Sync from SPIN branch 23/46923/2 tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/mobile/20150903.053605 accepted/tizen/tv/20150903.053717 accepted/tizen/wearable/20150903.053838 submit/tizen/20150903.021205 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
authorWootak Jung <wootak.jung@samsung.com>
Thu, 27 Aug 2015 08:19:13 +0000 (17:19 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 2 Sep 2015 02:27:12 +0000 (11:27 +0900)
Change-Id: I8380b64bb4ccb377ab1daba319c32962790c6a12

36 files changed:
CMakeLists.txt [changed mode: 0755->0644]
LICENSE
introspection/gen.sh
introspection/gps.xml [deleted file]
packaging/tel-plugin-dbus_tapi.spec [changed mode: 0755->0644]
src/call.c [deleted file]
src/desc-dtapi.c [new file with mode: 0644]
src/dtapi_call.c [new file with mode: 0644]
src/dtapi_common.c [moved from src/common.c with 82% similarity]
src/dtapi_common.h [moved from src/common.h with 89% similarity]
src/dtapi_main.c [moved from src/desc-dbus.c with 77% similarity]
src/dtapi_modem.c [moved from src/modem.c with 51% similarity]
src/dtapi_network.c [moved from src/network.c with 61% similarity]
src/dtapi_oem.c [moved from src/oem.c with 58% similarity]
src/dtapi_phonebook.c [moved from src/phonebook.c with 60% similarity]
src/dtapi_sap.c [new file with mode: 0644]
src/dtapi_sat.c [moved from src/sat.c with 55% similarity]
src/dtapi_sat_manager.c [moved from src/sat_manager.c with 99% similarity]
src/dtapi_sat_manager.h [moved from src/sat_manager.h with 99% similarity]
src/dtapi_sim.c [moved from src/sim.c with 53% similarity]
src/dtapi_sms.c [moved from src/sms.c with 50% similarity]
src/dtapi_ss.c [new file with mode: 0644]
src/gps.c [deleted file]
src/sap.c [deleted file]
src/sat_ui_support/TelCall.h [deleted file]
src/sat_ui_support/TelDefines.h [deleted file]
src/sat_ui_support/TelErr.h [deleted file]
src/sat_ui_support/TelSat.h [deleted file]
src/sat_ui_support/TelSatEnvelope.h [deleted file]
src/sat_ui_support/TelSatObj.h [deleted file]
src/sat_ui_support/TelSatProactvCmd.h [deleted file]
src/sat_ui_support/TelSim.h [deleted file]
src/sat_ui_support/TelSs.h [deleted file]
src/sat_ui_support/sat_ui_support.c
src/sat_ui_support/sat_ui_support.h
src/ss.c [deleted file]

old mode 100755 (executable)
new mode 100644 (file)
index 1f0a074..6e28f71
@@ -57,21 +57,21 @@ MESSAGE(${CMAKE_C_FLAGS})
 MESSAGE(${pkgs_LDFLAGS})
 
 SET(SRCS
-               src/desc-dbus.c
-               src/common.c
-               src/network.c
-               src/phonebook.c
-               src/sim.c
-               src/sap.c
-               src/sms.c
-               src/sat.c
-               src/sat_manager.c
-               src/sat_ui_support/sat_ui_support.c
-               src/ss.c
-               src/call.c
-               src/modem.c
-               src/gps.c
-               src/oem.c
+       src/desc-dtapi.c
+       src/dtapi_main.c
+       src/dtapi_common.c
+       src/dtapi_network.c
+       src/dtapi_phonebook.c
+       src/dtapi_sim.c
+       src/dtapi_sap.c
+       src/dtapi_sms.c
+       src/dtapi_sat.c
+       src/dtapi_sat_manager.c
+       src/sat_ui_support/sat_ui_support.c
+       src/dtapi_ss.c
+       src/dtapi_call.c
+       src/dtapi_modem.c
+       src/dtapi_oem.c
 )
 
 ADD_CUSTOM_COMMAND(
@@ -88,7 +88,6 @@ ADD_CUSTOM_COMMAND(
        ${INTROSPECTION}/call.xml
        ${INTROSPECTION}/ss.xml
        ${INTROSPECTION}/modem.xml
-       ${INTROSPECTION}/gps.xml
        ${INTROSPECTION}/oem.xml
        COMMENT "Generating GDBus .c/.h")
 
diff --git a/LICENSE b/LICENSE
index bae7f54..3d69259 100644 (file)
--- a/LICENSE
+++ b/LICENSE
-Copyright (c) 2000 - 2012 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
+Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
index 1c50ece..103beb6 100755 (executable)
@@ -3,4 +3,4 @@ gdbus-codegen --interface-prefix org.tizen.telephony. \
        --c-namespace Telephony                       \
        --c-generate-object-manager                 \
        --generate-docbook generated-docs                       \
-       manager.xml network.xml sim.xml phonebook.xml sat.xml sap.xml gps.xml oem.xml modem.xml ss.xml call.xml sms.xml
+       manager.xml network.xml sim.xml phonebook.xml sat.xml sap.xml oem.xml modem.xml ss.xml call.xml sms.xml
diff --git a/introspection/gps.xml b/introspection/gps.xml
deleted file mode 100644 (file)
index b1f29ec..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<node>
-       <!--
-               org.tizen.telephony.Gps:
-               @short_description: Tizen Telephony Gps interface
-
-               Gps interface.
-
-       -->
-       <interface name="org.tizen.telephony.Gps">
-               <method name="SetFrequencyAiding">
-                       <arg direction="in" type="y" name="state"/>
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="ConfirmMeasurePos">
-                       <arg direction="in" type="s" name="data"/>
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="EnableSmartAssistant">
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="DisableSmartAssistant">
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="SyncSmartAssistantAreaList">
-                       <arg direction="in" type="i" name="count"/>
-                       <arg direction="in" type="v" name="list"/>
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="DelSmartAssistantAreaList">
-                       <arg direction="in" type="i" name="count"/>
-                       <arg direction="in" type="v" name="list"/>
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="AddSmartAssistantArea">
-                       <arg direction="in" type="i" name="index"/>
-                       <arg direction="in" type="i" name="mode_state"/>
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="ModifySmartAssistantArea">
-                       <arg direction="in" type="i" name="index"/>
-                       <arg direction="in" type="i" name="mode_state"/>
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <method name="SetSmartAssistantInfo">
-                       <arg direction="in" type="i" name="index"/>
-                       <arg direction="in" type="i" name="lpp_state"/>
-                       <arg direction="out" type="i" name="result"/>
-               </method>
-               <signal name="AssistData">
-                       <arg type="s" name="data"/>
-               </signal>
-               <signal name="MeasurePosition">
-                       <arg type="s" name="data"/>
-               </signal>
-               <signal name="ResetAssistData">
-               </signal>
-               <signal name="FrequencyAiding">
-                       <arg type="s" name="data"/>
-               </signal>
-               <signal name="AreaStatus">
-                       <arg type="i" name="status"/>
-                       <arg type="i" name="index"/>
-               </signal>
-               <signal name="SyncStatus">
-                       <arg type="i" name="status"/>
-                       <arg type="i" name="cause"/>
-               </signal>
-       </interface>
-
-</node>
old mode 100755 (executable)
new mode 100644 (file)
index cff8b7e..38c34f4
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 3
-%define patchlevel 63
+%define patchlevel 64
 
 Name:           tel-plugin-dbus_tapi
 Version:        %{major}.%{minor}.%{patchlevel}
diff --git a/src/call.c b/src/call.c
deleted file mode 100644 (file)
index f9a5562..0000000
+++ /dev/null
@@ -1,1942 +0,0 @@
-/*
- * tel-plugin-dbus-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 <string.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <time.h>
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <aul.h>
-#include <appsvc.h>
-#include <app_manager.h>
-#include <bundle_internal.h>
-#include <tcore.h>
-#include <plugin.h>
-#include <server.h>
-#include <storage.h>
-#include <user_request.h>
-#include <core_object.h>
-#include <co_call.h>
-#include <communicator.h>
-
-#include "generated-code.h"
-#include "common.h"
-
-#ifdef TIZEN_PLATFORM_ALLOW_LAUNCH_CALLAPP /* do not allow to launch call app. Let call-manager do this */
-typedef struct {
-       struct tnoti_call_status_incoming *incoming;
-       enum dbus_tapi_sim_slot_id slot_id;
-} thread_cb_data;
-
-static gboolean __thread_dispatch(GMainContext *main_context, gint priority, GSourceFunc cb, gpointer data)
-{
-       GSource *request_source = NULL;
-
-       if (main_context == NULL || cb == NULL) {
-               err("Failed to dispatch");
-               return FALSE;
-       }
-
-       request_source = g_idle_source_new();
-       g_source_set_callback(request_source, cb, data, NULL);
-       g_source_set_priority(request_source, priority);
-       g_source_attach(request_source, main_context);
-       g_source_unref(request_source);
-
-       return TRUE;
-}
-
-static gboolean __thread_finish_cb(gpointer thread_data)
-{
-       dbg("Thread %p return is complete", thread_data);
-
-       g_thread_join(thread_data);
-
-       dbg("Clean up of thread %p is complete", thread_data);
-
-       return FALSE;
-}
-
-static gboolean __dispatch_on_new_thread(gchar *name, GThreadFunc thread_cb, gpointer thread_data)
-{
-       GThread *thread;
-       if (!name || !thread_cb) {
-               err("Wrong Input Parameter");
-               return FALSE;
-       }
-       thread = g_thread_new(name, thread_cb, thread_data);
-       if (thread == NULL)
-               return FALSE;
-       else
-               dbg("Thread %p is created for %s", thread, name);
-
-       return TRUE;
-}
-
-static gpointer _launch_voice_call(gpointer data)
-{
-       bool running = FALSE;
-       GThread* selfi = g_thread_self();
-
-       dbg("enter");
-       app_manager_is_running("org.tizen.call", &running);
-
-       if (running) {
-               dbg("call app is already running");
-       } else {
-               char handle[2] = {0, };
-               char cli[2] = {0, };
-               char clicause[3] = {0, };
-               char forward[2] = {0, };
-               char active_line[2] = {0, };
-               char cna[2] = {0, };
-               char number[83] = {0, };
-               char name[83] = {0, };
-               char slot_info[2] = {0,};
-
-               bundle *kb  = 0;
-               thread_cb_data *cb_data = (thread_cb_data *)data;
-
-               snprintf(handle, 2, "%d", cb_data->incoming->handle);
-               dbg("handle : [%s]", handle);
-               snprintf(cli, 2, "%d", cb_data->incoming->cli.mode);
-               dbg("cli : [%s]", cli);
-               snprintf(clicause, 3, "%d", cb_data->incoming->cli.no_cli_cause);
-               dbg("clicause : [%s]", clicause);
-               snprintf(number, 83, "%s", cb_data->incoming->cli.number);
-               dbg("number : [%s]", number);
-               snprintf(forward, 2, "%d", cb_data->incoming->forward);
-               dbg("forward : [%s]", forward);
-               snprintf(active_line, 2, "%d", cb_data->incoming->active_line);
-               dbg("active_line : [%s]", active_line);
-
-               if (cb_data->incoming->cna.mode == CALL_CNA_MODE_PRESENT)
-                       snprintf(cna, 2, "%d", 0);
-               else
-                       snprintf(cna, 2, "%d", 1);
-
-               dbg("cna : [%s]", cna);
-               snprintf(name, 83, "%s", cb_data->incoming->cna.name);
-               dbg("name : [%s]", name);
-
-               snprintf(slot_info, 2, "%d", cb_data->slot_id);
-               dbg("slot_id : [%s]", slot_info);
-
-
-               kb = bundle_create();
-
-               /* AppSvc */
-               /* appsvc_set_operation(kb, APPSVC_OPERATION_CALL); */
-               appsvc_set_pkgname(kb, "org.tizen.call");
-               appsvc_set_uri(kb, "tel:MT");
-
-               appsvc_add_data(kb, "launch-type", "MT");
-               appsvc_add_data(kb, "handle", handle);
-               appsvc_add_data(kb, "number", number);
-               appsvc_add_data(kb, "name_mode", cna);
-               appsvc_add_data(kb, "name", name);
-               appsvc_add_data(kb, "cli", cli);
-               appsvc_add_data(kb, "clicause", clicause);
-               appsvc_add_data(kb, "fwded", forward);
-               appsvc_add_data(kb, "activeline", active_line);
-               appsvc_add_data(kb, "slot_id", slot_info);
-
-               appsvc_run_service(kb, 0, NULL, NULL);
-               bundle_free(kb);
-               g_free(cb_data->incoming);
-               g_free(cb_data);
-       }
-
-       if (TRUE == __thread_dispatch(g_main_context_default(), G_PRIORITY_LOW, (GSourceFunc)__thread_finish_cb, selfi))
-               dbg("Thread %p processing is complete", selfi);
-
-       return NULL;
-}
-
-static gpointer _launch_video_call(gpointer data)
-{
-       bool running = FALSE;
-       GThread* selfi = g_thread_self();
-
-       dbg("enter");
-       app_manager_is_running("org.tizen.call", &running);
-
-       if (running) {
-               dbg("call app is already running");
-       } else {
-
-               char handle[2] = {0, };
-               char cli[2] = {0, };
-               char forward[2] = {0, };
-               char number[83] = {0, };
-               char slot_info[2] = {0,};
-               int ret = 0;
-
-               bundle *kb  = 0;
-               thread_cb_data *cb_data = (thread_cb_data *)data;
-
-               snprintf(handle, 2, "%d", cb_data->incoming->handle);
-               dbg("id : [%s]", handle);
-               snprintf(number, 83, "%s", cb_data->incoming->cli.number);
-               dbg("number : [%s]", number);
-               snprintf(cli, 2, "%d", cb_data->incoming->cli.mode);
-               dbg("cli : [%s]", cli);
-               snprintf(forward, 2, "%d", cb_data->incoming->forward);
-               dbg("forward : [%s]", forward);
-
-               snprintf(slot_info, 2, "%d", cb_data->slot_id);
-               dbg("slot_id : [%s]", slot_info);
-
-               kb = bundle_create();
-               bundle_add(kb, "KEY_CALL_TYPE", "mt");
-               bundle_add(kb, "KEY_CALL_HANDLE", handle);
-               bundle_add(kb, "KEY_CALLING_PARTY_NUMBER", number);
-               bundle_add(kb, "KEY_CLI_CAUSE", cli);
-               bundle_add(kb, "KEY_FORWARDED", forward);
-               bundle_add(kb, "KEY_SLOT_ID", slot_info);
-
-
-               ret = aul_launch_app("org.tizen.vtmain", kb);
-               bundle_free(kb);
-
-               dbg("VT AUL return %d", ret);
-
-               g_free(cb_data->incoming);
-               g_free(cb_data);
-       }
-
-       if (TRUE == __thread_dispatch(g_main_context_default(), G_PRIORITY_LOW, (GSourceFunc)__thread_finish_cb, selfi))
-               dbg("Thread %p processing is complete", selfi);
-
-       return NULL;
-}
-#endif
-
-static gboolean on_call_dial(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_type, gint call_ecc, gchar* call_number, gpointer user_data)
-{
-       struct treq_call_dial req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       memset(&req, 0x0, sizeof(req));
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.type = call_type;
-       req.ecc = call_ecc;
-
-       if (call_number)
-               g_strlcpy(req.number, call_number, MAX_CALL_DIAL_NUM_LEN);
-
-       dbg("[%s] dial len : %d, dial str : %s", GET_CP_NAME(invocation), strlen(req.number), req.number);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_dial), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_DIAL);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_answer(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gint answer_type, gpointer user_data)
-{
-       struct treq_call_answer req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       req.type = answer_type;
-
-       dbg("[%s] call handle : %d, type : %d", GET_CP_NAME(invocation), req.handle, req.type);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_answer), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_ANSWER);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_end(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gint end_type, gpointer user_data)
-{
-       struct treq_call_end req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       req.type = end_type;
-
-       dbg("[%s] call handle : %d, type : %d", GET_CP_NAME(invocation), req.handle, req.type);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_end), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_END);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_start_cont_dtmf(TelephonyCall *call, GDBusMethodInvocation *invocation, guchar dtmf_digit, gpointer user_data)
-{
-       struct treq_call_start_cont_dtmf  req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-       memset(&req, 0x0, sizeof(req));
-
-       req.dtmf_digit = dtmf_digit;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_start_cont_dtmf), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_START_CONT_DTMF);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_stop_cont_dtmf(TelephonyCall *call, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_CALL_STOP_CONT_DTMF);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_send_burst_dtmf(TelephonyCall *call, GDBusMethodInvocation *invocation, gchar *dtmf_string, gint pulse_width, gint inter_digit_interval, gpointer user_data)
-{
-       struct treq_call_send_burst_dtmf req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-       memset(&req, 0x0, sizeof(req));
-       if (dtmf_string) {
-               g_strlcpy(req.dtmf_string, dtmf_string, MAX_CALL_BURST_DTMF_STRING_LEN + 1);
-       } else {
-               FAIL_RESPONSE(invocation, "Invalid Input");
-               err("Invalid DTMF string");
-               tcore_user_request_unref(ur);
-               return TRUE;
-       }
-
-       req.pulse_width = pulse_width;
-       req.inter_digit_interval = inter_digit_interval;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_send_burst_dtmf), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SEND_BURST_DTMF);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               err("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_active(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gpointer user_data)
-{
-       struct treq_call_active req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       dbg("[%s] call handle : %d", GET_CP_NAME(invocation), req.handle);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_active), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_ACTIVE);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_hold(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gpointer user_data)
-{
-       struct treq_call_hold req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       dbg("[%s] call handle : %d", GET_CP_NAME(invocation), req.handle);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_hold), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_HOLD);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_swap(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gpointer user_data)
-{
-       struct treq_call_swap req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       dbg("[%s] call handle : %d", GET_CP_NAME(invocation), req.handle);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_swap), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SWAP);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_join(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gpointer user_data)
-{
-       struct treq_call_join req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       dbg("[%s] call handle : %d", GET_CP_NAME(invocation), req.handle);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_join), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_JOIN);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_split(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gpointer user_data)
-{
-       struct treq_call_split req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       dbg("[%s] call handle : %d", GET_CP_NAME(invocation), req.handle);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_split), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SPLIT);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_transfer(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gpointer user_data)
-{
-       struct treq_call_transfer req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       dbg("[%s] call handle : %d", GET_CP_NAME(invocation), req.handle);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_transfer), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_TRANSFER);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_deflect(TelephonyCall *call, GDBusMethodInvocation *invocation, gchar *call_number, gpointer user_data)
-{
-       struct treq_call_deflect req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       if (call_number)
-               g_strlcpy(req.number, call_number, MAX_CALL_DIAL_NUM_LEN);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_deflect), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_DEFLECT);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_get_privacy_mode(TelephonyCall *call, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-       tcore_user_request_set_command(ur, TREQ_CALL_GET_PRIVACY_MODE);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_privacy_mode(TelephonyCall *call, GDBusMethodInvocation *invocation, gint privacy_mode, gpointer user_data)
-{
-       struct treq_call_set_voice_privacy_mode req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.privacy_mode = privacy_mode;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_voice_privacy_mode), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_PRIVACY_MODE);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_get_status(TelephonyCall *call, GDBusMethodInvocation *invocation, gint call_handle, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       TcorePlugin *plugin = 0;
-       GSList *o_list = 0;
-       CoreObject *o = 0;
-       CallObject *co = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       gchar call_number[MAX_CALL_NUMBER_LEN];
-       gint call_type;
-       gboolean call_direction;
-       gint call_status;
-       gboolean call_multiparty_state;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
-               return TRUE;
-
-       plugin = tcore_server_find_plugin(ctx->server, GET_CP_NAME(invocation));
-
-       o_list = tcore_plugin_get_core_objects_bytype(plugin, CORE_OBJECT_TYPE_CALL);
-       if (!o_list) {
-               dbg("[ error ] co_list : 0");
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               return TRUE;
-       }
-
-       o = (CoreObject *)o_list->data;
-       g_slist_free(o_list);
-
-       co = tcore_call_object_find_by_handle(o, call_handle);
-       if (!co) {
-               dbg("[ error ] co : 0");
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               return TRUE;
-       }
-
-       memset(call_number, 0, MAX_CALL_NUMBER_LEN);
-       tcore_call_object_get_number(co, call_number);
-
-       call_type = tcore_call_object_get_type(co);
-       call_direction = tcore_call_object_get_direction(co);
-
-       if (call_direction == TCORE_CALL_DIRECTION_OUTGOING)
-               call_direction = TRUE;
-       else
-               call_direction = FALSE;
-
-       call_status = tcore_call_object_get_status(co);
-       call_multiparty_state = tcore_call_object_get_multiparty_state(co);
-       telephony_call_complete_get_status(call, invocation,
-                       call_handle, call_number, call_type, call_direction, call_status, call_multiparty_state);
-
-       return TRUE;
-}
-
-static gboolean on_call_get_status_all(TelephonyCall *call, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       TcorePlugin *plugin = 0;
-       GSList *list = 0;
-       CoreObject *o = 0;
-       CallObject *co = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       GVariant *gv = 0;
-       GVariantBuilder b;
-
-       gint call_id;
-       gint handle;
-       gchar call_number[MAX_CALL_NUMBER_LEN];
-       gint call_type;
-       gboolean call_direction;
-       gint call_status;
-       gboolean call_multiparty_state;
-
-       int len, i;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
-               return TRUE;
-
-       plugin = tcore_server_find_plugin(ctx->server, GET_CP_NAME(invocation));
-
-       list = tcore_plugin_get_core_objects_bytype(plugin, CORE_OBJECT_TYPE_CALL);
-       if (!list) {
-               dbg("[ error ] co_list : 0");
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               return TRUE;
-       }
-
-       o = (CoreObject *)list->data;
-       g_slist_free(list);
-
-       g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-#define MAX_CALL_STATUS_NUM 9
-       for (i = 0; i < MAX_CALL_STATUS_NUM; i++) {
-               list = tcore_call_object_find_by_status(o, i);
-
-               if (list) {
-                       GSList *tmp = 0;
-                       tmp = list;
-
-                       dbg("[%s][ call status ] there is  a call on state %s", GET_CP_NAME(invocation),
-                               (i == TCORE_CALL_STATUS_IDLE ? "(IDLE)" :
-                               (i == TCORE_CALL_STATUS_ACTIVE ? "(ACTIVE)" :
-                               (i == TCORE_CALL_STATUS_HELD ? "(HELD)" :
-                               (i == TCORE_CALL_STATUS_DIALING ? "(DIALING)" :
-                               (i == TCORE_CALL_STATUS_ALERT ? "(ALERT)" :
-                               (i == TCORE_CALL_STATUS_INCOMING ? "(INCOMING)" :
-                               (i == TCORE_CALL_STATUS_WAITING ? "(WAITING)" :
-                               (i == TCORE_CALL_STATUS_SETUP ? "(SETUP)" :
-                               (i == TCORE_CALL_STATUS_SETUP_PENDING ? "(SETUP_PENDING)" : "(UNKNOWN)"))))))))));
-
-                       while (tmp) {
-                               co = (CallObject*)tmp->data;
-                               if (!co) {
-                                       dbg("[ error ] call object : 0");
-                                       tmp = tmp->next;
-                                       continue;
-                               }
-
-                               handle = tcore_call_object_get_handle(co);
-                               call_id = tcore_call_object_get_id(co);
-
-                               memset(call_number, 0, MAX_CALL_NUMBER_LEN);
-                               len = tcore_call_object_get_number(co, call_number);
-                               if (!len)
-                                       dbg("[ check ] no number : (handle : 0x%d)", handle);
-
-                               call_type = tcore_call_object_get_type(co);
-                               call_direction = tcore_call_object_get_direction(co);
-
-                               if (call_direction == TCORE_CALL_DIRECTION_OUTGOING)
-                                       call_direction = TRUE;
-                               else
-                                       call_direction = FALSE;
-
-                               call_status = tcore_call_object_get_status(co);
-                               if ((TCORE_CALL_STATUS_SETUP == call_status) || (TCORE_CALL_STATUS_SETUP_PENDING == call_status)) {
-                                       dbg("SETUP/SETUP_PENDING found. This is already notified as dialing status to applicaiton, so change it to 'Dialing' ");
-                                       call_status = TCORE_CALL_STATUS_DIALING;
-                               }
-
-                               call_multiparty_state = tcore_call_object_get_multiparty_state(co);
-
-                               dbg("call_handle : (%d), call_id : (%d)", handle, call_id);
-                               dbg("call_number : (%s), len : (%d)", call_number, len);
-                               dbg("call_type : (%s), call_direction : (%s)",
-                                       call_type == TCORE_CALL_TYPE_VOICE ? "VOICE" :
-                                       (call_type == TCORE_CALL_TYPE_VIDEO ? "VIDEO" :
-                                       (call_type == TCORE_CALL_TYPE_E911 ? "E911" :
-                                       (call_type == TCORE_CALL_TYPE_STDOTASP ? "STDOTASP" :
-                                       (call_type == TCORE_CALL_TYPE_NONSTDOTASP ? "NONSTDOTASP" : "UNKNOWN")))),
-                                       call_direction == TRUE ? "MO" : "MT");
-                               dbg("call_status : (%s) , call_multiparty_state : (%s)",
-                                       call_status == TCORE_CALL_STATUS_IDLE ? "(IDLE)" :
-                                       (call_status == TCORE_CALL_STATUS_ACTIVE ? "(ACTIVE)" :
-                                       (call_status == TCORE_CALL_STATUS_HELD ? "(HELD)" :
-                                       (call_status == TCORE_CALL_STATUS_DIALING ? "(DIALING)" :
-                                       (call_status == TCORE_CALL_STATUS_ALERT ? "(ALERT)" :
-                                       (call_status == TCORE_CALL_STATUS_INCOMING ? "(INCOMING)" :
-                                       (call_status == TCORE_CALL_STATUS_WAITING ? "(WAITING)" :
-                                       (call_status == TCORE_CALL_STATUS_SETUP ? "(SETUP)" :
-                                       (call_status == TCORE_CALL_STATUS_SETUP_PENDING ? "(SETUP_PENDING)" : "(UNKNOWN)")))))))),
-                                       call_multiparty_state == 1 ? "T" : "F");
-
-                               g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                               g_variant_builder_add(&b, "{sv}", "call_id", g_variant_new_int32(handle));
-                               g_variant_builder_add(&b, "{sv}", "call_number", g_variant_new_string(call_number));
-                               g_variant_builder_add(&b, "{sv}", "call_type", g_variant_new_int32(call_type));
-                               g_variant_builder_add(&b, "{sv}", "call_direction", g_variant_new_boolean(call_direction));
-                               g_variant_builder_add(&b, "{sv}", "call_state", g_variant_new_int32(call_status));
-                               g_variant_builder_add(&b, "{sv}", "call_multiparty_state", g_variant_new_boolean(call_multiparty_state));
-                               g_variant_builder_close(&b);
-
-                               tmp = g_slist_next(tmp);
-                       }
-                       g_slist_free(list);
-               }
-       }
-
-       gv = g_variant_builder_end(&b);
-
-       telephony_call_complete_get_status_all(call, invocation, gv);
-
-       return TRUE;
-}
-
-static gboolean on_call_set_sound_path(TelephonyCall *call, GDBusMethodInvocation *invocation, gint sound_path, gboolean extra_volume_on, gpointer user_data)
-{
-       struct treq_call_set_sound_path req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.path = sound_path;
-       req.extra_volume_on = extra_volume_on;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_sound_path), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_SOUND_PATH);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_get_sound_volume_level(TelephonyCall *call, GDBusMethodInvocation *invocation, gint sound_device, gint sound_type, gpointer user_data)
-{
-       struct treq_call_get_sound_volume_level req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.device = sound_device;
-       req.sound = sound_type;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_get_sound_volume_level), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_GET_SOUND_VOLUME_LEVEL);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               GVariantBuilder b;
-               GVariant *result = 0;
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-               g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-               g_variant_builder_add(&b, "{sv}", "err", g_variant_new_int32(ret));
-               g_variant_builder_close(&b);
-               result = g_variant_builder_end(&b);
-
-               telephony_call_complete_get_sound_volume_level(call, invocation, result, ret);
-
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_sound_volume_level(TelephonyCall *call, GDBusMethodInvocation *invocation, gint sound_device, gint sound_type, gint sound_volume, gpointer user_data)
-{
-       struct treq_call_set_sound_volume_level req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.device = sound_device;
-       req.sound = sound_type;
-       req.volume = sound_volume;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_sound_volume_level), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_SOUND_VOLUME_LEVEL);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_get_sound_mute_status(TelephonyCall *call, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_CALL_GET_SOUND_MUTE_STATUS);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_sound_mute_status(TelephonyCall *call, GDBusMethodInvocation *invocation, gint status, gint path, gpointer user_data)
-{
-       struct treq_call_set_sound_mute_status req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.path = path;
-       req.status = status;
-
-       dbg("[%s] path : 0x%x, status : 0x%x", GET_CP_NAME(invocation), path, status);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_sound_mute_status), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_SOUND_MUTE_STATUS);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_sound_recording(TelephonyCall *call, GDBusMethodInvocation *invocation, gint recording_state, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       struct treq_call_set_sound_recording req;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.state = (gboolean)recording_state;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_sound_recording), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_SOUND_RECORDING);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_sound_equalization(TelephonyCall *call, GDBusMethodInvocation *invocation, gint eq_mode, gint eq_direction, gchar* eq_parameter, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       struct treq_call_set_sound_equalization req;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.mode = eq_mode;
-       req.direction = (enum telephony_call_sound_direction)eq_direction;
-       memcpy((char *)req.parameter, (const char *)eq_parameter, (MAX_CALL_EQ_PARAMETER_SIZE * 2));
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_sound_equalization), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_SOUND_EQUALIZATION);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_sound_noise_reduction(TelephonyCall *call, GDBusMethodInvocation *invocation, gint nr_state, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       struct treq_call_set_sound_noise_reduction req;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.status = (gboolean)nr_state;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_sound_noise_reduction), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_SOUND_NOISE_REDUCTION);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               telephony_call_complete_set_sound_noise_reduction(call, invocation, ret);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_sound_clock_status(TelephonyCall *call, GDBusMethodInvocation *invocation, gboolean clock_status, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       struct treq_call_set_sound_clock_status req;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.status = clock_status;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_sound_clock_status), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_SOUND_CLOCK_STATUS);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_set_preferred_voice_subscription(TelephonyCall *call, GDBusMethodInvocation *invocation,
-       gint preferred_subscription, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       struct treq_call_set_preferred_voice_subscription req;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.preferred_subs = preferred_subscription;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_set_preferred_voice_subscription), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_SET_PREFERRED_VOICE_SUBSCRIPTION);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_get_preferred_voice_subscription(TelephonyCall *call, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_CALL_GET_PREFERRED_VOICE_SUBSCRIPTION);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_modify(TelephonyCall *call,
-       GDBusMethodInvocation *invocation,
-       gint call_handle, gint call_type, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       struct treq_call_modify req = {0};
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       req.call_type = call_type;
-
-       dbg("[%s] call handle : %d, call_type : %d", GET_CP_NAME(invocation), req.handle, req.call_type);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_modify), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_MODIFY);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_call_confirm_modify(TelephonyCall *call,
-       GDBusMethodInvocation *invocation,
-       gint call_handle, gint confirm_type, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       struct treq_call_confirm_modify req = {0};
-       UserRequest *ur;
-       TReturn ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, call, invocation);
-
-       req.handle = call_handle;
-       req.confirm_type = confirm_type;
-
-       dbg("[%s] call handle : %d, confirm_type : %d", GET_CP_NAME(invocation), req.handle, req.confirm_type);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_call_confirm_modify), &req);
-       tcore_user_request_set_command(ur, TREQ_CALL_CONFIRM_MODIFY);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_setup_call_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
-{
-       TelephonyCall *call;
-
-       call = telephony_call_skeleton_new();
-       telephony_object_skeleton_set_call(object, call);
-       g_object_unref(call);
-
-       g_signal_connect(call,
-               "handle-dial",
-               G_CALLBACK(on_call_dial), ctx);
-
-       g_signal_connect(call,
-               "handle-answer",
-               G_CALLBACK(on_call_answer), ctx);
-
-       g_signal_connect(call,
-               "handle-end",
-               G_CALLBACK(on_call_end), ctx);
-
-       g_signal_connect(call,
-               "handle-start-cont-dtmf",
-               G_CALLBACK(on_call_start_cont_dtmf), ctx);
-
-       g_signal_connect(call,
-               "handle-stop-cont-dtmf",
-               G_CALLBACK(on_call_stop_cont_dtmf), ctx);
-
-       g_signal_connect(call,
-               "handle-send-burst-dtmf",
-               G_CALLBACK(on_call_send_burst_dtmf), ctx);
-
-       g_signal_connect(call,
-               "handle-active",
-               G_CALLBACK(on_call_active), ctx);
-
-       g_signal_connect(call,
-               "handle-hold",
-               G_CALLBACK(on_call_hold), ctx);
-
-       g_signal_connect(call,
-               "handle-swap",
-               G_CALLBACK(on_call_swap), ctx);
-
-       g_signal_connect(call,
-               "handle-join",
-               G_CALLBACK(on_call_join), ctx);
-
-       g_signal_connect(call,
-               "handle-split",
-               G_CALLBACK(on_call_split), ctx);
-
-       g_signal_connect(call,
-               "handle-transfer",
-               G_CALLBACK(on_call_transfer), ctx);
-
-       g_signal_connect(call,
-               "handle-deflect",
-               G_CALLBACK(on_call_deflect), ctx);
-
-       g_signal_connect(call,
-               "handle-get-privacy-mode",
-               G_CALLBACK(on_call_get_privacy_mode), ctx);
-
-       g_signal_connect(call,
-               "handle-set-privacy-mode",
-               G_CALLBACK(on_call_set_privacy_mode), ctx);
-
-       g_signal_connect(call,
-               "handle-get-status",
-               G_CALLBACK(on_call_get_status), ctx);
-
-       g_signal_connect(call,
-               "handle-get-status-all",
-               G_CALLBACK(on_call_get_status_all), ctx);
-
-       g_signal_connect(call,
-               "handle-set-sound-path",
-               G_CALLBACK(on_call_set_sound_path), ctx);
-
-       g_signal_connect(call,
-               "handle-get-sound-volume-level",
-               G_CALLBACK(on_call_get_sound_volume_level), ctx);
-
-       g_signal_connect(call,
-               "handle-set-sound-volume-level",
-               G_CALLBACK(on_call_set_sound_volume_level), ctx);
-
-       g_signal_connect(call,
-               "handle-get-sound-mute-status",
-               G_CALLBACK(on_call_get_sound_mute_status), ctx);
-
-       g_signal_connect(call,
-               "handle-set-sound-mute-status",
-               G_CALLBACK(on_call_set_sound_mute_status), ctx);
-
-       g_signal_connect(call,
-               "handle-set-sound-recording",
-               G_CALLBACK(on_call_set_sound_recording), ctx);
-
-       g_signal_connect(call,
-               "handle-set-sound-equalization",
-               G_CALLBACK(on_call_set_sound_equalization), ctx);
-
-       g_signal_connect(call,
-               "handle-set-sound-noise-reduction",
-               G_CALLBACK(on_call_set_sound_noise_reduction), ctx);
-
-       g_signal_connect(call,
-               "handle-set-sound-clock-status",
-               G_CALLBACK(on_call_set_sound_clock_status), ctx);
-
-       g_signal_connect(call,
-               "handle-set-preferred-voice-subscription",
-               G_CALLBACK(on_call_set_preferred_voice_subscription), ctx);
-
-       g_signal_connect(call,
-               "handle-get-preferred-voice-subscription",
-               G_CALLBACK(on_call_get_preferred_voice_subscription), ctx);
-
-       g_signal_connect(call,
-               "handle-modify",
-               G_CALLBACK(on_call_modify), ctx);
-
-       g_signal_connect(call,
-               "handle-confirm-modify",
-               G_CALLBACK(on_call_confirm_modify), ctx);
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_call_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data)
-{
-       char *cpname = dbus_info ? GET_CP_NAME(dbus_info->invocation) : "";
-
-       switch (command) {
-       case TRESP_CALL_DIAL: {
-               struct tresp_call_dial *resp = (struct tresp_call_dial*)data;
-
-               dbg("[%s] DIAL (err[%d])", cpname, resp->err);
-
-               telephony_call_complete_dial(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_ANSWER: {
-               struct tresp_call_answer *resp = (struct tresp_call_answer*)data;
-
-               dbg("[%s] ANSWER (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_answer(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle);
-       } break;
-
-       case TRESP_CALL_END: {
-               struct tresp_call_end *resp = (struct tresp_call_end*)data;
-
-               dbg("[%s] END (err[%d] call_handle[%d] type[%d])", cpname, resp->err, resp->handle, resp->type);
-
-               telephony_call_complete_end(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle, resp->type);
-       } break;
-
-       case TRESP_CALL_HOLD: {
-               struct tresp_call_hold *resp = (struct tresp_call_hold*)data;
-
-               dbg("[%s] HOLD (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_hold(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle);
-       } break;
-
-       case TRESP_CALL_ACTIVE: {
-               struct tresp_call_active *resp = (struct tresp_call_active*)data;
-
-               dbg("[%s] ACTIVE (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_active(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle);
-       } break;
-
-       case TRESP_CALL_SWAP: {
-               struct tresp_call_swap *resp = (struct tresp_call_swap*)data;
-
-               dbg("[%s] SWAP (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_swap(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle);
-       } break;
-
-       case TRESP_CALL_JOIN: {
-               struct tresp_call_join *resp = (struct tresp_call_join*)data;
-
-               dbg("[%s] JOIN (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_join(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle);
-       } break;
-
-       case TRESP_CALL_SPLIT: {
-               struct tresp_call_split *resp = (struct tresp_call_split*)data;
-
-               dbg("[%s] SPLIT (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_split(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle);
-       } break;
-
-       case TRESP_CALL_DEFLECT: {
-               struct tresp_call_deflect *resp = (struct tresp_call_deflect*)data;
-
-               dbg("[%s] DEFLECT (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_deflect(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_TRANSFER: {
-               struct tresp_call_transfer *resp = (struct tresp_call_transfer*)data;
-
-               dbg("[%s] TRANSFER (err[%d] call_handle[%d])", cpname, resp->err, resp->handle);
-
-               telephony_call_complete_transfer(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->handle);
-       } break;
-
-       case TRESP_CALL_START_CONT_DTMF: {
-               struct tresp_call_dtmf *resp = (struct tresp_call_dtmf*)data;
-
-               dbg("[%s] START_CONT_DTMF (err[%d])", cpname, resp->err);
-
-               telephony_call_complete_start_cont_dtmf(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_STOP_CONT_DTMF: {
-               struct tresp_call_dtmf *resp = (struct tresp_call_dtmf*)data;
-
-               dbg("[%s] STOP_CONT_DTMF (err[%d])", cpname, resp->err);
-
-               telephony_call_complete_stop_cont_dtmf(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_SEND_BURST_DTMF: {
-               struct tresp_call_dtmf *resp = (struct tresp_call_dtmf*)data;
-
-               dbg("[%s] SEND_BURST_DTMF (err[%d])", cpname, resp->err);
-
-               telephony_call_complete_send_burst_dtmf(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_GET_PRIVACY_MODE: {
-               struct tresp_call_get_voice_privacy_mode *resp = (struct tresp_call_get_voice_privacy_mode*)data;
-
-               dbg("[%s] GET_PRIVACY_MODE (err[%d] mode[%d])", cpname, resp->err, resp->privacy_mode);
-
-               telephony_call_complete_get_privacy_mode(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->privacy_mode);
-       } break;
-
-       case TRESP_CALL_SET_PRIVACY_MODE: {
-               struct tresp_call_set_voice_privacy_mode *resp = (struct tresp_call_set_voice_privacy_mode *)data;
-
-               dbg("[%s] SET_PRIVACY_MODE (err[%d])", cpname, resp->err);
-
-               telephony_call_complete_set_privacy_mode(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_SET_SOUND_PATH: {
-               struct tresp_call_set_sound_path *resp = (struct tresp_call_set_sound_path*)data;
-
-               dbg("[%s] SET_SOUND_PATH (err[%d])", cpname, resp->err);
-
-               telephony_call_complete_set_sound_path(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_SET_SOUND_VOLUME_LEVEL: {
-               struct tresp_call_set_sound_volume_level *resp = (struct tresp_call_set_sound_volume_level*)data;
-
-               dbg("[%s] SET_SOUND_VOLUME_LEVEL (err[%d])", cpname, resp->err);
-
-               telephony_call_complete_set_sound_volume_level(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_GET_SOUND_VOLUME_LEVEL: {
-               struct tresp_call_get_sound_volume_level *resp = (struct tresp_call_get_sound_volume_level*)data;
-               GVariant *result = 0;
-               GVariantBuilder b;
-               int i = 0;
-
-               dbg("[%s] GET_SOUND_VOLUME_LEVEL (err[%d])", cpname, resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-
-               g_variant_builder_add(&b, "{sv}", "err", g_variant_new_int32(resp->err));
-
-               if (!resp->err) {
-                       dbg("resp->record_num : [%d]", resp->record_num);
-
-                       for (i = 0; i < resp->record_num; i++) {
-                               dbg("sound_type : [%d], level:[%d]", resp->record[i].sound, resp->record[i].volume);
-                               g_variant_builder_add(&b, "{sv}", "type", g_variant_new_int32(resp->record[i].sound));
-                               g_variant_builder_add(&b, "{sv}", "level", g_variant_new_int32(resp->record[i].volume));
-                       }
-               }
-
-               g_variant_builder_close(&b);
-
-               result = g_variant_builder_end(&b);
-
-               telephony_call_complete_get_sound_volume_level(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_CALL_SET_SOUND_MUTE_STATUS: {
-               struct tresp_call_set_sound_mute_status *resp = (struct tresp_call_set_sound_mute_status*)data;
-
-               dbg("[%s] SET_SOUND_MUTE_STATUS (err[%d])", cpname, resp->err);
-               telephony_call_complete_set_sound_mute_status(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_GET_SOUND_MUTE_STATUS: {
-               struct tresp_call_get_sound_mute_status *resp = (struct tresp_call_get_sound_mute_status*)data;
-
-               dbg("[%s] GET_SOUND_MUTE_STATUS (err[%d] path[%d] status[%d])",
-                       cpname, resp->err, resp->path, resp->status);
-               telephony_call_complete_get_sound_mute_status(dbus_info->interface_object, dbus_info->invocation, resp->err, resp->path, resp->status);
-
-       } break;
-
-       case TRESP_CALL_SET_SOUND_RECORDING: {
-               struct tresp_call_set_sound_recording *resp = (struct tresp_call_set_sound_recording*)data;
-               telephony_call_complete_set_sound_recording(dbus_info->interface_object, dbus_info->invocation, resp->err);
-
-       } break;
-
-       case TRESP_CALL_SET_SOUND_EQUALIZATION: {
-               struct tresp_call_set_sound_equalization *resp = (struct tresp_call_set_sound_equalization*)data;
-               telephony_call_complete_set_sound_equalization(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_SET_SOUND_NOISE_REDUCTION: {
-               struct tresp_call_set_sound_noise_reduction *resp = (struct tresp_call_set_sound_noise_reduction*)data;
-               telephony_call_complete_set_sound_noise_reduction(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_SET_SOUND_CLOCK_STATUS: {
-               struct tresp_call_set_sound_clock_status *resp = (struct tresp_call_set_sound_clock_status*)data;
-               telephony_call_complete_set_sound_clock_status(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_SET_PREFERRED_VOICE_SUBSCRIPTION: {
-               struct tresp_call_set_preferred_voice_subscription *resp = (struct tresp_call_set_preferred_voice_subscription*)data;
-               telephony_call_complete_set_preferred_voice_subscription(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_GET_PREFERRED_VOICE_SUBSCRIPTION: {
-               struct tresp_call_get_preferred_voice_subscription *resp = (struct tresp_call_get_preferred_voice_subscription*)data;
-               telephony_call_complete_get_preferred_voice_subscription(dbus_info->interface_object, dbus_info->invocation,
-                       resp->preferred_subs, resp->err);
-       } break;
-
-       case TRESP_CALL_MODIFY: {
-               const struct tresp_call_modify *resp = data;
-               telephony_call_complete_modify(dbus_info->interface_object,
-                       dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_CALL_CONFIRM_MODIFY: {
-               const struct tresp_call_confirm_modify *resp = data;
-               telephony_call_complete_confirm_modify(dbus_info->interface_object,
-                       dbus_info->invocation, resp->err);
-       } break;
-
-       default:
-               dbg("not handled command[%d]", command);
-       break;
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_call_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data)
-{
-       TelephonyCall *call;
-       char *cp_name;
-
-       if (!object) {
-               dbg("object is 0");
-               return FALSE;
-       }
-       if (!data) {
-               err("data is NULL");
-               return FALSE;
-       }
-       cp_name = (char *)tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
-
-       call = telephony_object_peek_call(TELEPHONY_OBJECT(object));
-       if (call == NULL) {
-               err("call object is NULL!!!");
-               return FALSE;
-       }
-
-       switch (command) {
-       case TNOTI_CALL_STATUS_IDLE: {
-               struct tnoti_call_status_idle *idle = (struct tnoti_call_status_idle*)data;
-
-               if (idle->type != CALL_TYPE_VIDEO) {
-                       dbg("[%s][ call status ]: idle (voice call)", cp_name);
-                       telephony_call_emit_voice_call_status_idle(call, idle->handle, idle->cause, 0, 0);
-               } else {
-                       dbg("[%s][ call status ]: idle (video call)", cp_name);
-                       telephony_call_emit_video_call_status_idle(call, idle->handle, idle->cause, 0, 0);
-               }
-       } break;
-
-       case TNOTI_CALL_STATUS_DIALING: {
-               struct tnoti_call_status_dialing *dialing = (struct tnoti_call_status_dialing*)data;
-
-               if (dialing->type != CALL_TYPE_VIDEO) {
-                       dbg("[%s][ call status ]: dialing (type[%d] call_handle[%d]) (voice call)", cp_name, dialing->type, dialing->handle);
-                       telephony_call_emit_voice_call_status_dialing(call, dialing->handle);
-               } else {
-                       dbg("[%s][ call status ]: dialing (type[%d] call_handle[%d]) (video call)", cp_name, dialing->type, dialing->handle);
-                       telephony_call_emit_video_call_status_dialing(call, dialing->handle);
-               }
-       } break;
-
-       case TNOTI_CALL_STATUS_ALERT: {
-               struct tnoti_call_status_alert *alert = (struct tnoti_call_status_alert*)data;
-
-               if (alert->type != CALL_TYPE_VIDEO) {
-                       dbg("[%s][ call status ]: alert (voice call) call_handle[%d]", cp_name, alert->handle);
-                       telephony_call_emit_voice_call_status_alert(call, alert->handle);
-               } else {
-                       dbg("[%s][ call status ]: alert (video call) call_handle[%d]", cp_name, alert->handle);
-                       telephony_call_emit_video_call_status_alert(call, alert->handle);
-               }
-       } break;
-
-       case TNOTI_CALL_STATUS_ACTIVE: {
-               struct tnoti_call_status_active *active = (struct tnoti_call_status_active*)data;
-
-               if (active->type != CALL_TYPE_VIDEO) {
-                       dbg("[%s][ call status ]: active (voice call) call_handle[%d]", cp_name, active->handle);
-                       telephony_call_emit_voice_call_status_active(call, active->handle);
-               } else {
-                       dbg("[%s][ call status ]: active (video call) call_handle[%d]", cp_name, active->handle);
-                       telephony_call_emit_video_call_status_active(call, active->handle);
-               }
-       } break;
-
-       case TNOTI_CALL_STATUS_HELD: {
-               struct tnoti_call_status_held *held = (struct tnoti_call_status_held*)data;
-
-               dbg("[%s][ call status ]: held, call_handle[%d]", cp_name, held->handle);
-               telephony_call_emit_voice_call_status_held(call, held->handle);
-       } break;
-
-       case TNOTI_CALL_STATUS_INCOMING: {
-               const struct tnoti_call_status_incoming *incoming_data = data;
-#ifdef TIZEN_PLATFORM_ALLOW_LAUNCH_CALLAPP /* do not allow to launch call app. Let call-manager do this */
-               thread_cb_data *cb_data;
-
-               cb_data = g_try_malloc0(sizeof(thread_cb_data));
-               if (!cb_data) {
-                       err("Memory allocation failed");
-                       return FALSE;
-               }
-               cb_data->slot_id = get_sim_slot_id_by_cp_name(cp_name);
-               cb_data->incoming = g_try_malloc0(sizeof(struct tnoti_call_status_incoming));
-
-               if (!cb_data->incoming) {
-                       err("Memory allocation failed");
-                       g_free(cb_data);
-                       return FALSE;
-               }
-               memcpy(cb_data->incoming, incoming_data, sizeof(struct tnoti_call_status_incoming));
-#endif
-               if (incoming_data->type != CALL_TYPE_VIDEO) {
-                       dbg("[%s][ call status ]: incoming (voice call) call_handle[%d]", cp_name, incoming_data->handle);
-                       telephony_call_emit_voice_call_status_incoming(call,
-                               incoming_data->handle,
-                               incoming_data->cli.mode,
-                               incoming_data->cli.no_cli_cause,
-                               incoming_data->cli.number,
-                               incoming_data->forward,
-                               incoming_data->active_line,
-                               incoming_data->cna.name);
-
-#ifdef TIZEN_PLATFORM_ALLOW_LAUNCH_CALLAPP /* do not allow to launch call app. Let call-manager do this */
-                       if (FALSE == __dispatch_on_new_thread("Voice Call",
-                                       _launch_voice_call, cb_data)) {
-                               err("Failed to launch Voice Call App");
-                               g_free(cb_data->incoming);
-                               g_free(cb_data);
-                       }
-#endif
-               } else {
-                       dbg("[%s][ call status ]: incoming (video call) call_handle[%d]", cp_name, incoming_data->handle);
-                       telephony_call_emit_video_call_status_incoming(call,
-                               incoming_data->handle,
-                               incoming_data->cli.mode,
-                               incoming_data->cli.no_cli_cause,
-                               incoming_data->cli.number,
-                               incoming_data->forward,
-                               incoming_data->active_line,
-                               incoming_data->cna.name);
-
-#ifdef TIZEN_PLATFORM_ALLOW_LAUNCH_CALLAPP /* do not allow to launch call app. Let call-manager do this */
-                       if (FALSE == __dispatch_on_new_thread("Video Call",
-                                       _launch_video_call, cb_data)) {
-                               err("Failed to launch Video call App");
-                               g_free(cb_data->incoming);
-                               g_free(cb_data);
-                       }
-#endif
-               }
-       } break;
-
-       case TNOTI_CALL_INFO_WAITING: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_WAITING : (%d)", cp_name, *id);
-               telephony_call_emit_waiting(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_FORWARDED: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_FORWARDED : (%d)", cp_name, *id);
-               telephony_call_emit_forwarded(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_FORWARDED_CALL: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_FORWARDED_CALL : (%d)", cp_name, *id);
-               telephony_call_emit_forwarded_call(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_BARRED_INCOMING: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_BARRED_INCOMING : (%d)", cp_name, *id);
-               telephony_call_emit_barred_incoming(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_BARRED_OUTGOING: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_BARRED_OUTGOING : (%d)", cp_name, *id);
-               telephony_call_emit_barred_outgoing(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_FORWARD_CONDITIONAL: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_FORWARD_CONDITIONAL : (%d)", cp_name, *id);
-               telephony_call_emit_forward_conditional(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_FORWARD_UNCONDITIONAL: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_FORWARD_UNCONDITIONAL : (%d)", cp_name, *id);
-               telephony_call_emit_forward_unconditional(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_HELD: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_HELD : (%d)", cp_name, *id);
-               telephony_call_emit_call_held(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_ACTIVE: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_ACTIVE : (%d)", cp_name, *id);
-               telephony_call_emit_call_active(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_JOINED: {
-               int *id = (int*)data;
-
-               dbg("[%s] CALL_INFO_JOINED : (%d)", cp_name, *id);
-               telephony_call_emit_call_joined(call, (gint)*id);
-       } break;
-
-       case TNOTI_CALL_INFO_PRIVACY_MODE: {
-               struct tnoti_call_info_voice_privacy_mode *privacy_info = (struct tnoti_call_info_voice_privacy_mode*)data;
-
-               dbg("[%s] CALL_INFO_PRIVACY_MODE : privacy mode(%d) ", cp_name, privacy_info->privacy_mode);
-               telephony_call_emit_call_privacy_mode(call, privacy_info->privacy_mode);
-       } break;
-
-       case TNOTI_CALL_OTASP_STATUS: {
-               struct tnoti_call_otasp_status  *otasp = (struct tnoti_call_otasp_status *)data;
-
-               dbg("[%s] CALL_OTASP_STATUS : status(%d)", cp_name, otasp->otasp_status);
-               telephony_call_emit_call_otasp_status(call, otasp->otasp_status);
-       } break;
-
-       case TNOTI_CALL_OTAPA_STATUS: {
-               struct tnoti_call_otapa_status  *otapa = (struct tnoti_call_otapa_status *)data;
-
-               dbg("[%s] CALL_OTAPA_STATUS : status(%d)", cp_name, otapa->otapa_status);
-               telephony_call_emit_call_otapa_status(call, otapa->otapa_status);
-       } break;
-
-       case TNOTI_CALL_SIGNAL_INFO: {
-               struct tnoti_call_signal_info *sig_info = (struct tnoti_call_signal_info *)data;
-               unsigned int signal;
-               if (sig_info->signal_type == CALL_SIGNAL_TYPE_TONE) {
-                       signal = sig_info->signal.sig_tone_type;
-               } else if (sig_info->signal_type == CALL_SIGNAL_TYPE_ISDN_ALERTING) {
-                       signal = sig_info->signal.sig_isdn_alert_type;
-               } else if (sig_info->signal_type == CALL_SIGNAL_TYPE_IS54B_ALERTING) {
-                       signal = sig_info->signal.sig_is54b_alert_type;
-               } else {
-                       err("Unknown Signal type");
-                       return FALSE;
-               }
-               dbg("[%s] CALL_SIGNAL_INFO : Signal type (%d), Pitch type (%d), Signal (%d)",
-                       cp_name, sig_info->signal_type, sig_info->pitch_type, signal);
-               telephony_call_emit_call_signal_info(call, sig_info->signal_type, sig_info->pitch_type, signal);
-       } break;
-
-       case TNOTI_CALL_INFO_REC: {
-               struct tnoti_call_info_rec *noti = (struct tnoti_call_info_rec *)data;
-               gchar *param = NULL;
-               if (noti->rec_info.type == CALL_REC_NAME_INFO) {
-                       param = g_strdup(noti->rec_info.data.name);
-               } else if (noti->rec_info.type == CALL_REC_NUMBER_INFO) {
-                       param = g_strdup(noti->rec_info.data.number);
-               } else {
-                       err("Unknown rec info type (%d)", noti->rec_info.type);
-                       return FALSE;
-               }
-               dbg("[%s] CALL_INFO_REC : id:(%d) type:(%d), param:(%s)",
-                       cp_name, noti->rec_info.handle, noti->rec_info.type, param);
-               telephony_call_emit_call_info_rec(call, noti->rec_info.handle, noti->rec_info.type, param);
-               g_free(param);
-       } break;
-
-       case TNOTI_CALL_SOUND_PATH: {
-               struct tnoti_call_sound_path *noti = (struct tnoti_call_sound_path*)data;
-               telephony_call_emit_call_sound_path(call, noti->path);
-       } break;
-
-       case TNOTI_CALL_SOUND_RINGBACK_TONE: {
-               struct tnoti_call_sound_ringback_tone *noti = (struct tnoti_call_sound_ringback_tone*)data;
-               telephony_call_emit_call_sound_ringback_tone(call, (gint)noti->status);
-       } break;
-
-       case TNOTI_CALL_SOUND_WBAMR: {
-               struct tnoti_call_sound_wbamr *noti = (struct tnoti_call_sound_wbamr*)data;
-               telephony_call_emit_call_sound_wbamr(call, (gint)noti->status);
-       } break;
-
-       case TNOTI_CALL_SOUND_EQUALIZATION: {
-               struct tnoti_call_sound_equalization *noti = (struct tnoti_call_sound_equalization*)data;
-               telephony_call_emit_call_sound_equalization(call, (gint)noti->mode, (gint)noti->direction);
-       } break;
-
-       case TNOTI_CALL_SOUND_NOISE_REDUCTION: {
-               struct tnoti_call_sound_noise_reduction *noti = (struct tnoti_call_sound_noise_reduction*)data;
-               telephony_call_emit_call_sound_noise_reduction(call, (gint)noti->status);
-       } break;
-
-       case TNOTI_CALL_SOUND_CLOCK_STATUS: {
-               struct tnoti_call_sound_clock_status *noti = (struct tnoti_call_sound_clock_status*)data;
-               telephony_call_emit_call_sound_clock_status(call, noti->status);
-       } break;
-
-       case TNOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION: {
-               struct tnoti_call_preferred_voice_subscription *noti = (struct tnoti_call_preferred_voice_subscription*)data;
-               telephony_call_emit_call_preferred_voice_subscription(call, noti->preferred_subs);
-       } break;
-
-       case TNOTI_CALL_MODIFY_REQUEST: {
-               const struct tnoti_call_modify_request *noti = data;
-               telephony_call_emit_call_modify_request(call, noti->handle, noti->call_type);
-       } break;
-
-       case TNOTI_CALL_INFO_FALLBACK:{
-               struct tnoti_call_fallback* noti = (struct tnoti_call_fallback*)data;
-               telephony_call_emit_call_fallback(call, noti->handle, noti->fallback_to);
-       } break;
-
-       default:
-               dbg("not handled command[%d]", command);
-       break;
-       }
-
-       return TRUE;
-}
diff --git a/src/desc-dtapi.c b/src/desc-dtapi.c
new file mode 100644 (file)
index 0000000..f1d4c43
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * tel-plugin-dbus-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 <glib.h>
+
+#include <tcore.h>
+#include <plugin.h>
+
+#include "dtapi_common.h"
+
+#ifndef PLUGIN_VERSION
+#define PLUGIN_VERSION 1
+#endif
+
+static gboolean on_load()
+{
+       dbg("i'm load!");
+
+       return TRUE;
+}
+
+static gboolean on_init(TcorePlugin *p)
+{
+       gboolean ret;
+
+       dbg("i'm init!");
+
+       if (!p)
+               return FALSE;
+
+       ret = dtapi_init(p);
+       dbg("DTAPI initialization: [%s]", (ret == TRUE ? "Successful" : "Fail"));
+
+       return ret;
+}
+
+static void on_unload(TcorePlugin *p)
+{
+       dbg("i'm unload");
+
+       if (!p)
+               return;
+
+       dtapi_deinit(p);
+}
+
+/* DBUS Communicator descriptor */
+EXPORT_API struct tcore_plugin_define_desc plugin_define_desc = {
+       .name = "NEW_DBUS_COMMUNICATOR",
+       .priority = TCORE_PLUGIN_PRIORITY_HIGH,
+       .version = PLUGIN_VERSION,
+       .load = on_load,
+       .init = on_init,
+       .unload = on_unload
+};
diff --git a/src/dtapi_call.c b/src/dtapi_call.c
new file mode 100644 (file)
index 0000000..330125d
--- /dev/null
@@ -0,0 +1,1779 @@
+/*
+ * tel-plugin-dbus-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 <string.h>
+#include <stdlib.h>
+
+#include <glib.h>
+
+#include <tcore.h>
+#include <plugin.h>
+#include <server.h>
+#include <co_call.h>
+
+#include "generated-code.h"
+#include "dtapi_common.h"
+
+static gboolean on_call_dial(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_type, gint call_ecc, gchar *call_number,
+       gpointer user_data)
+{
+       struct treq_call_dial req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       memset(&req, 0x0, sizeof(req));
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.type = call_type;
+       req.ecc = call_ecc;
+
+       if (call_number)
+               g_strlcpy(req.number, call_number, MAX_CALL_DIAL_NUM_LEN);
+
+       dbg("[%s] Dial number len: [%d] Dial number: [%s]",
+               GET_CP_NAME(invocation), strlen(req.number), req.number);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_DIAL,
+               &req, sizeof(struct treq_call_dial));
+
+       return TRUE;
+}
+
+static gboolean on_call_answer(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gint answer_type, gpointer user_data)
+{
+       struct treq_call_answer req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+       req.type = answer_type;
+
+       dbg("[%s] Call handle: [%d] Answer type: [%s]",
+               GET_CP_NAME(invocation), req.handle,
+               (req.type == CALL_ANSWER_TYPE_ACCEPT ? "ACCEPT" :
+               (req.type == CALL_ANSWER_TYPE_REJECT ? "REJECT" :
+               (req.type == CALL_ANSWER_TYPE_REPLACE ? "REPLACE" :
+               (req.type == CALL_ANSWER_TYPE_HOLD_ACCEPT ? "HOLD & ACCEPT" :
+               "UNKNOWN OPERATION")))));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_ANSWER,
+               &req, sizeof(struct treq_call_answer));
+
+       return TRUE;
+}
+
+static gboolean on_call_end(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gint end_type, gpointer user_data)
+{
+       struct treq_call_end req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+       req.type = end_type;
+
+       dbg("[%s] Call handle: [%d] End type: [%s]",
+               GET_CP_NAME(invocation), req.handle,
+               (req.type == CALL_END_TYPE_ALL ? "END ALL" :
+               (req.type == CALL_END_TYPE_ACTIVE_ALL ? "END ALL ACTIVE" :
+               (req.type == CALL_END_TYPE_HOLD_ALL ? "END ALL HELD" :
+               (req.type == CALL_END_TYPE_DEFAULT ? "END SPECIFIC" :
+               "UNKNOWN OPERATION")))));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_END, &req, sizeof(struct treq_call_end));
+
+       return TRUE;
+}
+
+static gboolean on_call_start_cont_dtmf(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       guchar dtmf_digit, gpointer user_data)
+{
+       struct treq_call_start_cont_dtmf  req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(req));
+
+       req.dtmf_digit = dtmf_digit;
+
+       dbg("[%s] DTMF Digit: [%c]", GET_CP_NAME(invocation), req.dtmf_digit);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_START_CONT_DTMF,
+               &req, sizeof(struct treq_call_start_cont_dtmf));
+
+       return TRUE;
+}
+
+static gboolean on_call_stop_cont_dtmf(TelephonyCall *call,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       dbg("[%s] Stop DTMF", GET_CP_NAME(invocation));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_STOP_CONT_DTMF,
+               NULL, 0);
+
+       return TRUE;
+}
+
+static gboolean on_call_send_burst_dtmf(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gchar *dtmf_string, gint pulse_width, gint inter_digit_interval, gpointer user_data)
+{
+       struct treq_call_send_burst_dtmf req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(req));
+
+       if (dtmf_string) {
+               g_strlcpy(req.dtmf_string, dtmf_string, MAX_CALL_BURST_DTMF_STRING_LEN + 1);
+       } else {
+               err("Invalid DTMF string");
+
+               FAIL_RESPONSE(invocation, "Invalid Input");
+
+               return TRUE;
+       }
+
+       req.pulse_width = pulse_width;
+       req.inter_digit_interval = inter_digit_interval;
+
+       dbg("[%s] Pulse width: [%d] Inter-digit interval: [%d]",
+               GET_CP_NAME(invocation),
+               req.pulse_width, req.inter_digit_interval);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SEND_BURST_DTMF,
+               &req, sizeof(struct treq_call_send_burst_dtmf));
+
+       return TRUE;
+}
+
+static gboolean on_call_active(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gpointer user_data)
+{
+       struct treq_call_active req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+
+       dbg("[%s] Call handle: [%d]", GET_CP_NAME(invocation), req.handle);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_ACTIVE,
+               &req, sizeof(struct treq_call_active));
+
+       return TRUE;
+}
+
+static gboolean on_call_hold(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gpointer user_data)
+{
+       struct treq_call_hold req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+
+       dbg("[%s] Call handle: [%d]", GET_CP_NAME(invocation), req.handle);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_HOLD,
+               &req, sizeof(struct treq_call_hold));
+
+       return TRUE;
+}
+
+static gboolean on_call_swap(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gpointer user_data)
+{
+       struct treq_call_swap req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+
+       dbg("[%s] Call handle: [%d]", GET_CP_NAME(invocation), req.handle);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SWAP,
+               &req, sizeof(struct treq_call_swap));
+
+       return TRUE;
+}
+
+static gboolean on_call_join(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gpointer user_data)
+{
+       struct treq_call_join req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+
+       dbg("[%s] Call handle: [%d]", GET_CP_NAME(invocation), req.handle);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_JOIN,
+               &req, sizeof(struct treq_call_join));
+
+       return TRUE;
+}
+
+static gboolean on_call_split(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gpointer user_data)
+{
+       struct treq_call_split req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+
+       dbg("[%s] Call handle: [%d]", GET_CP_NAME(invocation), req.handle);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SPLIT,
+               &req, sizeof(struct treq_call_split));
+
+       return TRUE;
+}
+
+static gboolean on_call_transfer(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gpointer user_data)
+{
+       struct treq_call_transfer req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+
+       dbg("[%s] Call handle: [%d]", GET_CP_NAME(invocation), req.handle);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_TRANSFER,
+               &req, sizeof(struct treq_call_transfer));
+
+       return TRUE;
+}
+
+static gboolean on_call_deflect(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gchar *call_number, gpointer user_data)
+{
+       struct treq_call_deflect req = {0};
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       if (call_number)
+               g_strlcpy(req.number, call_number, MAX_CALL_DIAL_NUM_LEN);
+
+       dbg("[%s] Call handle: [%d] Number: [%s]", GET_CP_NAME(invocation),
+               req.handle, req.number);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_DEFLECT,
+               &req, sizeof(struct treq_call_deflect));
+
+       return TRUE;
+}
+
+static gboolean on_call_get_privacy_mode(TelephonyCall *call,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
+               return TRUE;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_GET_PRIVACY_MODE,
+               NULL, 0);
+
+       return TRUE;
+}
+
+static gboolean on_call_set_privacy_mode(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint privacy_mode, gpointer user_data)
+{
+       struct treq_call_set_voice_privacy_mode req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.privacy_mode = privacy_mode;
+
+       dbg("[%s] Privacy mode: [%d]", GET_CP_NAME(invocation), req.privacy_mode);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_PRIVACY_MODE,
+               &req, sizeof(struct treq_call_set_voice_privacy_mode));
+
+       return TRUE;
+}
+
+static gboolean on_call_get_status(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       TcorePlugin *plugin = 0;
+       CoreObject *call_co = NULL;
+       CallObject *call_obj = NULL;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       gchar call_number[MAX_CALL_NUMBER_LEN];
+       gint call_type;
+       gboolean call_direction;
+       gint call_status;
+       gboolean call_multiparty_state;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
+               return TRUE;
+
+       plugin = tcore_server_find_plugin(ctx->server, GET_CP_NAME(invocation));
+       call_co = tcore_plugin_ref_core_object(plugin, CORE_OBJECT_TYPE_CALL);
+       call_obj = tcore_call_object_find_by_handle(call_co, call_handle);
+       if (!call_obj) {
+               err("Call object: NULL");
+
+               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+
+               return TRUE;
+       }
+
+       dbg("[%s] Call handle: [%d]", GET_CP_NAME(invocation), call_handle);
+
+       memset(call_number, 0x0, MAX_CALL_NUMBER_LEN);
+       tcore_call_object_get_number(call_obj, call_number);
+       call_type = tcore_call_object_get_type(call_obj);
+       call_direction = tcore_call_object_get_direction(call_obj);
+
+       if (call_direction == TCORE_CALL_DIRECTION_OUTGOING)
+               call_direction = TRUE;
+       else
+               call_direction = FALSE;
+
+       call_status = tcore_call_object_get_status(call_obj);
+       call_multiparty_state = tcore_call_object_get_multiparty_state(call_obj);
+
+       telephony_call_complete_get_status(call, invocation,
+               call_handle, call_number, call_type,
+               call_direction, call_status, call_multiparty_state);
+
+       return TRUE;
+}
+
+static gboolean on_call_get_status_all(TelephonyCall *call,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       TcorePlugin *plugin = 0;
+       CoreObject *call_co = NULL;
+       CallObject *call_obj = NULL;
+       GSList *list, *tmp;
+
+       GVariant *gv = NULL;
+       GVariantBuilder b;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       gint call_id;
+       gint handle;
+       gchar call_number[MAX_CALL_NUMBER_LEN];
+       gint call_type;
+       gboolean call_direction;
+       gint call_status;
+       gboolean call_multiparty_state;
+
+       int len, i;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
+               return TRUE;
+
+       plugin = tcore_server_find_plugin(ctx->server, GET_CP_NAME(invocation));
+       call_co = tcore_plugin_ref_core_object(plugin, CORE_OBJECT_TYPE_CALL);
+
+       g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+       for (i = 0; i < TCORE_CALL_STATUS_MAX; i++) {
+               tmp = list = tcore_call_object_find_by_status(call_co, i);
+               if (list == NULL)
+                       continue;
+
+               while (tmp) {
+                       call_obj = (CallObject *)tmp->data;
+                       if (!call_obj) {
+                               err("call object: NULL");
+
+                               /* Next Call object */
+                               tmp = g_slist_next(tmp);
+                               continue;
+                       }
+
+                       handle = tcore_call_object_get_handle(call_obj);
+                       call_id = tcore_call_object_get_id(call_obj);
+
+                       memset(call_number, 0, MAX_CALL_NUMBER_LEN);
+                       len = tcore_call_object_get_number(call_obj, call_number);
+                       if (!len)
+                               warn("[ CHECK ] NO number: Call handle: [%d]", handle);
+
+                       call_type = tcore_call_object_get_type(call_obj);
+                       call_direction = tcore_call_object_get_direction(call_obj);
+
+                       if (call_direction == TCORE_CALL_DIRECTION_OUTGOING)
+                               call_direction = TRUE;
+                       else
+                               call_direction = FALSE;
+
+                       call_status = tcore_call_object_get_status(call_obj);
+                       if ((TCORE_CALL_STATUS_SETUP == call_status)
+                                       || (TCORE_CALL_STATUS_SETUP_PENDING == call_status)) {
+                               dbg("SETUP/SETUP_PENDING found. This is already notified as " \
+                                       "dialing status to applicaiton, so change it to 'Dialing' ");
+                               call_status = TCORE_CALL_STATUS_DIALING;
+                       }
+
+                       call_multiparty_state = tcore_call_object_get_multiparty_state(call_obj);
+
+                       dbg("Call handle: [%d] Call ID: [%d] Call number: [%s] Call number len: [%d]",
+                               handle, call_id, call_number, len);
+                       dbg("Call Type: [%s] Call Direction: [%s] Call Status: [%s] Multi-Party Call: [%s]",
+                               call_type == TCORE_CALL_TYPE_VOICE ? "VOICE" :
+                               (call_type == TCORE_CALL_TYPE_VIDEO ? "VIDEO" :
+                               (call_type == TCORE_CALL_TYPE_E911 ? "E911" :
+                               (call_type == TCORE_CALL_TYPE_STDOTASP ? "STDOTASP" :
+                               (call_type == TCORE_CALL_TYPE_NONSTDOTASP ? "NONSTDOTASP" : "UNKNOWN")))),
+                               (call_direction == TRUE ? "MO" : "MT"),
+                               (call_status == TCORE_CALL_STATUS_IDLE ? "IDLE" :
+                               (call_status == TCORE_CALL_STATUS_ACTIVE ? "ACTIVE" :
+                               (call_status == TCORE_CALL_STATUS_HELD ? "HELD" :
+                               (call_status == TCORE_CALL_STATUS_DIALING ? "DIALING" :
+                               (call_status == TCORE_CALL_STATUS_ALERT ? "ALERT" :
+                               (call_status == TCORE_CALL_STATUS_INCOMING ? "INCOMING" :
+                               (call_status == TCORE_CALL_STATUS_WAITING ? "WAITING" :
+                               (call_status == TCORE_CALL_STATUS_SETUP ? "SETUP" :
+                               (call_status == TCORE_CALL_STATUS_SETUP_PENDING ? "SETUP_PENDING" : "UNKNOWN"))))))))),
+                               (call_multiparty_state == 1 ? "YES" : "NO"));
+
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "call_id",
+                               g_variant_new_int32(handle));
+                       g_variant_builder_add(&b, "{sv}", "call_number",
+                               g_variant_new_string(call_number));
+                       g_variant_builder_add(&b, "{sv}", "call_type",
+                               g_variant_new_int32(call_type));
+                       g_variant_builder_add(&b, "{sv}", "call_direction",
+                               g_variant_new_boolean(call_direction));
+                       g_variant_builder_add(&b, "{sv}", "call_state",
+                               g_variant_new_int32(call_status));
+                       g_variant_builder_add(&b, "{sv}", "call_multiparty_state",
+                               g_variant_new_boolean(call_multiparty_state));
+                       g_variant_builder_close(&b);
+
+                       /* Next Call object */
+                       tmp = g_slist_next(tmp);
+               }
+
+               /* Free list */
+               g_slist_free(list);
+       }
+       gv = g_variant_builder_end(&b);
+
+       telephony_call_complete_get_status_all(call, invocation, gv);
+
+       return TRUE;
+}
+
+static gboolean on_call_set_sound_path(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint sound_path, gboolean extra_volume_on, gpointer user_data)
+{
+       struct treq_call_set_sound_path req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.path = sound_path;
+       req.extra_volume_on = extra_volume_on;
+
+       dbg("[%s] Sound path: [%d] Extra Volume: [%s]", GET_CP_NAME(invocation),
+               req.path, (extra_volume_on ? "ON" : "OFF"));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_SOUND_PATH,
+               &req, sizeof(struct treq_call_set_sound_path));
+
+       return TRUE;
+}
+
+static gboolean on_call_get_sound_volume_level(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint sound_device, gint sound_type, gpointer user_data)
+{
+       struct treq_call_get_sound_volume_level req;
+       struct custom_data *ctx = user_data;
+       TReturn ret;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
+               return TRUE;
+
+       req.device = sound_device;
+       req.sound = sound_type;
+
+       dbg("[%s] Sound device: [%d] Sound type: [%d]", GET_CP_NAME(invocation),
+               req.device, req.sound);
+
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, call, invocation,
+               TREQ_CALL_GET_SOUND_VOLUME_LEVEL,
+               &req, sizeof(struct treq_call_get_sound_volume_level));
+       if (ret != TCORE_RETURN_SUCCESS) {
+               GVariantBuilder b;
+               GVariant *result = 0;
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+               g_variant_builder_add(&b, "{sv}", "err", g_variant_new_int32(ret));
+               g_variant_builder_close(&b);
+               result = g_variant_builder_end(&b);
+
+               telephony_call_complete_get_sound_volume_level(call,
+                       invocation, result, ret);
+       }
+
+       return TRUE;
+}
+
+static gboolean on_call_set_sound_volume_level(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint sound_device, gint sound_type, gint sound_volume,
+       gpointer user_data)
+{
+       struct treq_call_set_sound_volume_level req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.device = sound_device;
+       req.sound = sound_type;
+       req.volume = sound_volume;
+
+       dbg("[%s] Sound device: [%d] Sound type: [%d] Volume level: [%d]",
+               GET_CP_NAME(invocation),
+               req.device, req.sound, req.volume);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_SOUND_VOLUME_LEVEL,
+               &req, sizeof(struct treq_call_set_sound_volume_level));
+
+       return TRUE;
+}
+
+static gboolean on_call_get_sound_mute_status(TelephonyCall *call,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
+               return TRUE;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_GET_SOUND_MUTE_STATUS,
+               NULL, 0);
+
+       return TRUE;
+}
+
+static gboolean on_call_set_sound_mute_status(TelephonyCall *call,
+       GDBusMethodInvocation *invocation, gint status, gint path,
+       gpointer user_data)
+{
+       struct treq_call_set_sound_mute_status req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.path = path;
+       req.status = status;
+
+       dbg("[%s] Path: [%s] Mute Status: [%s]", GET_CP_NAME(invocation),
+               (req.path == CALL_SOUND_MUTE_PATH_TX ? "OUTGOING" :
+               (req.path == CALL_SOUND_MUTE_PATH_RX ? "INCOMING" :
+               "BOTH In- & Out-coming")),
+               (req.status == CALL_SOUND_MUTE_STATUS_OFF ? "OFF" : "ON"));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_SOUND_MUTE_STATUS,
+               &req, sizeof(struct treq_call_set_sound_mute_status));
+
+       return TRUE;
+}
+
+static gboolean on_call_set_sound_recording(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint recording_state, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_call_set_sound_recording req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.state = (gboolean)recording_state;
+
+       dbg("[%s] Recording state: [%s]", GET_CP_NAME(invocation),
+               (req.state ? "ON" : "OFF"));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_SOUND_RECORDING,
+               &req, sizeof(struct treq_call_set_sound_recording));
+
+       return TRUE;
+}
+
+static gboolean on_call_set_sound_equalization(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint eq_mode, gint eq_direction, gchar *eq_parameter,
+       gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_call_set_sound_equalization req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.mode = eq_mode;
+       req.direction = (enum telephony_call_sound_direction)eq_direction;
+       memcpy((char *)req.parameter, (const char *)eq_parameter, (MAX_CALL_EQ_PARAMETER_SIZE * 2));
+
+       dbg("[%s] Equalization mode: [%d] Direction: [%s]",
+               GET_CP_NAME(invocation), req.mode,
+               (req.direction == CALL_SOUND_DIRECTION_LEFT ? "LEFT" : "RIGHT"));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_SOUND_EQUALIZATION,
+               &req, sizeof(struct treq_call_set_sound_equalization));
+
+       return TRUE;
+}
+
+static gboolean on_call_set_sound_noise_reduction(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint nr_state, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_call_set_sound_noise_reduction req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.status = (gboolean)nr_state;
+
+       dbg("[%s] NR Status: [%d]", GET_CP_NAME(invocation), req.status);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_SOUND_NOISE_REDUCTION,
+               &req, sizeof(struct treq_call_set_sound_noise_reduction));
+
+       return TRUE;
+}
+
+static gboolean on_call_set_sound_clock_status(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gboolean clock_status, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_call_set_sound_clock_status req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.status = clock_status;
+
+       dbg("[%s] Clock Status: [%s]", GET_CP_NAME(invocation),
+               (req.status ? "ON" : "OFF"));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_SOUND_CLOCK_STATUS,
+               &req, sizeof(struct treq_call_set_sound_clock_status));
+
+       return TRUE;
+}
+
+static gboolean on_call_set_preferred_voice_subscription(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint preferred_subscription, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_call_set_preferred_voice_subscription req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "w"))
+               return TRUE;
+
+       req.preferred_subs = preferred_subscription;
+
+       dbg("[%s] Preferred Voice subscription: [%s]", GET_CP_NAME(invocation),
+               (req.preferred_subs == CALL_PREFERRED_VOICE_SUBS_CURRENT_NETWORK ? "CURRENT NW" :
+               (req.preferred_subs == CALL_PREFERRED_VOICE_SUBS_ASK_ALWAYS ? "ASK ALWAYS" :
+               (req.preferred_subs == CALL_PREFERRED_VOICE_SUBS_SIM1 ? "SIM 1" :
+               (req.preferred_subs == CALL_PREFERRED_VOICE_SUBS_SIM2 ? "SIM 2" :
+               "UNKNOWN")))));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_SET_PREFERRED_VOICE_SUBSCRIPTION,
+               &req, sizeof(struct treq_call_set_preferred_voice_subscription));
+
+       return TRUE;
+}
+
+static gboolean on_call_get_preferred_voice_subscription(TelephonyCall *call,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
+               return TRUE;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_GET_PREFERRED_VOICE_SUBSCRIPTION,
+               NULL, 0);
+
+       return TRUE;
+}
+
+static gboolean on_call_modify(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gint call_type, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_call_modify req = {0};
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+       req.call_type = call_type;
+
+       dbg("[%s] Call handle: [%d] Call type: [%s]",
+               GET_CP_NAME(invocation), req.handle,
+               (req.call_type == CALL_TYPE_VOICE ? "VOICE" :
+               (req.call_type == CALL_TYPE_VIDEO ? "VIDEO" :
+               "EMERGENCY")));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_MODIFY,
+               &req, sizeof(struct treq_call_modify));
+
+       return TRUE;
+}
+
+static gboolean on_call_confirm_modify(TelephonyCall *call,
+       GDBusMethodInvocation *invocation,
+       gint call_handle, gint confirm_type, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_call_confirm_modify req = {0};
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_CALL, "x"))
+               return TRUE;
+
+       req.handle = call_handle;
+       req.confirm_type = confirm_type;
+
+       dbg("[%s] Call handle: [%d] Confirm type: [%s]",
+               GET_CP_NAME(invocation), req.handle,
+               (req.confirm_type == CALL_CONFIRM_TYPE_ACCEPT ? "ACCEPT" :
+               "REJECT"));
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, call, invocation,
+               TREQ_CALL_CONFIRM_MODIFY,
+               &req, sizeof(struct treq_call_confirm_modify));
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_setup_call_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
+{
+       TelephonyCall *call;
+
+       call = telephony_call_skeleton_new();
+       telephony_object_skeleton_set_call(object, call);
+       g_object_unref(call);
+
+       dbg("call = %p", call);
+
+       /*
+        * Register signal handlers for CALL interface
+        */
+       g_signal_connect(call,
+               "handle-dial",
+               G_CALLBACK(on_call_dial), ctx);
+
+       g_signal_connect(call,
+               "handle-answer",
+               G_CALLBACK(on_call_answer), ctx);
+
+       g_signal_connect(call,
+               "handle-end",
+               G_CALLBACK(on_call_end), ctx);
+
+       g_signal_connect(call,
+               "handle-start-cont-dtmf",
+               G_CALLBACK(on_call_start_cont_dtmf), ctx);
+
+       g_signal_connect(call,
+               "handle-stop-cont-dtmf",
+               G_CALLBACK(on_call_stop_cont_dtmf), ctx);
+
+       g_signal_connect(call,
+               "handle-send-burst-dtmf",
+               G_CALLBACK(on_call_send_burst_dtmf), ctx);
+
+       g_signal_connect(call,
+               "handle-active",
+               G_CALLBACK(on_call_active), ctx);
+
+       g_signal_connect(call,
+               "handle-hold",
+               G_CALLBACK(on_call_hold), ctx);
+
+       g_signal_connect(call,
+               "handle-swap",
+               G_CALLBACK(on_call_swap), ctx);
+
+       g_signal_connect(call,
+               "handle-join",
+               G_CALLBACK(on_call_join), ctx);
+
+       g_signal_connect(call,
+               "handle-split",
+               G_CALLBACK(on_call_split), ctx);
+
+       g_signal_connect(call,
+               "handle-transfer",
+               G_CALLBACK(on_call_transfer), ctx);
+
+       g_signal_connect(call,
+               "handle-deflect",
+               G_CALLBACK(on_call_deflect), ctx);
+
+       g_signal_connect(call,
+               "handle-get-privacy-mode",
+               G_CALLBACK(on_call_get_privacy_mode), ctx);
+
+       g_signal_connect(call,
+               "handle-set-privacy-mode",
+               G_CALLBACK(on_call_set_privacy_mode), ctx);
+
+       g_signal_connect(call,
+               "handle-get-status",
+               G_CALLBACK(on_call_get_status), ctx);
+
+       g_signal_connect(call,
+               "handle-get-status-all",
+               G_CALLBACK(on_call_get_status_all), ctx);
+
+       g_signal_connect(call,
+               "handle-set-sound-path",
+               G_CALLBACK(on_call_set_sound_path), ctx);
+
+       g_signal_connect(call,
+               "handle-get-sound-volume-level",
+               G_CALLBACK(on_call_get_sound_volume_level), ctx);
+
+       g_signal_connect(call,
+               "handle-set-sound-volume-level",
+               G_CALLBACK(on_call_set_sound_volume_level), ctx);
+
+       g_signal_connect(call,
+               "handle-get-sound-mute-status",
+               G_CALLBACK(on_call_get_sound_mute_status), ctx);
+
+       g_signal_connect(call,
+               "handle-set-sound-mute-status",
+               G_CALLBACK(on_call_set_sound_mute_status), ctx);
+
+       g_signal_connect(call,
+               "handle-set-sound-recording",
+               G_CALLBACK(on_call_set_sound_recording), ctx);
+
+       g_signal_connect(call,
+               "handle-set-sound-equalization",
+               G_CALLBACK(on_call_set_sound_equalization), ctx);
+
+       g_signal_connect(call,
+               "handle-set-sound-noise-reduction",
+               G_CALLBACK(on_call_set_sound_noise_reduction), ctx);
+
+       g_signal_connect(call,
+               "handle-set-sound-clock-status",
+               G_CALLBACK(on_call_set_sound_clock_status), ctx);
+
+       g_signal_connect(call,
+               "handle-set-preferred-voice-subscription",
+               G_CALLBACK(on_call_set_preferred_voice_subscription), ctx);
+
+       g_signal_connect(call,
+               "handle-get-preferred-voice-subscription",
+               G_CALLBACK(on_call_get_preferred_voice_subscription), ctx);
+
+       g_signal_connect(call,
+               "handle-modify",
+               G_CALLBACK(on_call_modify), ctx);
+
+       g_signal_connect(call,
+               "handle-confirm-modify",
+               G_CALLBACK(on_call_confirm_modify), ctx);
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_call_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
+{
+       char *cpname = dbus_info ? GET_CP_NAME(dbus_info->invocation) : "";
+
+       switch (command) {
+       case TRESP_CALL_DIAL: {
+               struct tresp_call_dial *resp = (struct tresp_call_dial *)data;
+
+               dbg("[%s] CALL_DIAL - Result: [%d]",
+                       cpname, resp->err);
+
+               telephony_call_complete_dial(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_ANSWER: {
+               struct tresp_call_answer *resp = (struct tresp_call_answer *)data;
+
+               dbg("[%s] CALL_ANSWER - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_answer(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle);
+       }
+       break;
+
+       case TRESP_CALL_END: {
+               struct tresp_call_end *resp = (struct tresp_call_end *)data;
+
+               dbg("[%s] CALL_END - Result: [%d] Call handle: [%d] End type: [%d]",
+                       cpname, resp->err, resp->handle, resp->type);
+
+               telephony_call_complete_end(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle, resp->type);
+       }
+       break;
+
+       case TRESP_CALL_HOLD: {
+               struct tresp_call_hold *resp = (struct tresp_call_hold *)data;
+
+               dbg("[%s] CALL_HOLD - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_hold(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle);
+       }
+       break;
+
+       case TRESP_CALL_ACTIVE: {
+               struct tresp_call_active *resp = (struct tresp_call_active *)data;
+
+               dbg("[%s] CALL_ACTIVE - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_active(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle);
+       }
+       break;
+
+       case TRESP_CALL_SWAP: {
+               struct tresp_call_swap *resp = (struct tresp_call_swap *)data;
+
+               dbg("[%s] CALL_SWAP - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_swap(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle);
+       }
+       break;
+
+       case TRESP_CALL_JOIN: {
+               struct tresp_call_join *resp = (struct tresp_call_join *)data;
+
+               dbg("[%s] CALL_JOIN - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_join(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle);
+       }
+       break;
+
+       case TRESP_CALL_SPLIT: {
+               struct tresp_call_split *resp = (struct tresp_call_split *)data;
+
+               dbg("[%s] CALL_SPLIT - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_split(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle);
+       }
+       break;
+
+       case TRESP_CALL_DEFLECT: {
+               struct tresp_call_deflect *resp = (struct tresp_call_deflect *)data;
+
+               dbg("[%s] CALL_DEFLECT - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_deflect(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_TRANSFER: {
+               struct tresp_call_transfer *resp = (struct tresp_call_transfer *)data;
+
+               dbg("[%s] CALL_TRANSFER - Result: [%d] Call handle: [%d]",
+                       cpname, resp->err, resp->handle);
+
+               telephony_call_complete_transfer(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->handle);
+       }
+       break;
+
+       case TRESP_CALL_START_CONT_DTMF: {
+               struct tresp_call_dtmf *resp = (struct tresp_call_dtmf *)data;
+
+               dbg("[%s] CALL_START_CONT_DTMF - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_start_cont_dtmf(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_STOP_CONT_DTMF: {
+               struct tresp_call_dtmf *resp = (struct tresp_call_dtmf *)data;
+
+               dbg("[%s] CALL_STOP_CONT_DTMF - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_stop_cont_dtmf(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_SEND_BURST_DTMF: {
+               struct tresp_call_dtmf *resp = (struct tresp_call_dtmf *)data;
+
+               dbg("[%s] CALL_SEND_BURST_DTMF - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_send_burst_dtmf(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_GET_PRIVACY_MODE: {
+               struct tresp_call_get_voice_privacy_mode *resp = (struct tresp_call_get_voice_privacy_mode *)data;
+
+               dbg("[%s] CALL_GET_PRIVACY_MODE - Result: [%d] Privacy mode: [%d]",
+                       cpname, resp->err, resp->privacy_mode);
+
+               telephony_call_complete_get_privacy_mode(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->privacy_mode);
+       }
+       break;
+
+       case TRESP_CALL_SET_PRIVACY_MODE: {
+               struct tresp_call_set_voice_privacy_mode *resp = (struct tresp_call_set_voice_privacy_mode *)data;
+
+               dbg("[%s] CALL_SET_PRIVACY_MODE - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_privacy_mode(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_SET_SOUND_PATH: {
+               struct tresp_call_set_sound_path *resp = (struct tresp_call_set_sound_path *)data;
+
+               dbg("[%s] CALL_SET_SOUND_PATH - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_sound_path(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_SET_SOUND_VOLUME_LEVEL: {
+               struct tresp_call_set_sound_volume_level *resp = (struct tresp_call_set_sound_volume_level *)data;
+
+               dbg("[%s] CALL_SET_SOUND_VOLUME_LEVEL  - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_sound_volume_level(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_GET_SOUND_VOLUME_LEVEL: {
+               struct tresp_call_get_sound_volume_level *resp = (struct tresp_call_get_sound_volume_level *)data;
+               GVariant *result = 0;
+               GVariantBuilder b;
+               int i = 0;
+
+               dbg("[%s] CALL_GET_SOUND_VOLUME_LEVEL  - Result: [%d]", cpname, resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+
+               g_variant_builder_add(&b, "{sv}", "err",
+                       g_variant_new_int32(resp->err));
+               if (!resp->err) {
+                       dbg("resp->record_num : [%d]", resp->record_num);
+
+                       for (i = 0; i < resp->record_num; i++) {
+                               dbg("sound_type : [%d], level:[%d]",
+                                       resp->record[i].sound, resp->record[i].volume);
+                               g_variant_builder_add(&b, "{sv}", "type",
+                                       g_variant_new_int32(resp->record[i].sound));
+                               g_variant_builder_add(&b, "{sv}", "level",
+                                       g_variant_new_int32(resp->record[i].volume));
+                       }
+               }
+               g_variant_builder_close(&b);
+               result = g_variant_builder_end(&b);
+
+               telephony_call_complete_get_sound_volume_level(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_SET_SOUND_MUTE_STATUS: {
+               struct tresp_call_set_sound_mute_status *resp = (struct tresp_call_set_sound_mute_status *)data;
+
+               dbg("[%s] CALL_SET_SOUND_MUTE_STATUS  - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_sound_mute_status(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_GET_SOUND_MUTE_STATUS: {
+               struct tresp_call_get_sound_mute_status *resp = (struct tresp_call_get_sound_mute_status *)data;
+
+               dbg("[%s] CALL_GET_SOUND_MUTE_STATUS  - Result: [%d] Path: [%d] Status: [%d]",
+                       cpname, resp->err, resp->path, resp->status);
+
+               telephony_call_complete_get_sound_mute_status(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->path, resp->status);
+
+       }
+       break;
+
+       case TRESP_CALL_SET_SOUND_RECORDING: {
+               struct tresp_call_set_sound_recording *resp = (struct tresp_call_set_sound_recording *)data;
+
+               dbg("[%s] CALL_SET_SOUND_RECORDING - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_sound_recording(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+
+       }
+       break;
+
+       case TRESP_CALL_SET_SOUND_EQUALIZATION: {
+               struct tresp_call_set_sound_equalization *resp = (struct tresp_call_set_sound_equalization *)data;
+
+               dbg("[%s] CALL_SET_SOUND_EQUALIZATION - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_sound_equalization(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_SET_SOUND_NOISE_REDUCTION: {
+               struct tresp_call_set_sound_noise_reduction *resp = (struct tresp_call_set_sound_noise_reduction *)data;
+
+               dbg("[%s] CALL_SET_SOUND_NOISE_REDUCTION - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_sound_noise_reduction(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_SET_SOUND_CLOCK_STATUS: {
+               struct tresp_call_set_sound_clock_status *resp = (struct tresp_call_set_sound_clock_status *)data;
+
+               dbg("[%s] CALL_SET_SOUND_CLOCK_STATUS - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_set_sound_clock_status(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_SET_PREFERRED_VOICE_SUBSCRIPTION: {
+               struct tresp_call_set_preferred_voice_subscription *resp = (struct tresp_call_set_preferred_voice_subscription *)data;
+
+               dbg("[%s] CALL_SET_PREFERRED_VOICE_SUBSCRIPTION - Result: [%d]",
+                       cpname, resp->err);
+
+               telephony_call_complete_set_preferred_voice_subscription(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_GET_PREFERRED_VOICE_SUBSCRIPTION: {
+               struct tresp_call_get_preferred_voice_subscription *resp = (struct tresp_call_get_preferred_voice_subscription *)data;
+
+               dbg("[%s] CALL_GET_PREFERRED_VOICE_SUBSCRIPTION - Result: [%d] Preferred Subscription: [%d]",
+                       cpname, resp->err, resp->preferred_subs);
+
+               telephony_call_complete_get_preferred_voice_subscription(dbus_info->interface_object,
+                       dbus_info->invocation, resp->preferred_subs, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_MODIFY: {
+               const struct tresp_call_modify *resp = data;
+
+               dbg("[%s] CALL_MODIFY - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_modify(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_CALL_CONFIRM_MODIFY: {
+               const struct tresp_call_confirm_modify *resp = data;
+
+               dbg("[%s] CALL_CONFIRM_MODIFY - Result: [%d]", cpname, resp->err);
+
+               telephony_call_complete_confirm_modify(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       default:
+               err("Unhandled/Unknown Response: [0x%x]", command);
+       break;
+       }
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_call_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
+{
+       TelephonyCall *call;
+       char *cp_name;
+
+       if (!object) {
+               dbg("object is NULL");
+               return FALSE;
+       }
+
+       if (!data) {
+               err("data is NULL");
+               return FALSE;
+       }
+
+       cp_name = (char *)tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
+
+       call = telephony_object_peek_call(TELEPHONY_OBJECT(object));
+       if (call == NULL) {
+               err("call object is NULL!!!");
+               return FALSE;
+       }
+
+       switch (command) {
+       case TNOTI_CALL_STATUS_IDLE: {
+               struct tnoti_call_status_idle *idle = (struct tnoti_call_status_idle *)data;
+
+               dbg("[%s] CALL_STATUS_IDLE: [%s]", cp_name,
+                       (idle->type != CALL_TYPE_VIDEO ? "Voice" : "Video"));
+
+               if (idle->type != CALL_TYPE_VIDEO)
+                       telephony_call_emit_voice_call_status_idle(call,
+                               idle->handle, idle->cause, 0, 0);
+               else
+                       telephony_call_emit_video_call_status_idle(call,
+                               idle->handle, idle->cause, 0, 0);
+       }
+       break;
+
+       case TNOTI_CALL_STATUS_DIALING: {
+               struct tnoti_call_status_dialing *dialing = (struct tnoti_call_status_dialing *)data;
+
+               dbg("[%s] CALL_STATUS_DIALING: [%s] Call handle: [%d]", cp_name,
+                       (dialing->type != CALL_TYPE_VIDEO ? "Voice" : "Video"),
+                       dialing->handle);
+
+               if (dialing->type != CALL_TYPE_VIDEO)
+                       telephony_call_emit_voice_call_status_dialing(call, dialing->handle);
+               else
+                       telephony_call_emit_video_call_status_dialing(call, dialing->handle);
+       }
+       break;
+
+       case TNOTI_CALL_STATUS_ALERT: {
+               struct tnoti_call_status_alert *alert = (struct tnoti_call_status_alert *)data;
+
+               dbg("[%s] CALL_STATUS_ALERT: [%s] Call handle: [%d]", cp_name,
+                       (alert->type != CALL_TYPE_VIDEO ? "Voice" : "Video"),
+                       alert->handle);
+
+               if (alert->type != CALL_TYPE_VIDEO)
+                       telephony_call_emit_voice_call_status_alert(call, alert->handle);
+               else
+                       telephony_call_emit_video_call_status_alert(call, alert->handle);
+       }
+       break;
+
+       case TNOTI_CALL_STATUS_ACTIVE: {
+               struct tnoti_call_status_active *active = (struct tnoti_call_status_active *)data;
+
+               dbg("[%s] CALL_STATUS_ACTIVE: [%s] Call handle: [%d]", cp_name,
+                       (active->type != CALL_TYPE_VIDEO ? "Voice" : "Video"),
+                       active->handle);
+
+               if (active->type != CALL_TYPE_VIDEO)
+                       telephony_call_emit_voice_call_status_active(call, active->handle);
+               else
+                       telephony_call_emit_video_call_status_active(call, active->handle);
+       }
+       break;
+
+       case TNOTI_CALL_STATUS_HELD: {
+               struct tnoti_call_status_held *held = (struct tnoti_call_status_held *)data;
+
+               dbg("[%s] CALL_STATUS_HELD: Call handle: [%d]", cp_name,
+                       held->handle);
+
+               telephony_call_emit_voice_call_status_held(call, held->handle);
+       }
+       break;
+
+       case TNOTI_CALL_STATUS_INCOMING: {
+               struct tnoti_call_status_incoming *incoming = (struct tnoti_call_status_incoming *)data;
+
+               dbg("[%s] CALL_STATUS_INCOMING: [%s] Call handle: [%d]", cp_name,
+                       (incoming->type != CALL_TYPE_VIDEO ? "Voice" : "Video"),
+                       incoming->handle);
+
+               if (incoming->type != CALL_TYPE_VIDEO)
+                       telephony_call_emit_voice_call_status_incoming(call,
+                               incoming->handle,
+                               incoming->cli.mode,
+                               incoming->cli.no_cli_cause,
+                               incoming->cli.number,
+                               incoming->forward,
+                               incoming->active_line,
+                               incoming->cna.name);
+               else
+                       telephony_call_emit_video_call_status_incoming(call,
+                               incoming->handle,
+                               incoming->cli.mode,
+                               incoming->cli.no_cli_cause,
+                               incoming->cli.number,
+                               incoming->forward,
+                               incoming->active_line,
+                               incoming->cna.name);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_WAITING: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_WAITING: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_waiting(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_FORWARDED: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_FORWARDED: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_forwarded(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_FORWARDED_CALL: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_FORWARDED_CALL: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_forwarded_call(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_BARRED_INCOMING: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_BARRED_INCOMING: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_barred_incoming(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_BARRED_OUTGOING: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_BARRED_INCOMING: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_barred_outgoing(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_FORWARD_CONDITIONAL: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_FORWARD_CONDITIONAL: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_forward_conditional(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_FORWARD_UNCONDITIONAL: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_FORWARD_UNCONDITIONAL: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_forward_unconditional(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_HELD: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_HELD: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_call_held(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_ACTIVE: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_ACTIVE: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_call_active(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_JOINED: {
+               int *id = (int *)data;
+
+               dbg("[%s] CALL_INFO_JOINED: Call handle: [%d]",
+                       cp_name, (gint)*id);
+
+               telephony_call_emit_call_joined(call, (gint)*id);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_PRIVACY_MODE: {
+               struct tnoti_call_info_voice_privacy_mode *privacy_info = (struct tnoti_call_info_voice_privacy_mode *)data;
+
+               dbg("[%s] CALL_INFO_PRIVACY_MODE: Privacy mode: [%d]",
+                       cp_name, privacy_info->privacy_mode);
+
+               telephony_call_emit_call_privacy_mode(call, privacy_info->privacy_mode);
+       }
+       break;
+
+       case TNOTI_CALL_OTASP_STATUS: {
+               struct tnoti_call_otasp_status  *otasp = (struct tnoti_call_otasp_status *)data;
+
+               dbg("[%s] CALL_OTASP_STATUS : status(%d)",
+                       cp_name, otasp->otasp_status);
+
+               telephony_call_emit_call_otasp_status(call, otasp->otasp_status);
+       }
+       break;
+
+       case TNOTI_CALL_OTAPA_STATUS: {
+               struct tnoti_call_otapa_status  *otapa = (struct tnoti_call_otapa_status *)data;
+
+               dbg("[%s] CALL_OTAPA_STATUS: Status: [%d]",
+                       cp_name, otapa->otapa_status);
+
+               telephony_call_emit_call_otapa_status(call, otapa->otapa_status);
+       }
+       break;
+
+       case TNOTI_CALL_SIGNAL_INFO: {
+               struct tnoti_call_signal_info *sig_info = (struct tnoti_call_signal_info *)data;
+               unsigned int signal;
+
+               if (sig_info->signal_type == CALL_SIGNAL_TYPE_TONE) {
+                       signal = sig_info->signal.sig_tone_type;
+               } else if (sig_info->signal_type == CALL_SIGNAL_TYPE_ISDN_ALERTING) {
+                       signal = sig_info->signal.sig_isdn_alert_type;
+               } else if (sig_info->signal_type == CALL_SIGNAL_TYPE_IS54B_ALERTING) {
+                       signal = sig_info->signal.sig_is54b_alert_type;
+               } else {
+                       err("Unknown Signal type");
+                       return FALSE;
+               }
+
+               dbg("[%s] CALL_SIGNAL_INFO: Signal type: [%d] Pitch type: [%d] Signal: [%d]",
+                       cp_name, sig_info->signal_type, sig_info->pitch_type, signal);
+
+               telephony_call_emit_call_signal_info(call,
+                       sig_info->signal_type, sig_info->pitch_type, signal);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_REC: {
+               struct tnoti_call_info_rec *noti = (struct tnoti_call_info_rec *)data;
+               gchar *param = NULL;
+
+               if (noti->rec_info.type == CALL_REC_NAME_INFO) {
+                       param = g_strdup(noti->rec_info.data.name);
+               } else if (noti->rec_info.type == CALL_REC_NUMBER_INFO) {
+                       param = g_strdup(noti->rec_info.data.number);
+               } else {
+                       err("Unknown rec info type (%d)", noti->rec_info.type);
+                       return FALSE;
+               }
+
+               dbg("[%s] CALL_INFO_REC: id: [%d] type: [%d] param: [%s]",
+                       cp_name, noti->rec_info.handle, noti->rec_info.type, param);
+
+               telephony_call_emit_call_info_rec(call, noti->rec_info.handle, noti->rec_info.type, param);
+               g_free(param);
+       }
+       break;
+
+       case TNOTI_CALL_SOUND_PATH: {
+               struct tnoti_call_sound_path *noti = (struct tnoti_call_sound_path *)data;
+
+               dbg("[%s] CALL_SOUND_PATH: Path: [%d]", cp_name, noti->path);
+
+               telephony_call_emit_call_sound_path(call, noti->path);
+       }
+       break;
+
+       case TNOTI_CALL_SOUND_RINGBACK_TONE: {
+               struct tnoti_call_sound_ringback_tone *noti = (struct tnoti_call_sound_ringback_tone *)data;
+
+               dbg("[%s] CALL_SOUND_RINGBACK_TONE: Status: [%d]",
+                       cp_name, (gint)noti->status);
+
+               telephony_call_emit_call_sound_ringback_tone(call, (gint)noti->status);
+       }
+       break;
+
+       case TNOTI_CALL_SOUND_WBAMR: {
+               struct tnoti_call_sound_wbamr *noti = (struct tnoti_call_sound_wbamr *)data;
+
+               dbg("[%s] CALL_SOUND_WBAMR: Status: [%d]",
+                       cp_name, (gint)noti->status);
+
+               telephony_call_emit_call_sound_wbamr(call, (gint)noti->status);
+       }
+       break;
+
+       case TNOTI_CALL_SOUND_EQUALIZATION: {
+               struct tnoti_call_sound_equalization *noti = (struct tnoti_call_sound_equalization *)data;
+
+               dbg("[%s] CALL_SOUND_EQUALIZATION: Direction: [%d]",
+                       cp_name, (gint)noti->direction);
+
+               telephony_call_emit_call_sound_equalization(call, (gint)noti->mode, (gint)noti->direction);
+       }
+       break;
+
+       case TNOTI_CALL_SOUND_NOISE_REDUCTION: {
+               struct tnoti_call_sound_noise_reduction *noti = (struct tnoti_call_sound_noise_reduction *)data;
+
+               dbg("[%s] CALL_SOUND_NOISE_REDUCTION: Status: [%d]",
+                       cp_name, (gint)noti->status);
+
+               telephony_call_emit_call_sound_noise_reduction(call, (gint)noti->status);
+       }
+       break;
+
+       case TNOTI_CALL_SOUND_CLOCK_STATUS: {
+               struct tnoti_call_sound_clock_status *noti = (struct tnoti_call_sound_clock_status *)data;
+
+               dbg("[%s] CALL_SOUND_CLOCK_STATUS: Status: [%d]",
+                       cp_name, (gint)noti->status);
+
+               telephony_call_emit_call_sound_clock_status(call, noti->status);
+       }
+       break;
+
+       case TNOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION: {
+               struct tnoti_call_preferred_voice_subscription *noti = (struct tnoti_call_preferred_voice_subscription *)data;
+
+               dbg("[%s] CALL_PREFERRED_VOICE_SUBSCRIPTION: Subscription: [%d]",
+                       cp_name, noti->preferred_subs);
+
+               telephony_call_emit_call_preferred_voice_subscription(call, noti->preferred_subs);
+       }
+       break;
+
+       case TNOTI_CALL_MODIFY_REQUEST: {
+               const struct tnoti_call_modify_request *noti = data;
+
+               dbg("[%s] CALL_MODIFY_REQUEST: Call handle: [%d] Call type: [%d]",
+                       cp_name, noti->handle, noti->call_type);
+
+               telephony_call_emit_call_modify_request(call, noti->handle, noti->call_type);
+       }
+       break;
+
+       case TNOTI_CALL_INFO_FALLBACK:{
+               struct tnoti_call_fallback* noti = (struct tnoti_call_fallback *)data;
+
+               dbg("[%s] CALL_INFO_FALLBACK: Call handle: [%d] Fallback to: [%d]",
+                       cp_name, noti->handle, noti->fallback_to);
+
+               telephony_call_emit_call_fallback(call, noti->handle, noti->fallback_to);
+       }
+       break;
+
+       default:
+               err("Unhandled/Unknown Notification: [0x%x]", command);
+       break;
+       }
+
+       return TRUE;
+}
similarity index 82%
rename from src/common.c
rename to src/dtapi_common.c
index 0e66b9a..0fff804 100644 (file)
@@ -37,7 +37,7 @@
 #include <cynara-session.h>
 
 #include "generated-code.h"
-#include "common.h"
+#include "dtapi_common.h"
 
 #define PERM_WRITE     "w"
 #define PERM_EXECUTE   "x"
@@ -64,7 +64,8 @@ char *dbus_plugin_get_cp_name_by_object_path(const char *object_path)
        return (char *)object_path + strlen(MY_DBUS_PATH) + 1;
 }
 
-UserRequest *dbus_plugin_macro_user_request_new(struct custom_data *ctx, void *object, GDBusMethodInvocation *invocation)
+UserRequest *dbus_plugin_macro_user_request_new(struct custom_data *ctx,
+       void *object, GDBusMethodInvocation *invocation)
 {
        UserRequest *ur = NULL;
        char *cp_name;
@@ -72,12 +73,12 @@ UserRequest *dbus_plugin_macro_user_request_new(struct custom_data *ctx, void *o
 
        cp_name = GET_CP_NAME(invocation);
 
-       ur = tcore_user_request_new(ctx->comm, cp_name);
-
        dbus_info = calloc(1, sizeof(struct dbus_request_info));
        if (!dbus_info)
                return NULL;
 
+       ur = tcore_user_request_new(ctx->comm, cp_name);
+
        dbus_info->interface_object = object;
        dbus_info->invocation = invocation;
 
@@ -166,7 +167,7 @@ OUT:
        return result;
 }
 
-enum dbus_tapi_sim_slot_id get_sim_slot_id_by_cp_name(char *cp_name)
+enum dbus_tapi_sim_slot_id get_sim_slot_id_by_cp_name(const char *cp_name)
 {
        if (g_str_has_suffix(cp_name , "0"))
                return SIM_SLOT_PRIMARY;
@@ -215,3 +216,43 @@ void dbus_plugin_util_unload_xml(void **i_doc, void **i_root_node)
                        *root_node = NULL;
        }
 }
+
+TReturn dtapi_dispatch_request_ex(struct custom_data *ctx,
+       void *object, GDBusMethodInvocation *invocation,
+       enum tcore_request_command req_command,
+       void *req_data, unsigned int req_data_len)
+{
+       UserRequest *ur;
+       TReturn ret;
+
+       ur = MAKE_UR(ctx, object, invocation);
+
+       if (req_data_len)
+               tcore_user_request_set_data(ur, req_data_len, req_data);
+       tcore_user_request_set_command(ur, req_command);
+
+       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
+       if (ret != TCORE_RETURN_SUCCESS) {
+               err("tcore_communicator_dispatch_request() : (0x%x)", ret);
+
+               tcore_user_request_unref(ur);
+       }
+
+       return ret;
+}
+
+void dtapi_dispatch_request(struct custom_data *ctx,
+       void *object, GDBusMethodInvocation *invocation,
+       enum tcore_request_command req_command,
+       void *req_data, unsigned int req_data_len)
+{
+       TReturn ret;
+
+       ret = dtapi_dispatch_request_ex(ctx, object, invocation,
+               req_command, req_data, req_data_len);
+       if (ret != TCORE_RETURN_SUCCESS) {
+               err("dtapi_dispatch_request_ex() : (0x%x)", ret);
+
+               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+       }
+}
similarity index 89%
rename from src/common.h
rename to src/dtapi_common.h
index 86f4ce7..b65ca5f 100644 (file)
 
 #define AC_MANAGER             "telephony_framework::api_manager"
 #define AC_CALL                        "telephony_framework::api_call"
-#define AC_GPS                 "telephony_framework::api_gps"
 #define AC_MODEM               "telephony_framework::api_modem"
 #define AC_NETWORK             "telephony_framework::api_network"
-#define AC_PHONEBOOK   "telephony_framework::api_phonebook"
+#define AC_PHONEBOOK           "telephony_framework::api_phonebook"
 #define AC_SAP                 "telephony_framework::api_sap"
 #define AC_SAT                 "telephony_framework::api_sat"
 #define AC_SIM                 "telephony_framework::api_sim"
 #define AC_SMS                 "telephony_framework::api_sms"
 #define AC_SS                  "telephony_framework::api_ss"
 
-#define MY_DBUS_PATH   "/org/tizen/telephony"
+#define MY_DBUS_PATH           "/org/tizen/telephony"
 #define MY_DBUS_SERVICE        "org.tizen.telephony"
 
 enum dbus_tapi_sim_slot_id {
@@ -83,9 +82,12 @@ struct dbus_request_info {
 #define DEFAULT_MSG_REQ_FAILED "Request failed"
 
 #define GET_CP_NAME(invocation) dbus_plugin_get_cp_name_by_object_path(g_dbus_method_invocation_get_object_path(invocation))
-#define MAKE_UR(ctx,object,invocation) dbus_plugin_macro_user_request_new(ctx, object, invocation)
-#define FAIL_RESPONSE(ivc,msg) g_dbus_method_invocation_return_error (ivc, \
-               G_DBUS_ERROR, G_DBUS_ERROR_FAILED, msg);
+#define MAKE_UR(ctx, object, invocation) dbus_plugin_macro_user_request_new(ctx, object, invocation)
+#define FAIL_RESPONSE(ivc, msg) g_dbus_method_invocation_return_error (ivc, \
+       G_DBUS_ERROR, G_DBUS_ERROR_FAILED, msg);
+
+gboolean dtapi_init(TcorePlugin *p);
+void dtapi_deinit(TcorePlugin *p);
 
 char *dbus_plugin_get_cp_name_by_object_path(const char *object_path);
 UserRequest *dbus_plugin_macro_user_request_new(struct custom_data *ctx, void *object, GDBusMethodInvocation *invocation);
@@ -94,6 +96,15 @@ gboolean check_access_control (cynara *p_cynara, GDBusMethodInvocation *invoc, c
 gboolean dbus_plugin_util_load_xml(char *docname, char *groupname, void **i_doc, void **i_root_node);
 void dbus_plugin_util_unload_xml(void **i_doc, void **i_root_node);
 
+void dtapi_dispatch_request(struct custom_data *ctx,
+       void *object, GDBusMethodInvocation *invocation,
+       enum tcore_request_command req_command,
+       void *req_data, unsigned int req_data_len);
+TReturn dtapi_dispatch_request_ex(struct custom_data *ctx,
+       void *object, GDBusMethodInvocation *invocation,
+       enum tcore_request_command req_command,
+       void *req_data, unsigned int req_data_len);
+
 gboolean dbus_plugin_setup_network_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx);
 gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data);
 gboolean dbus_plugin_network_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data);
@@ -130,14 +141,10 @@ gboolean dbus_plugin_setup_modem_interface(TelephonyObjectSkeleton *object, stru
 gboolean dbus_plugin_modem_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data);
 gboolean dbus_plugin_modem_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data);
 
-gboolean dbus_plugin_setup_gps_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx);
-gboolean dbus_plugin_gps_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data);
-gboolean dbus_plugin_gps_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data);
-
 gboolean dbus_plugin_setup_oem_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx);
 gboolean dbus_plugin_oem_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data);
 gboolean dbus_plugin_oem_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data);
 
-enum dbus_tapi_sim_slot_id get_sim_slot_id_by_cp_name(char *cp_name);
+enum dbus_tapi_sim_slot_id get_sim_slot_id_by_cp_name(const char *cp_name);
 
-#endif
+#endif /* __COMMON_H__ */
similarity index 77%
rename from src/desc-dbus.c
rename to src/dtapi_main.c
index c085818..4224c5c 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
-#include <pthread.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <time.h>
+
 #include <glib.h>
 #include <gio/gio.h>
 
 #include <tcore.h>
 #include <server.h>
 #include <plugin.h>
-#include <hal.h>
 #include <communicator.h>
 #include <storage.h>
-#include <queue.h>
 #include <user_request.h>
 #include <co_network.h>
 #include <co_sim.h>
 #include <co_ps.h>
 
-#include "sat_ui_support.h"
-
-#ifndef PLUGIN_VERSION
-#define PLUGIN_VERSION 1
-#endif
-
 #include "generated-code.h"
-#include "common.h"
+#include "dtapi_common.h"
 
-static void initialize_properties(CoreObject *source,
+static void __dtapi_initialize_properties(CoreObject *source,
        TelephonyObjectSkeleton *object)
 {
        TelephonyNetwork *network;
@@ -100,11 +91,11 @@ static void initialize_properties(CoreObject *source,
                telephony_sim_set_cf_state(sim, FALSE);
 }
 
-static void add_modem(struct custom_data *ctx, TcorePlugin *p)
+static void __dtapi_add_modem(struct custom_data *ctx, TcorePlugin *p)
 {
        TelephonyObjectSkeleton *object;
        char *path = NULL;
-       GSList *co_list;
+       CoreObject *co;
        const char *cp_name;
 
        /* Get CP Name */
@@ -119,89 +110,90 @@ static void add_modem(struct custom_data *ctx, TcorePlugin *p)
        object = g_hash_table_lookup(ctx->objects, path);
        if (object) {
                dbg("DBUS interface object(%p) already created (path: %s)", object, path);
-               goto OUT;
+
+               /* Freeing memory */
+               g_free(path);
+
+               return;
        }
 
        object = telephony_object_skeleton_new(path);
        if (object == NULL) {
                err("New DBUS object is NULL");
-               goto OUT;
+
+               /* Freeing memory */
+               g_free(path);
+
+               return;
        }
 
        info("New DBUS object(%p) created (path: %s)", object, path);
        g_hash_table_insert(ctx->objects, g_strdup(path), object);
 
-       /* Add interfaces */
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_MODEM);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* Freeing memory */
+       g_free(path);
+
+       /*
+        * Add interfaces
+        *
+        * Interfaces are exposed only if Core object is available (supported)
+        */
+       /* Modem interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_MODEM);
+       if (co)
                dbus_plugin_setup_modem_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_CALL);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* Call interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_CALL);
+       if (co)
                dbus_plugin_setup_call_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_NETWORK);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* Network interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_NETWORK);
+       if (co)
                dbus_plugin_setup_network_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_SS);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* SS interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SS);
+       if (co)
                dbus_plugin_setup_ss_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_SMS);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* SMS interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SMS);
+       if (co)
                dbus_plugin_setup_sms_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_SAT);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* SAT interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SAT);
+       if (co)
                dbus_plugin_setup_sat_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_PHONEBOOK);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* Phonebook interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_PHONEBOOK);
+       if (co)
                dbus_plugin_setup_phonebook_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_SAP);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* SAP interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SAP);
+       if (co)
                dbus_plugin_setup_sap_interface(object, ctx);
-       }
 
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_SIM);
-       if (co_list) {
-               g_slist_free(co_list);
+       /* SIM interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SIM);
+       if (co)
                dbus_plugin_setup_sim_interface(object, ctx);
-       }
-
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_GPS);
-       if (co_list) {
-               g_slist_free(co_list);
-               dbus_plugin_setup_gps_interface(object, ctx);
-       }
-       dbus_plugin_setup_oem_interface(object, ctx);
-       /* Export the Object to Manager */
-       g_dbus_object_manager_server_export(ctx->manager, G_DBUS_OBJECT_SKELETON(object));
 
+       /* OEM interface */
+       co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_CUSTOM);
+       if (co)
+               dbus_plugin_setup_oem_interface(object, ctx);
 
-OUT:
-       /* Freeing memory */
-       g_free(path);
+       /* Export the Object to Manager */
+       g_dbus_object_manager_server_export(ctx->manager,
+       G_DBUS_OBJECT_SKELETON(object));
 }
 
-static void refresh_object(struct custom_data *ctx)
+static void __dtapi_refresh_object(struct custom_data *ctx)
 {
        GSList *modem_plg_list;
        TcorePlugin *modem_plg;
@@ -215,18 +207,144 @@ static void refresh_object(struct custom_data *ctx)
        modem_plg_list = tcore_server_get_modem_plugin_list(ctx->server);
        for (cur = modem_plg_list; cur; cur = cur->next) {
                modem_plg = cur->data;
-               if (modem_plg == NULL) {
-                       dbg("No Modem Plug-in");
-                       continue;
-               }
-
-               /* Add modem */
-               add_modem(ctx, modem_plg);
+               if (modem_plg)
+                       __dtapi_add_modem(ctx, modem_plg); /* Add modem */
        }
        g_slist_free(modem_plg_list);
 }
 
-static TReturn send_response(Communicator *comm, UserRequest *ur, enum tcore_response_command command, unsigned int data_len, const void *data)
+static gboolean on_manager_getmodems(TelephonyManager *mgr,
+       GDBusMethodInvocation  *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       GSList *cp_name_list;
+       gchar **list;
+       const char *name = NULL;
+       int count;
+
+       cp_name_list = tcore_server_get_cp_name_list(ctx->server);
+       if (cp_name_list == NULL) {
+               telephony_manager_complete_get_modems(mgr, invocation, &name);
+               return TRUE;
+       }
+
+       count = g_slist_length(cp_name_list);
+       list = g_try_malloc0(sizeof(gchar *) * (count + 1));
+       if (list == NULL) {
+               err("Failed to allocate list");
+               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+
+               /* Freeing the received list of CP names */
+               g_slist_free_full(cp_name_list, g_free);
+
+               return TRUE;
+       }
+
+       count = 0;
+       for ( ; cp_name_list ; cp_name_list = cp_name_list->next) {
+               name = cp_name_list->data;
+               list[count] = g_strdup(name);
+               dbg("list[%d]: %s", count, list[count]);
+               count++;
+       }
+
+       telephony_manager_complete_get_modems(mgr, invocation, (const gchar **)list);
+
+       /* Free memory */
+       for (; count >= 0; count--)
+               g_free(list[count]);
+       g_free(list);
+
+       /* Freeing the received list of CP names */
+       g_slist_free_full(cp_name_list, g_free);
+
+       return TRUE;
+}
+
+static void on_name_lost(GDBusConnection *conn,
+       const gchar *name, gpointer user_data)
+{
+       info("Lost the name '%s' on the Session bus!!!", name);
+}
+
+static void on_name_acquired(GDBusConnection *conn,
+       const gchar *name, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       Storage *strg;
+       int count;
+
+       ctx->name_acquired = TRUE; /* Setting Bus acquried flag after Bus name is acquired */
+
+       info("Acquired the name '%s' on the Session bus", name);
+       strg = tcore_server_find_storage(ctx->server, "vconf");
+
+       count = tcore_storage_get_int(strg, STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT);
+       if (count < 0) {
+               err("SIM slot count not yet set");
+       } else {
+               if (tcore_storage_get_bool(strg, STORAGE_KEY_TELEPHONY_READY) == FALSE) {
+                       gboolean b_set;
+
+                       b_set = tcore_storage_set_bool(strg, STORAGE_KEY_TELEPHONY_READY, TRUE);
+                       if (b_set == FALSE) {
+                               err("Fail to set telephony ready");
+
+                               /* Reset STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT */
+                               b_set = tcore_storage_set_int(strg, STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT, -1);
+                               warn("Reset STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT!!!");
+                       } else {
+#ifdef ENABLE_KPI_LOGS
+                               TIME_CHECK("Setting VCONFKEY_TELEPHONY_READY to TRUE");
+#else
+                               msg("Setting VCONFKEY_TELEPHONY_READY to TRUE");
+#endif
+                       }
+               }
+       }
+}
+
+static void on_bus_acquired(GDBusConnection *conn,
+       const gchar *name, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+
+       info("dbus registered");
+
+       /*
+        * Refresh object
+        */
+       __dtapi_refresh_object(ctx);
+
+       /*
+        * Add interface to 'default' object path
+        */
+       ctx->mgr = telephony_manager_skeleton_new();
+
+       /*
+        * Register Manager signal handler(s)
+        */
+       g_signal_connect(ctx->mgr,
+               "handle-get-modems",
+               G_CALLBACK(on_manager_getmodems),
+               ctx); /* user_data */
+
+       /*
+        * Export interface onto Connection (conn) with 'path' (MY_DBUS_PATH)
+        */
+       g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(ctx->mgr),
+               conn, MY_DBUS_PATH, NULL);
+
+       /*
+        * Exports all objects managed by 'manager' on Connection (conn)
+        */
+       g_dbus_object_manager_server_set_connection(ctx->manager, conn);
+
+       dbg("Aquire DBUS - COMPLETE");
+}
+
+static TReturn dtapi_send_response(Communicator *comm, UserRequest *ur,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        struct custom_data *ctx = NULL;
        struct dbus_request_info *dbus_info;
@@ -246,8 +364,8 @@ static TReturn send_response(Communicator *comm, UserRequest *ur, enum tcore_res
 
        if (!data) {
                err("data is NULL");
-               g_dbus_method_invocation_return_error(dbus_info->invocation,
-                       G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Request failed");
+               FAIL_RESPONSE(dbus_info->invocation, "Request failed");
+
                return TCORE_RETURN_SUCCESS;
        }
 
@@ -256,54 +374,51 @@ static TReturn send_response(Communicator *comm, UserRequest *ur, enum tcore_res
        switch (command & (TCORE_RESPONSE | 0x0FF00000)) {
        case TRESP_CALL:
                ret = dbus_plugin_call_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_SS:
                ret = dbus_plugin_ss_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_PS:
-               break;
+               warn("Unhandled command (0x%x)", command);
+       break;
 
        case TRESP_SIM:
                ret = dbus_plugin_sim_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_SAP:
                ret = dbus_plugin_sap_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_PHONEBOOK:
                ret = dbus_plugin_phonebook_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_MODEM:
                ret = dbus_plugin_modem_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_SMS:
                ret = dbus_plugin_sms_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_SAT:
                ret = dbus_plugin_sat_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_CUSTOM:
                ret = dbus_plugin_oem_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        case TRESP_NETWORK:
                ret = dbus_plugin_network_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
-
-       case TRESP_GPS:
-               ret = dbus_plugin_gps_response(ctx, ur, dbus_info, command, data_len, data);
-               break;
+       break;
 
        default:
                warn("unknown command (0x%x)", command);
-               break;
+       break;
        }
 
        if (ret == TRUE)
@@ -312,7 +427,8 @@ static TReturn send_response(Communicator *comm, UserRequest *ur, enum tcore_res
                return TCORE_RETURN_FAILURE;
 }
 
-static TReturn send_notification(Communicator *comm, CoreObject *source, enum tcore_notification_command command, unsigned int data_len, const void *data)
+static TReturn dtapi_send_notification(Communicator *comm, CoreObject *source,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
        struct custom_data *ctx = NULL;
        unsigned int noti = 0;
@@ -340,11 +456,12 @@ static TReturn send_notification(Communicator *comm, CoreObject *source, enum tc
 
                        cp_name = tcore_server_get_cp_name_by_plugin((TcorePlugin *)data);
                        dbg("Modem Plug-in (%s) is added... Exporting interfaces for the modem", cp_name);
-                       add_modem(ctx, (TcorePlugin *)data);
+
+                       __dtapi_add_modem(ctx, (TcorePlugin *)data); /* Add modem */
 
                        ret = TRUE;
-                       break;
                }
+               break;
 
                case TNOTI_SERVER_ADDED_MODEM_PLUGIN_COMPLETED: {
                        Storage *strg;
@@ -389,8 +506,9 @@ static TReturn send_notification(Communicator *comm, CoreObject *source, enum tc
                                dbg("Bus acquired...[%s]", (ctx->name_acquired) ? "YES" : "NO");
                        }
                        ret = TRUE;
-                       break;
                }
+               break;
+
                case TNOTI_SERVER_REMOVED_MODEM_PLUGIN: {
                        TcorePlugin *plugin = tcore_communicator_ref_plugin(comm);
                        TelephonyObjectSkeleton *object;
@@ -409,26 +527,48 @@ static TReturn send_notification(Communicator *comm, CoreObject *source, enum tc
                        /* Look-up Hash table for Object */
                        object = g_hash_table_lookup(ctx->objects, path);
 
-                       initialize_properties(source, object);
+                       __dtapi_initialize_properties(source, object);
 
                        g_free(path);
-                       break;
                }
+               break;
+
                case TNOTI_SERVER_RUN:
                        dbg("TNOTI_SERVER_RUN");
-                       break;
+               break;
+
                case TNOTI_SERVER_ADDED_PLUGIN:
                        dbg("TNOTI_SERVER_ADDED_PLUGIN");
-                       break;
+               break;
+
                case TNOTI_SERVER_ADDED_COMMUNICATOR:
                        dbg("TNOTI_SERVER_ADDED_COMMUNICATOR");
-                       break;
+               break;
+
                case TNOTI_SERVER_ADDED_HAL:
                        dbg("TNOTI_SERVER_ADDED_HAL");
-                       break;
+               break;
+
+               case TNOTI_SERVER_EXIT: {
+                       Storage *strg = NULL;
+
+                       dbg("TNOTI_SERVER_EXIT");
+
+                       /* Reset STORAGE_KEY_TELEPHONY_READY */
+                       strg = tcore_server_find_storage(ctx->server, "vconf");
+                       tcore_storage_set_bool(strg, STORAGE_KEY_TELEPHONY_READY, FALSE);
+
+                       /*
+                        * Exit Telephony daemon
+                        */
+                       if (TCORE_RETURN_SUCCESS == tcore_server_exit(ctx->server))
+                               ret = TRUE;
+               }
+               break;
+
                default:
                        warn("Unsupported System notification: (0x%x)", command);
-                       break;
+               break;
                }
        } else {
                TelephonyObjectSkeleton *object;
@@ -457,47 +597,43 @@ static TReturn send_notification(Communicator *comm, CoreObject *source, enum tc
                switch (noti) {
                case TNOTI_CALL:
                        ret = dbus_plugin_call_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_SS:
                        ret = dbus_plugin_ss_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_PS:
                        /* dbg("PS Notification (0x%x)... Not handled!!!", noti); */
-                       break;
+               break;
 
                case TNOTI_SIM:
                        ret = dbus_plugin_sim_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_SAP:
                        ret = dbus_plugin_sap_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_PHONEBOOK:
                        ret = dbus_plugin_phonebook_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_MODEM:
                        ret = dbus_plugin_modem_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_SMS:
                        ret = dbus_plugin_sms_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_SAT:
                        ret = dbus_plugin_sat_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                case TNOTI_NETWORK:
                        ret = dbus_plugin_network_notification(ctx, source, object, command, data_len, data);
-                       break;
-
-               case TNOTI_GPS:
-                       ret = dbus_plugin_gps_notification(ctx, source, object, command, data_len, data);
-                       break;
+               break;
 
                default:
                        if ((command & (TCORE_NOTIFICATION | 0x0F000000)) == TNOTI_CUSTOM)
@@ -505,7 +641,7 @@ static TReturn send_notification(Communicator *comm, CoreObject *source, enum tc
                        else
                                warn("Unknown/Unhandled Notification: [0x%x]", command);
 
-                       break;
+               break;
                }
        }
 
@@ -515,144 +651,22 @@ static TReturn send_notification(Communicator *comm, CoreObject *source, enum tc
                return TCORE_RETURN_FAILURE;
 }
 
-
-static gboolean
-on_manager_getmodems(TelephonyManager *mgr,
-               GDBusMethodInvocation  *invocation,
-               gpointer                user_data)
-{
-       struct custom_data *ctx = user_data;
-       GSList *cp_name_list;
-       gchar **list;
-       const char *name = NULL;
-       int count;
-
-       cp_name_list = tcore_server_get_cp_name_list(ctx->server);
-       if (cp_name_list == NULL) {
-               telephony_manager_complete_get_modems(mgr, invocation, &name);
-               return TRUE;
-       }
-
-       count = g_slist_length(cp_name_list);
-       list = g_try_malloc0(sizeof(gchar *) * (count+1));
-       if (list == NULL) {
-               err("Failed to allocate list");
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-
-               /* Freeing the received list of CP names */
-               g_slist_free_full(cp_name_list, g_free);
-               return TRUE;
-       }
-
-       count = 0;
-       for ( ; cp_name_list ; cp_name_list = cp_name_list->next) {
-               name = cp_name_list->data;
-               list[count] = g_strdup(name);
-               dbg("list[%d]: %s", count, list[count]);
-               count++;
-       }
-
-       telephony_manager_complete_get_modems(mgr, invocation, (const gchar **)list);
-
-       /* Free memory */
-       for (; count >= 0; count--)
-               g_free(list[count]);
-
-       g_free(list);
-
-       /* Freeing the received list of CP names */
-       g_slist_free_full(cp_name_list, g_free);
-
-       return TRUE;
-}
-
-static void on_name_lost(GDBusConnection *conn, const gchar *name, gpointer user_data)
-{
-       info("Lost the name %s on the session bus\n", name);
-}
-
-static void on_name_acquired(GDBusConnection *conn, const gchar *name, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       Storage *strg;
-       gboolean b_set;
-       int count;
-
-       ctx->name_acquired = TRUE; /* Setting Bus acquried flag after Bus name is acquired */
-
-       info("Acquired the name %s on the session bus", name);
-       strg = tcore_server_find_storage(ctx->server, "vconf");
-
-       count = tcore_storage_get_int(strg, STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT);
-       if (count < 0) {
-               err("SIM slot count not yet set");
-       } else {
-               if (tcore_storage_get_bool(strg, STORAGE_KEY_TELEPHONY_READY) == FALSE) {
-                       b_set = tcore_storage_set_bool(strg, STORAGE_KEY_TELEPHONY_READY, TRUE);
-                       if (b_set == FALSE) {
-                               err("Fail to set telephony ready");
-
-                               /* Reset STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT */
-                               b_set = tcore_storage_set_int(strg, STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT, -1);
-                               warn("Reset STORAGE_KEY_TELEPHONY_SIM_SLOT_COUNT!!!");
-                       } else {
-#ifdef ENABLE_KPI_LOGS
-                               TIME_CHECK("Setting VCONFKEY_TELEPHONY_READY to TRUE");
-#else
-                               msg("Setting VCONFKEY_TELEPHONY_READY to TRUE");
-#endif
-                       }
-               }
-       }
-}
-
-static void on_bus_acquired(GDBusConnection *conn, const gchar *name, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-
-       info("dbus registered");
-
-       refresh_object(ctx);
-
-       /* Add interface to default object path */
-       ctx->mgr = telephony_manager_skeleton_new();
-       g_signal_connect(ctx->mgr,
-                       "handle-get-modems",
-                       G_CALLBACK(on_manager_getmodems),
-                       ctx); /* user_data */
-
-       g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(ctx->mgr), conn, MY_DBUS_PATH, NULL);
-
-       g_dbus_object_manager_server_set_connection(ctx->manager, conn);
-
-       dbg("Aquire DBUS - COMPLETE");
-
-
-}
-
-struct tcore_communitor_operations ops = {
-       .send_response = send_response,
-       .send_notification = send_notification,
+/*
+ * DBUS communicator operations
+ */
+struct tcore_communicator_operations dbus_ops = {
+       .send_response = dtapi_send_response,
+       .send_notification = dtapi_send_notification,
 };
 
-static gboolean on_load()
-{
-       dbg("i'm load!");
-
-       return TRUE;
-}
-
-static gboolean on_init(TcorePlugin *p)
+gboolean dtapi_init(TcorePlugin *p)
 {
        Communicator *comm;
        struct custom_data *data;
        guint id;
        cynara *p_cynara = NULL;
 
-       if (!p)
-               return FALSE;
-
-       dbg("i'm init!");
+       dbg("Enter");
 
        /* Initialize cynara handle */
        if (CYNARA_API_SUCCESS == cynara_initialize(&p_cynara, NULL)) {
@@ -669,7 +683,7 @@ static gboolean on_init(TcorePlugin *p)
        data->p_cynara = p_cynara;
        data->plugin = p;
 
-       comm = tcore_communicator_new(p, "dbus", &ops);
+       comm = tcore_communicator_new(p, "dbus", &dbus_ops);
        tcore_communicator_link_user_data(comm, data);
 
        data->comm = comm;
@@ -681,23 +695,23 @@ static gboolean on_init(TcorePlugin *p)
        dbg("data = %p", data);
 
        id = g_bus_own_name(G_BUS_TYPE_SYSTEM,
-                       MY_DBUS_SERVICE,
-                       G_BUS_NAME_OWNER_FLAGS_REPLACE,
-                       on_bus_acquired,
-                       on_name_acquired, on_name_lost,
-                       data,
-                       NULL);
+               MY_DBUS_SERVICE,
+               G_BUS_NAME_OWNER_FLAGS_REPLACE,
+               on_bus_acquired,
+               on_name_acquired, on_name_lost,
+               data,
+               NULL);
 
        data->owner_id = id;
        dbg("owner id=[%d]", data->owner_id);
 
        data->manager = g_dbus_object_manager_server_new(MY_DBUS_PATH);
-       refresh_object(data);
+       __dtapi_refresh_object(data);
 
        return TRUE;
 }
 
-static void on_unload(TcorePlugin *p)
+void dtapi_deinit(TcorePlugin *p)
 {
        struct custom_data *data = 0;
        Communicator *comm = 0;
@@ -705,10 +719,7 @@ static void on_unload(TcorePlugin *p)
        GSList *list = NULL;
        struct cached_data *object = NULL;
 
-       if (!p)
-               return;
-
-       dbg("i'm unload");
+       dbg("Enter");
 
        comm = tcore_server_find_communicator(s, "dbus");
        if (!comm)
@@ -741,11 +752,3 @@ static void on_unload(TcorePlugin *p)
        tcore_server_remove_communicator(s, comm);
 }
 
-EXPORT_API struct tcore_plugin_define_desc plugin_define_desc = {
-       .name = "NEW_DBUS_COMMUNICATOR",
-       .priority = TCORE_PLUGIN_PRIORITY_HIGH,
-       .version = PLUGIN_VERSION,
-       .load = on_load,
-       .init = on_init,
-       .unload = on_unload
-};
similarity index 51%
rename from src/modem.c
rename to src/dtapi_modem.c
index 254ccbc..d4b7181 100644 (file)
  */
 
 #include <stdio.h>
-#include <string.h>
-#include <pthread.h>
-#include <unistd.h>
 #include <stdlib.h>
-#include <time.h>
+
 #include <glib.h>
-#include <gio/gio.h>
 
 #include <tcore.h>
 #include <server.h>
-#include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <storage.h>
-#include <queue.h>
 #include <user_request.h>
 #include <co_modem.h>
 
 #include "generated-code.h"
-#include "common.h"
-
+#include "dtapi_common.h"
 
-static gboolean
-on_modem_set_power(TelephonyModem *modem, GDBusMethodInvocation *invocation,
-       gint mode, gpointer user_data)
+static gboolean on_modem_set_power(TelephonyModem *modem,
+       GDBusMethodInvocation *invocation, gint mode, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
        enum tcore_request_command command;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "x"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
-
        switch (mode) {
        case MODEM_STATE_ONLINE:
                command = TREQ_MODEM_POWER_ON;
        break;
+
        case MODEM_STATE_OFFLINE:
                command = TREQ_MODEM_POWER_OFF;
        break;
+
        case MODEM_STATE_RESET:
                command = TREQ_MODEM_POWER_RESET;
        break;
+
        case MODEM_STATE_LOW:
                command = TREQ_MODEM_POWER_LOW;
        break;
+
        default:
-               ret = TCORE_RETURN_EINVAL;
-               goto ERR;
+               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+               return TRUE;
        }
 
-       tcore_user_request_set_command(ur, command);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               command,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_modem_set_flight_mode(TelephonyModem *modem, GDBusMethodInvocation *invocation,
-       gboolean enable, gpointer user_data)
+static gboolean on_modem_set_flight_mode(TelephonyModem *modem,
+       GDBusMethodInvocation *invocation, gboolean enable, gpointer user_data)
 {
-       struct treq_modem_set_flightmode data;
+       struct treq_modem_set_flightmode req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
+       req.enable = enable;
 
-       data.enable = enable;
-       if (TCORE_RETURN_SUCCESS != tcore_user_request_set_data(ur, sizeof(data), &data))
-               goto ERR;
-       tcore_user_request_set_command(ur, TREQ_MODEM_SET_FLIGHTMODE);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               TREQ_MODEM_SET_FLIGHTMODE,
+               &req, sizeof(struct treq_modem_set_flightmode));
 
        return TRUE;
 }
 
-static gboolean
-on_modem_get_flight_mode(TelephonyModem *modem, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_modem_get_flight_mode(TelephonyModem *modem,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
-
-       tcore_user_request_set_data(ur, 0, NULL);
-       tcore_user_request_set_command(ur, TREQ_MODEM_GET_FLIGHTMODE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               TREQ_MODEM_GET_FLIGHTMODE,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_modem_get_version(TelephonyModem *modem, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_modem_get_version(TelephonyModem *modem,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
-
-       tcore_user_request_set_command(ur, TREQ_MODEM_GET_VERSION);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               TREQ_MODEM_GET_VERSION,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_modem_get_serial_number(TelephonyModem *modem, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_modem_get_serial_number(TelephonyModem *modem,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
-
-       tcore_user_request_set_command(ur, TREQ_MODEM_GET_SN);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               TREQ_MODEM_GET_SN,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_modem_get_imei(TelephonyModem *modem, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_modem_get_imei(TelephonyModem *modem,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
-
-       tcore_user_request_set_command(ur, TREQ_MODEM_GET_IMEI);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               TREQ_MODEM_GET_IMEI,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_modem_set_dun_pin_ctrl(TelephonyModem *modem, GDBusMethodInvocation *invocation,
-       gint arg_signal, gboolean arg_status, gpointer user_data)
+static gboolean on_modem_set_dun_pin_ctrl(TelephonyModem *modem,
+       GDBusMethodInvocation *invocation,
+       gint signal, gboolean status, gpointer user_data)
 {
-       struct treq_modem_set_dun_pin_control data;
+       struct treq_modem_set_dun_pin_control req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "x"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
-
-       data.signal = arg_signal;
-       data.status = arg_status;
+       req.signal = signal;
+       req.status = status;
 
-       if (TCORE_RETURN_SUCCESS != tcore_user_request_set_data(ur, sizeof(data), &data))
-               goto ERR;
-       tcore_user_request_set_command(ur, TREQ_MODEM_SET_DUN_PIN_CONTROL);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               TREQ_MODEM_GET_VERSION,
+               &req, sizeof(struct treq_modem_set_dun_pin_control));
 
        return TRUE;
 }
 
 static gboolean on_modem_get_device_info(TelephonyModem *modem,
-       GDBusMethodInvocation *invocation,
-       gpointer user_data)
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_MODEM, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, modem, invocation);
-       if (ur == NULL)
-               goto ERR;
-
-       tcore_user_request_set_command(ur, TREQ_MODEM_GET_DEVICE_INFO);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS)
-               goto ERR;
-
-       return TRUE;
-
-ERR:
-       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-       tcore_user_request_unref(ur);
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, modem, invocation,
+               TREQ_MODEM_GET_DEVICE_INFO,
+               NULL, 0);
 
        return TRUE;
 }
 
-gboolean dbus_plugin_setup_modem_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
+gboolean dbus_plugin_setup_modem_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
 {
        TelephonyModem *modem;
 
@@ -321,6 +209,9 @@ gboolean dbus_plugin_setup_modem_interface(TelephonyObjectSkeleton *object, stru
 
        dbg("modem: [%p]", modem);
 
+       /*
+        * Register signal handlers for Modem interface
+        */
        g_signal_connect(modem,
                "handle-set-power",
                G_CALLBACK(on_modem_set_power), ctx);
@@ -353,50 +244,56 @@ gboolean dbus_plugin_setup_modem_interface(TelephonyObjectSkeleton *object, stru
                "handle-get-device-info",
                G_CALLBACK(on_modem_get_device_info), ctx);
 
+       /*
+        * Initialize 'properties'
+        */
        telephony_modem_set_power(modem, MODEM_STATE_UNKNOWN);
 
        return TRUE;
 }
 
-gboolean dbus_plugin_modem_response(struct custom_data *ctx, UserRequest *ur,
-       struct dbus_request_info *dbus_info, enum tcore_response_command command,
-       unsigned int data_len, const void *data)
+gboolean dbus_plugin_modem_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        char *cpname = dbus_info ? GET_CP_NAME(dbus_info->invocation) : "";
 
        switch (command) {
        case TRESP_MODEM_SET_FLIGHTMODE: {
                const struct tresp_modem_set_flightmode *resp_set_flight_mode = data;
-               int info_set_flight_mode = 3;   /* TAPI_POWER_FLIGHT_MODE_RESP_FAIL */
+               int set_flight_mode = 3;        /* TAPI_POWER_FLIGHT_MODE_RESP_FAIL */
 
                if (resp_set_flight_mode->result == TCORE_RETURN_SUCCESS) {
                        const struct treq_modem_set_flightmode *treq_data;
                        treq_data = tcore_user_request_ref_data(ur, NULL);
                        if (treq_data == NULL) {
                                warn("No Request data!!!");
-                               info_set_flight_mode = 3;       /* TAPI_POWER_FLIGHT_MODE_RESP_FAIL */
+                               set_flight_mode = 3;    /* TAPI_POWER_FLIGHT_MODE_RESP_FAIL */
                        } else if (treq_data->enable == TRUE) {
-                               info_set_flight_mode = 1;       /* TAPI_POWER_FLIGHT_MODE_RESP_ON */
+                               set_flight_mode = 1;    /* TAPI_POWER_FLIGHT_MODE_RESP_ON */
                        } else {
-                               info_set_flight_mode = 2;       /* TAPI_POWER_FLIGHT_MODE_RESP_OFF */
+                               set_flight_mode = 2;    /* TAPI_POWER_FLIGHT_MODE_RESP_OFF */
                        }
                }
 
-               dbg("[%s] SET_FLIGHTMODE - [%s] [%s]",
-                       cpname, (resp_set_flight_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
-                       (info_set_flight_mode == 1 ? "ON" : (info_set_flight_mode == 2 ? "OFF" : "Request FAIL")));
+               dbg("[%s] SET_FLIGHTMODE - [%s] [%s]", cpname,
+                       (resp_set_flight_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+                       (set_flight_mode == 1 ? "ON" :
+                       (set_flight_mode == 2 ? "OFF" : "Request FAIL")));
 
-               telephony_modem_complete_set_flight_mode(dbus_info->interface_object, dbus_info->invocation,
-                       info_set_flight_mode);
+               telephony_modem_complete_set_flight_mode(dbus_info->interface_object,
+                       dbus_info->invocation, set_flight_mode);
        }
        break;
 
        case TRESP_MODEM_GET_FLIGHTMODE: {
                const struct tresp_modem_get_flightmode *resp_get_flight_mode = data;
 
-               dbg("[%s] GET_FLIGHTMODE - [%s]", cpname, (resp_get_flight_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] GET_FLIGHTMODE - [%s]", cpname,
+                       (resp_get_flight_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_modem_complete_get_flight_mode(dbus_info->interface_object, dbus_info->invocation,
+               telephony_modem_complete_get_flight_mode(dbus_info->interface_object,
+                       dbus_info->invocation,
                        resp_get_flight_mode->enable, resp_get_flight_mode->result);
        }
        break;
@@ -405,45 +302,52 @@ gboolean dbus_plugin_modem_response(struct custom_data *ctx, UserRequest *ur,
                const struct tresp_modem_power_on *resp_modem_power_on = data;
                int result = 0;
 
-               dbg("[%s] POWER_ON - [%s]", cpname, (resp_modem_power_on->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] POWER_ON - [%s]", cpname,
+                       (resp_modem_power_on->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               /*TBD: value should be defined in TAPI*/
+               /* TBD: value should be defined in TAPI */
                if (resp_modem_power_on->result == TCORE_RETURN_EALREADY)
                        result = 1;
                else if (resp_modem_power_on->result == TCORE_RETURN_OPERATION_ABORTED)
                        result = 2;
 
-               telephony_modem_complete_set_power(dbus_info->interface_object, dbus_info->invocation, result);
+               telephony_modem_complete_set_power(dbus_info->interface_object,
+                       dbus_info->invocation, result);
        }
        break;
 
        case TRESP_MODEM_POWER_OFF: {
                dbg("[%s] POWER_OFF", cpname);
 
-               telephony_modem_complete_set_power(dbus_info->interface_object, dbus_info->invocation, 0);
+               telephony_modem_complete_set_power(dbus_info->interface_object,
+                       dbus_info->invocation, 0);
        }
        break;
 
        case TRESP_MODEM_POWER_RESET: {
                dbg("[%s] POWER_RESET", cpname);
 
-               telephony_modem_complete_set_power(dbus_info->interface_object, dbus_info->invocation, 0);
+               telephony_modem_complete_set_power(dbus_info->interface_object,
+                       dbus_info->invocation, 0);
        }
        break;
 
        case TRESP_MODEM_POWER_LOW: {
                dbg("[%s] POWER_LOW", cpname);
 
-               telephony_modem_complete_set_power(dbus_info->interface_object, dbus_info->invocation, 0);
+               telephony_modem_complete_set_power(dbus_info->interface_object,
+                       dbus_info->invocation, 0);
        }
        break;
 
        case TRESP_MODEM_GET_IMEI: {
                const struct tresp_modem_get_imei *resp_get_imei = data;
 
-               dbg("[%s] GET_IMEI - [%s]", cpname, (resp_get_imei->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] GET_IMEI - [%s]", cpname,
+                       (resp_get_imei->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_modem_complete_get_imei(dbus_info->interface_object, dbus_info->invocation,
+               telephony_modem_complete_get_imei(dbus_info->interface_object,
+                       dbus_info->invocation,
                        resp_get_imei->result, resp_get_imei->imei);
        }
        break;
@@ -451,62 +355,65 @@ gboolean dbus_plugin_modem_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_MODEM_GET_SN: {
                const struct tresp_modem_get_sn *resp_get_sn = data;
 
-               dbg("[%s] GET_SN - [%s]", cpname, (resp_get_sn->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] GET_SN - [%s]", cpname,
+                       (resp_get_sn->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_modem_complete_get_serial_number(dbus_info->interface_object, dbus_info->invocation,
-                       resp_get_sn->result, resp_get_sn->sn, resp_get_sn->meid, resp_get_sn->imei, resp_get_sn->imeisv);
+               telephony_modem_complete_get_serial_number(dbus_info->interface_object,
+                       dbus_info->invocation, resp_get_sn->result,
+                       resp_get_sn->sn, resp_get_sn->meid,
+                       resp_get_sn->imei, resp_get_sn->imeisv);
        }
        break;
 
        case TRESP_MODEM_GET_VERSION: {
                const struct tresp_modem_get_version *resp_get_version = data;
 
-               dbg("[%s] GET_VERSION - [%s]", cpname, (resp_get_version->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] GET_VERSION - [%s]", cpname,
+                       (resp_get_version->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_modem_complete_get_version(dbus_info->interface_object, dbus_info->invocation,
-                               resp_get_version->result,
-                               resp_get_version->software,
-                               resp_get_version->hardware,
-                               resp_get_version->calibration,
-                               resp_get_version->product_code,
-                               resp_get_version->prl_version,
-                               resp_get_version->eri_version);
+               telephony_modem_complete_get_version(dbus_info->interface_object,
+                       dbus_info->invocation, resp_get_version->result,
+                       resp_get_version->software, resp_get_version->hardware,
+                       resp_get_version->calibration, resp_get_version->product_code,
+                       resp_get_version->prl_version, resp_get_version->eri_version);
        }
        break;
 
        case TRESP_MODEM_SET_DUN_PIN_CONTROL: {
                const struct tresp_modem_set_dun_pin_control *resp_dun_pin_ctrl = data;
 
-               dbg("[%s] SET_DUN_PIN_CONTROL - [%s]", cpname, (resp_dun_pin_ctrl->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SET_DUN_PIN_CONTROL - [%s]", cpname,
+                       (resp_dun_pin_ctrl->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_modem_complete_set_dun_pin_ctrl(dbus_info->interface_object, dbus_info->invocation,
-                       resp_dun_pin_ctrl->result);
+               telephony_modem_complete_set_dun_pin_ctrl(dbus_info->interface_object,
+                       dbus_info->invocation, resp_dun_pin_ctrl->result);
        }
        break;
 
        case TRESP_MODEM_GET_DEVICE_INFO: {
                const struct tresp_modem_get_device_info *resp_get_device_info = data;
 
-               dbg("[%s] TGET_DEVICE_INFO - Vendor[%s] Device[%s]", cpname, resp_get_device_info->vendor_name, resp_get_device_info->device_name);
+               dbg("[%s] TGET_DEVICE_INFO - Vendor[%s] Device[%s]", cpname,
+                       resp_get_device_info->vendor_name,
+                       resp_get_device_info->device_name);
 
-               telephony_modem_complete_get_device_info(dbus_info->interface_object, dbus_info->invocation,
-                               resp_get_device_info->result,
-                               resp_get_device_info->vendor_name,
-                               resp_get_device_info->device_name);
+               telephony_modem_complete_get_device_info(dbus_info->interface_object,
+                       dbus_info->invocation, resp_get_device_info->result,
+                       resp_get_device_info->vendor_name, resp_get_device_info->device_name);
        }
        break;
 
        default:
-               err("Unhandled/Unknown Response!!!");
+               err("Unhandled/Unknown Response: [0x%x]", command);
        break;
        }
 
        return TRUE;
 }
 
-gboolean dbus_plugin_modem_notification(struct custom_data *ctx, CoreObject *source,
-       TelephonyObjectSkeleton *object, enum tcore_notification_command command,
-       unsigned int data_len, const void *data)
+gboolean dbus_plugin_modem_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
        TelephonyModem *modem;
        const char *cp_name;
@@ -525,21 +432,28 @@ gboolean dbus_plugin_modem_notification(struct custom_data *ctx, CoreObject *sou
        switch (command) {
        case TNOTI_MODEM_POWER: {
                const struct tnoti_modem_power *info = data;
-
-               dbg("[%s] MODEM_POWER:[%d]", cp_name, info->state);
-
-               if (info->state > MODEM_STATE_MAX)
+               enum modem_state state = info->state;
+
+               dbg("[%s] MODEM_POWER: [%s]", cp_name,
+                       (state == MODEM_STATE_UNKNOWN ? "UNKNOWN" :
+                       (state == MODEM_STATE_ONLINE ? "ONLINE" :
+                       (state == MODEM_STATE_OFFLINE ? "OFFLINE" :
+                       (state == MODEM_STATE_RESET ? "RESET" :
+                       (state == MODEM_STATE_LOW ? "LOW" :
+                       "INTERNAL STATE"))))));
+               if (state > MODEM_STATE_MAX)
                        break;
 
-               telephony_modem_emit_power(modem, info->state);
-               telephony_modem_set_power(modem, info->state);
+               telephony_modem_emit_power(modem, state);
+               telephony_modem_set_power(modem, state);
        }
        break;
 
        case TNOTI_MODEM_DUN_PIN_CONTROL: {
                const struct tnoti_modem_dun_pin_control *pin = data;
 
-               dbg("[%s] MODEM_DUN_PIN_CONTROL (Signal: [0x%2x] Status: [0x%2x])", cp_name, pin->signal, pin->status);
+               dbg("[%s] MODEM_DUN_PIN_CONTROL (Signal: [0x%2x] Status: [0x%2x])",
+                       cp_name, pin->signal, pin->status);
 
                telephony_modem_emit_dun_pin_ctrl(modem, pin->signal, pin->status);
        }
@@ -563,7 +477,7 @@ gboolean dbus_plugin_modem_notification(struct custom_data *ctx, CoreObject *sou
        break;
 
        default:
-               err("Unhandled/Unknown Notification!!!");
+               err("Unhandled/Unknown Notification: [0x%x]", command);
        break;
        }
 
similarity index 61%
rename from src/network.c
rename to src/dtapi_network.c
index f138a5a..46d0c10 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
-#include <pthread.h>
-#include <unistd.h>
 #include <stdlib.h>
-#include <time.h>
+
 #include <glib.h>
-#include <gio/gio.h>
 
 #include <tcore.h>
 #include <server.h>
 #include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <storage.h>
-#include <queue.h>
-#include <user_request.h>
 #include <co_network.h>
-#include <co_sim.h>
-#include <co_ps.h>
 
 #include "generated-code.h"
-#include "common.h"
-
-/* Application used properties */
-#define        NET_PROP_NONE        0x0000
-#define        NET_PROP_SVC_TYPE    0x0001
-#define        NET_PROP_ROAM        0x0002
-#define        NET_PROP_PLMN        0x0004
-#define        NET_PROP_NAME_OPTION 0x0100
-#define        NET_PROP_SPN         0x0200
-#define        NET_PROP_NWNAME      0x0400
-#define        NET_PROP_EMIT        0x0FFF
-
-/* Extra properties */
-#define        NET_PROP_CS          0x1000
-#define        NET_PROP_PS          0x2000
-#define        NET_PROP_ACT         0x4000
-#define        NET_PROP_ALL         0xFFFF
-
-struct network_prop_info {
+#include "dtapi_common.h"
+
+/*
+ * Application used properties
+ */
+#define NET_PROP_NONE          0x0000
+#define NET_PROP_SVC_TYPE      0x0001
+#define NET_PROP_ROAM          0x0002
+#define NET_PROP_PLMN          0x0004
+#define NET_PROP_NAME_OPTION 0x0100
+#define NET_PROP_SPN           0x0200
+#define NET_PROP_NWNAME        0x0400
+#define NET_PROP_EMIT          0x0FFF
+
+/*
+ * Extra properties
+ */
+#define NET_PROP_CS            0x1000
+#define NET_PROP_PS            0x2000
+#define NET_PROP_ACT           0x4000
+#define NET_PROP_ALL           0xFFFF
+
+typedef struct {
        int type;
        int svc_type;
        int ps_type;
@@ -70,7 +64,7 @@ struct network_prop_info {
        char *plmn;
        char *spn;
        char *nwname;
-};
+} NetworkPropertyInfo;
 
 static int __convert_act_to_systemtype(enum telephony_network_access_technology act)
 {
@@ -141,24 +135,29 @@ static int __convert_name_priority_to_option(enum tcore_network_name_priority pr
        switch (priority) {
        case TCORE_NETWORK_NAME_PRIORITY_SPN:
                return 1; /* NETWORK_NAME_OPTION_SPN */
+
        case TCORE_NETWORK_NAME_PRIORITY_NETWORK:
                return 2; /* NETWORK_NAME_OPTION_OPERATOR */
+
        case TCORE_NETWORK_NAME_PRIORITY_ANY:
                return 3; /* NETWORK_NAME_OPTION_ANY */
+
        default:
-               break;
+       break;
        }
+
        return 0; /* NETWORK_NAME_OPTION_NONE */
 }
 
 static void __get_current_network_status(CoreObject *o,
-       struct network_prop_info *current, int req_type)
+       NetworkPropertyInfo *current, int req_type)
 {
        if (!o || !current)
                return;
 
        if (req_type & NET_PROP_SVC_TYPE) {
                enum telephony_network_service_type svc_type;
+
                tcore_network_get_service_type(o, &svc_type);
                current->svc_type = svc_type;
        }
@@ -171,6 +170,7 @@ static void __get_current_network_status(CoreObject *o,
 
        if (req_type & NET_PROP_NAME_OPTION) {
                enum tcore_network_name_priority priority = TCORE_NETWORK_NAME_PRIORITY_UNKNOWN;
+
                tcore_network_get_network_name_priority(o, &priority);
                current->name_option = __convert_name_priority_to_option(priority);
        }
@@ -180,6 +180,7 @@ static void __get_current_network_status(CoreObject *o,
 
        if (req_type & NET_PROP_NWNAME) {
                char *nwname = tcore_network_get_network_name(o, TCORE_NETWORK_NAME_TYPE_FULL);
+
                if (!nwname || strlen(nwname) == 0)
                        nwname = tcore_network_get_network_name(o, TCORE_NETWORK_NAME_TYPE_SHORT);
                current->nwname = nwname;
@@ -188,24 +189,27 @@ static void __get_current_network_status(CoreObject *o,
        if (req_type & NET_PROP_CS) {
                enum telephony_network_service_domain_status cs;
                tcore_network_get_service_status(o, TCORE_NETWORK_SERVICE_DOMAIN_TYPE_CIRCUIT, &cs);
+
                current->cs = cs;
        }
 
        if (req_type & NET_PROP_PS) {
                enum telephony_network_service_domain_status ps;
+
                tcore_network_get_service_status(o, TCORE_NETWORK_SERVICE_DOMAIN_TYPE_PACKET, &ps);
                current->ps = ps;
        }
 
        if (req_type & NET_PROP_ACT) {
                enum telephony_network_access_technology act = NETWORK_ACT_UNKNOWN;
+
                tcore_network_get_access_technology(o, &act);
                current->act = __convert_act_to_systemtype(act);
        }
 }
 
 static int __check_property_change(TelephonyNetwork *network, CoreObject *o,
-       struct network_prop_info *current, int req_type)
+       NetworkPropertyInfo *current, int req_type)
 {
        int changed_type = NET_PROP_NONE;
 
@@ -214,71 +218,69 @@ static int __check_property_change(TelephonyNetwork *network, CoreObject *o,
 
        __get_current_network_status(o, current, req_type);
 
-       if (req_type & NET_PROP_SVC_TYPE) {
+       if (req_type & NET_PROP_SVC_TYPE)
                if (telephony_network_get_service_type(network) != current->svc_type)
                        changed_type |= NET_PROP_SVC_TYPE;
-       }
 
-       if (req_type & NET_PROP_ROAM) {
+       if (req_type & NET_PROP_ROAM)
                if (telephony_network_get_roaming_status(network) != current->roaming)
                        changed_type |= NET_PROP_ROAM;
-       }
 
        if (req_type & NET_PROP_PLMN) {
-               const gchar *prev_plmn = telephony_network_get_plmn(network);
                if (current->plmn) {
+                       const gchar *prev_plmn = telephony_network_get_plmn(network);
+
                        if (!prev_plmn || strcmp(prev_plmn, current->plmn) != 0)
                                changed_type |= NET_PROP_PLMN;
                }
        }
 
-       if (req_type & NET_PROP_NAME_OPTION) {
+       if (req_type & NET_PROP_NAME_OPTION)
                if (telephony_network_get_name_option(network) != current->name_option)
                        changed_type |= NET_PROP_NAME_OPTION;
-       }
 
        if (req_type & NET_PROP_SPN) {
-               const gchar *prev_spn = telephony_network_get_spn_name(network);
                if (current->spn) {
+                       const gchar *prev_spn = telephony_network_get_spn_name(network);
+
                        if (!prev_spn || strcmp(prev_spn, current->spn) != 0)
                                changed_type |= NET_PROP_SPN;
                }
        }
 
        if (req_type & NET_PROP_NWNAME) {
-               const gchar *prev_nwname = telephony_network_get_network_name(network);
                if (current->nwname) {
+                       const gchar *prev_nwname = telephony_network_get_network_name(network);
+
                        if (!prev_nwname || strcmp(prev_nwname, current->nwname) != 0)
                                changed_type |= NET_PROP_NWNAME;
                }
        }
 
-       if (req_type & NET_PROP_CS) {
+       if (req_type & NET_PROP_CS)
                if (telephony_network_get_circuit_status(network) != current->cs)
                        changed_type |= NET_PROP_CS;
-       }
 
-       if (req_type & NET_PROP_PS) {
+       if (req_type & NET_PROP_PS)
                if (telephony_network_get_packet_status(network) != current->ps)
                        changed_type |= NET_PROP_PS;
-       }
 
-       if (req_type & NET_PROP_ACT) {
+       if (req_type & NET_PROP_ACT)
                if (telephony_network_get_access_technology(network) != current->act)
                        changed_type |= NET_PROP_ACT;
-       }
 
        return changed_type;
 }
 
 static void __update_network_properties(TelephonyNetwork *network,
-       const char *cp_name, struct network_prop_info *current, int update_type)
+       const char *cp_name, NetworkPropertyInfo *current, int update_type)
 {
        if (!current)
                return;
 
        if (update_type & NET_PROP_SVC_TYPE) {
                telephony_network_set_service_type(network, current->svc_type);
+
                if (current->svc_type != NETWORK_SERVICE_TYPE_3G)
                        telephony_network_set_ps_type(network, TELEPHONY_HSDPA_OFF);
        }
@@ -310,24 +312,39 @@ static void __update_network_properties(TelephonyNetwork *network,
 
 static int __add_default_property_type(TelephonyNetwork *network, CoreObject *o, int req_type)
 {
-       /* If SVC_TYPE was changed, another properties (ACT,OPTION,SPN,NWNAME) may be changed together */
+       /*
+        * If SVC_TYPE was changed,
+        * other properties (ACT, OPTION, SPN, NWNAME) may also be changed together
+        */
        if (req_type & NET_PROP_SVC_TYPE) {
-               struct network_prop_info current = {0, -1, -1, 0, -1, -1, -1, -1, NULL, NULL, NULL};
+               NetworkPropertyInfo current = {0, -1, -1, 0, -1, -1, -1, -1, NULL, NULL, NULL};
+
                if (__check_property_change(network, o, &current, NET_PROP_SVC_TYPE)) {
-                       /* If SVC_TYPE was really changed, we should add anothers to default checking value */
-                       req_type |= (NET_PROP_ACT|NET_PROP_NAME_OPTION|NET_PROP_SPN|NET_PROP_NWNAME);
+                       /*
+                        * If SVC_TYPE was really changed,
+                        * we should add others to default checking value
+                        */
+                       req_type |= (NET_PROP_ACT | NET_PROP_NAME_OPTION | NET_PROP_SPN | NET_PROP_NWNAME);
                }
        }
 
-       /* If PLMN was changed, Another properties (ROAM,OPTION,SPN,NWNAME) may be changed together */
+       /*
+        * If PLMN was changed,
+        * other properties (ROAM,OPTION,SPN,NWNAME) may also be changed together
+        */
        if (req_type & NET_PROP_PLMN) {
-               struct network_prop_info current = {0, -1, -1, 0, -1, -1, -1, -1, NULL, NULL, NULL};
+               NetworkPropertyInfo current = {0, -1, -1, 0, -1, -1, -1, -1, NULL, NULL, NULL};
+
                if (__check_property_change(network, o, &current, NET_PROP_PLMN)) {
-                       /* If PLMN was really changed, we should add anothers to default checking value */
-                       req_type |= (NET_PROP_ROAM|NET_PROP_NAME_OPTION|NET_PROP_SPN|NET_PROP_NWNAME);
+                       /*
+                        * If PLMN was really changed,
+                        * we should add anothers to default checking value
+                        */
+                       req_type |= (NET_PROP_ROAM | NET_PROP_NAME_OPTION | NET_PROP_SPN | NET_PROP_NWNAME);
                }
                g_free(current.plmn);
        }
+
        return req_type;
 }
 
@@ -336,7 +353,7 @@ static void __check_network_properties(TelephonyNetwork *network, CoreObject *o,
 {
        int changed_type = NET_PROP_NONE;
        int emit_type = NET_PROP_NONE;
-       struct network_prop_info current = {0, -1, -1, 0, -1, -1, -1, -1, NULL, NULL, NULL};
+       NetworkPropertyInfo current = {0, -1, -1, 0, -1, -1, -1, -1, NULL, NULL, NULL};
 
        req_type = __add_default_property_type(network, o, req_type);
        changed_type = __check_property_change(network, o, &current, req_type);
@@ -346,13 +363,16 @@ static void __check_network_properties(TelephonyNetwork *network, CoreObject *o,
 
        emit_type = (changed_type & NET_PROP_EMIT);
        if (emit_type) {
-               info("[%s][PROPTYPE:%04x] svc[%d] roam[%d] plmn[%s] prio[%d] spn[%s] nwname[%s]",
-                       cp_name, emit_type, current.svc_type, current.roaming, current.plmn,
+               info("[%s] PROPTYPE: [%04x] svc: [%d] roam: [%s] plmn: [%s] prio: [%d] spn: [%s] nwname: [%s]",
+                       cp_name, emit_type, current.svc_type,
+                       (current.roaming ? "YES" : "NO"), current.plmn,
                        current.name_option, current.spn, current.nwname);
+
                telephony_network_emit_property_info(network, emit_type,
                        current.svc_type, current.roaming, current.name_option,
                        current.plmn, current.spn, current.nwname);
        }
+
        g_free(current.plmn);
        g_free(current.spn);
        g_free(current.nwname);
@@ -378,7 +398,7 @@ static enum tcore_hook_return on_hook_ps_protocol_status(Server *s,
                return TCORE_HOOK_RETURN_CONTINUE;
        }
 
-       info("[%s] PS_PROTOCOL_STATUS (status:[%d])", cp_name, protocol_status->status);
+       info("[%s] PS_PROTOCOL_STATUS - Status: [%d]", cp_name, protocol_status->status);
 
        path = g_strdup_printf("%s/%s", MY_DBUS_PATH, cp_name);
 
@@ -410,26 +430,27 @@ static enum tcore_hook_return on_hook_ps_protocol_status(Server *s,
        switch (protocol_status->status) {
        case TELEPHONY_HSDPA_OFF:
                ps_protocol_status = TELEPHONY_HSDPA_OFF;
-               break;
+       break;
 
        case TELEPHONY_HSDPA_ON:
                ps_protocol_status = TELEPHONY_HSDPA_ON;
-               break;
+       break;
 
        case TELEPHONY_HSUPA_ON:
                ps_protocol_status = TELEPHONY_HSUPA_ON;
-               break;
+       break;
 
        case TELEPHONY_HSPA_ON:
                ps_protocol_status = TELEPHONY_HSPA_ON;
-               break;
+       break;
 
        case TELEPHONY_HSPAP_ON:
                ps_protocol_status = TELEPHONY_HSPAP_ON;
-               break;
+       break;
+
        default:
                err("Unhandled protocol status!");
-               break;
+       break;
        }
 
        telephony_network_set_ps_type(network, ps_protocol_status);
@@ -437,92 +458,69 @@ static enum tcore_hook_return on_hook_ps_protocol_status(Server *s,
        return TCORE_HOOK_RETURN_CONTINUE;
 }
 
-static gboolean
-on_network_search(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_search(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "x"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SEARCH);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SEARCH,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_search_cancel(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_search_cancel(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "x"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_CANCEL_MANUAL_SEARCH);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_CANCEL_MANUAL_SEARCH,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_selection_mode(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_selection_mode(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_PLMN_SELECTION_MODE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_PLMN_SELECTION_MODE,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_set_selection_mode(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-               gint mode, const gchar *plmn, gint act, gpointer user_data)
+static gboolean on_network_set_selection_mode(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation,
+       gint mode, const gchar *plmn, gint act, gpointer user_data)
 {
        struct treq_network_set_plmn_selection_mode req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       memset(&req, 0, sizeof(struct treq_network_set_plmn_selection_mode));
+       memset(&req, 0x0, sizeof(struct treq_network_set_plmn_selection_mode));
 
        if (mode == 0) {        /* Automatic */
                req.mode = NETWORK_SELECT_MODE_AUTOMATIC;
@@ -536,192 +534,139 @@ on_network_set_selection_mode(TelephonyNetwork *network, GDBusMethodInvocation *
        }
        dbg("Mode: [%d] PLMN: [%s] AcT: [%d]", req.mode, req.plmn, req.act);
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_network_set_plmn_selection_mode), &req);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_PLMN_SELECTION_MODE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_PLMN_SELECTION_MODE,
+               &req, sizeof(struct treq_network_set_plmn_selection_mode));
 
        return TRUE;
 }
 
 
-static gboolean
-on_network_set_service_domain(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gint domain, gpointer user_data)
+static gboolean on_network_set_service_domain(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gint domain, gpointer user_data)
 {
        struct treq_network_set_service_domain req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
        req.domain = domain;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_network_set_service_domain), &req);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_SERVICE_DOMAIN);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_SERVICE_DOMAIN,
+               &req, sizeof(struct treq_network_set_service_domain));
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_service_domain(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_service_domain(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_SERVICE_DOMAIN);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_SERVICE_DOMAIN,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_set_band(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
+static gboolean on_network_set_band(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation,
        gint band, gint mode, gpointer user_data)
 {
        struct treq_network_set_band req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
        req.mode = mode;
        req.band = band;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_network_set_band), &req);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_BAND);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_BAND,
+               &req, sizeof(struct treq_network_set_band));
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_band(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_band(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_BAND);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_BAND,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_set_mode(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gint mode, gpointer user_data)
+static gboolean on_network_set_mode(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gint mode, gpointer user_data)
 {
        struct treq_network_set_mode req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
        req.mode = mode;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_network_set_mode), &req);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_MODE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_MODE,
+               &req, sizeof(struct treq_network_set_mode));
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_mode(TelephonyNetwork *network,
+static gboolean on_network_get_mode(TelephonyNetwork *network,
        GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_MODE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_MODE,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_set_preferred_plmn(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
+static gboolean on_network_set_preferred_plmn(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation,
        gint mode, gint ef_index, gint act, const gchar *plmn, gpointer user_data)
 {
        struct treq_network_set_preferred_plmn req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
        req.operation = mode;
        req.ef_index = ef_index;
        req.act = act;
@@ -731,271 +676,192 @@ on_network_set_preferred_plmn(TelephonyNetwork *network, GDBusMethodInvocation *
        if (strlen(plmn) <= 5)
                req.plmn[5] = '#';
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_network_set_preferred_plmn), &req);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_PREFERRED_PLMN);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_PREFERRED_PLMN,
+               &req, sizeof(struct treq_network_set_preferred_plmn));
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_preferred_plmn(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_preferred_plmn(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_PREFERRED_PLMN);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_PREFERRED_PLMN,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_serving_network(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_serving_network(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_SERVING_NETWORK);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_SERVING_NETWORK,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_neighboring_cell_info(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_neighboring_cell_info(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_NEIGHBORING_CELL_INFO);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_NEIGHBORING_CELL_INFO,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_set_default_data_subscription(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_set_default_data_subscription(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_DEFAULT_DATA_SUBSCRIPTION);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_DEFAULT_DATA_SUBSCRIPTION,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_default_data_subscription(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_default_data_subscription(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_DEFAULT_DATA_SUBSCRIPTION);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_DEFAULT_DATA_SUBSCRIPTION,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_network_set_default_subs(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_set_default_subs(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_DEFAULT_SUBSCRIPTION);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_DEFAULT_SUBSCRIPTION,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_network_get_default_subs(TelephonyNetwork *network, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_default_subs(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur;
-       TReturn ret = 0;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_DEFAULT_SUBSCRIPTION);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_DEFAULT_SUBSCRIPTION,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_network_set_emergency_callback_mode(TelephonyNetwork *network,
-       GDBusMethodInvocation *invocation,
-       gint mode,
-       gpointer user_data)
+static gboolean on_network_set_emergency_callback_mode(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gint mode, gpointer user_data)
 {
        struct treq_network_set_emergency_callback_mode req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
        req.mode = mode;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_network_set_emergency_callback_mode), &req);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_EMERGENCY_CALLBACK_MODE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_EMERGENCY_CALLBACK_MODE,
+               &req, sizeof(struct treq_network_set_emergency_callback_mode));
 
        return TRUE;
 }
 
-static gboolean
-on_network_set_roaming_preference(TelephonyNetwork *network,
-       GDBusMethodInvocation *invocation,
-       gint roam_pref,
-       gpointer user_data)
+static gboolean on_network_set_roaming_preference(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation,  gint roam_pref, gpointer user_data)
 {
        struct treq_network_set_roaming_preference req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "w"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-
        req.roam_pref = roam_pref;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_network_set_roaming_preference), &req);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_SET_ROAMING_PREFERENCE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_SET_ROAMING_PREFERENCE,
+               &req, sizeof(struct treq_network_set_roaming_preference));
 
        return TRUE;
 }
 
-static gboolean
-on_network_get_roaming_preference(TelephonyNetwork *network,
-       GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_network_get_roaming_preference(TelephonyNetwork *network,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_NETWORK, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, network, invocation);
-       tcore_user_request_set_data(ur, 0, NULL);
-       tcore_user_request_set_command(ur, TREQ_NETWORK_GET_ROAMING_PREFERENCE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, network, invocation,
+               TREQ_NETWORK_GET_ROAMING_PREFERENCE,
+               NULL, 0);
 
        return TRUE;
 }
 
-gboolean dbus_plugin_setup_network_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
+gboolean dbus_plugin_setup_network_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
 {
        TelephonyNetwork *network;
 
@@ -1003,6 +869,11 @@ gboolean dbus_plugin_setup_network_interface(TelephonyObjectSkeleton *object, st
        telephony_object_skeleton_set_network(object, network);
        g_object_unref(network);
 
+       dbg("network = %p", network);
+
+       /*
+        * Register signal handlers for Network interface
+        */
        g_signal_connect(network,
                "handle-search",
                G_CALLBACK(on_network_search), ctx);
@@ -1087,7 +958,9 @@ gboolean dbus_plugin_setup_network_interface(TelephonyObjectSkeleton *object, st
                "handle-get-roaming-preference",
                G_CALLBACK(on_network_get_roaming_preference), ctx);
 
-       /* initialize dbus properties */
+       /*
+        * Initialize DBUS properties
+        */
        telephony_network_set_access_technology(network, NETWORK_ACT_UNKNOWN);
        telephony_network_set_cell_id(network, 0);
        telephony_network_set_ims_voice_status(network, NETWORK_IMS_VOICE_UNKNOWN);
@@ -1111,9 +984,9 @@ gboolean dbus_plugin_setup_network_interface(TelephonyObjectSkeleton *object, st
        return TRUE;
 }
 
-gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
-       struct dbus_request_info *dbus_info, enum tcore_response_command command,
-       unsigned int data_len, const void *data)
+gboolean dbus_plugin_network_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        char *cpname = dbus_info ? GET_CP_NAME(dbus_info->invocation) : "";
 
@@ -1124,7 +997,7 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                int i = 0;
 
-               info("[%s] SEARCH - [%s] Count: [%d]",
+               info("[%s] NETWORK_SEARCH - [%s] Count: [%d]",
                        cpname, (resp_network_search->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
                        resp_network_search->list_count);
 
@@ -1141,7 +1014,8 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                }
                network_search_result = g_variant_builder_end(&b);
 
-               telephony_network_complete_search(dbus_info->interface_object, dbus_info->invocation,
+               telephony_network_complete_search(dbus_info->interface_object,
+                       dbus_info->invocation,
                        network_search_result, resp_network_search->result);
        }
        break;
@@ -1149,37 +1023,37 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_NETWORK_SET_PLMN_SELECTION_MODE: {
                const struct tresp_network_set_plmn_selection_mode *resp_set_plmn_selection_mode = data;
 
-               info("[%s] SET_PLMN_SELECTION_MODE - [%s]",
-                       cpname, (resp_set_plmn_selection_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               info("[%s] NETWORK_SET_PLMN_SELECTION_MODE - [%s]", cpname,
+                       (resp_set_plmn_selection_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_selection_mode(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_plmn_selection_mode->result);
+               telephony_network_complete_set_selection_mode(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_plmn_selection_mode->result);
        }
        break;
 
        case TRESP_NETWORK_GET_PLMN_SELECTION_MODE: {
                const struct tresp_network_get_plmn_selection_mode *resp_get_plmn_selection_mode = data;
 
-               info("[%s] GET_PLMN_SELECTION_MODE - [%s] Mode: [%s]",
-                       cpname, (resp_get_plmn_selection_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
-                       (resp_get_plmn_selection_mode->mode == NETWORK_SELECT_MODE_AUTOMATIC ? "Auto" :
-                       (resp_get_plmn_selection_mode->mode == NETWORK_SELECT_MODE_MANUAL ? "Manual" :
-                       "Unknown")));
+               info("[%s] NETWORK_GET_PLMN_SELECTION_MODE - [%s] Mode: [%s]", cpname,
+                       (resp_get_plmn_selection_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+                       (resp_get_plmn_selection_mode->mode == NETWORK_SELECT_MODE_AUTOMATIC ? "AUTO" :
+                       (resp_get_plmn_selection_mode->mode == NETWORK_SELECT_MODE_MANUAL ? "MANUAL" :
+                       "UNKNOWN")));
 
                switch (resp_get_plmn_selection_mode->mode) {
                case NETWORK_SELECT_MODE_AUTOMATIC:
-                       telephony_network_complete_get_selection_mode(dbus_info->interface_object, dbus_info->invocation,
-                               0, resp_get_plmn_selection_mode->result);
+                       telephony_network_complete_get_selection_mode(dbus_info->interface_object,
+                               dbus_info->invocation, 0, resp_get_plmn_selection_mode->result);
                break;
 
                case NETWORK_SELECT_MODE_MANUAL:
-                       telephony_network_complete_get_selection_mode(dbus_info->interface_object, dbus_info->invocation,
-                               1, resp_get_plmn_selection_mode->result);
+                       telephony_network_complete_get_selection_mode(dbus_info->interface_object,
+                               dbus_info->invocation, 1, resp_get_plmn_selection_mode->result);
                break;
 
                default:
-                       telephony_network_complete_get_selection_mode(dbus_info->interface_object, dbus_info->invocation,
-                               -1, resp_get_plmn_selection_mode->result);
+                       telephony_network_complete_get_selection_mode(dbus_info->interface_object,
+                               dbus_info->invocation, -1, resp_get_plmn_selection_mode->result);
                break;
                }
        }
@@ -1188,22 +1062,23 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_NETWORK_SET_SERVICE_DOMAIN: {
                const struct tresp_network_set_service_domain *resp_set_service_domain = data;
 
-               dbg("[%s] SET_SERVICE_DOMAIN - [%s]",
-                       cpname, (resp_set_service_domain->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] NETWORK_SET_SERVICE_DOMAIN - [%s]", cpname,
+                       (resp_set_service_domain->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_service_domain(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_service_domain->result);
+               telephony_network_complete_set_service_domain(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_service_domain->result);
        }
        break;
 
        case TRESP_NETWORK_GET_SERVICE_DOMAIN: {
                const struct tresp_network_get_service_domain *resp_get_service_domain = data;
 
-               dbg("[%s] GET_SERVICE_DOMAIN - [%s] Domain: [%d]",
-                       cpname, (resp_get_service_domain->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+               dbg("[%s] NETWORK_GET_SERVICE_DOMAIN - [%s] Domain: [%d]", cpname,
+                       (resp_get_service_domain->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
                        resp_get_service_domain->domain);
 
-               telephony_network_complete_get_service_domain(dbus_info->interface_object, dbus_info->invocation,
+               telephony_network_complete_get_service_domain(dbus_info->interface_object,
+                       dbus_info->invocation,
                        resp_get_service_domain->domain, resp_get_service_domain->result);
        }
        break;
@@ -1211,24 +1086,25 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_NETWORK_SET_BAND: {
                const struct tresp_network_set_band *resp_set_band = data;
 
-               dbg("[%s] SET_BAND - [%s]",
-                       cpname, (resp_set_band->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] NETWORK_SET_BAND - [%s]", cpname,
+                       (resp_set_band->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_band(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_band->result);
+               telephony_network_complete_set_band(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_band->result);
        }
        break;
 
        case TRESP_NETWORK_GET_BAND: {
                const struct tresp_network_get_band *resp_get_band = data;
 
-               dbg("[%s] GET_BAND - [%s] Mode: [%s] Band: [%d]",
-                       cpname, (resp_get_band->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
-                       (resp_get_band->mode == NETWORK_BAND_MODE_PREFERRED ? "Preferred" :
-                       (resp_get_band->mode == NETWORK_BAND_MODE_ONLY ? "Only" :
-                       "Unknown")), resp_get_band->band);
+               dbg("[%s] NETWORK_GET_BAND - [%s] Mode: [%s] Band: [%d]", cpname,
+                       (resp_get_band->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+                       (resp_get_band->mode == NETWORK_BAND_MODE_PREFERRED ? "PREFERRED" :
+                       (resp_get_band->mode == NETWORK_BAND_MODE_ONLY ? "ONLY" :
+                       "UNKNOWN")), resp_get_band->band);
 
-               telephony_network_complete_get_band(dbus_info->interface_object, dbus_info->invocation,
+               telephony_network_complete_get_band(dbus_info->interface_object,
+                       dbus_info->invocation,
                        resp_get_band->band, resp_get_band->mode, resp_get_band->result);
        }
        break;
@@ -1236,22 +1112,23 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_NETWORK_SET_MODE: {
                const struct tresp_network_set_mode *resp_set_mode = data;
 
-               dbg("[%s] SET_MODE - [%s]",
-                       cpname, (resp_set_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] NETWORK_SET_MODE - [%s]", cpname,
+                       (resp_set_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_mode(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_mode->result);
+               telephony_network_complete_set_mode(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_mode->result);
        }
        break;
 
        case TRESP_NETWORK_GET_MODE: {
                const struct tresp_network_get_mode *resp_get_mode = data;
 
-               dbg("[%s] GET_MODE - [%s] Mode: [%d]",
-                       cpname, (resp_get_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+               dbg("[%s] NETWORK_GET_MODE - [%s] Mode: [%d]", cpname,
+                       (resp_get_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
                        resp_get_mode->mode);
 
-               telephony_network_complete_get_mode(dbus_info->interface_object, dbus_info->invocation,
+               telephony_network_complete_get_mode(dbus_info->interface_object,
+                       dbus_info->invocation,
                        resp_get_mode->mode, resp_get_mode->result);
        }
        break;
@@ -1264,14 +1141,16 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                enum telephony_network_access_technology act;
                int i = 0;
 
-               dbg("[%s] GET_NEIGHBORING_CELL_INFO - [%s]",
-                       cpname, (resp_get_ngbr_cell_info->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] NETWORK_GET_NEIGHBORING_CELL_INFO - [%s]", cpname,
+                       (resp_get_ngbr_cell_info->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
                act = resp_get_ngbr_cell_info->info.serving.act;
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
 
-               /* Fill Serving cell parameter */
+               /*
+                * Fill Serving cell parameter
+                */
                value = g_variant_new("(iii)",
                                resp_get_ngbr_cell_info->info.serving.act,
                                resp_get_ngbr_cell_info->info.serving.mcc,
@@ -1282,31 +1161,31 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
 
                if (act >= NETWORK_ACT_GSM && act <= NETWORK_ACT_EGPRS) {
                        value = g_variant_new("(iiiii)",
-                                       resp_get_ngbr_cell_info->info.serving.cell.geran.cell_id,
-                                       resp_get_ngbr_cell_info->info.serving.cell.geran.lac,
-                                       resp_get_ngbr_cell_info->info.serving.cell.geran.bcch,
-                                       resp_get_ngbr_cell_info->info.serving.cell.geran.bsic,
-                                       resp_get_ngbr_cell_info->info.serving.cell.geran.rxlev);
+                               resp_get_ngbr_cell_info->info.serving.cell.geran.cell_id,
+                               resp_get_ngbr_cell_info->info.serving.cell.geran.lac,
+                               resp_get_ngbr_cell_info->info.serving.cell.geran.bcch,
+                               resp_get_ngbr_cell_info->info.serving.cell.geran.bsic,
+                               resp_get_ngbr_cell_info->info.serving.cell.geran.rxlev);
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
                        g_variant_builder_add(&b, "{sv}", "g_serving", value);
                        g_variant_builder_close(&b);
                } else if (act >= NETWORK_ACT_UMTS && act <= NETWORK_ACT_GSM_UTRAN) {
                        value = g_variant_new("(iiiii)",
-                                       resp_get_ngbr_cell_info->info.serving.cell.umts.cell_id,
-                                       resp_get_ngbr_cell_info->info.serving.cell.umts.lac,
-                                       resp_get_ngbr_cell_info->info.serving.cell.umts.arfcn,
-                                       resp_get_ngbr_cell_info->info.serving.cell.umts.psc,
-                                       resp_get_ngbr_cell_info->info.serving.cell.umts.rscp);
+                               resp_get_ngbr_cell_info->info.serving.cell.umts.cell_id,
+                               resp_get_ngbr_cell_info->info.serving.cell.umts.lac,
+                               resp_get_ngbr_cell_info->info.serving.cell.umts.arfcn,
+                               resp_get_ngbr_cell_info->info.serving.cell.umts.psc,
+                               resp_get_ngbr_cell_info->info.serving.cell.umts.rscp);
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
                        g_variant_builder_add(&b, "{sv}", "u_serving", value);
                        g_variant_builder_close(&b);
                } else if (act == NETWORK_ACT_LTE) {
                        value = g_variant_new("(iiiii)",
-                                       resp_get_ngbr_cell_info->info.serving.cell.lte.cell_id,
-                                       resp_get_ngbr_cell_info->info.serving.cell.lte.lac,
-                                       resp_get_ngbr_cell_info->info.serving.cell.lte.earfcn,
-                                       resp_get_ngbr_cell_info->info.serving.cell.lte.tac,
-                                       resp_get_ngbr_cell_info->info.serving.cell.lte.rssi);
+                               resp_get_ngbr_cell_info->info.serving.cell.lte.cell_id,
+                               resp_get_ngbr_cell_info->info.serving.cell.lte.lac,
+                               resp_get_ngbr_cell_info->info.serving.cell.lte.earfcn,
+                               resp_get_ngbr_cell_info->info.serving.cell.lte.tac,
+                               resp_get_ngbr_cell_info->info.serving.cell.lte.rssi);
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
                        g_variant_builder_add(&b, "{sv}", "l_serving", value);
                        g_variant_builder_close(&b);
@@ -1323,7 +1202,9 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                        g_variant_builder_close(&b);
                }
 
-               /* Fill GERAN neighbor cell parameter */
+               /*
+                * Fill GERAN neighbor cell parameter
+                */
                for (i = 0; i < resp_get_ngbr_cell_info->info.geran_list_count; i++) {
                        value = g_variant_new("(iiiii)",
                                resp_get_ngbr_cell_info->info.geran_list[i].cell_id,
@@ -1336,7 +1217,9 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                        g_variant_builder_close(&b);
                }
 
-               /* Fill UMTS neighbor cell parameter */
+               /*
+                * Fill UMTS neighbor cell parameter
+                */
                for (i = 0; i < resp_get_ngbr_cell_info->info.umts_list_count; i++) {
                        value = g_variant_new("(iiiii)",
                                resp_get_ngbr_cell_info->info.umts_list[i].cell_id,
@@ -1350,7 +1233,8 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                }
                neighboring_cell_info_result = g_variant_builder_end(&b);
 
-               telephony_network_complete_get_ngbr_cell_info(dbus_info->interface_object, dbus_info->invocation,
+               telephony_network_complete_get_ngbr_cell_info(dbus_info->interface_object,
+                       dbus_info->invocation,
                        neighboring_cell_info_result, resp_get_ngbr_cell_info->result);
        }
        break;
@@ -1358,11 +1242,11 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_NETWORK_SET_PREFERRED_PLMN: {
                const struct tresp_network_set_preferred_plmn *resp_set_preferred_plmn = data;
 
-               dbg("[%s] SET_PREFERRED_PLMN - [%s]",
-                       cpname, (resp_set_preferred_plmn->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] NETWORK_SET_PREFERRED_PLMN - [%s]", cpname,
+                       (resp_set_preferred_plmn->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_preferred_plmn(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_preferred_plmn->result);
+               telephony_network_complete_set_preferred_plmn(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_preferred_plmn->result);
        }
        break;
 
@@ -1372,8 +1256,8 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                int i = 0;
 
-               dbg("[%s] GET_PREFERRED_PLMN - [%s] Count: [%d]",
-                       cpname, (resp_get_preferred_plmn->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+               dbg("[%s] NETWORK_GET_PREFERRED_PLMN - [%s] Count: [%d]", cpname,
+                       (resp_get_preferred_plmn->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
                        resp_get_preferred_plmn->list_count);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
@@ -1381,29 +1265,32 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
 
                        g_variant_builder_add(&b, "{sv}", "plmn",
-                                       g_variant_new_string(resp_get_preferred_plmn->list[i].plmn));
-                       g_variant_builder_add(&b, "{sv}", "act", g_variant_new_int32(resp_get_preferred_plmn->list[i].act));
+                               g_variant_new_string(resp_get_preferred_plmn->list[i].plmn));
+                       g_variant_builder_add(&b, "{sv}", "act",
+                               g_variant_new_int32(resp_get_preferred_plmn->list[i].act));
                        g_variant_builder_add(&b, "{sv}", "index",
-                                       g_variant_new_int32(resp_get_preferred_plmn->list[i].ef_index));
-                       g_variant_builder_add(&b, "{sv}", "name", g_variant_new_string(resp_get_preferred_plmn->list[i].name));
+                               g_variant_new_int32(resp_get_preferred_plmn->list[i].ef_index));
+                       g_variant_builder_add(&b, "{sv}", "name",
+                               g_variant_new_string(resp_get_preferred_plmn->list[i].name));
 
                        g_variant_builder_close(&b);
                }
                preferred_plmn_result = g_variant_builder_end(&b);
 
-               telephony_network_complete_get_preferred_plmn(dbus_info->interface_object, dbus_info->invocation,
-                               preferred_plmn_result, resp_get_preferred_plmn->result);
+               telephony_network_complete_get_preferred_plmn(dbus_info->interface_object,
+                       dbus_info->invocation,
+                       preferred_plmn_result, resp_get_preferred_plmn->result);
        }
        break;
 
        case TRESP_NETWORK_SET_CANCEL_MANUAL_SEARCH: {
                const struct tresp_network_set_cancel_manual_search *resp_set_cancel_manual_search = data;
 
-               info("[%s] SET_CANCEL_MANUAL_SEARCH - [%s]",
-                       cpname, (resp_set_cancel_manual_search->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+               info("[%s] NETWORK_SET_CANCEL_MANUAL_SEARCH - [%s]", cpname,
+                       (resp_set_cancel_manual_search->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_search_cancel(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_cancel_manual_search->result);
+               telephony_network_complete_search_cancel(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_cancel_manual_search->result);
        }
        break;
 
@@ -1415,26 +1302,34 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
 
                enum telephony_network_access_technology act;
 
-               dbg("[%s] GET_SERVING_NETWORK - [%s] AcT: [%d] PLMN: [%s] LAC: [%d])",
-                       cpname, (resp_get_serving_network->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
-                       resp_get_serving_network->act, resp_get_serving_network->plmn, resp_get_serving_network->gsm.lac);
+               dbg("[%s] NETWORK_GET_SERVING_NETWORK - [%s] AcT: [%d] PLMN: [%s] LAC: [%d]", cpname,
+                       (resp_get_serving_network->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+                       resp_get_serving_network->act, resp_get_serving_network->plmn,
+                       resp_get_serving_network->gsm.lac);
 
                act = resp_get_serving_network->act;
                g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}"));
 
-               /* Fill Serving cell parameter */
+               /*
+                * Fill Serving cell parameter
+                */
                value = g_variant_new("(is)",
-                               resp_get_serving_network->act,
-                               resp_get_serving_network->plmn);
+                       resp_get_serving_network->act,
+                       resp_get_serving_network->plmn);
 
                g_variant_builder_add(&b, "{sv}", "serving", value);
-               if ((act >= NETWORK_ACT_GSM && act <= NETWORK_ACT_GSM_UTRAN) || act == NETWORK_ACT_LTE) {
-                       dbg("lac:[%d]", resp_get_serving_network->gsm.lac);
+               if ((act >= NETWORK_ACT_GSM
+                               && act <= NETWORK_ACT_GSM_UTRAN)
+                               || act == NETWORK_ACT_LTE) {
+                       dbg("lac: [%d]", resp_get_serving_network->gsm.lac);
+
                        value = g_variant_new("(i)",
-                                       resp_get_serving_network->gsm.lac);
+                               resp_get_serving_network->gsm.lac);
                        g_variant_builder_add(&b, "{sv}", "g_serving", value);
-               } else if (act >= NETWORK_ACT_IS95A && act <= NETWORK_ACT_EHRPD) {
-                       dbg("carrier:[%d] sid:[%d] nid:[%d] bs_id:[%d] bs_lat:[%d] bs_long:[%d] reg_zone:[%d] pilot_pn:[%d]",
+               } else if (act >= NETWORK_ACT_IS95A
+                               && act <= NETWORK_ACT_EHRPD) {
+                       dbg("carrier: [%d] sid: [%d] nid: [%d] bs_id: [%d] " \
+                               "bs_lat: [%d] bs_long: [%d] reg_zone: [%d] pilot_pn: [%d]",
                                resp_get_serving_network->cdma.carrier,
                                resp_get_serving_network->cdma.sid,
                                resp_get_serving_network->cdma.nid,
@@ -1445,18 +1340,20 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
                                resp_get_serving_network->cdma.pilot_pn);
 
                        value = g_variant_new("(iuuuiiuu)",
-                                       resp_get_serving_network->cdma.carrier,
-                                       resp_get_serving_network->cdma.sid,
-                                       resp_get_serving_network->cdma.nid,
-                                       resp_get_serving_network->cdma.bs_id,
-                                       resp_get_serving_network->cdma.bs_lat,
-                                       resp_get_serving_network->cdma.bs_long,
-                                       resp_get_serving_network->cdma.reg_zone,
-                                       resp_get_serving_network->cdma.pilot_pn);
+                               resp_get_serving_network->cdma.carrier,
+                               resp_get_serving_network->cdma.sid,
+                               resp_get_serving_network->cdma.nid,
+                               resp_get_serving_network->cdma.bs_id,
+                               resp_get_serving_network->cdma.bs_lat,
+                               resp_get_serving_network->cdma.bs_long,
+                               resp_get_serving_network->cdma.reg_zone,
+                               resp_get_serving_network->cdma.pilot_pn);
                        g_variant_builder_add(&b, "{sv}", "c_serving", value);
                }
                serving_network = g_variant_builder_end(&b);
-               telephony_network_complete_get_serving_network(dbus_info->interface_object, dbus_info->invocation,
+
+               telephony_network_complete_get_serving_network(dbus_info->interface_object,
+                       dbus_info->invocation,
                        serving_network, resp_get_serving_network->result);
        }
        break;
@@ -1464,22 +1361,22 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_NETWORK_SET_DEFAULT_DATA_SUBSCRIPTION: {
                const struct tresp_network_set_default_data_subscription *resp_set_default_data_subs = data;
 
-               info("SET_DEFAULT_DATA_SUBSCRIPTION - [%s]",
+               info("[%s] NETWORK_SET_DEFAULT_DATA_SUBSCRIPTION - [%s]", cpname,
                        (resp_set_default_data_subs->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_default_data_subscription(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_default_data_subs->result);
+               telephony_network_complete_set_default_data_subscription(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_default_data_subs->result);
        }
        break;
 
        case TRESP_NETWORK_GET_DEFAULT_DATA_SUBSCRIPTION: {
                const struct tresp_network_get_default_data_subs *resp_get_default_data_subs = data;
 
-               dbg("GET_DEFAULT_DATA_SUBSCRIPTION - [%s] 'default' Data subscription: [%s]",
+               dbg("[%s] NETWORK_GET_DEFAULT_DATA_SUBSCRIPTION - [%s] 'default' Data subscription: [%s]", cpname,
                        (resp_get_default_data_subs->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
-                       (resp_get_default_data_subs->default_subs == NETWORK_DEFAULT_DATA_SUBS_SIM1 ? "SIM1" :
-                       (resp_get_default_data_subs->default_subs == NETWORK_DEFAULT_DATA_SUBS_SIM2 ? "SIM2" :
-                       "Unknown")));
+                       (resp_get_default_data_subs->default_subs == NETWORK_DEFAULT_DATA_SUBS_SIM1 ? "SIM 1" :
+                       (resp_get_default_data_subs->default_subs == NETWORK_DEFAULT_DATA_SUBS_SIM2 ? "SIM 2" :
+                       "UNKNWON")));
 
                telephony_network_complete_get_default_data_subscription(dbus_info->interface_object, dbus_info->invocation,
                        resp_get_default_data_subs->default_subs, resp_get_default_data_subs->result);
@@ -1489,66 +1386,75 @@ gboolean dbus_plugin_network_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_NETWORK_SET_DEFAULT_SUBSCRIPTION: {
                const struct tresp_network_set_default_subs *resp_set_default_subs = data;
 
-               info("SET_DEFAULT_SUBSCRIPTION - [%s]",
+               info("[%s] NETWORK_SET_DEFAULT_SUBSCRIPTION - [%s]", cpname,
                        (resp_set_default_subs->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_default_subscription(dbus_info->interface_object, dbus_info->invocation,
-                       resp_set_default_subs->result);
+               telephony_network_complete_set_default_subscription(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_default_subs->result);
        }
        break;
 
        case TRESP_NETWORK_GET_DEFAULT_SUBSCRIPTION: {
                const struct tresp_network_get_default_subs *resp_get_default_subs = data;
 
-               dbg("GET_DEFAULT_SUBSCRIPTION - [%s] 'default' subscription: [%s]",
+               dbg("[%s] NETWORK_GET_DEFAULT_SUBSCRIPTION - [%s] 'default' subscription: [%s]", cpname,
                        (resp_get_default_subs->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
-                       (resp_get_default_subs->default_subs == NETWORK_DEFAULT_SUBS_SIM1 ? "SIM1" :
-                       (resp_get_default_subs->default_subs == NETWORK_DEFAULT_SUBS_SIM2 ? "SIM2" :
-                       "Unknown")));
+                       (resp_get_default_subs->default_subs == NETWORK_DEFAULT_SUBS_SIM1 ? "SIM 1" :
+                       (resp_get_default_subs->default_subs == NETWORK_DEFAULT_SUBS_SIM2 ? "SIM 2" :
+                       "UNKNOWN")));
 
-               telephony_network_complete_get_default_subscription(dbus_info->interface_object, dbus_info->invocation,
+               telephony_network_complete_get_default_subscription(dbus_info->interface_object,
+                       dbus_info->invocation,
                        resp_get_default_subs->default_subs, resp_get_default_subs->result);
        }
        break;
 
        case TRESP_NETWORK_SET_EMERGENCY_CALLBACK_MODE: {
                const struct tresp_network_set_emergency_callback_mode *resp_set_emergency_callback_mode = data;
-               info("SET_EMERGENCY_CALLBACK_MODE (result:[%d])", resp_set_emergency_callback_mode->result);
-               telephony_network_complete_set_emergency_callback_mode(dbus_info->interface_object, dbus_info->invocation,
-                               resp_set_emergency_callback_mode->result);
+
+               info("[%s] NETWORK_SET_EMERGENCY_CALLBACK_MODE - [%s]", cpname,
+                       (resp_set_emergency_callback_mode->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
+
+               telephony_network_complete_set_emergency_callback_mode(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_emergency_callback_mode->result);
        }
        break;
 
        case TRESP_NETWORK_SET_ROAMING_PREFERENCE: {
                const struct tresp_network_set_roaming_preference *resp_set_roam_pref = data;
 
-               info("SET_ROAMING_PREFERENCE (result:[%d])", resp_set_roam_pref->result);
+               info("[%s] NETWORK_SET_ROAMING_PREFERENCE - [%s]", cpname,
+                       (resp_set_roam_pref->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"));
 
-               telephony_network_complete_set_roaming_preference(dbus_info->interface_object, dbus_info->invocation, resp_set_roam_pref->result);
+               telephony_network_complete_set_roaming_preference(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_roam_pref->result);
        }
        break;
 
        case TRESP_NETWORK_GET_ROAMING_PREFERENCE: {
                const struct tresp_network_get_roaming_preference *resp_get_roam_pref = data;
 
-               dbg("GET_ROAMING_PREFERENCE (roam_pref:[%d])", resp_get_roam_pref->roam_pref);
+               dbg("[%s] NETWORK_GET_ROAMING_PREFERENCE - [%s] roam_pref: [%d]", cpname,
+                       (resp_get_roam_pref->result == TCORE_RETURN_SUCCESS ? "Success" : "Fail"),
+                       resp_get_roam_pref->roam_pref);
 
-               telephony_network_complete_get_roaming_preference(dbus_info->interface_object, dbus_info->invocation,
+               telephony_network_complete_get_roaming_preference(dbus_info->interface_object,
+                       dbus_info->invocation,
                        resp_get_roam_pref->roam_pref, resp_get_roam_pref->result);
        }
        break;
 
        default:
-               err("Unhandled/Unknown Response!!!");
+               err("Unhandled/Unknown Response: [0x%x]", command);
        break;
        }
 
        return TRUE;
 }
 
-gboolean dbus_plugin_network_notification(struct custom_data *ctx, CoreObject *source,
-       TelephonyObjectSkeleton *object, enum tcore_notification_command command,
-       unsigned int data_len, const void *data)
+gboolean dbus_plugin_network_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
        TelephonyNetwork *network;
        const char *cp_name;
@@ -1574,8 +1480,9 @@ gboolean dbus_plugin_network_notification(struct custom_data *ctx, CoreObject *s
        case TNOTI_NETWORK_REGISTRATION_STATUS: {
                const struct tnoti_network_registration_status *reg = data;
 
-               info("[%s] NET_REGI_STATUS (cs:[%d] ps:[%d] svc:[%d] roam:[%d])",
-                       cp_name, reg->cs_domain_status, reg->ps_domain_status, reg->service_type, reg->roaming_status);
+               info("[%s] NET_REGI_STATUS - CS: [%d] PS: [%d] SVC: [%d] Roam: [%d]", cp_name,
+                       reg->cs_domain_status, reg->ps_domain_status,
+                       reg->service_type, reg->roaming_status);
 
 #ifdef ENABLE_KPI_LOGS
                /* We ignore No SIM present case for KPI */
@@ -1592,46 +1499,40 @@ gboolean dbus_plugin_network_notification(struct custom_data *ctx, CoreObject *s
 
                /* Emit Signal */
                telephony_network_emit_registration_status(network,
-                               reg->cs_domain_status,
-                               reg->ps_domain_status,
-                               reg->service_type,
-                               reg->roaming_status);
+                       reg->cs_domain_status, reg->ps_domain_status,
+                       reg->service_type, reg->roaming_status);
        }
        break;
 
        case TNOTI_NETWORK_CHANGE: {
                const struct tnoti_network_change *change = data;
 
-               info("[%s] NET_CHANGE. (plmn:[%s] lac:[%d])",
-                       cp_name, change->plmn, change->gsm.lac);
+               info("[%s] NET_CHANGE - plmn: [%s] lac: [%d]", cp_name,
+                       change->plmn, change->gsm.lac);
 
                __check_network_properties(network, source, cp_name, NET_PROP_PLMN);
 
                /* Emit Signal */
                telephony_network_emit_change(network,
-                               change->act,
-                               change->plmn);
+                       change->act, change->plmn);
        }
        break;
 
        case TNOTI_NETWORK_TIMEINFO: {
                const struct tnoti_network_timeinfo *time_info = data;
 
-               info("[%s] NET_TIMEINFO", cp_name);
+               info("[%s] NET_TIMEINFO - [%04d-%02d-%02d] [%02d:%02d:%02d]", cp_name,
+                       time_info->year, time_info->month, time_info->day,
+                       time_info->hour, time_info->minute, time_info->second);
 
                /* Emit signal */
                telephony_network_emit_time_info(network,
-                               time_info->year,
-                               time_info->month,
-                               time_info->day,
-                               time_info->hour,
-                               time_info->minute,
-                               time_info->second,
-                               time_info->wday,
-                               time_info->gmtoff,
-                               time_info->dstoff,
-                               time_info->isdst,
-                               time_info->plmn);
+                       time_info->year, time_info->month, time_info->day,
+                       time_info->hour, time_info->minute, time_info->second,
+                       time_info->wday,
+                       time_info->gmtoff, time_info->dstoff,
+                       time_info->isdst,
+                       time_info->plmn);
        }
        break;
 
@@ -1640,7 +1541,9 @@ gboolean dbus_plugin_network_notification(struct custom_data *ctx, CoreObject *s
 
                /* Update property */
                if (icon_info->type & NETWORK_ICON_INFO_RSSI) {
-                       info("[%s] NET_ICON_INFO (Ant:[%d])", cp_name, icon_info->rssi);
+                       info("[%s] NET_ICON_INFO - RSSI: [%d]", cp_name, icon_info->rssi);
+
+                       /* Emit signal */
                        telephony_network_set_sig_level(network, icon_info->rssi);
                }
        }
@@ -1649,25 +1552,23 @@ gboolean dbus_plugin_network_notification(struct custom_data *ctx, CoreObject *s
        case TNOTI_NETWORK_IDENTITY: {
                const struct tnoti_network_identity *identity = data;
 
-               info("[%s] NET_IDENTITY (long:[%s] short:[%s] plmn:[%s])",
-                       cp_name, identity->full_name, identity->short_name, identity->plmn);
+               info("[%s] NET_IDENTITY - long name: [%s] short name: [%s] PLMN: [%s]", cp_name,
+                       identity->full_name, identity->short_name, identity->plmn);
 
                __check_network_properties(network, source, cp_name,
-                               (NET_PROP_NAME_OPTION|NET_PROP_SPN|NET_PROP_NWNAME));
+                       (NET_PROP_NAME_OPTION | NET_PROP_SPN | NET_PROP_NWNAME));
 
                /* Emit Signal */
                telephony_network_emit_identity(network,
-                               identity->plmn,
-                               identity->short_name,
-                               identity->full_name);
+                       identity->plmn, identity->short_name, identity->full_name);
        }
        break;
 
        case TNOTI_NETWORK_LOCATION_CELLINFO: {
                const struct tnoti_network_location_cellinfo *location = data;
 
-               info("[%s] NET_LOCATION_CELLINFO (lac:[0x%x] cell_id:[0x%x])",
-                       cp_name, location->lac, location->cell_id);
+               info("[%s] NET_LOCATION_CELLINFO - LAC: [0x%x] Cell ID: [0x%x]", cp_name,
+                       location->lac, location->cell_id);
 
                /* Update properties */
                telephony_network_set_lac(network, location->lac);
@@ -1675,70 +1576,87 @@ gboolean dbus_plugin_network_notification(struct custom_data *ctx, CoreObject *s
 
                /* Emit signal */
                telephony_network_emit_cell_info(network,
-                               location->lac,
-                               location->cell_id);
+                       location->lac, location->cell_id);
        }
        break;
 
        case TNOTI_NETWORK_SIGNAL_STRENGTH: {
                const struct tnoti_network_signal_strength *signal_strength = data;
 
-               info("[%s] NET_SIGNAL_STRENGTH (dbm:[%d])", cp_name, signal_strength->dbm);
+               info("[%s] NET_SIGNAL_STRENGTH - DBM: [%d]", cp_name,
+                       signal_strength->dbm);
 
                /* Update properties */
                telephony_network_set_sig_dbm(network, signal_strength->dbm);
 
                /* Emit signal */
                telephony_network_emit_signal_strength(network,
-                               signal_strength->dbm);
+                       signal_strength->dbm);
        }
        break;
 
        case TNOTI_NETWORK_DEFAULT_DATA_SUBSCRIPTION: {
                const struct tnoti_network_default_data_subs *default_data_subs_info = data;
 
-               info("[%s] NET_DEFAULT_DATA_SUBSCRIPTION (default:[%d])", cp_name, default_data_subs_info->default_subs);
+               info("[%s] NET_DEFAULT_DATA_SUBSCRIPTION - 'default' DDS: [%s]", cp_name,
+                       (default_data_subs_info->default_subs == NETWORK_DEFAULT_DATA_SUBS_SIM1 ? "SIM 1" :
+                       (default_data_subs_info->default_subs == NETWORK_DEFAULT_DATA_SUBS_SIM2 ? "SIM 2" :
+                       "UNKNOWN")));
 
                /* Emit signal */
                telephony_network_emit_default_data_subscription(network,
-                               default_data_subs_info->default_subs);
+                       default_data_subs_info->default_subs);
        }
        break;
 
        case TNOTI_NETWORK_DEFAULT_SUBSCRIPTION: {
                const struct tnoti_network_default_subs *default_subs_info = data;
 
-               info("[%s] NET_DEFAULT_SUBSCRIPTION (default:[%d])", cp_name, default_subs_info->default_subs);
+               info("[%s] NET_DEFAULT_SUBSCRIPTION - 'default' subscription: [%s]", cp_name,
+                       (default_subs_info->default_subs == NETWORK_DEFAULT_SUBS_SIM1 ? "SIM 1" :
+                       (default_subs_info->default_subs == NETWORK_DEFAULT_SUBS_SIM2 ? "SIM 2" :
+                       "UNKNOWN")));
 
                /* Emit signal */
                telephony_network_emit_default_subscription(network,
-                               default_subs_info->default_subs);
+                       default_subs_info->default_subs);
        }
        break;
 
        case TNOTI_NETWORK_IMS_VOICE_SUPPORT_STATUS: {
                const struct tnoti_network_ims_voice_status *status = data;
 
-               dbg("TNOTI_NETWORK_IMS_VOICE_SUPPORT_STATUS");
+               dbg("[%s] NET_IMS_VOICE_SUPPORT_STATUS - Status: [%s]", cp_name,
+                       (status->status == NETWORK_IMS_VOICE_SUPPORT ? "SUPPORTED" :
+                       (status->status == NETWORK_IMS_VOICE_NOT_SUPPORT ? "NOT SUPPORTED" :
+                       "UNKNOWN")));
 
                /* Update properties */
-               telephony_network_set_ims_voice_status(network, status->status);
+               telephony_network_set_ims_voice_status(network,
+                       status->status);
        }
        break;
 
        case TNOTI_NETWORK_EMERGENCY_CALLBACK_MODE: {
                const struct tnoti_network_emergency_callback_mode *emergency_callback_mode = data;
 
+               dbg("[%s] NET_EMERGENCY_CALLBACK_MODE - Mode: [%s]", cp_name,
+                       (emergency_callback_mode->mode == NETWORK_EMERGENCY_CALLBACK_MODE_ENTER ? "ENTER" :
+                       (emergency_callback_mode->mode == NETWORK_EMERGENCY_CALLBACK_MODE_EXIT? "EXIT" :
+                       "READY")));
+
+               /* Emit signal */
                telephony_network_emit_emergency_callback_mode(network,
-                               emergency_callback_mode->mode);
+                       emergency_callback_mode->mode);
        }
        break;
 
        default:
-               err("Unhandled/Unknown Notification!!!");
+               err("Unhandled/Unknown Notification: [0x%x]", command);
        break;
        }
 
        return TRUE;
 }
 
+
similarity index 58%
rename from src/oem.c
rename to src/dtapi_oem.c
index 9c8ed5c..8c93ac9 100644 (file)
--- a/src/oem.c
@@ -1,51 +1,74 @@
+/*
+ * tel-plugin-dbus-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 <string.h>
-#include <pthread.h>
-#include <unistd.h>
 #include <stdlib.h>
-#include <time.h>
+
 #include <glib.h>
-#include <gio/gio.h>
 
 #include <tcore.h>
-#include <server.h>
-#include <plugin.h>
-#include <hal.h>
 #include <communicator.h>
-#include <queue.h>
 #include <user_request.h>
 
 #include "generated-code.h"
-#include "common.h"
+#include "dtapi_common.h"
 
-#define TYPE_FACTORY           0x00020000
-#define MAKE_REQ_CMD(id)       (TREQ_CUSTOM|TYPE_FACTORY|id)
-#define GET_OEM_ID(cmd)        (cmd&0x0000FFFF)
+#define TYPE_FACTORY           (0x00020000)
+#define MAKE_REQ_CMD(id)       (TREQ_CUSTOM | TYPE_FACTORY | id)
+#define GET_OEM_ID(cmd)        (cmd & 0x0000FFFF)
 
-static void _emit_oem_response(struct dbus_request_info *dbus_info, int oem_id, const void *data, unsigned int data_len)
+static void _emit_oem_response(struct dbus_request_info *dbus_info,
+       int oem_id, const void *data, unsigned int data_len)
 {
        if (!dbus_info || !oem_id || !data || !data_len) {
-               dbg("Invalid Data! dbus_info=%p, oem_id=0x%x, data=%p, data_len=%d", dbus_info, oem_id, data, data_len);
-               return ;
+               dbg("Invalid Data! dbus_info=%p, oem_id=0x%x, data=%p, data_len=%d",
+                       dbus_info, oem_id, data, data_len);
+               return;
        }
 
        if (dbus_info->interface_object) {
                gchar *encoded_data = g_base64_encode((const guchar*)data, data_len);
+
+               /*
+                * Send Response if invocation is non-null,
+                * else Send Notification.
+                */
                if (dbus_info->invocation)
-                       telephony_oem_complete_send_oem_data_with_response(dbus_info->interface_object, dbus_info->invocation, oem_id, encoded_data);
+                       telephony_oem_complete_send_oem_data_with_response(dbus_info->interface_object,
+                               dbus_info->invocation, oem_id, encoded_data);
                else
                        telephony_oem_emit_oem_data(dbus_info->interface_object, oem_id, encoded_data);
+
                g_free(encoded_data);
        }
 }
 
-static void _emit_oem_notification(TelephonyOEM *oem, int oem_id, const void *data, unsigned int data_len)
+static void _emit_oem_notification(TelephonyOEM *oem,
+       int oem_id, const void *data, unsigned int data_len)
 {
        gchar *encoded_data = NULL;
 
        if (!oem || !oem_id || !data || !data_len) {
-               dbg("Invalid Data! oem_id=0x%x, data=%p, data_len=%d", oem_id, data, data_len);
-               return ;
+               dbg("Invalid Data! oem_id=0x%x, data=%p, data_len=%d",
+                       oem_id, data, data_len);
+               return;
        }
 
        encoded_data = g_base64_encode((const guchar*)data, data_len);
@@ -53,8 +76,7 @@ static void _emit_oem_notification(TelephonyOEM *oem, int oem_id, const void *da
        g_free(encoded_data);
 }
 
-static gboolean
-send_oem_data(TelephonyOEM *oem,
+static gboolean send_oem_data(TelephonyOEM *oem,
        GDBusMethodInvocation *invocation,
        gint arg_oem_id,
        const gchar *arg_data,
@@ -73,8 +95,8 @@ send_oem_data(TelephonyOEM *oem,
                return TRUE;
 
        ur = MAKE_UR(ctx, oem, invocation);
-       decoded_data = g_base64_decode(arg_data, &length);
 
+       decoded_data = g_base64_decode(arg_data, &length);
        tcore_user_request_set_data(ur, length, decoded_data);
        g_free(decoded_data);
 
@@ -94,11 +116,11 @@ send_oem_data(TelephonyOEM *oem,
 
                telephony_oem_complete_send_oem_data(oem, invocation, result);
        }
+
        return TRUE;
 }
 
-static gboolean
-on_send_oem_data(TelephonyOEM *oem,
+static gboolean on_send_oem_data(TelephonyOEM *oem,
        GDBusMethodInvocation *invocation,
        gint arg_oem_id,
        const gchar *arg_data,
@@ -107,8 +129,7 @@ on_send_oem_data(TelephonyOEM *oem,
        return send_oem_data(oem, invocation, arg_oem_id, arg_data, user_data, TRUE);
 }
 
-static gboolean
-on_send_oem_data_with_response(TelephonyOEM *oem,
+static gboolean on_send_oem_data_with_response(TelephonyOEM *oem,
        GDBusMethodInvocation *invocation,
        gint arg_oem_id,
        const gchar *arg_data,
@@ -117,7 +138,8 @@ on_send_oem_data_with_response(TelephonyOEM *oem,
        return send_oem_data(oem, invocation, arg_oem_id, arg_data, user_data, FALSE);
 }
 
-gboolean dbus_plugin_setup_oem_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
+gboolean dbus_plugin_setup_oem_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
 {
        TelephonyOEM *oem;
 
@@ -128,6 +150,9 @@ gboolean dbus_plugin_setup_oem_interface(TelephonyObjectSkeleton *object, struct
 
        dbg("oem = %p", oem);
 
+       /*
+        * Register signal handlers for OEM interface
+        */
        g_signal_connect(oem,
                "handle-send-oem-data",
                G_CALLBACK(on_send_oem_data), ctx);
@@ -139,15 +164,22 @@ gboolean dbus_plugin_setup_oem_interface(TelephonyObjectSkeleton *object, struct
        return TRUE;
 }
 
-gboolean dbus_plugin_oem_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data)
+gboolean dbus_plugin_oem_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        _emit_oem_response(dbus_info, GET_OEM_ID(command), data, data_len);
+
        return TRUE;
 }
 
-gboolean dbus_plugin_oem_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data)
+gboolean dbus_plugin_oem_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
-       _emit_oem_notification(telephony_object_peek_oem(TELEPHONY_OBJECT(object)), GET_OEM_ID(command), data, data_len);
+       _emit_oem_notification(telephony_object_peek_oem(TELEPHONY_OBJECT(object)),
+               GET_OEM_ID(command), data, data_len);
+
        return TRUE;
 }
 
similarity index 60%
rename from src/phonebook.c
rename to src/dtapi_phonebook.c
index e9ea6b5..654d688 100644 (file)
  */
 
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
-#include <errno.h>
+#include <string.h>
+
+#include <glib.h>
 
 #include <tcore.h>
 #include <server.h>
 #include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <core_object.h>
-#include <queue.h>
-#include <user_request.h>
-#include <util.h>
 #include <co_phonebook.h>
-#include <co_sim.h>
 
 #include "generated-code.h"
-#include "common.h"
-#include "sat_manager.h"
-
-static const char* dbg_dbus_pb_type_name[] = {"PB_TYPE_FDN", "PB_TYPE_ADN", "PB_TYPE_SDN",
-               "PB_TYPE_USIM", "PB_TYPE_AAS", "PB_TYPE_GAS", };
-static const char* dbg_dbus_pb_adf_field_name[] = { "NO VALUE 0", "PB_FIELD_NAME", "PB_FIELD_NUMBER",
-               "PB_FIELD_ANR1", "PB_FIELD_ANR2", "PB_FIELD_ANR3", "PB_FIELD_EMAIL1",
-               "PB_FIELD_EMAIL2", "PB_FIELD_EMAIL3", "PB_FIELD_EMAIL4", "PB_FIELD_SNE",
-               "PB_FIELD_GRP", "PB_FIELD_PBC" };
-static const char* dbg_dbus_pb_ton_name[] = { "PB_TON_UNKNOWN", "PB_TON_INTERNATIONAL",
-               "PB_TON_NATIONAL", "PB_TON_NETWORK_SPECIFIC", "PB_TON_DEDICATED_ACCESS",
-               "PB_TON_ALPHA_NUMERIC", "PB_TON_ABBREVIATED_NUMBER",
-               "PB_TON_RESERVED_FOR_EXT", };
-
-#define DBUS_PBM_GET_COPBM(invocation, co_pbm, server) { \
+#include "dtapi_common.h"
+
+/*
+ * Printable values for debugging/logging
+ */
+static const char *dbg_dbus_pb_type_name[] = {
+       "PB_TYPE_FDN", "PB_TYPE_ADN", "PB_TYPE_SDN",
+       "PB_TYPE_USIM", "PB_TYPE_AAS", "PB_TYPE_GAS"
+};
+
+static const char *dbg_dbus_pb_adf_field_name[] = {
+       "NO VALUE 0", "PB_FIELD_NAME", "PB_FIELD_NUMBER",
+       "PB_FIELD_ANR1", "PB_FIELD_ANR2", "PB_FIELD_ANR3",
+       "PB_FIELD_EMAIL1", "PB_FIELD_EMAIL2", "PB_FIELD_EMAIL3", "PB_FIELD_EMAIL4",
+       "PB_FIELD_SNE", "PB_FIELD_GRP", "PB_FIELD_PBC"
+};
+
+static const char *dbg_dbus_pb_ton_name[] = {
+       "PB_TON_UNKNOWN",
+       "PB_TON_INTERNATIONAL",
+       "PB_TON_NATIONAL",
+       "PB_TON_NETWORK_SPECIFIC",
+       "PB_TON_DEDICATED_ACCESS",
+       "PB_TON_ALPHA_NUMERIC",
+       "PB_TON_ABBREVIATED_NUMBER",
+       "PB_TON_RESERVED_FOR_EXT"
+};
+
+#define DBUS_PBM_GET_CO_PBM(invocation, co_pbm, server) do { \
        co_pbm = __get_pbm_co_by_cp_name(server, GET_CP_NAME(invocation)); \
        if (!co_pbm) { \
                err("[%s] PBM Core object is NULL", GET_CP_NAME(invocation)); \
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED); \
                return TRUE; \
        } \
-}
+} while (0)
 
 static CoreObject *__get_pbm_co_by_cp_name(Server *server, char *cp_name)
 {
@@ -72,7 +80,8 @@ static CoreObject *__get_pbm_co_by_cp_name(Server *server, char *cp_name)
        return tcore_plugin_ref_core_object(plugin, CORE_OBJECT_TYPE_PHONEBOOK);
 }
 
-static gboolean on_phonebook_get_init_status(TelephonyPhonebook *phonebook, GDBusMethodInvocation *invocation, gpointer user_data)
+static gboolean on_phonebook_get_init_status(TelephonyPhonebook *phonebook,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        gboolean pb_status = FALSE;
@@ -83,11 +92,27 @@ static gboolean on_phonebook_get_init_status(TelephonyPhonebook *phonebook, GDBu
        if (!check_access_control(p_cynara, invocation, AC_PHONEBOOK, "r"))
                return TRUE;
 
-       DBUS_PBM_GET_COPBM(invocation, co_pb, ctx->server);
-
+       DBUS_PBM_GET_CO_PBM(invocation, co_pb, ctx->server);
        pb_status = tcore_phonebook_get_status(co_pb);
-       list = tcore_phonebook_get_support_list(co_pb);
+       if (pb_status == FALSE) {
+               /*
+                *Phonebook is NOT initialized
+                */
+               dbg("pb_init is not completed yet.");
 
+               telephony_phonebook_complete_get_init_status(phonebook,
+                       invocation, pb_status,
+                       FALSE, /* FDN */
+                       FALSE, /* ADN */
+                       FALSE, /* SDN */
+                       FALSE, /* USIM */
+                       FALSE, /* AAS */
+                       FALSE); /* GAS */
+
+               return TRUE;
+       }
+
+       list = tcore_phonebook_get_support_list(co_pb);
        if (!list) {
                err("Supported phonebook list is NULL");
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
@@ -95,28 +120,28 @@ static gboolean on_phonebook_get_init_status(TelephonyPhonebook *phonebook, GDBu
        }
 
        dbg("[%s] fdn[%d],adn[%d],sdn[%d],usim[%d],aas[%d],gas[%d]",
-               GET_CP_NAME(invocation), list->b_fdn, list->b_adn, list->b_sdn, list->b_usim, list->b_aas, list->b_gas);
-
-       telephony_phonebook_complete_get_init_status(phonebook, invocation,
-                       pb_status,
-                       list->b_fdn,
-                       list->b_adn,
-                       list->b_sdn,
-                       list->b_usim,
-                       list->b_aas,
-                       list->b_gas);
-
+               GET_CP_NAME(invocation),
+               list->b_fdn, list->b_adn, list->b_sdn,
+               list->b_usim, list->b_aas, list->b_gas);
+
+       telephony_phonebook_complete_get_init_status(phonebook,
+               invocation, pb_status,
+               list->b_fdn,
+               list->b_adn,
+               list->b_sdn,
+               list->b_usim,
+               list->b_aas,
+               list->b_gas);
        g_free(list);
 
        return TRUE;
 }
 
-static gboolean on_phonebook_get_count(TelephonyPhonebook *phonebook, GDBusMethodInvocation *invocation, gint arg_req_type, gpointer user_data)
+static gboolean on_phonebook_get_count(TelephonyPhonebook *phonebook,
+       GDBusMethodInvocation *invocation, gint req_type, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_phonebook_get_count pb_count;
+       struct treq_phonebook_get_count req;
        CoreObject *co_pb = NULL;
        gboolean pb_status = FALSE;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -124,36 +149,36 @@ static gboolean on_phonebook_get_count(TelephonyPhonebook *phonebook, GDBusMetho
        if (!check_access_control(p_cynara, invocation, AC_PHONEBOOK, "r"))
                return TRUE;
 
-       DBUS_PBM_GET_COPBM(invocation, co_pb, ctx->server);
-
+       DBUS_PBM_GET_CO_PBM(invocation, co_pb, ctx->server);
        pb_status = tcore_phonebook_get_status(co_pb);
        if (pb_status == FALSE) {
                dbg("pb_init is not completed yet.");
-               telephony_phonebook_complete_get_count(phonebook, invocation, PB_ACCESS_CONDITION_NOT_SATISFIED, 0, 0, 0);
+
+               telephony_phonebook_complete_get_count(phonebook,
+                       invocation, PB_ACCESS_CONDITION_NOT_SATISFIED, 0, 0, 0);
+
                return TRUE;
        }
 
-       ur = MAKE_UR(ctx, phonebook, invocation);
-       memset(&pb_count, 0, sizeof(struct treq_phonebook_get_count));
+       memset(&req, 0x0, sizeof(struct treq_phonebook_get_count));
+
+       req.phonebook_type = req_type;
+       dbg("[%s] req phonebook_type[%d][%s]", GET_CP_NAME(invocation),
+               req.phonebook_type, dbg_dbus_pb_type_name[req.phonebook_type]);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, phonebook, invocation,
+               TREQ_PHONEBOOK_GETCOUNT,
+               &req, sizeof(struct treq_phonebook_get_count));
 
-       pb_count.phonebook_type = arg_req_type;
-       dbg("[%s] req phonebook_type[%d][%s]", GET_CP_NAME(invocation), pb_count.phonebook_type, dbg_dbus_pb_type_name[pb_count.phonebook_type]);
-       tcore_user_request_set_data(ur, sizeof(struct treq_phonebook_get_count), &pb_count);
-       tcore_user_request_set_command(ur, TREQ_PHONEBOOK_GETCOUNT);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
        return TRUE;
 }
 
-static gboolean on_phonebook_get_info(TelephonyPhonebook *phonebook, GDBusMethodInvocation *invocation, gint arg_req_type, gpointer user_data)
+static gboolean on_phonebook_get_info(TelephonyPhonebook *phonebook,
+       GDBusMethodInvocation *invocation, gint req_type, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_phonebook_get_info pb_info;
+       struct treq_phonebook_get_info req;
        CoreObject *co_pb = NULL;
        gboolean pb_status = FALSE;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -161,37 +186,37 @@ static gboolean on_phonebook_get_info(TelephonyPhonebook *phonebook, GDBusMethod
        if (!check_access_control(p_cynara, invocation, AC_PHONEBOOK, "r"))
                return TRUE;
 
-       DBUS_PBM_GET_COPBM(invocation, co_pb, ctx->server);
-
+       DBUS_PBM_GET_CO_PBM(invocation, co_pb, ctx->server);
        pb_status = tcore_phonebook_get_status(co_pb);
        if (pb_status == FALSE) {
                dbg("pb_init is not completed yet.");
-               telephony_phonebook_complete_get_info(phonebook, invocation, PB_ACCESS_CONDITION_NOT_SATISFIED, 0, 0, 0, 0, 0, 0);
+
+               telephony_phonebook_complete_get_info(phonebook, invocation,
+                       PB_ACCESS_CONDITION_NOT_SATISFIED, 0, 0, 0, 0, 0, 0);
+
                return TRUE;
        }
 
-       ur = MAKE_UR(ctx, phonebook, invocation);
-       memset(&pb_info, 0, sizeof(struct treq_phonebook_get_info));
+       memset(&req, 0x0, sizeof(struct treq_phonebook_get_info));
 
-       pb_info.phonebook_type = arg_req_type;
-       dbg("[%s] req phonebook_type[%d][%s]", GET_CP_NAME(invocation), pb_info.phonebook_type, dbg_dbus_pb_type_name[pb_info.phonebook_type]);
-       tcore_user_request_set_data(ur, sizeof(struct treq_phonebook_get_info), &pb_info);
-       tcore_user_request_set_command(ur, TREQ_PHONEBOOK_GETMETAINFO);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       req.phonebook_type = req_type;
+
+       dbg("[%s] req phonebook_type[%d][%s]", GET_CP_NAME(invocation),
+               req.phonebook_type,
+               dbg_dbus_pb_type_name[req.phonebook_type]);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, phonebook, invocation,
+               TREQ_PHONEBOOK_GETMETAINFO,
+               &req, sizeof(struct treq_phonebook_get_info));
 
        return TRUE;
 }
 
-static gboolean on_phonebook_get_usim_info(TelephonyPhonebook *phonebook, GDBusMethodInvocation *invocation, gpointer user_data)
+static gboolean on_phonebook_get_usim_info(TelephonyPhonebook *phonebook,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_pb = NULL;
        gboolean pb_status = FALSE;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -199,39 +224,39 @@ static gboolean on_phonebook_get_usim_info(TelephonyPhonebook *phonebook, GDBusM
        if (!check_access_control(p_cynara, invocation, AC_PHONEBOOK, "r"))
                return TRUE;
 
-       DBUS_PBM_GET_COPBM(invocation, co_pb, ctx->server);
+       DBUS_PBM_GET_CO_PBM(invocation, co_pb, ctx->server);
 
        pb_status = tcore_phonebook_get_status(co_pb);
-
        if (pb_status == FALSE) {
                GVariant *gv = NULL;
                GVariantBuilder b;
+
                dbg("pb_init is not completed yet.");
+
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                gv = g_variant_builder_end(&b);
-               telephony_phonebook_complete_get_usim_meta_info(phonebook, invocation, PB_ACCESS_CONDITION_NOT_SATISFIED, gv);
+
+               telephony_phonebook_complete_get_usim_meta_info(phonebook, invocation,
+                       PB_ACCESS_CONDITION_NOT_SATISFIED, gv);
+
                return TRUE;
        }
 
-       ur = MAKE_UR(ctx, phonebook, invocation);
-       tcore_user_request_set_data(ur, 0, NULL);
-       tcore_user_request_set_command(ur, TREQ_PHONEBOOK_GETUSIMINFO);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, phonebook, invocation,
+               TREQ_PHONEBOOK_GETUSIMINFO,
+               NULL, 0);
+
        return TRUE;
 }
 
-static gboolean on_phonebook_read_record(TelephonyPhonebook *phonebook, GDBusMethodInvocation *invocation,
-               gint arg_req_type, gint arg_index, gpointer user_data)
+static gboolean on_phonebook_read_record(TelephonyPhonebook *phonebook,
+       GDBusMethodInvocation *invocation,
+       gint req_type, gint index,
+       gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_phonebook_read_record pb_read;
+       struct treq_phonebook_read_record req;
        CoreObject *co_pb = NULL;
        gboolean pb_status = FALSE;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -239,48 +264,51 @@ static gboolean on_phonebook_read_record(TelephonyPhonebook *phonebook, GDBusMet
        if (!check_access_control(p_cynara, invocation, AC_PHONEBOOK, "r"))
                return TRUE;
 
-       DBUS_PBM_GET_COPBM(invocation, co_pb, ctx->server);
+       DBUS_PBM_GET_CO_PBM(invocation, co_pb, ctx->server);
        pb_status = tcore_phonebook_get_status(co_pb);
-
        if (pb_status == FALSE) {
                dbg("pb_init is not completed yet.");
-               telephony_phonebook_complete_read_record(phonebook, invocation, PB_ACCESS_CONDITION_NOT_SATISFIED,
-                               0, 0, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, 0);
+
+               telephony_phonebook_complete_read_record(phonebook, invocation,
+                       PB_ACCESS_CONDITION_NOT_SATISFIED,
+                       0, 0, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL,
+                       0, NULL, 0, NULL, NULL, NULL, NULL, 0);
+
                return TRUE;
        }
 
-       ur = MAKE_UR(ctx, phonebook, invocation);
-       memset(&pb_read, 0, sizeof(struct treq_phonebook_read_record));
+       memset(&req, 0x0, sizeof(struct treq_phonebook_read_record));
 
-       pb_read.index = (unsigned short)arg_index;
-       pb_read.phonebook_type = arg_req_type;
-       dbg("[%s] req phonebook_type[%d][%s] index[%d]",
-               GET_CP_NAME(invocation), pb_read.phonebook_type, dbg_dbus_pb_type_name[pb_read.phonebook_type], pb_read.index);
+       req.index = (unsigned short)index;
+       req.phonebook_type = req_type;
+
+       dbg("[%s] req phonebook_type[%d][%s] index[%d]", GET_CP_NAME(invocation),
+               req.phonebook_type,
+               dbg_dbus_pb_type_name[req.phonebook_type], req.index);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, phonebook, invocation,
+               TREQ_PHONEBOOK_READRECORD,
+               &req, sizeof(struct treq_phonebook_read_record));
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_phonebook_read_record), &pb_read);
-       tcore_user_request_set_command(ur, TREQ_PHONEBOOK_READRECORD);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
        return TRUE;
 }
 
-static gboolean on_phonebook_update_record(TelephonyPhonebook *phonebook, GDBusMethodInvocation *invocation,
-               gint arg_type, gint arg_index, const gchar *arg_name, gint arg_dcs,
-               const gchar *arg_number, gint arg_ton,
-               const gchar *arg_sne, gint arg_sne_dcs,
-               const gchar *arg_number2, gint arg_number2_ton,
-               const gchar *arg_number3, gint arg_number3_ton, const gchar *arg_number4, gint arg_number4_ton,
-               const gchar *arg_email1, const gchar *arg_email2, const gchar *arg_email3, const gchar *arg_email4,
-               gint arg_group_index, gpointer user_data)
+static gboolean on_phonebook_update_record(TelephonyPhonebook *phonebook,
+       GDBusMethodInvocation *invocation,
+       gint type, gint index,
+       const gchar *name, gint dcs,
+       const gchar *number, gint ton,
+       const gchar *sne, gint sne_dcs,
+       const gchar *number2, gint number2_ton,
+       const gchar *number3, gint number3_ton,
+       const gchar *number4, gint number4_ton,
+       const gchar *email1, const gchar *email2,
+       const gchar *email3, const gchar *email4,
+       gint group_index, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_phonebook_update_record pb_update;
+       struct treq_phonebook_update_record req;
        CoreObject *co_pb = NULL;
        gboolean pb_status = FALSE;
        int temp_len = 0;
@@ -289,95 +317,110 @@ static gboolean on_phonebook_update_record(TelephonyPhonebook *phonebook, GDBusM
        if (!check_access_control(p_cynara, invocation, AC_PHONEBOOK, "x"))
                return TRUE;
 
-       DBUS_PBM_GET_COPBM(invocation, co_pb, ctx->server);
-
+       DBUS_PBM_GET_CO_PBM(invocation, co_pb, ctx->server);
        pb_status = tcore_phonebook_get_status(co_pb);
-
        if (pb_status == FALSE) {
                dbg("pb_init is not completed yet.");
-               telephony_phonebook_complete_update_record(phonebook, invocation, PB_ACCESS_CONDITION_NOT_SATISFIED);
+
+               telephony_phonebook_complete_update_record(phonebook, invocation,
+                       PB_ACCESS_CONDITION_NOT_SATISFIED);
+
                return TRUE;
        }
 
-       memset(&pb_update, 0, sizeof(struct treq_phonebook_update_record));
+       memset(&req, 0x0, sizeof(struct treq_phonebook_update_record));
 
        dbg("[%s] pb_type[%d] index[%d] name[%s] number[%s] email[%s]",
-               GET_CP_NAME(invocation), arg_type, arg_index, arg_name, arg_number, arg_email1);
+               GET_CP_NAME(invocation), type, index,
+               name, number, email1);
 
-       pb_update.index = (unsigned short)arg_index;
-       pb_update.phonebook_type = arg_type;
+       req.index = (unsigned short)index;
+       req.phonebook_type = type;
 
-       if (arg_name != NULL && strlen(arg_name)) {
-               pb_update.dcs = PB_TEXT_ASCII;
-               pb_update.name_len = strlen(arg_name);
-               if (pb_update.name_len > PHONEBOOK_NAME_BYTE_MAX)
-                       pb_update.name_len = PHONEBOOK_NAME_BYTE_MAX;
-               memcpy(pb_update.name, arg_name, pb_update.name_len);
+       if (name != NULL && strlen(name)) {
+               req.dcs = PB_TEXT_ASCII;
+               req.name_len = strlen(name);
+
+               if (req.name_len > PHONEBOOK_NAME_BYTE_MAX)
+                       req.name_len = PHONEBOOK_NAME_BYTE_MAX;
+
+               memcpy(req.name, name, req.name_len);
        }
-       if (arg_sne != NULL && strlen(arg_sne)) {
-               pb_update.sne_dcs = PB_TEXT_ASCII;
-               pb_update.sne_len = strlen(arg_sne);
-               if (pb_update.sne_len > PHONEBOOK_NAME_BYTE_MAX)
-                       pb_update.sne_len = PHONEBOOK_NAME_BYTE_MAX;
-               memcpy(pb_update.sne, arg_sne, pb_update.sne_len);
+
+       if (sne != NULL && strlen(sne)) {
+               req.sne_dcs = PB_TEXT_ASCII;
+               req.sne_len = strlen(sne);
+
+               if (req.sne_len > PHONEBOOK_NAME_BYTE_MAX)
+                       req.sne_len = PHONEBOOK_NAME_BYTE_MAX;
+
+               memcpy(req.sne, sne, req.sne_len);
        }
-       if (arg_number != NULL && (temp_len = strlen(arg_number))) {
-               pb_update.ton = arg_ton;
+
+       if (number != NULL && (temp_len = strlen(number))) {
+               req.ton = ton;
+
                if (temp_len > PHONEBOOK_NUMBER_BYTE_MAX)
                        temp_len = PHONEBOOK_NUMBER_BYTE_MAX;
-               memcpy(pb_update.number, arg_number, temp_len);
+
+               memcpy(req.number, number, temp_len);
        }
-       if (arg_number2 != NULL && (temp_len = strlen(arg_number2))) {
-               pb_update.anr1_ton = arg_number2_ton;
+
+       if (number2 != NULL && (temp_len = strlen(number2))) {
+               req.anr1_ton = number2_ton;
+
                if (temp_len > PHONEBOOK_NUMBER_BYTE_MAX)
                        temp_len = PHONEBOOK_NUMBER_BYTE_MAX;
-               memcpy(pb_update.anr1, arg_number2, temp_len);
+
+               memcpy(req.anr1, number2, temp_len);
        }
 
-       if (arg_number3 != NULL && (temp_len = strlen(arg_number3))) {
-               pb_update.anr2_ton = arg_number3_ton;
+       if (number3 != NULL && (temp_len = strlen(number3))) {
+               req.anr2_ton = number3_ton;
+
                if (temp_len > PHONEBOOK_NUMBER_BYTE_MAX)
                        temp_len = PHONEBOOK_NUMBER_BYTE_MAX;
-               memcpy(pb_update.anr2, arg_number3, temp_len);
+
+               memcpy(req.anr2, number3, temp_len);
        }
 
-       if (arg_number4 != NULL && (temp_len = strlen(arg_number4))) {
-               pb_update.anr3_ton = arg_number4_ton;
+       if (number4 != NULL && (temp_len = strlen(number4))) {
+               req.anr3_ton = number4_ton;
+
                if (temp_len > PHONEBOOK_NUMBER_BYTE_MAX)
                        temp_len = PHONEBOOK_NUMBER_BYTE_MAX;
-               memcpy(pb_update.anr3, arg_number4, temp_len);
-       }
 
-       if (arg_email1 != NULL && strlen(arg_email1)) {
-               pb_update.email1_len = strlen(arg_email1);
-               if (pb_update.email1_len > PHONEBOOK_EMAIL_BYTE_MAX)
-                       pb_update.email1_len = PHONEBOOK_EMAIL_BYTE_MAX;
-               memcpy(pb_update.email1, arg_email1, pb_update.email1_len);
+               memcpy(req.anr3, number4, temp_len);
        }
-       /* Additional e-mail fields (email 2,3,4) cannot be used to CP*/
 
-       pb_update.group_index = (unsigned short)arg_group_index;
+       if (email1 != NULL && strlen(email1)) {
+               req.email1_len = strlen(email1);
 
-       ur = MAKE_UR(ctx, phonebook, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_phonebook_update_record), &pb_update);
-       tcore_user_request_set_command(ur, TREQ_PHONEBOOK_UPDATERECORD);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
+               if (req.email1_len > PHONEBOOK_EMAIL_BYTE_MAX)
+                       req.email1_len = PHONEBOOK_EMAIL_BYTE_MAX;
+
+               memcpy(req.email1, email1, req.email1_len);
        }
 
+       /* Additional e-mail fields (email 2,3,4) cannot be used to CP */
+
+       req.group_index = (unsigned short)group_index;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, phonebook, invocation,
+               TREQ_PHONEBOOK_UPDATERECORD,
+               &req, sizeof(struct treq_phonebook_update_record));
+
        return TRUE;
 }
 
-static gboolean on_phonebook_delete_record(TelephonyPhonebook *phonebook, GDBusMethodInvocation *invocation,
-               gint arg_type, gint arg_index, gpointer user_data)
+static gboolean on_phonebook_delete_record(TelephonyPhonebook *phonebook,
+       GDBusMethodInvocation *invocation,
+       gint type, gint index,
+       gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_phonebook_delete_record pb_delete;
+       struct treq_phonebook_delete_record req;
        CoreObject *co_pb = NULL;
        gboolean pb_status = FALSE;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -385,37 +428,36 @@ static gboolean on_phonebook_delete_record(TelephonyPhonebook *phonebook, GDBusM
        if (!check_access_control(p_cynara, invocation, AC_PHONEBOOK, "x"))
                return TRUE;
 
-       DBUS_PBM_GET_COPBM(invocation, co_pb, ctx->server);
-
+       DBUS_PBM_GET_CO_PBM(invocation, co_pb, ctx->server);
        pb_status = tcore_phonebook_get_status(co_pb);
-
        if (pb_status == FALSE) {
                dbg("pb_init is not completed yet.");
-               telephony_phonebook_complete_delete_record(phonebook, invocation, PB_ACCESS_CONDITION_NOT_SATISFIED);
+
+               telephony_phonebook_complete_delete_record(phonebook, invocation,
+                       PB_ACCESS_CONDITION_NOT_SATISFIED);
+
                return TRUE;
        }
 
-       ur = MAKE_UR(ctx, phonebook, invocation);
-       memset(&pb_delete, 0, sizeof(struct treq_phonebook_delete_record));
+       memset(&req, 0x0, sizeof(struct treq_phonebook_delete_record));
 
-       pb_delete.index = (unsigned short)arg_index;
-       pb_delete.phonebook_type = arg_type;
-       dbg("[%s] req phonebook_type[%d][%s] index[%d]",
-               GET_CP_NAME(invocation), pb_delete.phonebook_type, dbg_dbus_pb_type_name[pb_delete.phonebook_type], pb_delete.index);
+       req.index = (unsigned short)index;
+       req.phonebook_type = type;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_phonebook_delete_record), &pb_delete);
-       tcore_user_request_set_command(ur, TREQ_PHONEBOOK_DELETERECORD);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       dbg("[%s] req phonebook_type[%d][%s] index[%d]", GET_CP_NAME(invocation),
+               req.phonebook_type,
+               dbg_dbus_pb_type_name[req.phonebook_type], req.index);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, phonebook, invocation,
+               TREQ_PHONEBOOK_DELETERECORD,
+               &req, sizeof(struct treq_phonebook_delete_record));
 
        return TRUE;
 }
 
-gboolean dbus_plugin_setup_phonebook_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
+gboolean dbus_plugin_setup_phonebook_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
 {
        TelephonyPhonebook *phonebook;
 
@@ -425,6 +467,9 @@ gboolean dbus_plugin_setup_phonebook_interface(TelephonyObjectSkeleton *object,
 
        dbg("phonebook = %p", phonebook);
 
+       /*
+        * Register signal handlers for Phonebook interface
+        */
        g_signal_connect(phonebook,
                "handle-get-init-status",
                G_CALLBACK(on_phonebook_get_init_status), ctx);
@@ -456,9 +501,9 @@ gboolean dbus_plugin_setup_phonebook_interface(TelephonyObjectSkeleton *object,
        return TRUE;
 }
 
-gboolean dbus_plugin_phonebook_response(struct custom_data *ctx, UserRequest *ur,
-               struct dbus_request_info *dbus_info, enum tcore_response_command command,
-               unsigned int data_len, const void *data)
+gboolean dbus_plugin_phonebook_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        const struct tresp_phonebook_get_count *resp_pbcnt = data;
        const struct tresp_phonebook_get_info *resp_entry = data;
@@ -473,9 +518,10 @@ gboolean dbus_plugin_phonebook_response(struct custom_data *ctx, UserRequest *ur
                dbg("[%s] GETCOUNT (type[%d][%s] used[%d]total[%d])",
                        cpname, resp_pbcnt->type, dbg_dbus_pb_type_name[resp_pbcnt->type],
                        resp_pbcnt->used_count, resp_pbcnt->total_count);
+
                telephony_phonebook_complete_get_count(dbus_info->interface_object, dbus_info->invocation,
                        resp_pbcnt->result, resp_pbcnt->type, resp_pbcnt->used_count, resp_pbcnt->total_count);
-               break;
+       break;
 
        case TRESP_PHONEBOOK_GETMETAINFO:
                dbg("[%s] GETMETAINFO (type[%d][%s])",
@@ -483,18 +529,20 @@ gboolean dbus_plugin_phonebook_response(struct custom_data *ctx, UserRequest *ur
                dbg("index(min[%d]max[%d]), num_max[%d] text(max[%d]used[%d])",
                        resp_entry->index_min, resp_entry->index_max, resp_entry->number_length_max,
                        resp_entry->text_length_max, resp_entry->used_count);
+
                telephony_phonebook_complete_get_info(dbus_info->interface_object, dbus_info->invocation,
                        resp_entry->result, resp_entry->type, resp_entry->index_min, resp_entry->index_max,
                        resp_entry->number_length_max, resp_entry->text_length_max, resp_entry->used_count);
-               break;
+       break;
 
        case TRESP_PHONEBOOK_GETUSIMINFO: {
                GVariant *gv = NULL;
                GVariantBuilder b;
                int i;
+
                dbg("[%s] GETUSIMINFO", cpname);
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
 
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp_capa->field_count; i++) {
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
                        dbg("type[%d][%s] index_max[%d] text_max[%d] used_count[%d]",
@@ -513,8 +561,8 @@ gboolean dbus_plugin_phonebook_response(struct custom_data *ctx, UserRequest *ur
 
                telephony_phonebook_complete_get_usim_meta_info(dbus_info->interface_object,
                        dbus_info->invocation, resp_capa->result, gv);
-               }
-               break;
+       }
+       break;
 
        case TRESP_PHONEBOOK_READRECORD: {
                unsigned char dest_pb_name[PHONEBOOK_NAME_BYTE_MAX + 1];
@@ -544,7 +592,9 @@ gboolean dbus_plugin_phonebook_response(struct custom_data *ctx, UserRequest *ur
                                memcpy(dest_pb_sne, resp_pbread->sne, resp_pbread->sne_len);
                        }
 
-                       if (strlen((const char*)resp_pbread->anr1) != 0 || strlen((const char*)resp_pbread->anr2) != 0 || strlen((const char*)resp_pbread->anr3) != 0) {
+                       if (strlen((const char*)resp_pbread->anr1) != 0
+                                       || strlen((const char*)resp_pbread->anr2) != 0
+                                       || strlen((const char*)resp_pbread->anr3) != 0) {
                                dbg("anr1:([%s],ton[%d][%s])", resp_pbread->anr1,
                                        resp_pbread->anr1_ton, dbg_dbus_pb_ton_name[resp_pbread->anr1_ton]);
                                dbg("anr2:([%s],ton[%d][%s])", resp_pbread->anr2,
@@ -552,10 +602,12 @@ gboolean dbus_plugin_phonebook_response(struct custom_data *ctx, UserRequest *ur
                                dbg("anr3:([%s],ton[%d][%s])", resp_pbread->anr3,
                                        resp_pbread->anr3_ton, dbg_dbus_pb_ton_name[resp_pbread->anr3_ton]);
                        }
+
                        if (resp_pbread->email1_len > 0) {
                                dbg("email1:[%s] len:[%d]", resp_pbread->email1, resp_pbread->email1_len);
                                memcpy(dest_pb_email1, resp_pbread->email1, resp_pbread->email1_len);
                        }
+
                        /* Additional e-mail fields (email 2,3,4) cannot be used to CP*/
                }
 
@@ -589,32 +641,34 @@ gboolean dbus_plugin_phonebook_response(struct custom_data *ctx, UserRequest *ur
                        (const gchar *)resp_pbread->email3,
                        (const gchar *)resp_pbread->email4,
                        resp_pbread->group_index);
-               }
-               break;
+       }
+       break;
 
        case TRESP_PHONEBOOK_UPDATERECORD:
                dbg("[%s] UPDATERECORD (result[%d])", cpname, resp_pbupdate->result);
+
                telephony_phonebook_complete_update_record(dbus_info->interface_object,
                        dbus_info->invocation, resp_pbupdate->result);
-               break;
+       break;
 
        case TRESP_PHONEBOOK_DELETERECORD:
                dbg("[%s] DELETERECORD (result[%d])", cpname, resp_pbdelete->result);
+
                telephony_phonebook_complete_delete_record(dbus_info->interface_object,
                        dbus_info->invocation, resp_pbdelete->result);
-               break;
+       break;
 
        default:
-               dbg("not handled cmd[0x%x]", command);
-               break;
+               err("Unhandled/Unknown Response: [0x%x]", command);
+       break;
        }
 
        return TRUE;
 }
 
-gboolean dbus_plugin_phonebook_notification(struct custom_data *ctx, CoreObject *source,
-               TelephonyObjectSkeleton *object, enum tcore_notification_command command,
-               unsigned int data_len, const void *data)
+gboolean dbus_plugin_phonebook_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
        TelephonyPhonebook *phonebook;
        const char *cp_name;
@@ -644,25 +698,26 @@ gboolean dbus_plugin_phonebook_notification(struct custom_data *ctx, CoreObject
                        n_pb_status->support_list.b_usim,
                        n_pb_status->support_list.b_aas,
                        n_pb_status->support_list.b_gas);
-               }
-               break;
+       }
+       break;
 
        case TNOTI_PHONEBOOK_CONTACT_CHANGE: {
                const struct tnoti_phonebook_contact_change *n_pb_contact_change = data;
 
                dbg("phonebook_type [%d] index [%d] operation [%d]",
-                       n_pb_contact_change->phonebook_type, n_pb_contact_change->index, n_pb_contact_change->operation);
+                       n_pb_contact_change->phonebook_type,
+                       n_pb_contact_change->index, n_pb_contact_change->operation);
 
                telephony_phonebook_emit_contact_change(phonebook,
                        n_pb_contact_change->phonebook_type,
                        n_pb_contact_change->index,
                        n_pb_contact_change->operation);
-               }
-               break;
+       }
+       break;
 
        default:
-               dbg("not handled cmd[0x%x]", command);
-               break;
+               err("Unhandled/Unknown Notification: [0x%x]", command);
+       break;
        }
 
        return TRUE;
diff --git a/src/dtapi_sap.c b/src/dtapi_sap.c
new file mode 100644 (file)
index 0000000..ab4f2e4
--- /dev/null
@@ -0,0 +1,419 @@
+/*
+ * tel-plugin-dbus-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 <string.h>
+#include <stdlib.h>
+
+#include <tcore.h>
+#include <plugin.h>
+
+#include "generated-code.h"
+#include "dtapi_common.h"
+
+static gboolean on_sap_connect(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, gint req_max_size, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_sap_req_connect req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_sap_req_connect));
+
+       req.max_msg_size = (unsigned short)req_max_size;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_REQ_CONNECT,
+               &req, sizeof(struct treq_sap_req_connect));
+
+       return TRUE;
+}
+
+static gboolean on_sap_disconnect(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "x"))
+               return TRUE;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_REQ_DISCONNECT,
+               NULL, 0);
+
+       return TRUE;
+}
+
+static gboolean on_sap_get_status(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "r"))
+               return TRUE;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_REQ_STATUS,
+               NULL, 0);
+
+       return TRUE;
+}
+
+static gboolean on_sap_get_atr(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "r"))
+               return TRUE;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_REQ_ATR,
+               NULL, 0);
+
+       return TRUE;
+}
+
+static gboolean on_sap_transfer_apdu(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, GVariant *req_apdu, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_sap_transfer_apdu req;
+       GVariantIter *iter = NULL;
+       GVariant *inner_gv = NULL;
+       guchar rt_i;
+       int i = 0;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       dbg("Func Entrance");
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_sap_transfer_apdu));
+
+       inner_gv = g_variant_get_variant(req_apdu);
+
+       g_variant_get(inner_gv, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               req.apdu_data[i] = rt_i;
+               i++;
+       }
+
+       req.apdu_length = (unsigned int)i;
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(req_apdu);
+
+       for (i = 0; i < (int)req.apdu_length; i++)
+               dbg("apdu[%d][0x%02x]", i, req.apdu_data[i]);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_TRANSFER_APDU,
+               &req, sizeof(struct treq_sap_transfer_apdu));
+
+       return TRUE;
+}
+
+static gboolean on_sap_set_protocol(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, gint protocol, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_sap_set_protocol req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_sap_set_protocol));
+
+       req.protocol = protocol;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_SET_PROTOCOL,
+               &req, sizeof(struct treq_sap_set_protocol));
+
+       return TRUE;
+}
+
+static gboolean on_sap_set_power(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, gint mode, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       struct treq_sap_set_power req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_sap_set_power));
+
+       req.mode = mode;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_SET_POWER,
+               &req, sizeof(struct treq_sap_set_power));
+
+       return TRUE;
+}
+
+static gboolean on_sap_get_card_reader_status(TelephonySap *sap,
+       GDBusMethodInvocation *invocation, gpointer user_data)
+{
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SAP, "r"))
+               return TRUE;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sap, invocation,
+               TREQ_SAP_REQ_CARDREADERSTATUS,
+               NULL, 0);
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_setup_sap_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
+{
+       TelephonySap *sap;
+
+       sap = telephony_sap_skeleton_new();
+       telephony_object_skeleton_set_sap(object, sap);
+       g_object_unref(sap);
+
+       dbg("sap = %p", sap);
+
+       /*
+        * Register signal handlers for SAP interface
+        */
+       g_signal_connect(sap,
+               "handle-connect",
+               G_CALLBACK(on_sap_connect), ctx);
+
+       g_signal_connect(sap,
+               "handle-disconnect",
+               G_CALLBACK(on_sap_disconnect), ctx);
+
+       g_signal_connect(sap,
+               "handle-get-status",
+               G_CALLBACK(on_sap_get_status), ctx);
+
+       g_signal_connect(sap,
+               "handle-get-atr",
+               G_CALLBACK(on_sap_get_atr), ctx);
+
+       g_signal_connect(sap,
+               "handle-transfer-apdu",
+               G_CALLBACK(on_sap_transfer_apdu), ctx);
+
+       g_signal_connect(sap,
+               "handle-set-protocol",
+               G_CALLBACK(on_sap_set_protocol), ctx);
+
+       g_signal_connect(sap,
+               "handle-set-power",
+               G_CALLBACK(on_sap_set_power), ctx);
+
+       g_signal_connect(sap,
+               "handle-get-card-reader-status",
+               G_CALLBACK(on_sap_get_card_reader_status), ctx);
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_sap_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
+{
+       switch (command) {
+       case TRESP_SAP_REQ_CONNECT: {
+               const struct tresp_sap_req_connect *sap_conn = data;
+
+               dbg("dbus comm - TRESP_SAP_REQ_CONNECT");
+
+               telephony_sap_complete_connect(dbus_info->interface_object,
+                       dbus_info->invocation, sap_conn->status,
+                       sap_conn->max_msg_size);
+       }
+       break;
+
+       case TRESP_SAP_REQ_DISCONNECT: {
+               const struct tresp_sap_req_disconnect *sap_disconn = data;
+
+               dbg("dbus comm - TRESP_SAP_REQ_DISCONNECT");
+
+               telephony_sap_complete_disconnect(dbus_info->interface_object,
+                       dbus_info->invocation, sap_disconn->result);
+       }
+       break;
+
+       case TRESP_SAP_REQ_STATUS: {
+               const struct tresp_sap_req_status *sap_status = data;
+
+               dbg("dbus comm - TRESP_SAP_REQ_STATUS");
+
+               telephony_sap_complete_get_status(dbus_info->interface_object,
+                       dbus_info->invocation, sap_status->status);
+       }
+       break;
+
+       case TRESP_SAP_REQ_ATR: {
+               const struct tresp_sap_req_atr *sap_atr = data;
+               GVariantBuilder builder;
+               GVariant * atr_gv = NULL;
+               GVariant *inner_gv = NULL;
+               int i = 0;
+
+               dbg("dbus comm - TRESP_SAP_REQ_ATR");
+
+               g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
+               for (i = 0; i < (int)sap_atr->atr_length; i++) {
+                       dbg("sap_atr->atr[%d][0x%02x]", i, sap_atr->atr[i]);
+                       g_variant_builder_add(&builder, "y", sap_atr->atr[i]);
+               }
+               inner_gv = g_variant_builder_end(&builder);
+               atr_gv = g_variant_new("v", inner_gv);
+
+               telephony_sap_complete_get_atr(dbus_info->interface_object,
+                       dbus_info->invocation, sap_atr->result,
+                       atr_gv);
+       }
+       break;
+
+       case TRESP_SAP_TRANSFER_APDU: {
+               const struct tresp_sap_transfer_apdu *sap_apdu = data;
+               GVariantBuilder builder;
+               GVariant * apdu_gv = NULL;
+               GVariant *inner_gv = NULL;
+               int i = 0;
+
+               dbg("dbus comm - TRESP_SAP_TRANSFER_APDU");
+
+               g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
+               for (i = 0; i < (int)sap_apdu->resp_apdu_length; i++) {
+                       dbg("sap_apdu->resp_adpdu[%d][0x%02x]", i, sap_apdu->resp_adpdu[i]);
+                       g_variant_builder_add(&builder, "y", sap_apdu->resp_adpdu[i]);
+               }
+               inner_gv = g_variant_builder_end(&builder);
+               apdu_gv = g_variant_new("v", inner_gv);
+
+               telephony_sap_complete_transfer_apdu(dbus_info->interface_object,
+                       dbus_info->invocation, sap_apdu->result,
+                       apdu_gv);
+       }
+       break;
+
+       case TRESP_SAP_SET_PROTOCOL: {
+               const struct tresp_sap_set_protocol *sap_protocol = data;
+
+               dbg("dbus comm - TRESP_SAP_SET_PROTOCOL");
+
+               telephony_sap_complete_set_protocol(dbus_info->interface_object,
+                       dbus_info->invocation, sap_protocol->result);
+       }
+       break;
+
+       case TRESP_SAP_SET_POWER: {
+               const struct tresp_sap_set_power *sap_power = data;
+
+               dbg("dbus comm - TRESP_SAP_SET_POWER");
+
+               telephony_sap_complete_set_power(dbus_info->interface_object,
+                       dbus_info->invocation, sap_power->result);
+       }
+       break;
+
+       case TRESP_SAP_REQ_CARDREADERSTATUS: {
+               const struct tresp_sap_req_cardreaderstatus *sap_reader = data;
+
+               dbg("dbus comm - TRESP_SAP_REQ_CARDREADERSTATUS");
+
+               telephony_sap_complete_get_card_reader_status(dbus_info->interface_object,
+                       dbus_info->invocation, sap_reader->result,
+                       sap_reader->reader_status);
+       }
+       break;
+
+       default:
+               err("Unhandled/Unknown Response: [0x%x]", command);
+       break;
+       }
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_sap_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
+{
+       TelephonySap *sap;
+
+       if (!object) {
+               err("object is NULL");
+               return FALSE;
+       }
+
+       sap = telephony_object_peek_sap(TELEPHONY_OBJECT(object));
+       if (sap == NULL) {
+               err("sap object is NULL!!!");
+               return FALSE;
+       }
+
+       switch (command) {
+       case TNOTI_SAP_STATUS: {
+               const struct tnoti_sap_status_changed *sap_status = data;
+
+               dbg("notified sap_status[%d]", sap_status->status);
+
+               telephony_sap_emit_status(sap, sap_status->status);
+       }
+       break;
+
+       case TNOTI_SAP_DISCONNECT: {
+               const struct tnoti_sap_disconnect *sap_disconn = data;
+
+               dbg("notified sap_disconnect type[%d]", sap_disconn->type);
+
+               telephony_sap_emit_disconnect(sap, sap_disconn->type);
+       }
+       break;
+
+       default:
+               err("Unhandled/Unknown Notification: [0x%x]", command);
+       break;
+       }
+
+       return TRUE;
+}
similarity index 55%
rename from src/sat.c
rename to src/dtapi_sat.c
index e6f70fc..cfa1032 100644 (file)
--- a/src/sat.c
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <errno.h>
+
+#include <glib.h>
 
 #include <tcore.h>
 #include <server.h>
 #include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <core_object.h>
-#include <queue.h>
-#include <user_request.h>
-#include <util.h>
 #include <co_sat.h>
 
 #include "generated-code.h"
-#include "common.h"
-#include "sat_manager.h"
+#include "dtapi_common.h"
+#include "dtapi_sat_manager.h"
 #include "sat_ui_support/sat_ui_support.h"
 
-static void _sat_set_main_menu(struct custom_data *ctx, const char *cp_name, GVariant *main_menu)
+static void __sat_set_main_menu(struct custom_data *ctx,
+       const char *cp_name, GVariant *main_menu)
 {
        GSList *list = NULL;
        struct cached_data *object = NULL;
 
        for (list = ctx->cached_data; list; list = list->next) {
-               object = (struct cached_data *) list->data;
-               if (object == NULL)
-                       continue;
-
-               if (g_strcmp0(object->cp_name, cp_name) == 0) {
-                       /* need to free the previous main_menu */
+               object = (struct cached_data *)list->data;
+               if (object && g_strcmp0(object->cp_name, cp_name) == 0) {
+                       /*
+                        * Need to free the previous main_menu
+                        */
                        g_variant_unref(object->cached_sat_main_menu);
                        object->cached_sat_main_menu = main_menu;
+
                        return;
                }
        }
 
-       /* If 'object' is NOT created, then create the object and add to the list */
+       /*
+        * If 'object' is NOT created,
+        * then create the object and add to the list
+        */
        object = g_try_malloc0(sizeof(struct cached_data));
        if (NULL == object) {
-               err(" Malloc Failed");
+               err("Memory allocation failed");
                return;
        }
+
        object->cp_name = g_strdup(cp_name);
        object->cached_sat_main_menu = main_menu;
 
-       ctx->cached_data = g_slist_append(ctx->cached_data, (gpointer) object);
+       /*
+        * Append the new 'object' to cached data list
+        */
+       ctx->cached_data = g_slist_append(ctx->cached_data, (gpointer)object);
 }
 
-static GVariant *_sat_get_main_menu(struct custom_data *ctx, const char *cp_name)
+static GVariant *__sat_get_main_menu(struct custom_data *ctx,
+       const char *cp_name)
 {
        GSList *list = NULL;
        struct cached_data *object;
@@ -81,18 +85,15 @@ static GVariant *_sat_get_main_menu(struct custom_data *ctx, const char *cp_name
         */
        for (list = ctx->cached_data; list; list = list->next) {
                object = (struct cached_data *)list->data;
-               if (object == NULL)
-                       continue;
-
-               if (g_strcmp0(object->cp_name, cp_name) == 0)
+               if (object && g_strcmp0(object->cp_name, cp_name) == 0)
                        return object->cached_sat_main_menu;
        }
 
        return NULL;
 }
 
-static gboolean on_sat_get_main_menu_info(TelephonySAT *sat, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sat_get_main_menu_info(TelephonySAT *sat,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        GVariant *main_menu = NULL;
@@ -110,41 +111,44 @@ static gboolean on_sat_get_main_menu_info(TelephonySAT *sat, GDBusMethodInvocati
        if (!check_access_control(p_cynara, invocation, AC_SAT, "r"))
                return TRUE;
 
-       main_menu = _sat_get_main_menu(ctx, GET_CP_NAME(invocation));
+       main_menu = __sat_get_main_menu(ctx, GET_CP_NAME(invocation));
        if (!main_menu) {
-               dbg("no main menu");
-               return FALSE;
+               err("NO Main Menu");
+               return TRUE;
        }
 
-
-
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-       g_variant_get(main_menu, "(ibs@vibb@v@v)", &command_id, &b_present, &title, &items, &item_cnt,
-                       &b_help_info, &b_updated, &icon_id, &icon_list);
+       g_variant_get(main_menu, "(ibs@vibb@v@v)", &command_id,
+               &b_present, &title, &items, &item_cnt,
+               &b_help_info, &b_updated, &icon_id, &icon_list);
 
-       telephony_sat_complete_get_main_menu_info(sat, invocation, result, command_id, b_present, title,
-                       items, item_cnt, b_help_info, b_updated, icon_id, icon_list);
+       telephony_sat_complete_get_main_menu_info(sat, invocation,
+               result, command_id, b_present, title,
+               items, item_cnt, b_help_info, b_updated, icon_id, icon_list);
 #else
-       g_variant_get(main_menu, "(ibs@vibb)", &command_id, &b_present, &title, &items, &item_cnt,
-                       &b_help_info, &b_updated);
+       g_variant_get(main_menu, "(ibs@vibb)", &command_id,
+               &b_present, &title, &items, &item_cnt,
+               &b_help_info, &b_updated);
 
-       telephony_sat_complete_get_main_menu_info(sat, invocation, result, command_id, b_present, title,
-                       items, item_cnt, b_help_info, b_updated);
+       telephony_sat_complete_get_main_menu_info(sat, invocation,
+               result, command_id, b_present, title,
+               items, item_cnt, b_help_info, b_updated);
 #endif
+
        g_free(title);
 
        return TRUE;
 }
 
-static gboolean on_sat_send_display_status(TelephonySAT *sat, GDBusMethodInvocation *invocation,
-               gint arg_command_id, gboolean arg_display_status,
-               gpointer user_data)
+static gboolean on_sat_send_display_status(TelephonySAT *sat,
+       GDBusMethodInvocation *invocation,
+       gint command_id, gboolean display_status, gpointer user_data)
 {
        TcorePlugin *plg = NULL;
        char *cp_name;
        struct custom_data *ctx = user_data;
        gboolean result = FALSE;
-       gint out_param = 1;
+       gint out_param = 0;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SAT, "x"))
@@ -153,24 +157,30 @@ static gboolean on_sat_send_display_status(TelephonySAT *sat, GDBusMethodInvocat
        cp_name = GET_CP_NAME(invocation);
        plg = tcore_server_find_plugin(ctx->server, cp_name);
        if (!plg) {
-               dbg("there is no valid plugin at this point");
-               out_param = 0;
-               telephony_sat_complete_send_ui_display_status(sat, invocation, out_param);
+               dbg("There is NO valid plugin at this point");
+
+               telephony_sat_complete_send_ui_display_status(sat,
+                       invocation, out_param);
+
                return TRUE;
        }
 
-       result = sat_manager_handle_ui_display_status(ctx, plg, arg_command_id, arg_display_status);
+       result = sat_manager_handle_ui_display_status(ctx, plg,
+               command_id, display_status);
        if (!result)
-               dbg("fail to send exec result");
+               dbg("Failed to send 'exec' result");
 
        out_param = (result ? 1 : 0);
-       telephony_sat_complete_send_ui_display_status(sat, invocation, out_param);
+       telephony_sat_complete_send_ui_display_status(sat,
+               invocation, out_param);
+
        return TRUE;
 }
 
-static gboolean on_sat_send_user_confirm(TelephonySAT *sat, GDBusMethodInvocation *invocation,
-               gint arg_command_id, gint arg_command_type, gint arg_user_confirm_type,
-               GVariant *arg_additional_data, gpointer user_data)
+static gboolean on_sat_send_user_confirm(TelephonySAT *sat,
+       GDBusMethodInvocation *invocation,
+       gint command_id, gint command_type, gint user_confirm_type,
+       GVariant *additional_data, gpointer user_data)
 {
        TcorePlugin *plg = NULL;
        char *cp_name;
@@ -178,7 +188,7 @@ static gboolean on_sat_send_user_confirm(TelephonySAT *sat, GDBusMethodInvocatio
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        gboolean result = FALSE;
-       gint out_param = 1;
+       gint out_param = 0;
        GVariant *confirm_data = NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SAT, "x"))
@@ -187,27 +197,33 @@ static gboolean on_sat_send_user_confirm(TelephonySAT *sat, GDBusMethodInvocatio
        cp_name = GET_CP_NAME(invocation);
        plg = tcore_server_find_plugin(ctx->server, cp_name);
        if (!plg) {
-               dbg("there is no valid plugin at this point");
-               out_param = 0;
-               telephony_sat_complete_send_user_confirm(sat, invocation, out_param);
+               dbg("There is NO valid plugin at this point");
+
+               telephony_sat_complete_send_user_confirm(sat,
+                       invocation, out_param);
+
                return TRUE;
        }
 
-       confirm_data = g_variant_new("(iiv)", arg_command_id, arg_user_confirm_type, arg_additional_data);
+       confirm_data = g_variant_new("(iiv)", command_id,
+               user_confirm_type, additional_data);
 
-       result = sat_manager_handle_user_confirm(ctx, plg, confirm_data);
+       result = sat_manager_handle_user_confirm(ctx,
+               plg, confirm_data);
        if (!result)
-               dbg("fail to send user confirm");
+               dbg("Failed to send 'user confirm'");
 
        out_param = (result ? 1 : 0);
-       telephony_sat_complete_send_user_confirm(sat, invocation, out_param);
+       telephony_sat_complete_send_user_confirm(sat,
+               invocation, out_param);
 
        return TRUE;
 }
 
-static gboolean on_sat_send_app_exec_result(TelephonySAT *sat, GDBusMethodInvocation *invocation,
-               gint arg_command_id, gint arg_command_type, GVariant *arg_exec_result,
-               gpointer user_data)
+static gboolean on_sat_send_app_exec_result(TelephonySAT *sat,
+       GDBusMethodInvocation *invocation,
+       gint command_id, gint command_type,
+       GVariant *exec_result, gpointer user_data)
 {
        TcorePlugin *plg = NULL;
        char *cp_name;
@@ -215,7 +231,7 @@ static gboolean on_sat_send_app_exec_result(TelephonySAT *sat, GDBusMethodInvoca
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        gboolean result = FALSE;
-       gint out_param = 1;
+       gint out_param = 0;
 
        if (!check_access_control(p_cynara, invocation, AC_SAT, "x"))
                return TRUE;
@@ -223,96 +239,95 @@ static gboolean on_sat_send_app_exec_result(TelephonySAT *sat, GDBusMethodInvoca
        cp_name = GET_CP_NAME(invocation);
        plg = tcore_server_find_plugin(ctx->server, cp_name);
        if (!plg) {
-               dbg("there is no valid plugin at this point");
-               out_param = 0;
-               telephony_sat_complete_send_app_exec_result(sat, invocation, out_param);
+               dbg("There is NO valid plugin at this point");
+
+               telephony_sat_complete_send_app_exec_result(sat,
+                       invocation, out_param);
+
                return TRUE;
        }
 
-       dbg("processing app exec result");
-       result = sat_manager_handle_app_exec_result(ctx, plg, arg_command_id, arg_command_type, arg_exec_result);
+       dbg("Processing app 'exec' result");
+       result = sat_manager_handle_app_exec_result(ctx, plg,
+               command_id, command_type, exec_result);
        if (!result)
-               dbg("fail to send exec result");
+               dbg("Failed to send 'exec' result");
 
        out_param = (result ? 1 : 0);
-       telephony_sat_complete_send_app_exec_result(sat, invocation, out_param);
+       telephony_sat_complete_send_app_exec_result(sat,
+               invocation, out_param);
+
        return TRUE;
 }
 
-static gboolean on_sat_select_menu(TelephonySAT *sat, GDBusMethodInvocation *invocation,
-               guchar arg_item_identifier, gboolean arg_help_request,
-               gpointer user_data)
+static gboolean on_sat_select_menu(TelephonySAT *sat,
+       GDBusMethodInvocation *invocation,
+       guchar item_identifier, gboolean help_request, gpointer user_data)
 {
-       TReturn rv;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       struct treq_sat_envelop_cmd_data envelop_data;
+       struct treq_sat_envelop_cmd_data req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SAT, "x"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, sat, invocation);
-       memset(&envelop_data, 0, sizeof(struct treq_sat_envelop_cmd_data));
-       envelop_data.sub_cmd = ENVELOP_MENU_SELECTION;
-       envelop_data.envelop_data.menu_select.device_identitie.src = DEVICE_ID_KEYPAD;
-       envelop_data.envelop_data.menu_select.device_identitie.dest = DEVICE_ID_SIM;
-       envelop_data.envelop_data.menu_select.item_identifier.item_identifier = arg_item_identifier;
-       envelop_data.envelop_data.menu_select.help_request = arg_help_request;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_sat_envelop_cmd_data), &envelop_data);
-       tcore_user_request_set_command(ur, TREQ_SAT_REQ_ENVELOPE);
-       rv = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (rv != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", rv);
-               tcore_user_request_unref(ur);
-       }
+       memset(&req, 0x0, sizeof(struct treq_sat_envelop_cmd_data));
+
+       req.sub_cmd = ENVELOP_MENU_SELECTION;
+       req.envelop_data.menu_select.device_identitie.src = DEVICE_ID_KEYPAD;
+       req.envelop_data.menu_select.device_identitie.dest = DEVICE_ID_SIM;
+       req.envelop_data.menu_select.item_identifier.item_identifier = item_identifier;
+       req.envelop_data.menu_select.help_request = help_request;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sat, invocation,
+               TREQ_SAT_REQ_ENVELOPE,
+               &req, sizeof(struct treq_sat_envelop_cmd_data));
 
        return TRUE;
 }
 
-static gboolean on_sat_download_event(TelephonySAT *sat, GDBusMethodInvocation *invocation,
-               gint arg_event_download_type, gint arg_src_device, gint arg_dest_device,
-               GVariant *arg_download_data, gpointer user_data)
+static gboolean on_sat_download_event(TelephonySAT *sat,
+       GDBusMethodInvocation *invocation,
+       gint event_download_type, gint src_device, gint dest_device,
+       GVariant *download_data, gpointer user_data)
 {
        gboolean b_event = FALSE;
-       TReturn rv;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
-       struct treq_sat_envelop_cmd_data envelop_data;
+       struct treq_sat_envelop_cmd_data req;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SAT, "x"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, sat, invocation);
-       memset(&envelop_data, 0, sizeof(struct treq_sat_envelop_cmd_data));
-       envelop_data.sub_cmd = ENVELOP_EVENT_DOWNLOAD;
-       envelop_data.envelop_data.event_download.event = arg_event_download_type;
-       b_event = sat_manager_handle_event_download_envelop(arg_event_download_type, arg_src_device, arg_dest_device,
-                               &envelop_data.envelop_data.event_download, arg_download_data);
+       memset(&req, 0x0, sizeof(struct treq_sat_envelop_cmd_data));
+
+       req.sub_cmd = ENVELOP_EVENT_DOWNLOAD;
+       req.envelop_data.event_download.event = event_download_type;
 
+       b_event = sat_manager_handle_event_download_envelop(event_download_type,
+               src_device, dest_device,
+               &req.envelop_data.event_download, download_data);
        if (!b_event) {
-               telephony_sat_complete_download_event(sat, invocation, -1, ENVELOPE_FAILED);
-               tcore_user_request_unref(ur);
+               err("Envelop failed");
+
+               telephony_sat_complete_download_event(sat,
+                       invocation, -1, ENVELOPE_FAILED);
+
                return TRUE;
        }
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_sat_envelop_cmd_data), &envelop_data);
-       tcore_user_request_set_command(ur, TREQ_SAT_REQ_ENVELOPE);
-       rv = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (rv != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", rv);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sat, invocation,
+               TREQ_SAT_REQ_ENVELOPE,
+               &req, sizeof(struct treq_sat_envelop_cmd_data));
 
        return TRUE;
 }
 
-gboolean dbus_plugin_setup_sat_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
+gboolean dbus_plugin_setup_sat_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
 {
        TelephonySAT *sat;
 
@@ -322,6 +337,9 @@ gboolean dbus_plugin_setup_sat_interface(TelephonyObjectSkeleton *object, struct
 
        dbg("sat = %p", sat);
 
+       /*
+        * Register signal handlers for SAT interface
+        */
        g_signal_connect(sat,
                "handle-get-main-menu-info",
                G_CALLBACK(on_sat_get_main_menu_info), ctx);
@@ -349,9 +367,9 @@ gboolean dbus_plugin_setup_sat_interface(TelephonyObjectSkeleton *object, struct
        return TRUE;
 }
 
-gboolean dbus_plugin_sat_response(struct custom_data *ctx, UserRequest *ur,
-               struct dbus_request_info *dbus_info, enum tcore_response_command command,
-               unsigned int data_len, const void *data)
+gboolean dbus_plugin_sat_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        const struct tresp_sat_envelop_data *envelop_rsp = NULL;
 
@@ -359,43 +377,54 @@ gboolean dbus_plugin_sat_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_SAT_REQ_ENVELOPE: {
                envelop_rsp = (struct tresp_sat_envelop_data *)data;
 
-               dbg("envelop sub_cmd(%d) result(%d) rsp(%d)", envelop_rsp->sub_cmd, envelop_rsp->result, envelop_rsp->envelop_resp);
-
-               if (envelop_rsp->sub_cmd == ENVELOP_MENU_SELECTION) {
-                       telephony_sat_complete_select_menu(dbus_info->interface_object, dbus_info->invocation,
-                                       envelop_rsp->result, envelop_rsp->envelop_resp);
-               } else if (envelop_rsp->sub_cmd == ENVELOP_EVENT_DOWNLOAD) {
-                       telephony_sat_complete_download_event(dbus_info->interface_object, dbus_info->invocation,
-                                       envelop_rsp->result, envelop_rsp->envelop_resp);
-               }
-       } break;
+               dbg("SAT_REQ_ENVELOPE - Result: [%d] Envelop sub-cmd: [%d] Envelop response: [%d]",
+                       envelop_rsp->result,
+                       (envelop_rsp->sub_cmd == ENVELOP_MENU_SELECTION ? "MENU SELECTION" :
+                       (envelop_rsp->sub_cmd == ENVELOP_EVENT_DOWNLOAD ? "EVENT DOWNLOAD" :
+                       "UNKNOWN")),
+                       (envelop_rsp->envelop_resp == ENVELOPE_SUCCESS ? "Success" :
+                       (envelop_rsp->envelop_resp == ENVELOPE_SIM_BUSY? "SIM Busy" :
+                       "Fail")));
+
+               if (envelop_rsp->sub_cmd == ENVELOP_MENU_SELECTION)
+                       telephony_sat_complete_select_menu(dbus_info->interface_object,
+                               dbus_info->invocation, envelop_rsp->result,
+                               envelop_rsp->envelop_resp);
+               else if (envelop_rsp->sub_cmd == ENVELOP_EVENT_DOWNLOAD)
+                       telephony_sat_complete_download_event(dbus_info->interface_object,
+                               dbus_info->invocation, envelop_rsp->result,
+                               envelop_rsp->envelop_resp);
+       }
+       break;
 
        case TRESP_SAT_REQ_TERMINALRESPONSE:
-               dbg("receive TRESP_SAT_REQ_TERMINALRESPONSE");
+               dbg("SAT_REQ_TERMINALRESPONSE");
        break;
 
        default:
-               dbg("not handled command[%d]", command);
+               err("Unhandled/Unknown Response: [0x%x]", command);
        break;
        }
+
        return TRUE;
 }
 
-gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *source,
-               TelephonyObjectSkeleton *object, enum tcore_notification_command command,
-               unsigned int data_len, const void *data)
+gboolean dbus_plugin_sat_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
        TelephonySAT *sat;
        const char *cp_name;
        enum dbus_tapi_sim_slot_id slot_id;
 
        if (!object || !ctx) {
-               dbg("NULL data is detected!!");
+               err("NULL data is detected!!");
                return FALSE;
        }
+
        cp_name  = tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
-       slot_id = get_sim_slot_id_by_cp_name((char *)cp_name);
-       dbg("slot_id: [%d]", slot_id);
+       slot_id = get_sim_slot_id_by_cp_name(cp_name);
+       dbg("Slot ID: [%d]", slot_id);
 
        sat = telephony_object_peek_sat(TELEPHONY_OBJECT(object));
        if (sat == NULL) {
@@ -403,29 +432,34 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                return FALSE;
        }
 
-       /* session end notification */
        switch (command) {
-       case TNOTI_SAT_SESSION_END: {
-               dbg("notified sat session end evt");
+       case TNOTI_SAT_SESSION_END: { /* Session End notification */
+               dbg("[%s] SAT_SESSION_END", cp_name);
+
                sat_manager_init_queue(ctx, cp_name);
 
                /* sat_ui_support_terminate_sat_ui(); */
-               telephony_sat_emit_end_proactive_session(sat, SAT_PROATV_CMD_TYPE_END_PROACTIVE_SESSION);
-               return TRUE;
-               } break;
+               telephony_sat_emit_end_proactive_session(sat,
+                       SAT_PROATV_CMD_TYPE_END_PROACTIVE_SESSION);
+       }
+       break;
 
-       /* call control notification */
-       case TNOTI_SAT_CALL_CTRL_RESULT: {
+       case TNOTI_SAT_CALL_CTRL_RESULT: { /* Call Control notification */
                struct tnoti_sat_call_control_result_ind *cc_result_noti = NULL;
                gint call_ctrl_result = 0, bc_repeat_indicator = 0, ton = 0x0F, npi = 0X0F;
-               gchar *text = NULL, *call_num = NULL, *ss_string = NULL, *sub_addr = NULL, *ccp1 = NULL, *ccp2 = NULL;
+               gchar *text = NULL, *call_num = NULL, *ss_string = NULL, *sub_addr = NULL;
+               gchar *ccp1 = NULL, *ccp2 = NULL;
 
                cc_result_noti = (struct tnoti_sat_call_control_result_ind *)data;
                if (cc_result_noti == NULL) {
                        err("Indication data is NULL");
                        return FALSE;
                }
-               dbg("sat call control result notification");
+
+               dbg("[%s] SAT_CALL_CTRL_RESULT - Result: [%s]", cp_name,
+                       (cc_result_noti->cc_result == call_control_allowed_no_mod ? "No Modification" :
+                       (cc_result_noti->cc_result == call_control_allowed_with_mod ? "Allowed Modification" :
+                       "NOT Allowed")));
 
                call_ctrl_result = cc_result_noti->cc_result;
                bc_repeat_indicator = cc_result_noti->bc_repeat_type.bc_indi_repeat_type;
@@ -460,18 +494,23 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                else
                        ccp1 = g_strdup("");
 
-
                if (cc_result_noti->ccp2.data_len > 0)
                        ccp2 = g_strdup(cc_result_noti->ccp2.data);
                else
                        ccp2 = g_strdup("");
 
-               telephony_sat_emit_call_control_result(sat, call_ctrl_result, text, ton, npi, call_num,
+               telephony_sat_emit_call_control_result(sat,
+                       call_ctrl_result, text, ton, npi, call_num,
                        ss_string, sub_addr, ccp1, ccp2, bc_repeat_indicator);
 
-               g_free(text); g_free(call_num); g_free(ss_string); g_free(sub_addr); g_free(ccp1); g_free(ccp2);
-               return TRUE;
-               } break;
+               g_free(text);
+               g_free(call_num);
+               g_free(ss_string);
+               g_free(sub_addr);
+               g_free(ccp1);
+               g_free(ccp2);
+       }
+       break;
 
        case TNOTI_SAT_MO_SM_CTRL_RESULT: {
                struct tnoti_sat_mo_sm_control_result_ind *mo_sm_result_noti = NULL;
@@ -484,7 +523,11 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        err("Indication data is NULL");
                        return FALSE;
                }
-               dbg("sat mo sm control result notification");
+
+               dbg("[%s] SAT_MO_SM_CTRL_RESULT - Result: [%s]", cp_name,
+                       (mo_sm_result_noti->cc_result == call_control_allowed_no_mod ? "No Modification" :
+                       (mo_sm_result_noti->cc_result == call_control_allowed_with_mod ? "Allowed Modification" :
+                       "NOT Allowed")));
 
                call_ctrl_result = mo_sm_result_noti->cc_result;
 
@@ -515,34 +558,38 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                else
                        text = g_strdup("");
 
-               telephony_sat_emit_mo_sm_control_result(sat, call_ctrl_result, text,
+               telephony_sat_emit_mo_sm_control_result(sat,
+                       call_ctrl_result, text,
                        rp_dst_ton, rp_dst_npi, rp_dst_call_num, tp_dst_ton, tp_dst_npi, tp_dst_call_num);
 
-               g_free(text); g_free(rp_dst_call_num); g_free(tp_dst_call_num);
-               return TRUE;
-               } break;
+               g_free(text);
+               g_free(rp_dst_call_num);
+               g_free(tp_dst_call_num);
+       }
+       break;
 
-       /* Proactive Command Notification */
-       case TNOTI_SAT_PROACTIVE_CMD: {
+       case TNOTI_SAT_PROACTIVE_CMD: { /* Proactive Command Notification */
                struct tnoti_sat_proactive_ind *p_ind;
                TcorePlugin *plg;
+
                plg = tcore_object_ref_plugin(source);
                if (plg == NULL) {
-                       dbg("there is no valid plugin at this point");
+                       err("there is no valid plugin at this point");
                        return FALSE;
                }
 
                if (cp_name == NULL) {
-                       dbg("CP name is NULL");
+                       err("CP name is NULL");
                        return FALSE;
                }
 
                p_ind = (struct tnoti_sat_proactive_ind *)data;
                if (p_ind == NULL) {
-                       dbg("Indication data is NULL");
+                       err("Indication data is NULL");
                        return FALSE;
                }
-               dbg("notified sat proactive command(%d)", p_ind->cmd_type);
+
+               dbg("[%s] SAT_PROACTIVE_CMD - [0x%02x]", cp_name, p_ind->cmd_type);
 
                switch (p_ind->cmd_type) {
                case SAT_PROATV_CMD_SETUP_MENU: {
@@ -558,7 +605,9 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        menu_info = sat_manager_caching_setup_menu_info(ctx, cp_name,
                                (struct tel_sat_setup_menu_tlv*)&p_ind->proactive_ind_data.setup_menu);
 
-                       dbg("menu_info type_format(%s)", g_variant_get_type_string(menu_info));
+                       dbg("PROATV_CMD_SETUP_MENU - type_format: [%s]",
+                               g_variant_get_type_string(menu_info));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(menu_info, "(ibs@vibb@v@v)", &command_id, &b_present, &title, &items,
                                &menu_cnt, &b_helpinfo, &b_updated, &icon_id, &icon_list);
@@ -567,13 +616,18 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                &menu_cnt, &b_helpinfo, &b_updated);
 #endif
                        if (!menu_cnt) {
-                               dbg("no main menu data");
-                               /* No need to cache anything so make store NULL in cached_sat_main_menu */
-                               _sat_set_main_menu(ctx, cp_name, NULL);
+                               dbg("NO Main Menu data");
+
+                               /*
+                                * No need to cache anything so make store NULL
+                                * in cached_sat_main_menu
+                                */
+                               __sat_set_main_menu(ctx, cp_name, NULL);
                                g_variant_unref(menu_info);
                        } else {
-                               _sat_set_main_menu(ctx, cp_name, menu_info);
+                               __sat_set_main_menu(ctx, cp_name, menu_info);
                        }
+
                        if (b_updated) {
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                                telephony_sat_emit_setup_menu(sat, command_id, b_present, title, items, menu_cnt,
@@ -583,8 +637,10 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                        b_helpinfo, b_updated);
 #endif
                        }
+
                        g_free(title);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_DISPLAY_TEXT: {
                        GVariant *display_text = NULL;
@@ -597,14 +653,17 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #endif
                        int ret;
 
-                       display_text = sat_manager_display_text_noti(ctx, cp_name, (struct tel_sat_display_text_tlv*) &p_ind->proactive_ind_data.display_text, p_ind->decode_err_code);
-
+                       display_text = sat_manager_display_text_noti(ctx, cp_name,
+                               (struct tel_sat_display_text_tlv *)&p_ind->proactive_ind_data.display_text,
+                               p_ind->decode_err_code);
                        if (!display_text) {
-                               dbg("no display text data");
+                               dbg("NO Display text data");
                                return TRUE;
                        }
 
-                       dbg("display text type_format(%s)", g_variant_get_type_string(display_text));
+                       dbg("PROATV_CMD_DISPLAY_TEXT - type_format: [%s]",
+                               g_variant_get_type_string(display_text));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(display_text, "(isiibbb@v)", &command_id, &text, &text_len, &duration,
                                &high_priority, &user_rsp_required, &immediately_rsp, &icon_id);
@@ -612,15 +671,20 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        g_variant_get(display_text, "(isiibbb)", &command_id, &text, &text_len, &duration,
                                &high_priority, &user_rsp_required, &immediately_rsp);
 #endif
-                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_DISPLAY_TEXT, display_text, slot_id);
+
+                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_DISPLAY_TEXT,
+                               display_text, slot_id);
                        if (!ret) {
                                int rv;
-                               dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                               err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                       dbg("Fail to send terminal response\n");
+                                       dbg("Failed to send Terminal Response!!!");
+
                                rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                if (!rv)
-                                       dbg("fail to dequeue data\n");
+                                       dbg("Failed to de-queue data\n");
                        }
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -630,8 +694,10 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        telephony_sat_emit_display_text(sat, command_id, text, text_len, duration,
                                high_priority, user_rsp_required, immediately_rsp);
 #endif
+
                        g_free(text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SELECT_ITEM: {
                        GVariant *select_menu = NULL;
@@ -644,14 +710,16 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #endif
                        int ret;
 
-                       select_menu = sat_manager_select_item_noti(ctx, cp_name, (struct tel_sat_select_item_tlv*) &p_ind->proactive_ind_data.select_item);
-
+                       select_menu = sat_manager_select_item_noti(ctx, cp_name,
+                               (struct tel_sat_select_item_tlv *)&p_ind->proactive_ind_data.select_item);
                        if (!select_menu) {
-                               dbg("no select menu data");
+                               dbg("NO Select menu data");
                                return TRUE;
                        }
 
-                       dbg("select menu type_format(%s)", g_variant_get_type_string(select_menu));
+                       dbg("PROATV_CMD_SELECT_ITEM - type_format: [%s]",
+                               g_variant_get_type_string(select_menu));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(select_menu, "(ibsiii@v@v@v)", &command_id, &help_info, &selected_text,
                                &text_len, &default_item_id, &menu_cnt, &menu_items, &icon_id, &icon_list);
@@ -659,15 +727,19 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        g_variant_get(select_menu, "(ibsiii@v)", &command_id, &help_info, &selected_text,
                                &text_len, &default_item_id, &menu_cnt, &menu_items);
 #endif
-                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SELECT_ITEM, select_menu, slot_id);
+                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SELECT_ITEM,
+                               select_menu, slot_id);
                        if (!ret) {
                                int rv;
-                               dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                               err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                       dbg("Fail to send terminal response\n");
+                                       dbg("Failed to send Terminal Response!!!");
+
                                rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                if (!rv)
-                                       dbg("fail to dequeue data\n");
+                                       dbg("Failed to de-queue data\n");
                        }
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -677,8 +749,10 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        telephony_sat_emit_select_item(sat, command_id, help_info, selected_text, text_len,
                                default_item_id, menu_cnt, menu_items);
 #endif
+
                        g_free(selected_text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_GET_INKEY: {
                        GVariant *get_inkey = NULL;
@@ -691,14 +765,18 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #endif
                        int ret;
 
-                       get_inkey = sat_manager_get_inkey_noti(ctx, cp_name, (struct tel_sat_get_inkey_tlv*) &p_ind->proactive_ind_data.get_inkey, p_ind->decode_err_code);
+                       get_inkey = sat_manager_get_inkey_noti(ctx, cp_name,
+                               (struct tel_sat_get_inkey_tlv *)&p_ind->proactive_ind_data.get_inkey,
+                               p_ind->decode_err_code);
 
                        if (!get_inkey) {
-                               dbg("no get inkey data");
+                               dbg("NO Get Inkey data");
                                return TRUE;
                        }
 
-                       dbg("get inkey type_format(%s)", g_variant_get_type_string(get_inkey));
+                       dbg("PROATV_CMD_GET_INKEY - type_format: [%s]",
+                               g_variant_get_type_string(get_inkey));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(get_inkey, "(iiibbsii@v)", &command_id, &key_type, &input_character_mode,
                                &b_numeric, &b_help_info, &text, &text_len, &duration, &icon_id);
@@ -706,15 +784,20 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        g_variant_get(get_inkey, "(iiibbsii)", &command_id, &key_type, &input_character_mode,
                                &b_numeric, &b_help_info, &text, &text_len, &duration);
 #endif
-                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_GET_INKEY, get_inkey, slot_id);
+
+                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_GET_INKEY,
+                               get_inkey, slot_id);
                        if (!ret) {
                                int rv;
-                               dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                               err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                       dbg("Fail to send terminal response\n");
+                                       dbg("Failed to send Terminal Response!!!");
+
                                rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                if (!rv)
-                                       dbg("fail to dequeue data\n");
+                                       dbg("Failed to de-queue data\n");
                        }
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -724,8 +807,10 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        telephony_sat_emit_get_inkey(sat, command_id, key_type, input_character_mode,
                                b_numeric, b_help_info, text, text_len, duration);
 #endif
+
                        g_free(text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_GET_INPUT: {
                        GVariant *get_input = NULL;
@@ -737,14 +822,17 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       get_input = sat_manager_get_input_noti(ctx, cp_name, (struct tel_sat_get_input_tlv*) &p_ind->proactive_ind_data.get_input, p_ind->decode_err_code);
-
+                       get_input = sat_manager_get_input_noti(ctx, cp_name,
+                               (struct tel_sat_get_input_tlv *)&p_ind->proactive_ind_data.get_input,
+                               p_ind->decode_err_code);
                        if (!get_input) {
-                               dbg("no get input data");
+                               dbg("NO Get Input data");
                                return TRUE;
                        }
 
-                       dbg("get input type_format(%s)", g_variant_get_type_string(get_input));
+                       dbg("PROATV_CMD_GET_INPUT - type_format: [%s]",
+                               g_variant_get_type_string(get_input));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(get_input, "(iibbbsiiisi@v)", &command_id,
                                &input_character_mode, &b_numeric, &b_help_info,
@@ -756,15 +844,20 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                &b_echo_input, &text, &text_len, &rsp_len_max,
                                &rsp_len_min, &def_text, &def_text_len);
 #endif
-                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_GET_INPUT, get_input, slot_id);
+
+                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_GET_INPUT,
+                               get_input, slot_id);
                        if (!ret) {
                                int rv;
-                               dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                               err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                       dbg("Fail to send terminal response\n");
+                                       dbg("Failed to send Terminal Response!!!");
+
                                rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                if (!rv)
-                                       dbg("fail to dequeue data\n");
+                                       dbg("Failed to de-queue data\n");
                        }
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -774,9 +867,11 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        telephony_sat_emit_get_input(sat, command_id, input_character_mode, b_numeric, b_help_info,
                                b_echo_input, text, text_len, rsp_len_max, rsp_len_min, def_text, def_text_len);
 #endif
+
                        g_free(text);
                        g_free(def_text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_PLAY_TONE: {
                        GVariant *play_tone = NULL;
@@ -787,28 +882,35 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       play_tone = sat_manager_play_tone_noti(ctx, cp_name, (struct tel_sat_play_tone_tlv*) &p_ind->proactive_ind_data.play_tone);
 
+                       play_tone = sat_manager_play_tone_noti(ctx, cp_name,
+                               (struct tel_sat_play_tone_tlv *)&p_ind->proactive_ind_data.play_tone);
                        if (!play_tone) {
-                               dbg("no play tone data");
+                               dbg("NO Play Tone data");
                                return TRUE;
                        }
 
-                       dbg("play tone type_format(%s)", g_variant_get_type_string(play_tone));
+                       dbg("PROATV_CMD_PLAY_TONE - type_format: [%s]",
+                               g_variant_get_type_string(play_tone));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(play_tone, "(isi@vii)", &command_id, &text, &text_len, &icon_id, &tone_type, &duration);
 #else
                        g_variant_get(play_tone, "(isiii)", &command_id, &text, &text_len, &tone_type, &duration);
 #endif
+
                        ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_PLAY_TONE, play_tone, slot_id);
                        if (!ret) {
                                int rv;
-                               dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                               err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                       dbg("Fail to send terminal response\n");
+                                       dbg("Failed to send Terminal Response!!!");
+
                                rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                if (!rv)
-                                       dbg("fail to dequeue data\n");
+                                       dbg("Failed to de-queue data\n");
                        }
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -816,8 +918,10 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #else
                        telephony_sat_emit_play_tone(sat, command_id, text, text_len, tone_type, duration);
 #endif
+
                        g_free(text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SEND_SMS: {
                        GVariant *send_sms = NULL;
@@ -829,14 +933,17 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       send_sms = sat_manager_send_sms_noti(ctx, cp_name, (struct tel_sat_send_sms_tlv*) &p_ind->proactive_ind_data.send_sms);
 
+                       send_sms = sat_manager_send_sms_noti(ctx, cp_name,
+                               (struct tel_sat_send_sms_tlv *)&p_ind->proactive_ind_data.send_sms);
                        if (!send_sms) {
-                               dbg("no send sms data");
+                               dbg("NO Send SMS data");
                                return TRUE;
                        }
 
-                       dbg("send sms type_format(%s)", g_variant_get_type_string(send_sms));
+                       dbg("PROATV_CMD_SEND_SMS - type_format: [%s]",
+                               g_variant_get_type_string(send_sms));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(send_sms, "(isi@vbiisii@vi)", &command_id,
                                &text, &text_len, &icon_id, &b_packing_required, &ton, &npi,
@@ -846,40 +953,51 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                &text, &text_len, &b_packing_required, &ton, &npi,
                                &dialling_number, &number_len, &tpdu_type, &tpdu_data, &tpdu_data_len);
 #endif
-                       dbg("check display text : text(%s) text len(%d)", text, text_len);
+
+                       dbg("Display text - text: [%s] text len: [%d]", text, text_len);
                        if (text_len > 1 && (g_strcmp0(text, "") != 0)) {
                                GVariant *ui_info = NULL;
                                gboolean user_confirm = FALSE;
                                int ret;
-                               dbg("text should be displayed by ui");
-                               dbg("send sms is pending!!!");
+
+                               dbg("Text should be displayed by UI - Send SMS is pending!!!");
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                                ui_info = g_variant_new("(isibv)", command_id, text, text_len, user_confirm, icon_id);
 #else
                                ui_info = g_variant_new("(isib)", command_id, text, text_len, user_confirm);
 #endif
-                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SEND_SMS, ui_info, slot_id);
+
+                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SEND_SMS,
+                                       ui_info, slot_id);
                                if (!ret) {
                                        int rv;
-                                       dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                                       err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                        if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                               dbg("Fail to send terminal response\n");
+                                               dbg("Failed to send Terminal Response!!!");
+
                                        rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                        if (!rv)
-                                               dbg("fail to dequeue data\n");
+                                               dbg("Failed to de-queue data\n");
                                }
+
                                g_free(text);
                                g_free(dialling_number);
+
                                return TRUE;
                        }
+
 #if !defined(TIZEN_PLATFORM_USE_QCOM_QMI)
                        telephony_sat_emit_send_sms(sat, command_id, text, text_len, b_packing_required,
                                ton, npi, dialling_number, number_len, tpdu_type, tpdu_data, tpdu_data_len);
 #endif
+
                        g_free(text);
                        g_free(dialling_number);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SEND_SS: {
                        GVariant *send_ss = NULL;
@@ -889,14 +1007,17 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       send_ss = sat_manager_send_ss_noti(ctx, cp_name, (struct tel_sat_send_ss_tlv*) &p_ind->proactive_ind_data.send_ss);
 
+                       send_ss = sat_manager_send_ss_noti(ctx, cp_name,
+                               (struct tel_sat_send_ss_tlv *)&p_ind->proactive_ind_data.send_ss);
                        if (!send_ss) {
-                               dbg("no send ss data");
+                               dbg("NO Send SS data");
                                return TRUE;
                        }
 
-                       dbg("send ss type_format(%s)", g_variant_get_type_string(send_ss));
+                       dbg("PROATV_CMD_SEND_SS - type_format: [%s]",
+                               g_variant_get_type_string(send_ss));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(send_ss, "(isi@viiis)", &command_id, &text, &text_len, &icon_id,
                                                        &ton, &npi, &ss_str_len, &ss_string);
@@ -904,41 +1025,57 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        g_variant_get(send_ss, "(isiiiis)", &command_id, &text, &text_len,
                                                        &ton, &npi, &ss_str_len, &ss_string);
 #endif
-                       dbg("check display text : text(%s) text len(%d)", text, text_len);
+
+                       dbg("Display text - text: [%s] text len: [%d]", text, text_len);
                        if (text_len > 1 && (g_strcmp0(text, "") != 0)) {
                                GVariant *ui_info = NULL;
                                gboolean user_confirm = FALSE;
                                int ret;
-                               dbg("text should be displayed by ui");
-                               dbg("send ss is pending!!!");
+
+                               dbg("Text should be displayed by UI - Send SS is pending!!!");
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                                ui_info = g_variant_new("(isibv)", command_id, text, text_len, user_confirm, icon_id);
 #else
                                ui_info = g_variant_new("(isib)", command_id, text, text_len, user_confirm);
 #endif
-                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE, ui_info, slot_id);
+
+                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE,
+                                       ui_info, slot_id);
                                if (!ret) {
                                        int rv;
-                                       dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                                       err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                        if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                               dbg("Fail to send terminal response\n");
+                                               dbg("Failed to send Terminal Response!!!");
+
                                        rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                        if (!rv)
-                                               dbg("fail to dequeue data\n");
+                                               dbg("Failed to de-queue data\n");
                                }
+
                                g_free(text);
                                g_free(ss_string);
+
                                return TRUE;
                        }
+
 #if !defined(TIZEN_PLATFORM_USE_QCOM_QMI)
-                       telephony_sat_emit_send_ss(sat, command_id, text, text_len, ton, npi, ss_string);
-                       /* tizen ciss */
-                       sat_ui_support_launch_ciss_application(SAT_PROATV_CMD_SEND_SS, send_ss, slot_id);
+                       telephony_sat_emit_send_ss(sat,
+                               command_id, text, text_len, ton, npi, ss_string);
+
+                       /*
+                        * Tizen CISS
+                        */
+                       sat_ui_support_launch_ciss_application(SAT_PROATV_CMD_SEND_SS,
+                               send_ss, slot_id);
 #endif
+
                        g_free(text);
                        g_free(ss_string);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SEND_USSD: {
                        GVariant *send_ussd = NULL;
@@ -949,53 +1086,72 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       send_ussd = sat_manager_send_ussd_noti(ctx, cp_name, (struct tel_sat_send_ussd_tlv*) &p_ind->proactive_ind_data.send_ussd);
 
+                       send_ussd = sat_manager_send_ussd_noti(ctx, cp_name,
+                               (struct tel_sat_send_ussd_tlv *)&p_ind->proactive_ind_data.send_ussd);
                        if (!send_ussd) {
-                               dbg("no send ussd data");
+                               dbg("NO Send USSD data");
                                return TRUE;
                        }
 
-                       dbg("send ussd type_format(%s)", g_variant_get_type_string(send_ussd));
+                       dbg("PROATV_CMD_SEND_USSD - type_format: [%s]",
+                               g_variant_get_type_string(send_ussd));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(send_ussd, "(isi@vyis)", &command_id, &text, &text_len, &icon_id, &dcs, &ussd_str_len, &ussd_string);
 #else
                        g_variant_get(send_ussd, "(isiyis)", &command_id, &text, &text_len, &dcs, &ussd_str_len, &ussd_string);
 #endif
-                       dbg("check display text : text(%s) text len(%d)", text, text_len);
+
+                       dbg("Display text - text: [%s] text len: [%d]", text, text_len);
                        if (text_len > 1 && (g_strcmp0(text, "") != 0)) {
                                GVariant *ui_info = NULL;
                                gboolean user_confirm = FALSE;
                                int ret;
-                               dbg("text should be displayed by ui");
-                               dbg("send ussd is pending!!!");
+
+                               dbg("Text should be displayed by UI -Send USSD is pending!!!");
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                                ui_info = g_variant_new("(isibv)", command_id, text, text_len, user_confirm, icon_id);
 #else
                                ui_info = g_variant_new("(isib)", command_id, text, text_len, user_confirm);
 #endif
-                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE, ui_info, slot_id);
+
+                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE,
+                                       ui_info, slot_id);
                                if (!ret) {
                                        int rv;
-                                       dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                                       err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                        if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                               dbg("Fail to send terminal response\n");
+                                               dbg("Failed to send Terminal Response!!!");
+
                                        rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                        if (!rv)
-                                               dbg("fail to dequeue data\n");
+                                               dbg("Failed to de-queue data\n");
                                }
+
                                g_free(text);
                                g_free(ussd_string);
+
                                return TRUE;
                        }
+
 #if !defined(TIZEN_PLATFORM_USE_QCOM_QMI)
-                       telephony_sat_emit_setup_ussd(sat, command_id, text, text_len, dcs, ussd_string);
-                       /* tizen ciss ui */
-                       sat_ui_support_launch_ciss_application(SAT_PROATV_CMD_SEND_USSD, send_ussd, slot_id);
+                       telephony_sat_emit_setup_ussd(sat,
+                               command_id, text, text_len, dcs, ussd_string);
+
+                       /*
+                        * Tizen CISS UI
+                        */
+                       sat_ui_support_launch_ciss_application(SAT_PROATV_CMD_SEND_USSD,
+                               send_ussd, slot_id);
 #endif
                        g_free(text);
                        g_free(ussd_string);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SETUP_CALL: {
                        GVariant *setup_call = NULL;
@@ -1004,73 +1160,105 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       setup_call = sat_manager_setup_call_noti(ctx, cp_name, (struct tel_sat_setup_call_tlv*) &p_ind->proactive_ind_data.setup_call);
 
+                       setup_call = sat_manager_setup_call_noti(ctx, cp_name,
+                               (struct tel_sat_setup_call_tlv *)&p_ind->proactive_ind_data.setup_call);
                        if (!setup_call) {
-                               dbg("no setup call data");
+                               dbg("NO Setup Call data");
                                return TRUE;
                        }
 
-                       dbg("setup call type_format(%s)", g_variant_get_type_string(setup_call));
+                       dbg("PROATV_CMD_SETUP_CALL - type_format: [%s]",
+                               g_variant_get_type_string(setup_call));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       g_variant_get(setup_call, "(isisi@visi)", &command_id, &confirmed_text, &confirmed_text_len, &text, &text_len, &icon_id, &call_type, &call_number, &duration);
+                       g_variant_get(setup_call, "(isisi@visi)", &command_id,
+                               &confirmed_text, &confirmed_text_len,
+                               &text, &text_len, &icon_id, &call_type,
+                               &call_number, &duration);
 #else
-                       g_variant_get(setup_call, "(isisiisi)", &command_id, &confirmed_text, &confirmed_text_len, &text, &text_len, &call_type, &call_number, &duration);
+                       g_variant_get(setup_call, "(isisiisi)", &command_id,
+                               &confirmed_text, &confirmed_text_len,
+                               &text, &text_len, &call_type, &call_number, &duration);
 #endif
-                       dbg("check display text : text(%s) text len(%d)", confirmed_text, confirmed_text_len);
+
+                       dbg("Display text - text: [%s] text len: [%d]", confirmed_text, confirmed_text_len);
                        if (confirmed_text_len > 1 && (g_strcmp0(confirmed_text, "") != 0)) {
                                GVariant *ui_info = NULL;
                                gboolean user_confirm = TRUE;
                                int ret;
-                               dbg("text should be displayed by ui");
-                               dbg("setup call is pending!!!");
+
+                               dbg("Text should be displayed by UI - Setup call is pending!!!");
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                               ui_info = g_variant_new("(isibv)", command_id, confirmed_text, confirmed_text_len, user_confirm, icon_id);
+                               ui_info = g_variant_new("(isibv)", command_id,
+                                       confirmed_text, confirmed_text_len,
+                                       user_confirm, icon_id);
 #else
-                               ui_info = g_variant_new("(isib)", command_id, confirmed_text, confirmed_text_len, user_confirm);
+                               ui_info = g_variant_new("(isib)", command_id,
+                                       confirmed_text, confirmed_text_len,
+                                       user_confirm);
 #endif
-                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE, ui_info, slot_id);
+
+                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE,
+                                       ui_info, slot_id);
                                if (!ret) {
                                        int rv;
-                                       dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                                       err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                        if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                               dbg("Fail to send terminal response\n");
+                                               dbg("Failed to send Terminal Response!!!");
+
                                        rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                        if (!rv)
-                                               dbg("fail to dequeue data\n");
+                                               dbg("Failed to de-queue data\n");
                                }
+
                                g_free(text);
                                g_free(call_number);
+
                                return TRUE;
                        }
+                       /* In case of No user confirm phase AlphaID in SETUP CALL noti.
+                         * Ref.) ETSI TS 102 223 : Section 6.4.13 and 6.6.12
+                         */
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       telephony_sat_emit_setup_call(sat, command_id, confirmed_text, confirmed_text_len, text, text_len, icon_id, call_type, call_number, duration);
+                       telephony_sat_emit_setup_call(sat,
+                               command_id, confirmed_text, confirmed_text_len,
+                               text, text_len, icon_id, call_type, call_number, duration);
 #else
-                       telephony_sat_emit_setup_call(sat, command_id, confirmed_text, confirmed_text_len, text, text_len, call_type, call_number, duration);
+                       telephony_sat_emit_setup_call(sat,
+                               command_id, confirmed_text, confirmed_text_len,
+                               text, text_len, call_type, call_number, duration);
 #endif
                        g_free(text);
                        g_free(call_number);
-
-                       /* tizen call ui in no alpha id case */
-                       sat_ui_support_launch_call_application(SAT_PROATV_CMD_SETUP_CALL, setup_call, slot_id);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SETUP_EVENT_LIST: {
                        GVariant *event_list = NULL;
                        gint event_cnt;
                        GVariant *evt_list;
-                       event_list = sat_manager_setup_event_list_noti(ctx, cp_name, (struct tel_sat_setup_event_list_tlv*) &p_ind->proactive_ind_data.setup_event_list);
 
+                       event_list = sat_manager_setup_event_list_noti(ctx, cp_name,
+                               (struct tel_sat_setup_event_list_tlv *)&p_ind->proactive_ind_data.setup_event_list);
                        if (!event_list) {
-                               dbg("no setup event list data");
+                               dbg("NO Setup Event list data");
                                return TRUE;
                        }
 
-                       dbg("setup event list type_format(%s)", g_variant_get_type_string(event_list));
+                       dbg("PROATV_CMD_SETUP_EVENT_LIST - type_format: [%s]",
+                               g_variant_get_type_string(event_list));
+
                        g_variant_get(event_list, "(i@v)", &event_cnt, &evt_list);
                        telephony_sat_emit_setup_event_list(sat, event_cnt, evt_list);
 
-                       /* bip proactive command is only handled by BIP Manager */
+                       /*
+                        * BIP pro-active command is only handled
+                        * by BIP Manager
+                        */
                        {
                                GDBusConnection *conn = NULL;
                                const gchar *g_path = NULL;
@@ -1078,11 +1266,19 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                conn = g_dbus_object_manager_server_get_connection(ctx->manager);
                                g_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
 
-                               /* TODO: SAT Event Downloader should execute event_list as well. */
-                               sat_ui_support_exec_evtdw(conn, g_path, SAT_PROATV_CMD_SETUP_EVENT_LIST, event_list);
-                               sat_ui_support_exec_bip(conn, g_path, SAT_PROATV_CMD_SETUP_EVENT_LIST, event_list);
+                               /*
+                                * TODO -
+                                * SAT Event Downloader should execute
+                                * event_list as well.
+                                */
+                               sat_ui_support_exec_evtdw(conn, g_path,
+                                       SAT_PROATV_CMD_SETUP_EVENT_LIST, event_list);
+
+                               sat_ui_support_exec_bip(conn, g_path,
+                                       SAT_PROATV_CMD_SETUP_EVENT_LIST, event_list);
                        }
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT: {
                        GVariant *setup_idle_mode = NULL;
@@ -1092,36 +1288,51 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       setup_idle_mode = sat_manager_setup_idle_mode_text_noti(ctx, cp_name, (struct tel_sat_setup_idle_mode_text_tlv*) &p_ind->proactive_ind_data.setup_idle_mode_text, p_ind->decode_err_code);
-
+                       setup_idle_mode = sat_manager_setup_idle_mode_text_noti(ctx, cp_name,
+                               (struct tel_sat_setup_idle_mode_text_tlv *)&p_ind->proactive_ind_data.setup_idle_mode_text,
+                               p_ind->decode_err_code);
                        if (!setup_idle_mode) {
-                               dbg("no setup idle mode text data");
+                               dbg("NO Setup Idle mode text data");
                                return TRUE;
                        }
 
-                       dbg("setup idle mode text type_format(%s)", g_variant_get_type_string(setup_idle_mode));
+                       dbg("PROATV_CMD_SETUP_IDLE_MODE_TEXT - type_format: [%s]",
+                               g_variant_get_type_string(setup_idle_mode));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       g_variant_get(setup_idle_mode, "(isi@v)", &command_id, &text, &text_len, &icon_id);
+                       g_variant_get(setup_idle_mode, "(isi@v)", &command_id,
+                               &text, &text_len, &icon_id);
 #else
-                       g_variant_get(setup_idle_mode, "(isi)", &command_id, &text, &text_len);
+                       g_variant_get(setup_idle_mode, "(isi)", &command_id,
+                               &text, &text_len);
 #endif
-                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT, setup_idle_mode, slot_id);
+
+                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT,
+                               setup_idle_mode, slot_id);
                        if (!ret) {
                                int rv;
-                               dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                               err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                       dbg("Fail to send terminal response\n");
+                                       dbg("Failed to send Terminal Response!!!");
+
                                rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                if (!rv)
-                                       dbg("fail to dequeue data\n");
+                                       dbg("Failed to de-queue data\n");
                        }
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       telephony_sat_emit_setup_idle_mode_text(sat, command_id, text, text_len, icon_id);
+                       telephony_sat_emit_setup_idle_mode_text(sat,
+                               command_id, text, text_len, icon_id);
 #else
-                       telephony_sat_emit_setup_idle_mode_text(sat, command_id, text, text_len);
+                       telephony_sat_emit_setup_idle_mode_text(sat,
+                       command_id, text, text_len);
 #endif
+
                        g_free(text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_OPEN_CHANNEL: {
                        GVariant *open_channel = NULL;
@@ -1134,14 +1345,17 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       open_channel = sat_manager_open_channel_noti(ctx, cp_name, (struct tel_sat_open_channel_tlv*) &p_ind->proactive_ind_data.open_channel);
 
+                       open_channel = sat_manager_open_channel_noti(ctx, cp_name,
+                               (struct tel_sat_open_channel_tlv *)&p_ind->proactive_ind_data.open_channel);
                        if (!open_channel) {
-                               dbg("no open channel data");
+                               dbg("NO Open Channel data");
                                return TRUE;
                        }
 
-                       dbg("open channel type_format(%s)", g_variant_get_type_string(open_channel));
+                       dbg("PROATV_CMD_OPEN_CHANNEL - type_format: [%s]",
+                               g_variant_get_type_string(open_channel));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        g_variant_get(open_channel, "(isi@vbbbi@viiiis@v)", &command_id,
                                &text, &text_len, &icon_id, &immediate_link, &auto_reconnection, &bg_mode,
@@ -1153,39 +1367,59 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                &bearer_type, &bearer_param, &buffer_size, &protocol_type,
                                &port_number, &dest_addr_type, &dest_address, &bearer_detail);
 #endif
-                       dbg("check display text : text(%s) text len(%d)", text, text_len);
+
+                       dbg("Display text - text: [%s] text len: [%d]", text, text_len);
                        if (text_len > 1 && (g_strcmp0(text, "") != 0)) {
                                GVariant *ui_info = NULL;
                                gboolean user_confirm = TRUE;
                                int ret;
-                               dbg("text should be displayed by ui");
-                               dbg("open channel text is displayed!!!");
+
+                               dbg("Text should be displayed by UI- Open Channel text is displayed!!!");
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                               ui_info = g_variant_new("(isibv)", command_id, text, text_len, user_confirm, icon_id);
+                               ui_info = g_variant_new("(isibv)", command_id,
+                                       text, text_len, user_confirm, icon_id);
 #else
-                               ui_info = g_variant_new("(isib)", command_id, text, text_len, user_confirm);
+                               ui_info = g_variant_new("(isib)", command_id,
+                                       text, text_len, user_confirm);
 #endif
-                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE, ui_info, slot_id);
-                                       if (!ret) {
+
+                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_NONE,
+                                       ui_info, slot_id);
+                               if (!ret) {
                                        int rv;
-                                       dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                                       err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                        if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                               dbg("Fail to send terminal response\n");
+                                               dbg("Failed to send Terminal Response!!!");
+
                                        rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                        if (!rv)
-                                               dbg("fail to dequeue data\n");
+                                               dbg("Failed to de-queue data\n");
                                }
+
                                g_free(text);
                                g_free(dest_address);
+
                                return TRUE;
                        }
+
                        g_free(text);
                        g_free(dest_address);
 
-                       /*telephony_sat_emit_open_channel(sat, command_id, text, text_len, immediate_link, auto_reconnection, bg_mode,
-                               bearer_type, bearer_param, buffer_size, protocol_type, port_number, dest_addr_type, dest_address, bearer_detail);*/
+#if 0
+                       telephony_sat_emit_open_channel(sat, command_id,
+                               text, text_len, immediate_link, auto_reconnection, bg_mode,
+                               bearer_type, bearer_param, buffer_size, protocol_type, port_number,
+                               dest_addr_type, dest_address, bearer_detail);
+#endif
+
 #if !defined(TIZEN_PLATFORM_USE_QCOM_QMI)
-                       /* bip proactive command is only handled by BIP Manager */
+                       /*
+                        * BIP pro-active command is only handled
+                        * by BIP Manager
+                        */
                        {
                                GDBusConnection *conn = NULL;
                                const gchar *g_path = NULL;
@@ -1193,10 +1427,12 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                conn = g_dbus_object_manager_server_get_connection(ctx->manager);
                                g_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
 
-                               sat_ui_support_exec_bip(conn, g_path, SAT_PROATV_CMD_OPEN_CHANNEL, open_channel);
+                               sat_ui_support_exec_bip(conn, g_path,
+                                       SAT_PROATV_CMD_OPEN_CHANNEL, open_channel);
                        }
 #endif
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_CLOSE_CHANNEL: {
                        GVariant *close_channel = NULL;
@@ -1205,23 +1441,38 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       close_channel = sat_manager_close_channel_noti(ctx, cp_name, (struct tel_sat_close_channel_tlv*) &p_ind->proactive_ind_data.close_channel);
 
+                       close_channel = sat_manager_close_channel_noti(ctx, cp_name,
+                               (struct tel_sat_close_channel_tlv *)&p_ind->proactive_ind_data.close_channel);
                        if (!close_channel) {
-                               dbg("no close channel data");
+                               dbg("NO Close Channel data");
                                return TRUE;
                        }
 
-                       /* TODO check the data for sat-ui */
-                       dbg("close channel type_format(%s)", g_variant_get_type_string(close_channel));
+                       /*
+                        * TODO -
+                        * Check the data for sat-ui
+                        */
+                       dbg("PROATV_CMD_CLOSE_CHANNEL - type_format: [%s]",
+                               g_variant_get_type_string(close_channel));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       g_variant_get(close_channel, "(isi@vi)", &command_id, &text, &text_len, &icon_id, &channel_id);
+                       g_variant_get(close_channel, "(isi@vi)", &command_id,
+                               &text, &text_len, &icon_id, &channel_id);
 #else
-                       g_variant_get(close_channel, "(isii)", &command_id, &text, &text_len, &channel_id);
+                       g_variant_get(close_channel, "(isii)", &command_id,
+                               &text, &text_len, &channel_id);
 #endif
 
-                       /*telephony_sat_emit_close_channel(sat, command_id, text, text_len, channel_id);*/
-                       /* bip proactive command is only handled by BIP Manager */
+#if 0
+                       telephony_sat_emit_close_channel(sat,
+                               command_id, text, text_len, channel_id);
+#endif
+
+                       /*
+                        * BIP pro-active command is only handled
+                        * by BIP Manager
+                        */
                        {
                                GDBusConnection *conn = NULL;
                                const gchar *g_path = NULL;
@@ -1229,11 +1480,13 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                conn = g_dbus_object_manager_server_get_connection(ctx->manager);
                                g_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
 
-                               sat_ui_support_exec_bip(conn, g_path, SAT_PROATV_CMD_CLOSE_CHANNEL, close_channel);
+                               sat_ui_support_exec_bip(conn, g_path,
+                                       SAT_PROATV_CMD_CLOSE_CHANNEL, close_channel);
                        }
 
                        g_free(text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_RECEIVE_DATA: {
                        GVariant *receive_data = NULL;
@@ -1242,23 +1495,39 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       receive_data = sat_manager_receive_data_noti(ctx, cp_name, (struct tel_sat_receive_channel_tlv*) &p_ind->proactive_ind_data.receive_data);
 
+                       receive_data = sat_manager_receive_data_noti(ctx, cp_name,
+                               (struct tel_sat_receive_channel_tlv *)&p_ind->proactive_ind_data.receive_data);
                        if (!receive_data) {
-                               dbg("no receive data data");
+                               dbg("NO Receive data data");
                                return TRUE;
                        }
 
-                       /* TODO check the data for sat-ui */
+                       /*
+                        * TODO -
+                        * Check the data for sat-ui
+                        */
+
+                       dbg("PROATV_CMD_RECEIVE_DATA - type_format: [%s]",
+                               g_variant_get_type_string(receive_data));
 
-                       dbg("receive data type_format(%s)", g_variant_get_type_string(receive_data));
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       g_variant_get(receive_data, "(isi@vii)", &command_id, &text, &text_len, &icon_id, &channel_id, &channel_data_len);
+                       g_variant_get(receive_data, "(isi@vii)", &command_id,
+                               &text, &text_len, &icon_id, &channel_id, &channel_data_len);
 #else
-                       g_variant_get(receive_data, "(isiii)", &command_id, &text, &text_len, &channel_id, &channel_data_len);
+                       g_variant_get(receive_data, "(isiii)", &command_id,
+                               &text, &text_len, &channel_id, &channel_data_len);
 #endif
-                       /*telephony_sat_emit_receive_data(sat, command_id, text, text_len, channel_id, channel_data_len);*/
-                       /* bip proactive command is only handled by BIP Manager */
+
+#if 0
+                       telephony_sat_emit_receive_data(sat,
+                               command_id, text, text_len, channel_id, channel_data_len);
+#endif
+
+                       /*
+                        * BIP pro-active command is only handled
+                        * by BIP Manager
+                        */
                        {
                                GDBusConnection *conn = NULL;
                                const gchar *g_path = NULL;
@@ -1266,10 +1535,13 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                conn = g_dbus_object_manager_server_get_connection(ctx->manager);
                                g_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
 
-                               sat_ui_support_exec_bip(conn, g_path, SAT_PROATV_CMD_RECEIVE_DATA, receive_data);
+                               sat_ui_support_exec_bip(conn, g_path,
+                                       SAT_PROATV_CMD_RECEIVE_DATA, receive_data);
                        }
+
                        g_free(text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SEND_DATA: {
                        GVariant *send_data = NULL;
@@ -1280,22 +1552,42 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id;
 #endif
-                       send_data = sat_manager_send_data_noti(ctx, cp_name, (struct tel_sat_send_channel_tlv*) &p_ind->proactive_ind_data.send_data);
 
+                       send_data = sat_manager_send_data_noti(ctx, cp_name,
+                               (struct tel_sat_send_channel_tlv *)&p_ind->proactive_ind_data.send_data);
                        if (!send_data) {
-                               dbg("no send data data");
+                               dbg("NO Send data data");
                                return TRUE;
                        }
-                       /* TODO check the data for sat-ui */
-                       dbg("send data type_format(%s)", g_variant_get_type_string(send_data));
+
+                       /*
+                        * TODO -
+                        * Check the data for sat-ui
+                        */
+
+                       dbg("PROATV_CMD_SEND_DATA - type_format: [%s]",
+                               g_variant_get_type_string(send_data));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       g_variant_get(send_data, "(isi@vib@vi)", &command_id, &text, &text_len, &icon_id, &channel_id, &send_data_immediately, &channel_data, &channel_data_len);
+                       g_variant_get(send_data, "(isi@vib@vi)", &command_id,
+                               &text, &text_len, &icon_id, &channel_id,
+                               &send_data_immediately, &channel_data, &channel_data_len);
 #else
-                       g_variant_get(send_data, "(isiib@vi)", &command_id, &text, &text_len, &channel_id, &send_data_immediately, &channel_data, &channel_data_len);
+                       g_variant_get(send_data, "(isiib@vi)", &command_id,
+                               &text, &text_len, &channel_id,
+                               &send_data_immediately, &channel_data, &channel_data_len);
+#endif
+
+#if 0
+                       telephony_sat_emit_send_data(sat,
+                               command_id, text, text_len, channel_id,
+                               send_data_immediately, channel_data, channel_data_len);
 #endif
-                       /*telephony_sat_emit_send_data(sat, command_id, text, text_len, channel_id, send_data_immediately, channel_data, channel_data_len);*/
 
-                       /* bip proactive command is only handled by BIP Manager */
+                       /*
+                        * BIP pro-active command is only handled
+                        * by BIP Manager
+                        */
                        {
                                GDBusConnection *conn = NULL;
                                const gchar *g_path = NULL;
@@ -1303,28 +1595,43 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                conn = g_dbus_object_manager_server_get_connection(ctx->manager);
                                g_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
 
-                               sat_ui_support_exec_bip(conn, g_path, SAT_PROATV_CMD_SEND_DATA, send_data);
+                               sat_ui_support_exec_bip(conn, g_path,
+                                       SAT_PROATV_CMD_SEND_DATA, send_data);
                        }
+
                        g_free(text);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_GET_CHANNEL_STATUS: {
                        GVariant *channel_status = NULL;
                        gint command_id;
 
-                       channel_status = sat_manager_get_channel_status_noti(ctx, cp_name, (struct tel_sat_get_channel_status_tlv*) &p_ind->proactive_ind_data.get_channel_status);
-
+                       channel_status = sat_manager_get_channel_status_noti(ctx, cp_name,
+                               (struct tel_sat_get_channel_status_tlv *)&p_ind->proactive_ind_data.get_channel_status);
                        if (!channel_status) {
-                               dbg("no get channel status data");
+                               dbg("NO Get Channel Status data");
                                return TRUE;
                        }
 
-                       /* TODO check the data for sat-ui */
-                       dbg("get channel status type_format(%s)", g_variant_get_type_string(channel_status));
+                       /*
+                        * TODO -
+                        * Check the data for sat-ui
+                        */
+
+                       dbg("PROATV_CMD_GET_CHANNEL_STATUS - type_format: [%s]",
+                               g_variant_get_type_string(channel_status));
+
                        g_variant_get(channel_status, "(i)", &command_id);
 
-                       /*telephony_sat_emit_get_channel_status(sat, command_id);*/
-                       /* bip proactive command is only handled by BIP Manager */
+#if 0
+                       telephony_sat_emit_get_channel_status(sat, command_id);
+#endif
+
+                       /*
+                        * BIP pro-active command is only handled
+                        * by BIP Manager
+                        */
                        {
                                GDBusConnection *conn = NULL;
                                const gchar *g_path = NULL;
@@ -1332,9 +1639,11 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                                conn = g_dbus_object_manager_server_get_connection(ctx->manager);
                                g_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
 
-                               sat_ui_support_exec_bip(conn, g_path, SAT_PROATV_CMD_GET_CHANNEL_STATUS, channel_status);
+                               sat_ui_support_exec_bip(conn, g_path,
+                                       SAT_PROATV_CMD_GET_CHANNEL_STATUS, channel_status);
                        }
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_REFRESH: {
                        GVariant *refresh = NULL;
@@ -1343,33 +1652,48 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        GVariant *file_list = NULL;
                        int ret;
 
-                       refresh = sat_manager_refresh_noti(ctx, cp_name, (struct tel_sat_refresh_tlv*) &p_ind->proactive_ind_data.refresh);
-
+                       refresh = sat_manager_refresh_noti(ctx, cp_name,
+                               (struct tel_sat_refresh_tlv *)&p_ind->proactive_ind_data.refresh);
                        if (!refresh) {
-                               dbg("no refresh data");
+                               dbg("NO Refresh data");
                                return TRUE;
                        }
 
-                       dbg("refresh type_format(%s)", g_variant_get_type_string(refresh));
-                       g_variant_get(refresh, "(ii@v)", &command_id, &refresh_type, &file_list);
+                       dbg("PROATV_CMD_REFRESH - type_format: [%s]",
+                               g_variant_get_type_string(refresh));
+
+                       g_variant_get(refresh, "(ii@v)", &command_id,
+                               &refresh_type, &file_list);
 
-                       telephony_sat_emit_refresh(sat, command_id, refresh_type, file_list);
-                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_REFRESH, refresh, slot_id);
+                       telephony_sat_emit_refresh(sat,
+                               command_id, refresh_type, file_list);
+
+                       ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_REFRESH,
+                               refresh, slot_id);
                        if (!ret) {
                                int rv;
-                               dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                               err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                       dbg("Fail to send terminal response\n");
+                                       dbg("Failed to send Terminal Response!!!");
+
                                rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                if (!rv)
-                                       dbg("fail to dequeue data\n");
+                                       dbg("Failed to de-queue data\n");
                        }
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_MORE_TIME: {
-                       sat_manager_more_time_noti(ctx, cp_name, (struct tel_sat_more_time_tlv*) &p_ind->proactive_ind_data.more_time);
+                       dbg("PROATV_CMD_MORE_TIME");
+
+                       sat_manager_more_time_noti(ctx, cp_name,
+                               (struct tel_sat_more_time_tlv *)&p_ind->proactive_ind_data.more_time);
+
                        telephony_sat_emit_more_time(sat);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_SEND_DTMF: {
                        GVariant *send_dtmf = NULL;
@@ -1380,49 +1704,70 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id = NULL;
 #endif
-                       send_dtmf = sat_manager_send_dtmf_noti(ctx, cp_name, (struct tel_sat_send_dtmf_tlv*) &p_ind->proactive_ind_data.send_dtmf);
+
+                       send_dtmf = sat_manager_send_dtmf_noti(ctx, cp_name,
+                               (struct tel_sat_send_dtmf_tlv *)&p_ind->proactive_ind_data.send_dtmf);
                        if (!send_dtmf) {
-                               dbg("no send_dtmf data");
+                               dbg("NO Send DTMF data");
                                return TRUE;
                        }
 
-                       dbg("send_dtmf type_format(%s)", g_variant_get_type_string(send_dtmf));
+                       dbg("PROATV_CMD_SEND_DTMF - type_format: [%s]",
+                               g_variant_get_type_string(send_dtmf));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       g_variant_get(send_dtmf, "(isi@vis)", &command_id, &text, &text_len, &icon_id, &dtmf_str_len, &dtmf_str);
+                       g_variant_get(send_dtmf, "(isi@vis)", &command_id,
+                               &text, &text_len, &icon_id, &dtmf_str_len, &dtmf_str);
 #else
-                       g_variant_get(send_dtmf, "(isiis)", &command_id, &text, &text_len, &dtmf_str_len, &dtmf_str);
+                       g_variant_get(send_dtmf, "(isiis)", &command_id,
+                               &text, &text_len, &dtmf_str_len, &dtmf_str);
 #endif
+
                        if (text_len > 1 && (g_strcmp0(text, "") != 0)) {
                                GVariant *ui_info = NULL;
                                gboolean user_confirm = FALSE;
                                int ret;
-                               dbg("text should be displayed by ui");
-                               dbg("send dtmf is displayed!!!");
+
+                               dbg("Text should be displayed by UI - Send DTMF is displayed!!!");
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                               ui_info = g_variant_new("(isibv)", command_id, text, text_len, user_confirm, icon_id);
+                               ui_info = g_variant_new("(isibv)", command_id,
+                                       text, text_len, user_confirm, icon_id);
 #else
-                               ui_info = g_variant_new("(isib)", command_id, text, text_len, user_confirm);
+                               ui_info = g_variant_new("(isib)", command_id,
+                                       text, text_len, user_confirm);
 #endif
-                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SEND_DTMF, ui_info, slot_id);
+
+                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_SEND_DTMF,
+                                       ui_info, slot_id);
                                if (!ret) {
                                        int rv;
-                                       dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                                       err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                        if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                               dbg("Fail to send terminal response\n");
+                                               dbg("Failed to send Terminal Response!!!");
+
                                        rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                        if (!rv)
-                                               dbg("fail to dequeue data\n");
+                                               dbg("Failed to de-queue data\n");
                                }
+
                                g_free(text);
                                g_free(dtmf_str);
+
                                return TRUE;
                        }
+
 #if !defined(TIZEN_PLATFORM_USE_QCOM_QMI)
-                       telephony_sat_emit_send_dtmf(sat, command_id, text, text_len, dtmf_str, dtmf_str_len);
+                       telephony_sat_emit_send_dtmf(sat,
+                               command_id, text, text_len, dtmf_str, dtmf_str_len);
 #endif
+
                        g_free(text);
                        g_free(dtmf_str);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_LAUNCH_BROWSER: {
                        GVariant *launch_browser = NULL;
@@ -1435,62 +1780,90 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                        GVariant *icon_id = NULL;
 #endif
-                       launch_browser = sat_manager_launch_browser_noti(ctx, cp_name, (struct tel_sat_launch_browser_tlv*) &p_ind->proactive_ind_data.launch_browser);
+
+                       launch_browser = sat_manager_launch_browser_noti(ctx, cp_name,
+                               (struct tel_sat_launch_browser_tlv *)&p_ind->proactive_ind_data.launch_browser);
                        if (!launch_browser) {
-                               dbg("no launch_browser data");
+                               dbg("NO launch Browser data");
                                return TRUE;
                        }
 
-                       dbg("launch_browser type_format(%s)", g_variant_get_type_string(launch_browser));
+                       dbg("PROATV_CMD_LAUNCH_BROWSER - type_format: [%s]",
+                               g_variant_get_type_string(launch_browser));
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                       g_variant_get(launch_browser, "(iiisisisi@v)", &command_id, &browser_launch_type, &browser_id, &url, &url_len, &gateway_proxy, &gateway_proxy_len, &text, &text_len, &icon_id);
+                       g_variant_get(launch_browser, "(iiisisisi@v)", &command_id,
+                               &browser_launch_type, &browser_id, &url, &url_len,
+                               &gateway_proxy, &gateway_proxy_len,
+                               &text, &text_len, &icon_id);
 #else
-                       g_variant_get(launch_browser, "(iiisisisi)", &command_id, &browser_launch_type, &browser_id, &url, &url_len, &gateway_proxy, &gateway_proxy_len, &text, &text_len);
+                       g_variant_get(launch_browser, "(iiisisisi)", &command_id,
+                               &browser_launch_type, &browser_id, &url, &url_len,
+                               &gateway_proxy, &gateway_proxy_len,
+                               &text, &text_len);
 #endif
-                       /* Popup is mendatory option in browser case */
+
+                       /*
+                        * Pop-up is MANDATORY option in Browser case
+                        */
                        {
                                GVariant *ui_info = NULL;
                                gboolean user_confirm = TRUE;
                                int ret;
-                               dbg("text should be displayed by ui");
-                               dbg("launch browser is displayed!!!");
+
+                               dbg("Text should be displayed by UI - Launch Browser is displayed!!!");
+
 #if defined(TIZEN_SUPPORT_SAT_ICON)
-                               ui_info = g_variant_new("(isibv)", command_id, text, text_len, user_confirm, icon_id);
+                               ui_info = g_variant_new("(isibv)", command_id,
+                                       text, text_len, user_confirm, icon_id);
 #else
-                               ui_info = g_variant_new("(isib)", command_id, text, text_len, user_confirm);
+                               ui_info = g_variant_new("(isib)", command_id,
+                                       text, text_len, user_confirm);
 #endif
-                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_LAUNCH_BROWSER, ui_info, slot_id);
+
+                               ret = sat_ui_support_launch_sat_ui(SAT_PROATV_CMD_LAUNCH_BROWSER,
+                                       ui_info, slot_id);
                                if (!ret) {
                                        int rv;
-                                       dbg("fail to launch sat-ui, remove the queued data!!\n");
+
+                                       err("Failed to launch 'sat-ui', remove the queued data!!!");
+
                                        if (!sat_manager_handle_sat_ui_launch_fail(ctx, cp_name, p_ind))
-                                               dbg("Fail to send terminal response\n");
+                                               dbg("Failed to send Terminal Response!!!");
+
                                        rv = sat_manager_remove_cmd_by_id(ctx, command_id);
                                        if (!rv)
-                                               dbg("fail to dequeue data\n");
+                                               dbg("Failed to de-queue data\n");
                                }
+
                                g_free(url);
                                g_free(text);
                                g_free(gateway_proxy);
+
                                return TRUE;
                        }
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_PROVIDE_LOCAL_INFO: {
                        GVariant *provide_info = NULL;
                        gint info_type = 0;
 
-                       provide_info = sat_manager_provide_local_info_noti(ctx, cp_name, (struct tel_sat_provide_local_info_tlv*) &p_ind->proactive_ind_data.provide_local_info);
+                       provide_info = sat_manager_provide_local_info_noti(ctx, cp_name,
+                               (struct tel_sat_provide_local_info_tlv *)&p_ind->proactive_ind_data.provide_local_info);
                        if (!provide_info) {
-                               dbg("no provide_info data");
+                               dbg("NO Provide info data");
                                return TRUE;
                        }
 
-                       dbg("provide_info type_format(%s)", g_variant_get_type_string(provide_info));
+                       dbg("PROATV_CMD_PROVIDE_LOCAL_INFO - type_format: [%s]",
+                               g_variant_get_type_string(provide_info));
+
                        g_variant_get(provide_info, "(i)", &info_type);
 
                        telephony_sat_emit_provide_local_info(sat, info_type);
-                       } break;
+               }
+               break;
 
                case SAT_PROATV_CMD_LANGUAGE_NOTIFICATION: {
                        GVariant *language_noti = NULL;
@@ -1498,30 +1871,42 @@ gboolean dbus_plugin_sat_notification(struct custom_data *ctx, CoreObject *sourc
                        gint language = 0;
                        gboolean b_specified = FALSE;
 
-                       language_noti = sat_manager_language_notification_noti(ctx, cp_name, (struct tel_sat_language_notification_tlv*) &p_ind->proactive_ind_data.language_notification);
+                       language_noti = sat_manager_language_notification_noti(ctx, cp_name,
+                               (struct tel_sat_language_notification_tlv *)&p_ind->proactive_ind_data.language_notification);
                        if (!language_noti) {
-                               dbg("no language_noti data");
+                               dbg("NO Language noti data");
                                return TRUE;
                        }
 
-                       dbg("language_noti type_format(%s)", g_variant_get_type_string(language_noti));
-                       g_variant_get(language_noti, "(iib)", &command_id, &language, &b_specified);
+                       dbg("PROATV_CMD_LANGUAGE_NOTIFICATION - type_format: [%s]",
+                               g_variant_get_type_string(language_noti));
+
+                       g_variant_get(language_noti, "(iib)", &command_id,
+                               &language, &b_specified);
 
                        sat_manager_update_language(ctx, cp_name, language_noti);
 
-                       telephony_sat_emit_language_notification(sat, command_id, language, b_specified);
-                       } break;
+                       telephony_sat_emit_language_notification(sat,
+                               command_id, language, b_specified);
+               }
+               break;
 
-               default:{
+               default: {
                        gboolean rv = FALSE;
-                       rv = sat_manager_processing_unsupport_proactive_command(ctx, cp_name, (struct tel_sat_unsupproted_command_tlv*) &p_ind->proactive_ind_data.unsupport_cmd);
-                       dbg("not handled ind->cmd_type[0x%x] send error tr result(%d)", p_ind->cmd_type, rv);
-                       } break;
+
+                       rv = sat_manager_processing_unsupport_proactive_command(ctx, cp_name,
+                               (struct tel_sat_unsupproted_command_tlv *)&p_ind->proactive_ind_data.unsupport_cmd);
+
+                       err("Unhandled/Unknown Command type: [0x%x] - Send error TR Result: [%d]", p_ind->cmd_type, rv);
                }
-               } break;
-       default:
-               err("Unhandled Notification: [0x%x]", command);
                break;
+               }
+       }
+       break;
+
+       default:
+               err("Unhandled/Unknown Notification: [0x%x]", command);
+       break;
        }
 
        return TRUE;
similarity index 99%
rename from src/sat_manager.c
rename to src/dtapi_sat_manager.c
index 3bba87d..a7fae83 100644 (file)
@@ -44,8 +44,8 @@
 #include <libxml/tree.h>
 
 #include "generated-code.h"
-#include "common.h"
-#include "sat_manager.h"
+#include "dtapi_common.h"
+#include "dtapi_sat_manager.h"
 #include "sat_ui_support/sat_ui_support.h"
 
 #define SAT_DEF_CMD_Q_MAX 10
@@ -411,9 +411,11 @@ static gboolean sat_manager_queue_peek_data_by_id(struct custom_data *ctx, struc
 static gboolean sat_manager_check_availiable_event_list(struct tel_sat_setup_event_list_tlv *event_list_tlv)
 {
        gboolean rv = TRUE;
-       int local_index = 0;
+       int local_index = 0, count = event_list_tlv->event_list.event_list_cnt;
+       if(count <= 0)
+               return FALSE;
 
-       for (local_index = 0; local_index < event_list_tlv->event_list.event_list_cnt; local_index++) {
+       for (local_index = 0; local_index < count; local_index++) {
                if (event_list_tlv->event_list.evt_list[local_index] == EVENT_USER_ACTIVITY) {
                        dbg("do user activity");
                } else if (event_list_tlv->event_list.evt_list[local_index] == EVENT_IDLE_SCREEN_AVAILABLE) {
@@ -1553,20 +1555,12 @@ GVariant* sat_manager_setup_call_noti(struct custom_data *ctx, const char *cp_na
                return NULL;
        }
 
-       if (setup_call_tlv->command_detail.cmd_qualifier.setup_call.setup_call == SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY || setup_call_tlv->command_detail.cmd_qualifier.setup_call.setup_call == SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL) {
-               GSList *co_list = NULL;
+       if (setup_call_tlv->command_detail.cmd_qualifier.setup_call.setup_call == SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY ||
+          setup_call_tlv->command_detail.cmd_qualifier.setup_call.setup_call == SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL) {
                CoreObject *co_call = NULL;
                int total_call_cnt = 0;
 
-               co_list = tcore_plugin_get_core_objects_bytype(plg, CORE_OBJECT_TYPE_CALL);
-               if (!co_list) {
-                       dbg("[ error ] co_list : 0");
-                       tr.terminal_rsp_data.setup_call.result_type = RESULT_ME_UNABLE_TO_PROCESS_COMMAND;
-                       goto SEND_TR;
-               }
-
-               co_call = (CoreObject *)co_list->data;
-               g_slist_free(co_list);
+               co_call = tcore_plugin_ref_core_object(plg, CORE_OBJECT_TYPE_CALL);
                total_call_cnt = tcore_call_object_total_length(co_call);
                if (total_call_cnt) {
                        dbg("[SAT] Another call in progress hence rejecting. total_call_cnt: %d", total_call_cnt);
@@ -1646,12 +1640,8 @@ GVariant* sat_manager_setup_event_list_noti(struct custom_data *ctx, const char
 {
        TcorePlugin *plg = NULL;
        GVariant *event_list = NULL;
-
-       int local_index = 0;
        gboolean rv = FALSE;
        gint event_cnt = 0;
-       GVariantBuilder builder;
-       GVariant *evt_list = NULL;
        struct treq_sat_terminal_rsp_data *tr = NULL;
 
        dbg("interpreting event list notification");
@@ -1668,18 +1658,25 @@ GVariant* sat_manager_setup_event_list_noti(struct custom_data *ctx, const char
        /* reset evnet list */
        memset(g_evt_list, 0, SAT_EVENT_DOWNLOAD_MAX);
 
+       rv = sat_manager_check_availiable_event_list(event_list_tlv);
+       dbg("rv of sat_manager_check_availiable_event_list()=[%d]", rv);
        /* get event */
-       g_variant_builder_init(&builder, G_VARIANT_TYPE("ai"));
-       for (local_index = 0; local_index < event_cnt; local_index++) {
-               g_variant_builder_add(&builder, "i", event_list_tlv->event_list.evt_list[local_index]);
-               if (event_list_tlv->event_list.evt_list[local_index] >= SAT_EVENT_DOWNLOAD_MAX)
-                       continue;
-               g_evt_list[event_list_tlv->event_list.evt_list[local_index]] = TRUE;
-       }
-       evt_list = g_variant_builder_end(&builder);
-
-       event_list = g_variant_new("(iv)", event_cnt, evt_list);
+       if (rv == TRUE) {
+               int local_index = 0;
+               GVariantBuilder builder;
+               GVariant *evt_list = NULL;
+               /* get event */
+               g_variant_builder_init(&builder, G_VARIANT_TYPE("ai"));
+               for (local_index = 0; local_index < event_cnt; local_index++) {
+                       g_variant_builder_add(&builder, "i", event_list_tlv->event_list.evt_list[local_index]);
+                       if (event_list_tlv->event_list.evt_list[local_index] >= SAT_EVENT_DOWNLOAD_MAX)
+                               continue;
+                       g_evt_list[event_list_tlv->event_list.evt_list[local_index]] = TRUE;
+               }
+               evt_list = g_variant_builder_end(&builder);
 
+               event_list = g_variant_new("(iv)", event_cnt, evt_list);
+       }
        /* send TR - does not need from application's response */
        tr = (struct treq_sat_terminal_rsp_data *)calloc(1, sizeof(struct treq_sat_terminal_rsp_data));
        if (!tr)
@@ -1690,11 +1687,11 @@ GVariant* sat_manager_setup_event_list_noti(struct custom_data *ctx, const char
        memcpy((void*)&tr->terminal_rsp_data.setup_event_list.command_detail, &event_list_tlv->command_detail, sizeof(struct tel_sat_cmd_detail_info));
        tr->terminal_rsp_data.setup_event_list.device_id.src = event_list_tlv->device_id.dest;
        tr->terminal_rsp_data.setup_event_list.device_id.dest = event_list_tlv->device_id.src;
-       tr->terminal_rsp_data.setup_event_list.result_type = RESULT_SUCCESS;
-       tr->terminal_rsp_data.setup_event_list.me_problem_type = ME_PROBLEM_NO_SPECIFIC_CAUSE;
-
-       rv = sat_manager_check_availiable_event_list(event_list_tlv);
-       dbg("rv of sat_manager_check_availiable_event_list()=[%d]", rv);
+       
+       if (rv == TRUE)         
+               tr->terminal_rsp_data.setup_event_list.result_type = RESULT_SUCCESS;
+       else
+               tr->terminal_rsp_data.setup_event_list.result_type = RESULT_BEYOND_ME_CAPABILITIES;
 
        sat_manager_send_terminal_response(ctx->comm, plg, tr);
        g_free(tr);
@@ -3354,7 +3351,7 @@ static gboolean _sat_manager_handle_send_ss_result(struct custom_data *ctx, Tcor
                        g_variant_iter_free(iter);
                        g_variant_unref(intermediate);
 
-                       tr->terminal_rsp_data.send_ss.text.string_length = local_index;
+                       tr->terminal_rsp_data.send_ss.text.string_length = local_index / 2;
                        tmp = _convert_hex_string_to_bytes(tr->terminal_rsp_data.send_ss.text.string);
                        memset(tr->terminal_rsp_data.send_ss.text.string, 0x00,
                                sizeof(tr->terminal_rsp_data.send_ss.text.string));
@@ -5043,8 +5040,6 @@ static gboolean _sat_manager_handle_setup_call_confirm(struct custom_data *ctx,
 #if defined(TIZEN_SUPPORT_SAT_ICON)
                GVariant *icon_id;
 #endif
-               enum dbus_tapi_sim_slot_id slot_id;
-               gboolean call_app_rv;
 
                cp_name = tcore_server_get_cp_name_by_plugin(plg);
                if (cp_name == NULL) {
@@ -5090,13 +5085,10 @@ static gboolean _sat_manager_handle_setup_call_confirm(struct custom_data *ctx,
                g_free(text);
                g_free(call_number);
 
-               slot_id = get_sim_slot_id_by_cp_name((char *)tcore_server_get_cp_name_by_plugin(plg));
-               dbg("slot_id: [%d]", slot_id);
-
-               call_app_rv = sat_ui_support_launch_call_application(q_data.cmd_data.setup_call.command_detail.cmd_type, setup_call, slot_id);
                free(tr);
 
-               return call_app_rv;
+               dbg("user confirmation %d", USER_CONFIRM_YES);
+               return TRUE;
        }
 
        case USER_CONFIRM_NO_OR_CANCEL: {
@@ -5119,6 +5111,7 @@ static gboolean _sat_manager_handle_setup_call_confirm(struct custom_data *ctx,
                dbg("fail to send terminal response");
                result = FALSE;
        }
+
 Exit:
        free(tr);
        return result;
@@ -5265,7 +5258,7 @@ static gboolean _sat_manager_handle_launch_browser_confirm(struct custom_data *c
                        g_free(text);
                        g_free(gateway_proxy);
 
-                       slot_id = get_sim_slot_id_by_cp_name((char*)tcore_server_get_cp_name_by_plugin(plg));
+                       slot_id = get_sim_slot_id_by_cp_name(tcore_server_get_cp_name_by_plugin(plg));
                        dbg("slot_id: [%d]", slot_id);
 
                        sat_ui_support_launch_browser_application(q_data.cmd_data.launch_browser.command_detail.cmd_type, launch_browser, slot_id);
@@ -5828,7 +5821,7 @@ static gboolean _sat_manager_handle_send_ss_ui_display_status(struct custom_data
        g_free(text);
        g_free(ss_string);
 
-       slot_id = get_sim_slot_id_by_cp_name((char *)tcore_server_get_cp_name_by_plugin(plg));
+       slot_id = get_sim_slot_id_by_cp_name(tcore_server_get_cp_name_by_plugin(plg));
        dbg("slot_id: [%d]", slot_id);
        sat_ui_support_launch_ciss_application(SAT_PROATV_CMD_SEND_SS, send_ss, slot_id);
 
@@ -5908,7 +5901,7 @@ static gboolean _sat_manager_handle_send_ussd_ui_display_status(struct custom_da
        g_free(text);
        g_free(ussd_string);
 
-       slot_id = get_sim_slot_id_by_cp_name((char *)tcore_server_get_cp_name_by_plugin(plg));
+       slot_id = get_sim_slot_id_by_cp_name(tcore_server_get_cp_name_by_plugin(plg));
        dbg("slot_id: [%d]", slot_id);
        sat_ui_support_launch_ciss_application(SAT_PROATV_CMD_SEND_USSD, send_ussd, slot_id);
 
similarity index 99%
rename from src/sat_manager.h
rename to src/dtapi_sat_manager.h
index 7fb1d36..5c32d60 100644 (file)
@@ -23,8 +23,8 @@
 
 #include <tcore.h>
 #include <type/sat.h>
-#include "common.h"
 
+#include "dtapi_common.h"
 
 typedef union {
        struct tel_sat_display_text_tlv displayTextInd; /**<    Parsed proactive command info from TLV to Telephony data type - display text    */
similarity index 53%
rename from src/sim.c
rename to src/dtapi_sim.c
index 0e8eb78..680e309 100644 (file)
--- a/src/sim.c
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <errno.h>
+
 #include <glib.h>
-#include <gio/gio.h>
 
 #include <tcore.h>
 #include <server.h>
 #include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <core_object.h>
-#include <queue.h>
 #include <user_request.h>
-#include <util.h>
 #include <co_sim.h>
 
 #include "generated-code.h"
-#include "common.h"
-
-#define DBUS_SIM_STATUS_ERROR "SIM STATUS ERROR"
-#define DBUS_SIM_NOT_FOUND "SIM NOT FOUND"
-#define DBUS_SIM_PERM_BLOCKED "SIM PERM BLOCKED"
-#define DBUS_SIM_CARD_ERROR "SIM CARD ERROR"
-#define DBUS_SIM_NOT_INITIALIZED "SIM NOT INITIALIZED"
-#define DBUS_SIM_INIT_COMPLETED "SIM INIT COMPLETED"
-#define DBUS_SIM_LOCKED "SIM LOCKED"
-#define DBUS_SIM_NOT_READY "SIM NOT READY"
-#define DBUS_SIM_RESPONSE_DATA_ERROR "SIM RESPONSE DATA ERROR"
-#define DBUS_SIM_SERVICE_IS_DISABLED "SIM SERVICE IS DISABLED"
-#define DBUS_SIM_SERVICE_NOT_SUPPORTED_FOR_NVSIM "SERVICE NOT SUPPORTED FOR NVSIM"
-
-#define DBUS_SIM_GET_COSIM(invocation, co_sim, server) { \
+#include "dtapi_common.h"
+
+/*
+ * Error message to application (DBUS)
+ */
+#define DBUS_SIM_STATUS_ERROR                          "SIM STATUS ERROR"
+#define DBUS_SIM_NOT_FOUND                             "SIM NOT FOUND"
+#define DBUS_SIM_PERM_BLOCKED                          "SIM PERM BLOCKED"
+#define DBUS_SIM_CARD_ERROR                            "SIM CARD ERROR"
+#define DBUS_SIM_NOT_INITIALIZED                       "SIM NOT INITIALIZED"
+#define DBUS_SIM_INIT_COMPLETED                        "SIM INIT COMPLETED"
+#define DBUS_SIM_LOCKED                                "SIM LOCKED"
+#define DBUS_SIM_NOT_READY                             "SIM NOT READY"
+#define DBUS_SIM_RESPONSE_DATA_ERROR           "SIM RESPONSE DATA ERROR"
+#define DBUS_SIM_SERVICE_IS_DISABLED                   "SIM SERVICE IS DISABLED"
+#define DBUS_SIM_SERVICE_NOT_SUPPORTED_FOR_NVSIM       "SERVICE NOT SUPPORTED FOR NVSIM"
+
+#define DBUS_SIM_GET_COSIM(invocation, co_sim, server) do { \
        co_sim = __get_sim_co_by_cp_name(server, GET_CP_NAME(invocation)); \
        if (!co_sim) { \
                err("[%s] SIM Core object is NULL", GET_CP_NAME(invocation)); \
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED); \
                return TRUE; \
        } \
-}
+} while (0)
 
-#define DBUS_SIM_CHECK_SIM_STATUS(invocation, op_type, co_sim) {\
+#define DBUS_SIM_CHECK_SIM_STATUS(invocation, op_type, co_sim) do { \
        if (__check_sim_state(op_type, tcore_sim_get_status(co_sim)) == FALSE) { \
                err("[%s] Invalid SIM status", GET_CP_NAME(invocation)); \
                __return_fail_response(invocation, tcore_sim_get_status(co_sim)); \
                return TRUE; \
        } \
-}
+} while (0)
 
-#define DBUS_SIM_CHECK_SIM_TYPE(co_sim, request) {\
+#define DBUS_SIM_CHECK_SIM_TYPE(co_sim, request) do { \
        if (tcore_sim_get_type(co_sim) == SIM_TYPE_NVSIM) { \
                err("[%s] is not supported for NVSIM", request); \
                FAIL_RESPONSE(invocation, DBUS_SIM_SERVICE_NOT_SUPPORTED_FOR_NVSIM); \
                return TRUE; \
        } \
-}
+} while (0)
 
-#define DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, op_type, co_sim) {\
+#define DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, op_type, co_sim) do { \
        gboolean b_cphs = FALSE; \
        b_cphs = tcore_sim_get_cphs_status(co_sim); \
        if (b_cphs && op_type != GET_MSISDN) { \
@@ -95,9 +92,9 @@
                        } \
                } \
        } \
-}
+} while (0)
 
-#define DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur) {\
+#define DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation) do { \
        if (ret != TCORE_RETURN_SUCCESS) { \
                if (ret == TCORE_RETURN_SIM_DISABLED_IN_SST) { \
                        err("[%s] 'Service' is disabled in SST", GET_CP_NAME(invocation)); \
                        err("[%s] Dispatch request failed: [0x%x]", GET_CP_NAME(invocation), ret); \
                        FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED); \
                } \
-               tcore_user_request_unref(ur); \
        } \
-}
+} while (0)
 
 enum dbus_tapi_sim_gdbus_method_name {
        /* EF Get */
@@ -143,12 +139,12 @@ enum dbus_tapi_sim_gdbus_method_name {
        GET_LOCK_INFO,
        TRANSFER_APDU,
        GET_ATR,
-       GET_FIELDS = 30,        /* for get various data at once */
+       GET_FIELDS = 30, /* for get various data at once */
        GET_GID,
        SET_POWERSTATE,
        GET_IMPI,
        GET_IMPU,
-       GET_DOMAIN,
+       GET_DOMAIN = 35,
        GET_PCSCF,
        GET_APP_LIST,
        GET_ISIM_SERVICE_TABLE,
@@ -158,7 +154,7 @@ enum dbus_tapi_sim_gdbus_method_name {
        REFRESHED,
 };
 
-static gboolean __is_valid_sim_status(enum tel_sim_status sim_status)
+static gboolean __is_sim_status_valid(enum tel_sim_status sim_status)
 {
        switch (sim_status) {
        case SIM_STATUS_INIT_COMPLETED:
@@ -179,7 +175,7 @@ static gboolean __is_valid_sim_status(enum tel_sim_status sim_status)
 
 static CoreObject *__get_sim_co_by_cp_name(Server *server, char *cp_name)
 {
-       TcorePlugin *plugin = NULL;
+       TcorePlugin *plugin;
 
        if (!server) {
                err("server is NULL");
@@ -192,13 +188,13 @@ static CoreObject *__get_sim_co_by_cp_name(Server *server, char *cp_name)
 
 static CoreObject* __get_sim_co_from_ur(Server *server, UserRequest *ur)
 {
-       CoreObject *co_sim = NULL;
-       char *modem_name = NULL;
+       CoreObject *co_sim;
+       char *modem_name;
 
        modem_name = tcore_user_request_get_modem_name(ur);
        if (!modem_name) {
                err("Modem name is NULL");
-               return co_sim;
+               return NULL;
        }
 
        co_sim = __get_sim_co_by_cp_name(server, modem_name);
@@ -207,7 +203,8 @@ static CoreObject* __get_sim_co_from_ur(Server *server, UserRequest *ur)
        return co_sim;
 }
 
-static gboolean __check_sim_state(enum dbus_tapi_sim_gdbus_method_name method, enum tel_sim_status sim_status)
+static gboolean __check_sim_state(enum dbus_tapi_sim_gdbus_method_name method,
+       enum tel_sim_status sim_status)
 {
        gboolean ret = TRUE;
 
@@ -234,15 +231,21 @@ static gboolean __check_sim_state(enum dbus_tapi_sim_gdbus_method_name method, e
        case GET_LOCK_INFO:
        case VERIFY_SEC:
        case VERIFY_PUK:
-               if (sim_status == SIM_STATUS_CARD_ERROR
-                               || sim_status == SIM_STATUS_CARD_BLOCKED
-                               || sim_status == SIM_STATUS_CARD_NOT_PRESENT
-                               || sim_status == SIM_STATUS_CARD_REMOVED
-                               || sim_status == SIM_STATUS_UNKNOWN
-                               || sim_status == SIM_STATUS_CARD_POWEROFF) {
+               switch (sim_status) {
+               case SIM_STATUS_CARD_ERROR: /* FALLTHROUGH */
+               case SIM_STATUS_CARD_BLOCKED: /* FALLTHROUGH */
+               case SIM_STATUS_CARD_NOT_PRESENT: /* FALLTHROUGH */
+               case SIM_STATUS_CARD_REMOVED: /* FALLTHROUGH */
+               case SIM_STATUS_UNKNOWN: /* FALLTHROUGH */
+               case SIM_STATUS_CARD_POWEROFF:
                        ret = FALSE;
+               break;
+
+               default:
+               break;
                }
        break;
+
        case GET_IMSI:
        case GET_SVCT:
        case GET_MSISDN:
@@ -266,15 +269,22 @@ static gboolean __check_sim_state(enum dbus_tapi_sim_gdbus_method_name method, e
                if (sim_status != SIM_STATUS_INIT_COMPLETED)
                        ret = FALSE;
        break;
+
        case SET_POWERSTATE:
-               if (sim_status != SIM_STATUS_INIT_COMPLETED
-                               && sim_status != SIM_STATUS_INITIALIZING
-                               && sim_status != SIM_STATUS_PIN_REQUIRED
-                               && sim_status != SIM_STATUS_CARD_BLOCKED
-                               && sim_status != SIM_STATUS_CARD_POWEROFF) {
+               switch (sim_status) {
+               case SIM_STATUS_INIT_COMPLETED: /* FALLTHROUGH */
+               case SIM_STATUS_INITIALIZING: /* FALLTHROUGH */
+               case SIM_STATUS_PIN_REQUIRED: /* FALLTHROUGH */
+               case SIM_STATUS_CARD_BLOCKED: /* FALLTHROUGH */
+               case SIM_STATUS_CARD_POWEROFF:
+               break;
+
+               default:
                        ret = FALSE;
+               break;
                }
        break;
+
        case GET_INIT_STATUS:
        case STATUS:
        case REFRESHED:
@@ -282,41 +292,45 @@ static gboolean __check_sim_state(enum dbus_tapi_sim_gdbus_method_name method, e
                err("Unhandled/Unknown operation: [%d]", method);
        break;
        }
+
        return ret;
 }
 
-static gboolean __check_sim_service_table(enum dbus_tapi_sim_gdbus_method_name method, struct tel_sim_service_table *svct)
+static gboolean __check_sim_service_table(enum dbus_tapi_sim_gdbus_method_name method,
+       struct tel_sim_service_table *svct)
 {
+       enum tel_sim_type sim_type = svct->sim_type;
+
        gboolean ret = TRUE;
 
        switch (method) {
        case GET_MSISDN:
-               if (!(svct->sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_MSISDN]) &&
-                               !(svct->sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_MSISDN])) {
+               if (!(sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_MSISDN])
+                               && !(sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_MSISDN]))
                        ret = FALSE;
-               }
        break;
+
        case GET_CALL_FORWARDING:
        case SET_CALL_FORWARDING:
-               if (!(svct->sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_CFIS]) &&
-                               !(svct->sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_CFIS])) {
+               if (!(sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_CFIS])
+                               && !(sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_CFIS]))
                        ret = FALSE;
-               }
        break;
+
        case GET_MESSAGE_WAITING:
        case SET_MESSAGE_WAITING:
-               if (!(svct->sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_MWIS]) &&
-                               !(svct->sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_MWIS])) {
+               if (!(sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_MWIS])
+                               && !(sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_MWIS]))
                        ret = FALSE;
-               }
        break;
+
        case GET_MAILBOX:
        case SET_MAILBOX:
-               if (!(svct->sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_MBDN]) &&
-                               !(svct->sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_MBDN])) {
+               if (!(sim_type == SIM_TYPE_GSM && svct->table.sst.service[SIM_SST_MBDN]) &&
+                               !(sim_type == SIM_TYPE_USIM && svct->table.ust.service[SIM_UST_MBDN]))
                        ret = FALSE;
-               }
        break;
+
        default:
                err("Unhandled/Unknown operation: [%d]", method);
        break;
@@ -325,7 +339,8 @@ static gboolean __check_sim_service_table(enum dbus_tapi_sim_gdbus_method_name m
        return ret;
 }
 
-static void __return_fail_response(GDBusMethodInvocation *invocation, enum tel_sim_status sim_status)
+static void __return_fail_response(GDBusMethodInvocation *invocation,
+       enum tel_sim_status sim_status)
 {
        dbg("[%s] SIM Status: [%d]", GET_CP_NAME(invocation), sim_status);
 
@@ -334,19 +349,24 @@ static void __return_fail_response(GDBusMethodInvocation *invocation, enum tel_s
        case SIM_STATUS_CARD_REMOVED:
                FAIL_RESPONSE(invocation, DBUS_SIM_NOT_FOUND);
        break;
+
        case SIM_STATUS_CARD_BLOCKED:
                FAIL_RESPONSE(invocation, DBUS_SIM_PERM_BLOCKED);
        break;
+
        case SIM_STATUS_CARD_ERROR:
        case SIM_STATUS_CARD_CRASHED:
                FAIL_RESPONSE(invocation, DBUS_SIM_CARD_ERROR);
        break;
+
        case SIM_STATUS_INITIALIZING:
                FAIL_RESPONSE(invocation, DBUS_SIM_NOT_INITIALIZED);
        break;
+
        case SIM_STATUS_INIT_COMPLETED:
                FAIL_RESPONSE(invocation, DBUS_SIM_INIT_COMPLETED);
        break;
+
        case SIM_STATUS_PIN_REQUIRED:
        case SIM_STATUS_PUK_REQUIRED:
        case SIM_STATUS_NCK_REQUIRED:
@@ -356,9 +376,11 @@ static void __return_fail_response(GDBusMethodInvocation *invocation, enum tel_s
        case SIM_STATUS_LOCK_REQUIRED:
                FAIL_RESPONSE(invocation, DBUS_SIM_LOCKED);
        break;
+
        case SIM_STATUS_UNKNOWN:
                FAIL_RESPONSE(invocation, DBUS_SIM_NOT_READY);
        break;
+
        default:
                dbg("Unhandled/Unknown status: [%d]", sim_status);
                FAIL_RESPONSE(invocation, DBUS_SIM_STATUS_ERROR);
@@ -366,8 +388,8 @@ static void __return_fail_response(GDBusMethodInvocation *invocation, enum tel_s
        }
 }
 
-static gboolean on_sim_get_init_status(TelephonySim *sim, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_sim_get_init_status(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        enum tel_sim_status sim_status = SIM_STATUS_UNKNOWN;
@@ -383,15 +405,17 @@ static gboolean on_sim_get_init_status(TelephonySim *sim, GDBusMethodInvocation
        sim_status = tcore_sim_get_status(co_sim);
        sim_changed = tcore_sim_get_identification(co_sim);
        dbg("[%s] SIM - Status: [%d] Changed: [%s]",
-               GET_CP_NAME(invocation), sim_status, (sim_changed ? "Yes" : "No"));
+               GET_CP_NAME(invocation),
+               sim_status, (sim_changed ? "YES" : "NO"));
 
-       telephony_sim_complete_get_init_status(sim, invocation, sim_status, sim_changed);
+       telephony_sim_complete_get_init_status(sim,
+               invocation, sim_status, sim_changed);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_card_type(TelephonySim *sim, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_sim_get_card_type(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        enum tel_sim_type sim_type = SIM_TYPE_UNKNOWN;
@@ -405,17 +429,25 @@ static gboolean on_sim_get_card_type(TelephonySim *sim, GDBusMethodInvocation *i
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_CARD_TYPE, co_sim);
 
        sim_type = tcore_sim_get_type(co_sim);
+       dbg("[%s] SIM Card type: [%s]",  GET_CP_NAME(invocation),
+               (sim_type == SIM_TYPE_GSM ? "GSM" :
+               (sim_type == SIM_TYPE_USIM ? "USIM" :
+               (sim_type == SIM_TYPE_RUIM ? "RUIM" :
+               (sim_type == SIM_TYPE_NVSIM ? "NVSIM" :
+               (sim_type == SIM_TYPE_ISIM ? "ISIM" :
+               "UNKNOWN"))))));
 
-       telephony_sim_complete_get_card_type(sim, invocation, sim_type);
+       telephony_sim_complete_get_card_type(sim,
+               invocation, sim_type);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_imsi(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_imsi(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       struct tel_sim_imsi *n_imsi;
+       struct tel_sim_imsi *imsi;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -425,20 +457,24 @@ static gboolean on_sim_get_imsi(TelephonySim *sim, GDBusMethodInvocation *invoca
        DBUS_SIM_GET_COSIM(invocation, co_sim, ctx->server);
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_IMSI, co_sim);
 
-       n_imsi = tcore_sim_get_imsi(co_sim);
-       if (!n_imsi) {
+       imsi = tcore_sim_get_imsi(co_sim);
+       if (!imsi) {
                FAIL_RESPONSE(invocation, DBUS_SIM_RESPONSE_DATA_ERROR);
-               return TRUE;
        } else {
-               telephony_sim_complete_get_imsi(sim, invocation, n_imsi->plmn, n_imsi->msin);
-               free(n_imsi);
+               dbg("[%s] IMSI - PLMN: [%s] MSIN: [%s]", GET_CP_NAME(invocation),
+                       imsi->plmn, imsi->msin);
+
+               telephony_sim_complete_get_imsi(sim,
+                       invocation, imsi->plmn, imsi->msin);
+
+               g_free(imsi);
        }
 
        return TRUE;
 }
 
-static gboolean on_sim_get_ecc(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_ecc(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        CoreObject *co_sim = NULL;
@@ -455,52 +491,51 @@ static gboolean on_sim_get_ecc(TelephonySim *sim, GDBusMethodInvocation *invocat
        ecc_list = tcore_sim_get_ecc_list(co_sim);
        if (!ecc_list) {
                struct custom_data *ctx = user_data;
-               UserRequest *ur = NULL;
-               TReturn ret;
-               dbg("[%s] po->ecc_list is NULL. Request to Modem.", GET_CP_NAME(invocation));
-               ur = MAKE_UR(ctx, sim, invocation);
-               tcore_user_request_set_command(ur, TREQ_SIM_GET_ECC);
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-               if (ret != TCORE_RETURN_SUCCESS) {
-                       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-                       dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-                       tcore_user_request_unref(ur);
-               }
+
+               dbg("[%s] ECC list is NULL - Request to Modem.", GET_CP_NAME(invocation));
+
+               /* Dispatch request */
+               dtapi_dispatch_request(ctx, sim, invocation,
+                       TREQ_SIM_GET_ECC,
+                       NULL, 0);
        } else {
                GVariant *gv = NULL;
                GVariantBuilder b;
                int i;
+
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < ecc_list->ecc_count; i++) {
-                       dbg("[%s] ecc[%d] : ecc_category=[0x%x], ecc_num=[%s], ecc_string=[%s]",
+                       dbg("[%s] ECC[%d] - Category: [0x%x] Number: [%s] String: [%s]",
                                GET_CP_NAME(invocation), i,
                                ecc_list->ecc[i].ecc_category,
                                ecc_list->ecc[i].ecc_num,
                                ecc_list->ecc[i].ecc_string);
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "category", g_variant_new_int32(ecc_list->ecc[i].ecc_category));
-                       g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string(ecc_list->ecc[i].ecc_num));
-                       g_variant_builder_add(&b, "{sv}", "name", g_variant_new_string(ecc_list->ecc[i].ecc_string));
+                       g_variant_builder_add(&b, "{sv}", "category",
+                               g_variant_new_int32(ecc_list->ecc[i].ecc_category));
+                       g_variant_builder_add(&b, "{sv}", "number",
+                               g_variant_new_string(ecc_list->ecc[i].ecc_num));
+                       g_variant_builder_add(&b, "{sv}", "name",
+                               g_variant_new_string(ecc_list->ecc[i].ecc_string));
                        g_variant_builder_close(&b);
                }
                gv = g_variant_builder_end(&b);
                if (!gv)
-                       err("error - ecc gv is NULL");
+                       err("ecc gv is NULL");
 
-               telephony_sim_complete_get_ecc(sim, invocation, gv);
+               telephony_sim_complete_get_ecc(sim,
+                       invocation, gv);
 
-               free(ecc_list);
+               g_free(ecc_list);
        }
 
        return TRUE;
 }
 
-static gboolean on_sim_get_iccid(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_iccid(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        struct tel_sim_iccid* iccid = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -513,33 +548,28 @@ static gboolean on_sim_get_iccid(TelephonySim *sim, GDBusMethodInvocation *invoc
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get ICCID");
 
        iccid = tcore_sim_get_iccid(co_sim);
-
        if (!iccid) {
-               ur = MAKE_UR(ctx, sim, invocation);
+               /* Dispatch request */
+               dtapi_dispatch_request(ctx, sim, invocation,
+                       TREQ_SIM_GET_ICCID,
+                       NULL, 0);
+       } else {
+               dbg("[%s] ICCID: [%s]", GET_CP_NAME(invocation),
+                       iccid->iccid);
 
-               tcore_user_request_set_command(ur, TREQ_SIM_GET_ICCID);
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
+               telephony_sim_complete_get_iccid(sim,
+                       invocation, SIM_ACCESS_SUCCESS, iccid->iccid);
 
-               if (ret != TCORE_RETURN_SUCCESS) {
-                       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-                       dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-                       tcore_user_request_unref(ur);
-               }
-       } else {
-               telephony_sim_complete_get_iccid(sim, invocation, SIM_ACCESS_SUCCESS,
-                                                                               iccid->iccid);
-               free(iccid);
+               g_free(iccid);
        }
 
        return TRUE;
 }
 
-static gboolean on_sim_get_language(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_language(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -550,27 +580,20 @@ static gboolean on_sim_get_language(TelephonySim *sim, GDBusMethodInvocation *in
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_LANGUAGE, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get Language");
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_LANGUAGE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_LANGUAGE,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_sim_set_language(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gint arg_language, gpointer user_data)
+static gboolean on_sim_set_language(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gint language, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_set_language set_language;
+       struct treq_sim_set_language req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "w"))
@@ -580,31 +603,27 @@ static gboolean on_sim_set_language(TelephonySim *sim, GDBusMethodInvocation *in
        DBUS_SIM_CHECK_SIM_STATUS(invocation, SET_LANGUAGE, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Set Language");
 
-       memset(&set_language, 0, sizeof(struct treq_sim_set_language));
-       set_language.language = arg_language;
+       memset(&req, 0x0, sizeof(struct treq_sim_set_language));
 
-       dbg("set_language.language[%d]", set_language.language);
-       ur = MAKE_UR(ctx, sim, invocation);
+       req.language = language;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_set_language), &set_language);
-       tcore_user_request_set_command(ur, TREQ_SIM_SET_LANGUAGE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       dbg("[%s] Language: [0x%02x]", GET_CP_NAME(invocation),
+               req.language);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_SET_LANGUAGE,
+               &req, sizeof(struct treq_sim_set_language));
 
        return TRUE;
 }
 
-static gboolean on_sim_get_call_forwarding(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_call_forwarding(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
+       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "r"))
@@ -615,36 +634,30 @@ static gboolean on_sim_get_call_forwarding(TelephonySim *sim, GDBusMethodInvocat
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get Call Forwarding");
        DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, GET_CALL_FORWARDING, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_CALLFORWARDING);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur);
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+               TREQ_SIM_GET_CALLFORWARDING,
+               NULL, 0);
+       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation);
 
        return TRUE;
 }
 
-static gboolean on_sim_set_call_forwarding(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gboolean  arg_cphs,
-               gint arg_rec_index,
-               gint arg_msp_num,
-               guchar arg_cfu_status,
-               gint arg_ton,
-               gint arg_npi,
-               const gchar *arg_number,
-               gint arg_cc2_id,
-               gint arg_ext7_id,
-               gboolean arg_cphs_line1,
-               gboolean arg_cphs_line2,
-               gboolean arg_cphs_fax,
-               gboolean arg_cphs_data,
-               gpointer user_data)
+static gboolean on_sim_set_call_forwarding(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gboolean  cphs,
+       gint rec_index,
+       gint msp_num,
+       guchar cfu_status,
+       gint ton, gint npi, const gchar *number,
+       gint cc2_id, gint ext7_id,
+       gboolean cphs_line1, gboolean cphs_line2,
+       gboolean cphs_fax, gboolean cphs_data, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_set_callforwarding req_cf;
+       struct treq_sim_set_callforwarding req;
+       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "w"))
@@ -655,51 +668,51 @@ static gboolean on_sim_set_call_forwarding(TelephonySim *sim, GDBusMethodInvocat
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Set Call Forwarding");
        DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, SET_CALL_FORWARDING, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       memset(&req_cf, 0, sizeof(struct treq_sim_set_callforwarding));
+       memset(&req, 0x0, sizeof(struct treq_sim_set_callforwarding));
 
-       req_cf.b_cphs = arg_cphs;
+       req.b_cphs = cphs;
+       if (req.b_cphs) {
+               req.cphs_cf.b_line1 = cphs_line1;
+               req.cphs_cf.b_line2 = cphs_line2;
+               req.cphs_cf.b_fax = cphs_fax;
+               req.cphs_cf.b_data = cphs_data;
 
-       if (req_cf.b_cphs) {
-               req_cf.cphs_cf.b_line1 = arg_cphs_line1;
-               req_cf.cphs_cf.b_line2 = arg_cphs_line2;
-               req_cf.cphs_cf.b_fax = arg_cphs_fax;
-               req_cf.cphs_cf.b_data = arg_cphs_data;
-               dbg("[%s] b_line1[%d], b_line2[%d], b_fax[%d], b_data[%d]",
-                               GET_CP_NAME(invocation), req_cf.cphs_cf.b_line1, req_cf.cphs_cf.b_line2,
-                               req_cf.cphs_cf.b_fax, req_cf.cphs_cf.b_data);
+               dbg("[%s] b_line1: [%d] b_line2: [%d] b_fax: [%d] b_data: [%d]",
+                       GET_CP_NAME(invocation),
+                       req.cphs_cf.b_line1, req.cphs_cf.b_line2,
+                       req.cphs_cf.b_fax, req.cphs_cf.b_data);
        } else {
-               req_cf.cf.rec_index = arg_rec_index;
-               req_cf.cf.msp_num = arg_msp_num;
-               req_cf.cf.cfu_status = arg_cfu_status;
-               req_cf.cf.ton = arg_ton;
-               req_cf.cf.npi = arg_npi;
-               memcpy(&req_cf.cf.cfu_num, arg_number, strlen(arg_number));
-               req_cf.cf.cc2_id = arg_cc2_id;
-               req_cf.cf.ext7_id = arg_ext7_id;
-               dbg("[%s] rec_index[%d], msp_num[%d], cfu_status[0x%x], ton[%d], "
-                               "npi[%d], cfu_num[%s], cc2_id[%d], ext7_id[%d]",
-                               GET_CP_NAME(invocation), req_cf.cf.rec_index, req_cf.cf.msp_num, req_cf.cf.cfu_status, req_cf.cf.ton,
-                               req_cf.cf.npi, req_cf.cf.cfu_num, req_cf.cf.cc2_id, req_cf.cf.ext7_id);
-       }
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_set_callforwarding), &req_cf);
-       tcore_user_request_set_command(ur, TREQ_SIM_SET_CALLFORWARDING);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur);
+               req.cf.rec_index = rec_index;
+               req.cf.msp_num = msp_num;
+               req.cf.cfu_status = cfu_status;
+               req.cf.ton = ton;
+               req.cf.npi = npi;
+               memcpy(&req.cf.cfu_num, number, strlen(number));
+               req.cf.cc2_id = cc2_id;
+               req.cf.ext7_id = ext7_id;
+
+               dbg("[%s] rec_index: [%d] msp_num: [%d] cfu_status: [0x%x] " \
+                       "ton: [%d] npi: [%d] cfu_num: [%s] cc2_id: [%d] ext7_id: [%d]",
+                       GET_CP_NAME(invocation), req.cf.rec_index,
+                       req.cf.msp_num, req.cf.cfu_status, req.cf.ton,
+                       req.cf.npi, req.cf.cfu_num, req.cf.cc2_id, req.cf.ext7_id);
+       }
+
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+               TREQ_SIM_SET_CALLFORWARDING,
+               &req, sizeof(struct treq_sim_set_callforwarding));
+       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_message_waiting(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_message_waiting(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
+       TReturn ret;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "r"))
@@ -710,35 +723,30 @@ static gboolean on_sim_get_message_waiting(TelephonySim *sim, GDBusMethodInvocat
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get Message Waiting");
        DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, GET_MESSAGE_WAITING, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_MESSAGEWAITING);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur);
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+               TREQ_SIM_GET_MESSAGEWAITING,
+               NULL, 0);
+       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation);
 
        return TRUE;
 }
 
-static gboolean on_sim_set_message_waiting(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gboolean  arg_cphs,
-               gint arg_rec_index,
-               guchar arg_indicator_status,
-               gint arg_voice_cnt,
-               gint arg_fax_cnt,
-               gint arg_email_cnt,
-               gint arg_other_cnt,
-               gint arg_video_cnt,
-               gboolean arg_cphs_voice1,
-               gboolean arg_cphs_voice2,
-               gboolean arg_cphs_fax,
-               gboolean arg_cphs_data,
-               gpointer user_data)
+static gboolean on_sim_set_message_waiting(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gboolean  cphs,
+       gint rec_index,
+       guchar indicator_status,
+       gint voice_cnt, gint fax_cnt,
+       gint email_cnt, gint other_cnt,
+       gint video_cnt,
+       gboolean cphs_voice1, gboolean cphs_voice2,
+       gboolean cphs_fax, gboolean cphs_data, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
        TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_set_messagewaiting req_mw;
+       struct treq_sim_set_messagewaiting req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "w"))
@@ -749,56 +757,51 @@ static gboolean on_sim_set_message_waiting(TelephonySim *sim, GDBusMethodInvocat
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Set Message Waiting");
        DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, SET_MESSAGE_WAITING, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
+       memset(&req, 0x0, sizeof(struct treq_sim_set_messagewaiting));
 
-       memset(&req_mw, 0, sizeof(struct treq_sim_set_messagewaiting));
+       req.b_cphs = cphs;
 
-       req_mw.b_cphs = arg_cphs;
+       if (req.b_cphs) {
+               req.cphs_mw.b_voice1 = cphs_voice1;
+               req.cphs_mw.b_voice2 = cphs_voice2;
+               req.cphs_mw.b_fax = cphs_fax;
+               req.cphs_mw.b_data = cphs_data;
 
-       if (req_mw.b_cphs) {
-               req_mw.cphs_mw.b_voice1 = arg_cphs_voice1;
-               req_mw.cphs_mw.b_voice2 = arg_cphs_voice2;
-               req_mw.cphs_mw.b_fax = arg_cphs_fax;
-               req_mw.cphs_mw.b_data = arg_cphs_data;
-               dbg("[%s] b_voice1[%d],b_voice2[%d],b_fax[%d], b_data[%d]",
-                               GET_CP_NAME(invocation),
-                               req_mw.cphs_mw.b_voice1,
-                               req_mw.cphs_mw.b_voice2,
-                               req_mw.cphs_mw.b_fax,
-                               req_mw.cphs_mw.b_data);
+               dbg("[%s] b_voice1: [%d] b_voice2: [%d] b_fax: [%d] b_data:[%d]",
+                       GET_CP_NAME(invocation),
+                       req.cphs_mw.b_voice1, req.cphs_mw.b_voice2,
+                       req.cphs_mw.b_fax, req.cphs_mw.b_data);
        } else {
-               req_mw.mw.rec_index = arg_rec_index;
-               req_mw.mw.indicator_status = arg_indicator_status;
-               req_mw.mw.voice_count = arg_voice_cnt;
-               req_mw.mw.fax_count = arg_fax_cnt;
-               req_mw.mw.email_count = arg_email_cnt;
-               req_mw.mw.other_count = arg_other_cnt;
-               req_mw.mw.video_count = arg_video_cnt;
-               dbg("[%s] rec_index[%d], indicator_status[0x%x],        voice_count[%d], fax_count[%d], email_count[%d], other_count[%d], video_count[%d]",
-                               GET_CP_NAME(invocation),
-                               req_mw.mw.rec_index,
-                               req_mw.mw.indicator_status,
-                               req_mw.mw.voice_count,
-                               req_mw.mw.fax_count,
-                               req_mw.mw.email_count,
-                               req_mw.mw.other_count,
-                               req_mw.mw.video_count);
-       }
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_set_messagewaiting), &req_mw);
-       tcore_user_request_set_command(ur, TREQ_SIM_SET_MESSAGEWAITING);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur);
+               req.mw.rec_index = rec_index;
+               req.mw.indicator_status = indicator_status;
+               req.mw.voice_count = voice_cnt;
+               req.mw.fax_count = fax_cnt;
+               req.mw.email_count = email_cnt;
+               req.mw.other_count = other_cnt;
+               req.mw.video_count = video_cnt;
+
+               dbg("[%s] rec_index: [%d] indicator_status: [0x%x] voice_count: [%d] " \
+                       "fax_count: [%d] email_count: [%d] other_count: [%d] video_count: [%d]",
+                       GET_CP_NAME(invocation),
+                       req.mw.rec_index, req.mw.indicator_status,
+                       req.mw.voice_count, req.mw.fax_count,
+                       req.mw.email_count, req.mw.other_count,
+                       req.mw.video_count);
+       }
+
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+               TREQ_SIM_SET_MESSAGEWAITING,
+               &req, sizeof(struct treq_sim_set_messagewaiting));
+       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_mailbox(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_mailbox(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
        TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -811,34 +814,28 @@ static gboolean on_sim_get_mailbox(TelephonySim *sim, GDBusMethodInvocation *inv
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get Mailbox");
        DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, GET_MAILBOX, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_MAILBOX);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur);
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+               TREQ_SIM_GET_MAILBOX,
+               NULL, 0);
+       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation);
 
        return TRUE;
 }
 
-static gboolean on_sim_set_mailbox(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gboolean arg_cphs,
-               gint arg_type,
-               gint arg_rec_index,
-               gint arg_profile_number,
-               gint arg_alpha_id_max_len,
-               const gchar *arg_alpha_id,
-               gint arg_ton,
-               gint arg_npi,
-               const gchar *arg_number,
-               gint arg_cc_id,
-               gint arg_ext1_id,
-               gpointer user_data)
+static gboolean on_sim_set_mailbox(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gboolean cphs,
+       gint mb_type, gint rec_index,
+       gint profile_number,
+       gint alpha_id_max_len, const gchar *alpha_id,
+       gint ton, gint npi, const gchar *number,
+       gint cc_id, gint ext1_id, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
        TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_set_mailbox req_mb;
+       struct treq_sim_set_mailbox req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "w"))
@@ -849,55 +846,49 @@ static gboolean on_sim_set_mailbox(TelephonySim *sim, GDBusMethodInvocation *inv
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Set Mailbox");
        DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, SET_MAILBOX, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       memset(&req_mb, 0, sizeof(struct treq_sim_set_mailbox));
-
-       req_mb.b_cphs = arg_cphs;
-
-       req_mb.mb_info.mb_type = arg_type;
-       req_mb.mb_info.rec_index = arg_rec_index;
-       req_mb.mb_info.profile_number = arg_profile_number;
-       req_mb.mb_info.number_info.alpha_id_max_len = arg_alpha_id_max_len;
-       if (strlen(arg_alpha_id))
-               memcpy(&req_mb.mb_info.number_info.alpha_id, arg_alpha_id, strlen(arg_alpha_id));
-       req_mb.mb_info.number_info.ton = arg_npi;
-       req_mb.mb_info.number_info.npi = arg_npi;
-       if (strlen(arg_number))
-               memcpy(&req_mb.mb_info.number_info.num, arg_number, strlen(arg_number));
-       req_mb.mb_info.number_info.cc_id = arg_ext1_id;
-       req_mb.mb_info.number_info.ext1_id = arg_ext1_id;
-
-       dbg("[%s] b_cphs[%d] mb_type[%d], rec_index[%d], profile_number[%d], alpha_id_max_len[%d], "
-                       "alpha_id[%s], ton[%d], npi[%d], num[%s], cc_id[%d], ext1_id[%d]",
-                       GET_CP_NAME(invocation),
-                       req_mb.b_cphs,
-                       req_mb.mb_info.mb_type,
-                       req_mb.mb_info.rec_index,
-                       req_mb.mb_info.profile_number,
-                       req_mb.mb_info.number_info.alpha_id_max_len,
-                       req_mb.mb_info.number_info.alpha_id,
-                       req_mb.mb_info.number_info.ton,
-                       req_mb.mb_info.number_info.npi,
-                       req_mb.mb_info.number_info.num,
-                       req_mb.mb_info.number_info.cc_id,
-                       req_mb.mb_info.number_info.ext1_id);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_set_mailbox), &req_mb);
-       tcore_user_request_set_command(ur, TREQ_SIM_SET_MAILBOX);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur);
+       memset(&req, 0x0, sizeof(struct treq_sim_set_mailbox));
+
+       req.b_cphs = cphs;
+
+       req.mb_info.mb_type = mb_type;
+       req.mb_info.rec_index = rec_index;
+       req.mb_info.profile_number = profile_number;
+       req.mb_info.number_info.alpha_id_max_len = alpha_id_max_len;
+       if (strlen(alpha_id))
+               memcpy(&req.mb_info.number_info.alpha_id, alpha_id, strlen(alpha_id));
+       req.mb_info.number_info.ton = ton;
+       req.mb_info.number_info.npi = npi;
+       if (strlen(number))
+               memcpy(&req.mb_info.number_info.num, number, strlen(number));
+       req.mb_info.number_info.cc_id = cc_id;
+       req.mb_info.number_info.ext1_id = ext1_id;
+
+       dbg("[%s] b_cphs: [%d] mb_type: [%d] rec_index: [%d] " \
+               "profile_number: [%d] alpha_id_max_len: [%d] alpha_id: [%s] " \
+               "ton: [%d] npi: [%d] num: [%s] cc_id: [%d] ext1_id: [%d]",
+               GET_CP_NAME(invocation),
+               req.b_cphs,
+               req.mb_info.mb_type, req.mb_info.rec_index,
+               req.mb_info.profile_number,
+               req.mb_info.number_info.alpha_id_max_len,
+               req.mb_info.number_info.alpha_id,
+               req.mb_info.number_info.ton, req.mb_info.number_info.npi,
+               req.mb_info.number_info.num,
+               req.mb_info.number_info.cc_id, req.mb_info.number_info.ext1_id);
+
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+               TREQ_SIM_SET_MAILBOX,
+               &req, sizeof(struct treq_sim_set_mailbox));
+       DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_cphsinfo(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_cphsinfo(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -908,21 +899,16 @@ static gboolean on_sim_get_cphsinfo(TelephonySim *sim, GDBusMethodInvocation *in
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_CPHS_INFO, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get CPHS Info");
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_CPHS_INFO);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_CPHS_INFO,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_service_table(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_service_table(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        CoreObject *co_sim = NULL;
@@ -939,45 +925,44 @@ static gboolean on_sim_get_service_table(TelephonySim *sim, GDBusMethodInvocatio
        svct = tcore_sim_get_service_table(co_sim);
        if (!svct) {
                struct custom_data *ctx = user_data;
-               UserRequest *ur = NULL;
-               TReturn ret;
-               ur = MAKE_UR(ctx, sim, invocation);
-
-               dbg("Not cached. Request to modem");
-               tcore_user_request_set_command(ur, TREQ_SIM_GET_SERVICE_TABLE);
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-               if (ret != TCORE_RETURN_SUCCESS) {
-                       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-                       dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-                       tcore_user_request_unref(ur);
-               }
+
+               dbg("[%s] NOT cached - Request to modem",
+                       GET_CP_NAME(invocation));
+
+               /* Dispatch request */
+               dtapi_dispatch_request(ctx, sim, invocation,
+                       TREQ_SIM_GET_SERVICE_TABLE,
+                       NULL, 0);
        } else {
                GVariantBuilder builder;
                GVariant * inner_gv = NULL;
                GVariant *svct_gv = NULL;
                int i = 0;
+
                dbg("[%s] GET_SERVICE_TABLE", GET_CP_NAME(invocation));
 
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                if (svct->sim_type == SIM_TYPE_GSM) {
                        for (i = 0; i < SIM_SST_SERVICE_CNT_MAX; i++)
-                               g_variant_builder_add(&builder, "y", svct->table.sst.service[i]);
+                               g_variant_builder_add(&builder, "y",
+                                       svct->table.sst.service[i]);
                } else if (svct->sim_type == SIM_TYPE_USIM) {
                        for (i = 0; i < SIM_UST_SERVICE_CNT_MAX; i++)
-                               g_variant_builder_add(&builder, "y", svct->table.ust.service[i]);
+                               g_variant_builder_add(&builder, "y",
+                                       svct->table.ust.service[i]);
                } else if (svct->sim_type == SIM_TYPE_RUIM) {
                        if (SIM_CDMA_SVC_TABLE == svct->table.cst.cdma_svc_table) {
-                               for (i = 0; i < SIM_CDMA_ST_SERVICE_CNT_MAX; i++) {
-                                       g_variant_builder_add(&builder, "iy", svct->table.cst.cdma_svc_table,
+                               for (i = 0; i < SIM_CDMA_ST_SERVICE_CNT_MAX; i++)
+                                       g_variant_builder_add(&builder, "iy",
+                                               svct->table.cst.cdma_svc_table,
                                                svct->table.cst.service.cdma_service[i]);
-                               }
                        } else if (SIM_CSIM_SVC_TABLE == svct->table.cst.cdma_svc_table) {
-                               for (i = 0; i < SIM_CSIM_ST_SERVICE_CNT_MAX; i++) {
-                                       g_variant_builder_add(&builder, "iy", svct->table.cst.cdma_svc_table,
+                               for (i = 0; i < SIM_CSIM_ST_SERVICE_CNT_MAX; i++)
+                                       g_variant_builder_add(&builder, "iy",
+                                               svct->table.cst.cdma_svc_table,
                                                svct->table.cst.service.csim_service[i]);
-                               }
                        } else {
-                               err("Invalid cdma_svc_table:[%d]", svct->table.cst.cdma_svc_table);
+                               err("Invalid cdma_svc_table: [%d]", svct->table.cst.cdma_svc_table);
                        }
                } else {
                        err("[%s] Unknown SIM type: [%d]", GET_CP_NAME(invocation), svct->sim_type);
@@ -985,19 +970,19 @@ static gboolean on_sim_get_service_table(TelephonySim *sim, GDBusMethodInvocatio
                inner_gv = g_variant_builder_end(&builder);
                svct_gv = g_variant_new("v", inner_gv);
 
-               telephony_sim_complete_get_service_table(sim, invocation,
-                       SIM_ACCESS_SUCCESS, svct->sim_type, svct_gv);
+               telephony_sim_complete_get_service_table(sim,
+                       invocation, SIM_ACCESS_SUCCESS, svct->sim_type, svct_gv);
 
                free(svct);
        }
+
        return TRUE;
 }
 
-static gboolean on_sim_get_msisdn(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_msisdn(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        struct tel_sim_msisdn_list *msisdn_list = NULL;
        gboolean read_from_modem = FALSE;
@@ -1011,7 +996,7 @@ static gboolean on_sim_get_msisdn(TelephonySim *sim, GDBusMethodInvocation *invo
        DBUS_SIM_CHECK_SIM_SERVICE_TABLE(invocation, GET_MSISDN, co_sim);
 
        if (SIM_TYPE_NVSIM == tcore_sim_get_type(co_sim)) {
-               dbg("In NV SIM, don't use MSISDN cached");
+               dbg("NV SIM, don't use cached MSISDN");
                read_from_modem = TRUE;
        } else {
                msisdn_list = tcore_sim_get_msisdn_list(co_sim);
@@ -1022,58 +1007,68 @@ static gboolean on_sim_get_msisdn(TelephonySim *sim, GDBusMethodInvocation *invo
        }
 
        if (read_from_modem) {
-               UserRequest *ur = NULL;
+               TReturn ret;
 
-               ur = MAKE_UR(ctx, sim, invocation);
-               dbg("[%s] Not cached. Request to modem", GET_CP_NAME(invocation));
-               tcore_user_request_set_command(ur, TREQ_SIM_GET_MSISDN);
+               dbg("[%s] NOT cached - Request to modem", GET_CP_NAME(invocation));
 
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-               DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation, ur);
+               /* Dispatch request */
+               ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+                       TREQ_SIM_GET_MSISDN,
+                       NULL, 0);
+               DBUS_SIM_CHECK_DISPATCH_RET(ret, invocation);
        } else {
                GVariant *gv = NULL;
                int i;
                GVariantBuilder b;
 
-               dbg("[%s] GET_MSISDN. count:[%d]", GET_CP_NAME(invocation), msisdn_list->count);
+               dbg("[%s] MSISDN count: [%d]",
+                       GET_CP_NAME(invocation), msisdn_list->count);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
                for (i = 0; i < msisdn_list->count; i++) {
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "name", g_variant_new_string((const gchar *)msisdn_list->msisdn[i].name));
+                       g_variant_builder_add(&b, "{sv}", "name",
+                               g_variant_new_string((const gchar *)msisdn_list->msisdn[i].name));
                        if (msisdn_list->msisdn[i].ton == SIM_TON_INTERNATIONAL) {
                                unsigned char *tmp = (unsigned char *)calloc(SIM_MSISDN_NUMBER_LEN_MAX + 1, 1);
                                if (tmp != NULL) {
                                        tmp[0] = '+';
-                                       strncpy((char *)tmp+1, (const char*)msisdn_list->msisdn[i].num, SIM_MSISDN_NUMBER_LEN_MAX - 1);
+
+                                       strncpy((char *)tmp+1,
+                                               (const char*)msisdn_list->msisdn[i].num,
+                                               SIM_MSISDN_NUMBER_LEN_MAX - 1);
                                        tmp[SIM_MSISDN_NUMBER_LEN_MAX] = '\0';
-                                       g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string((const gchar *)tmp));
+
+                                       g_variant_builder_add(&b, "{sv}", "number",
+                                               g_variant_new_string((const gchar *)tmp));
+
                                        free(tmp);
                                } else {
-                                       warn("calloc failed.");
-                                       g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string((const gchar *)msisdn_list->msisdn[i].num));
+                                       warn("Memory allocation failed");
+                                       g_variant_builder_add(&b, "{sv}", "number",
+                                               g_variant_new_string((const gchar *)msisdn_list->msisdn[i].num));
                                }
                        } else {
-                               g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string((const gchar *)msisdn_list->msisdn[i].num));
+                               g_variant_builder_add(&b, "{sv}", "number",
+                                       g_variant_new_string((const gchar *)msisdn_list->msisdn[i].num));
                        }
                        g_variant_builder_close(&b);
                }
                gv = g_variant_builder_end(&b);
 
-               telephony_sim_complete_get_msisdn(sim, invocation, SIM_ACCESS_SUCCESS, gv);
-               free(msisdn_list);
+               telephony_sim_complete_get_msisdn(sim,
+                       invocation, SIM_ACCESS_SUCCESS, gv);
+
+               g_free(msisdn_list);
        }
 
        return TRUE;
 }
 
-static gboolean on_sim_get_oplmnwact(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_oplmnwact(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1084,25 +1079,18 @@ static gboolean on_sim_get_oplmnwact(TelephonySim *sim, GDBusMethodInvocation *i
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_OPLMWACT, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get OPLMNWACT");
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_OPLMNWACT);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_OPLMNWACT,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_spn(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_spn(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        struct tel_sim_spn* spn = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -1115,32 +1103,30 @@ static gboolean on_sim_get_spn(TelephonySim *sim, GDBusMethodInvocation *invocat
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get SPN");
 
        spn = tcore_sim_get_spn(co_sim);
-
        if (!spn) {
-               ur = MAKE_UR(ctx, sim, invocation);
+               dbg("[%s] NOT cached - Request to modem", GET_CP_NAME(invocation));
 
-               tcore_user_request_set_command(ur, TREQ_SIM_GET_SPN);
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-
-               if (ret != TCORE_RETURN_SUCCESS) {
-                       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-                       dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-                       tcore_user_request_unref(ur);
-               }
+               /* Dispatch request */
+               dtapi_dispatch_request(ctx, sim, invocation,
+                       TREQ_SIM_GET_SPN,
+                       NULL, 0);
        } else {
+               dbg("[%s] Display condition: [%d] SPN: [%s]",
+                       GET_CP_NAME(invocation),
+                       spn->display_condition, (const gchar *)spn->spn);
+
                telephony_sim_complete_get_spn(sim, invocation, SIM_ACCESS_SUCCESS,
                        spn->display_condition, (const gchar *)spn->spn);
-               free(spn);
+
+               g_free(spn);
        }
        return TRUE;
 }
 
-static gboolean on_sim_get_cphs_netname(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_cphs_netname(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        struct tel_sim_cphs_netname *cphs_netname = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -1153,34 +1139,34 @@ static gboolean on_sim_get_cphs_netname(TelephonySim *sim, GDBusMethodInvocation
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get CPHS Net Name");
 
        cphs_netname = tcore_sim_get_cphs_netname(co_sim);
-
        if (!cphs_netname) {
-               ur = MAKE_UR(ctx, sim, invocation);
-
-               tcore_user_request_set_command(ur, TREQ_SIM_GET_CPHS_NETNAME);
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-               if (ret != TCORE_RETURN_SUCCESS) {
-                       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-                       dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-                       tcore_user_request_unref(ur);
-               }
+               dbg("[%s] NOT cached - Request to modem", GET_CP_NAME(invocation));
+
+               /* Dispatch request */
+               dtapi_dispatch_request(ctx, sim, invocation,
+                       TREQ_SIM_GET_CPHS_NETNAME,
+                       NULL, 0);
        } else {
-               telephony_sim_complete_get_cphs_net_name(sim, invocation,
-                       SIM_ACCESS_SUCCESS,
+               dbg("[%s] Full name: [%s] Short name: [%s]",
+                       GET_CP_NAME(invocation),
+                       (const gchar *)cphs_netname->full_name,
+                       (const gchar *)cphs_netname->short_name);
+
+               telephony_sim_complete_get_cphs_net_name(sim,
+                       invocation, SIM_ACCESS_SUCCESS,
                        (const gchar *)cphs_netname->full_name,
                        (const gchar *)cphs_netname->short_name);
-               free(cphs_netname);
+
+               g_free(cphs_netname);
        }
 
        return TRUE;
 }
 
-static gboolean on_sim_get_gid(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_gid(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1191,27 +1177,19 @@ static gboolean on_sim_get_gid(TelephonySim *sim, GDBusMethodInvocation *invocat
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_GID, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get GID");
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_GID);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_GID,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_sim_authentication(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gint arg_type,
-           GVariant *arg_rand,
-           GVariant *arg_autn,
-           gpointer user_data)
+static gboolean on_sim_authentication(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gint auth_type,
+       GVariant *rand, GVariant *autn, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
        GVariantIter *iter = NULL;
        GVariant *rand_gv = NULL;
        GVariant *autn_gv = NULL;
@@ -1219,7 +1197,7 @@ static gboolean on_sim_authentication(TelephonySim *sim, GDBusMethodInvocation *
        int i = 0;
        TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_req_authentication req_auth;
+       struct treq_sim_req_authentication req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "x"))
@@ -1228,31 +1206,41 @@ static gboolean on_sim_authentication(TelephonySim *sim, GDBusMethodInvocation *
        DBUS_SIM_GET_COSIM(invocation, co_sim, ctx->server);
        DBUS_SIM_CHECK_SIM_STATUS(invocation, AUTHENTICATION, co_sim);
 
-       memset(&req_auth, 0, sizeof(struct treq_sim_req_authentication));
+       memset(&req, 0x0, sizeof(struct treq_sim_req_authentication));
 
-       req_auth.auth_type = arg_type;
+       req.auth_type = auth_type;
 
-       rand_gv = g_variant_get_variant(arg_rand);
+       rand_gv = g_variant_get_variant(rand);
        g_variant_get(rand_gv, "ay", &iter);
        while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               req_auth.rand_data[i] = rt_i;
+               req.rand_data[i] = rt_i;
                i++;
        }
-       req_auth.rand_length = (unsigned int)i;
+       g_variant_iter_free(iter);
+       g_variant_unref(rand_gv);
+
+       req.rand_length = (unsigned int)i;
 
        i = 0;
-       autn_gv = g_variant_get_variant(arg_autn);
+       autn_gv = g_variant_get_variant(autn);
        g_variant_get(autn_gv, "ay", &iter);
        while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               req_auth.autn_data[i] = rt_i;
+               req.autn_data[i] = rt_i;
                i++;
        }
-       req_auth.autn_length = (unsigned int)i;
+       g_variant_iter_free(iter);
+       g_variant_unref(autn_gv);
+
+       req.autn_length = (unsigned int)i;
+
+       dbg("[%s] Authentication - type: [0x%02x] RAND len: [%d] AUTN len: [%d]",
+               GET_CP_NAME(invocation),
+               req.auth_type, req.rand_length, req.autn_length);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_req_authentication), &req_auth);
-       tcore_user_request_set_command(ur, TREQ_SIM_REQ_AUTHENTICATION);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
+       /* Dispatch request */
+       ret = dtapi_dispatch_request_ex(ctx, sim, invocation,
+               TREQ_SIM_REQ_AUTHENTICATION,
+               &req, sizeof(struct treq_sim_req_authentication));
        if (ret != TCORE_RETURN_SUCCESS) {
                GVariantBuilder builder;
                GVariant *ak = NULL;
@@ -1280,24 +1268,21 @@ static gboolean on_sim_authentication(TelephonySim *sim, GDBusMethodInvocation *
                resp = g_variant_builder_end(&builder);
                resp_gv = g_variant_new("v", resp);
 
-               telephony_sim_complete_authentication(sim, invocation,
-                       SIM_ACCESS_FAILED, 0, 0, ak_gv, cp_gv, it_gv, resp_gv);
-               tcore_user_request_unref(ur);
+               telephony_sim_complete_authentication(sim,
+                       invocation, SIM_ACCESS_FAILED,
+                       0, 0, ak_gv, cp_gv, it_gv, resp_gv);
        }
 
        return TRUE;
 }
 
-static gboolean on_sim_verify_sec(TelephonySim *sim, GDBusMethodInvocation *invocation,
-           gint arg_type,
-           const gchar *arg_password,
-               gpointer user_data)
+static gboolean on_sim_verify_sec(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gint pin_type, const gchar *pin, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_verify_pins verify_pins;
+       struct treq_sim_verify_pins req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "x"))
@@ -1307,36 +1292,32 @@ static gboolean on_sim_verify_sec(TelephonySim *sim, GDBusMethodInvocation *invo
        DBUS_SIM_CHECK_SIM_STATUS(invocation, VERIFY_SEC, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Verify Sec");
 
-       memset(&verify_pins, 0, sizeof(struct treq_sim_verify_pins));
+       memset(&req, 0x0, sizeof(struct treq_sim_verify_pins));
 
-       verify_pins.pin_type = arg_type;
-       verify_pins.pin_length = strlen(arg_password);
-       memcpy(verify_pins.pin, arg_password, verify_pins.pin_length);
+       req.pin_type = pin_type;
+       req.pin_length = strlen(pin);
+       memcpy(req.pin, pin, req.pin_length);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_verify_pins), &verify_pins);
-       tcore_user_request_set_command(ur, TREQ_SIM_VERIFY_PINS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       dbg("[%s] PIN - type: [0x%02x] len: [%d]",
+               GET_CP_NAME(invocation),
+               req.pin_type, req.pin_length);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_VERIFY_PINS,
+               &req, sizeof(struct treq_sim_verify_pins));
 
        return TRUE;
 }
 
-static gboolean on_sim_verify_puk(TelephonySim *sim, GDBusMethodInvocation *invocation,
-           gint arg_type,
-           const gchar *arg_puk,
-           const gchar *arg_new_pin,
-               gpointer user_data)
+static gboolean on_sim_verify_puk(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gint puk_type, const gchar *puk,
+       const gchar *new_pin, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_verify_puks verify_puks;
+       struct treq_sim_verify_puks req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "x"))
@@ -1346,38 +1327,34 @@ static gboolean on_sim_verify_puk(TelephonySim *sim, GDBusMethodInvocation *invo
        DBUS_SIM_CHECK_SIM_STATUS(invocation, VERIFY_PUK, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Verify PUK");
 
-       memset(&verify_puks, 0, sizeof(struct treq_sim_verify_puks));
+       memset(&req, 0x0, sizeof(struct treq_sim_verify_puks));
 
-       verify_puks.puk_type = arg_type;
-       verify_puks.puk_length = strlen(arg_puk);
-       memcpy(verify_puks.puk, arg_puk, verify_puks.puk_length);
-       verify_puks.pin_length = strlen(arg_new_pin);
-       memcpy(verify_puks.pin, arg_new_pin, verify_puks.pin_length);
+       req.puk_type = puk_type;
+       req.puk_length = strlen(puk);
+       memcpy(req.puk, puk, req.puk_length);
+       req.pin_length = strlen(new_pin);
+       memcpy(req.pin, new_pin, req.pin_length);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_verify_puks), &verify_puks);
-       tcore_user_request_set_command(ur, TREQ_SIM_VERIFY_PUKS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       dbg("[%s] PUK - type: [0x%02x] len: [%d] PIN len: [%d]",
+               GET_CP_NAME(invocation), req.puk_type,
+               req.puk_length, req.pin_length);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_VERIFY_PUKS,
+               &req, sizeof(struct treq_sim_verify_puks));
 
        return TRUE;
 }
 
-static gboolean on_sim_change_pin(TelephonySim *sim, GDBusMethodInvocation *invocation,
-           gint arg_type,
-           const gchar *arg_old_password,
-           const gchar *arg_new_password,
-               gpointer user_data)
+static gboolean on_sim_change_pin(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gint pin_type, const gchar *old_pin, const gchar *new_pin,
+       gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_change_pins change_pins;
+       struct treq_sim_change_pins req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "x"))
@@ -1387,36 +1364,32 @@ static gboolean on_sim_change_pin(TelephonySim *sim, GDBusMethodInvocation *invo
        DBUS_SIM_CHECK_SIM_STATUS(invocation, CHANGE_PIN, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Change PIN");
 
-       memset(&change_pins, 0, sizeof(struct treq_sim_change_pins));
+       memset(&req, 0x0, sizeof(struct treq_sim_change_pins));
 
-       change_pins.type = arg_type;
-       change_pins.old_pin_length = strlen(arg_old_password);
-       memcpy(change_pins.old_pin, arg_old_password, change_pins.old_pin_length);
-       change_pins.new_pin_length = strlen(arg_new_password);
-       memcpy(change_pins.new_pin, arg_new_password, change_pins.new_pin_length);
+       req.type = pin_type;
+       req.old_pin_length = strlen(old_pin);
+       memcpy(req.old_pin, old_pin, req.old_pin_length);
+       req.new_pin_length = strlen(new_pin);
+       memcpy(req.new_pin, new_pin, req.new_pin_length);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_change_pins), &change_pins);
-       tcore_user_request_set_command(ur, TREQ_SIM_CHANGE_PINS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       dbg("[%s] PIN - type: [0x%02x] Old PIN len: [%d] New PIN len: [%d]",
+               GET_CP_NAME(invocation), req.type,
+               req.old_pin_length, req.new_pin_length);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_CHANGE_PINS,
+               &req, sizeof(struct treq_sim_change_pins));
 
        return TRUE;
 }
 
-static gboolean on_sim_disable_facility(TelephonySim *sim, GDBusMethodInvocation *invocation,
-           gint arg_type,
-           const gchar *arg_password,
-               gpointer user_data)
+static gboolean on_sim_disable_facility(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gint facility_type, const gchar *password, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_sim_disable_facility dis_facility;
+       struct treq_sim_disable_facility req;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1427,60 +1400,68 @@ static gboolean on_sim_disable_facility(TelephonySim *sim, GDBusMethodInvocation
        DBUS_SIM_CHECK_SIM_STATUS(invocation, DISABLE_FACILITY, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Diable Facility");
 
-       memset(&dis_facility, 0, sizeof(struct treq_sim_disable_facility));
+       memset(&req, 0x0, sizeof(struct treq_sim_disable_facility));
 
-       dbg("arg_type[%d]", arg_type);
-       switch (arg_type) {
+       dbg("[%s] facility_type: [%d]", GET_CP_NAME(invocation), facility_type);
+       switch (facility_type) {
        case 1:
-               dis_facility.type = SIM_FACILITY_PS;
-               break;
+               req.type = SIM_FACILITY_PS;
+       break;
+
        case 3:
-               dis_facility.type = SIM_FACILITY_SC;
-               break;
+               req.type = SIM_FACILITY_SC;
+       break;
+
        case 4:
-               dis_facility.type = SIM_FACILITY_FD;
-               break;
+               req.type = SIM_FACILITY_FD;
+       break;
+
        case 5:
-               dis_facility.type = SIM_FACILITY_PN;
-               break;
+               req.type = SIM_FACILITY_PN;
+       break;
+
        case 6:
-               dis_facility.type = SIM_FACILITY_PU;
-               break;
+               req.type = SIM_FACILITY_PU;
+       break;
+
        case 7:
-               dis_facility.type = SIM_FACILITY_PP;
-               break;
+               req.type = SIM_FACILITY_PP;
+       break;
+
        case 8:
-               dis_facility.type = SIM_FACILITY_PC;
-               break;
+               req.type = SIM_FACILITY_PC;
+       break;
+
        default:
-               err("Unhandled/Unknown type[0x%x]", arg_type);
-               break;
-       }
-       dis_facility.password_length = strlen(arg_password);
-       memcpy(dis_facility.password, arg_password, dis_facility.password_length);
+               err("Unhandled/Unknown Facility type: [0x%x]", facility_type);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_disable_facility), &dis_facility);
-       tcore_user_request_set_command(ur, TREQ_SIM_DISABLE_FACILITY);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
+
+               return TRUE;
        }
 
+       req.password_length = strlen(password);
+       memcpy(req.password, password, req.password_length);
+
+       dbg("[%s] Facility - type: [0x%02x] Passowrd len: [%d]",
+               GET_CP_NAME(invocation),
+               req.type, req.password_length);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_DISABLE_FACILITY,
+               &req, sizeof(struct treq_sim_disable_facility));
+
        return TRUE;
 }
 
 static gboolean on_sim_enable_facility(TelephonySim *sim, GDBusMethodInvocation *invocation,
-           gint arg_type,
-           const gchar *arg_password,
+           gint facility_type,
+           const gchar *password,
                gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_sim_enable_facility en_facility;
+       struct treq_sim_enable_facility req;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1491,59 +1472,67 @@ static gboolean on_sim_enable_facility(TelephonySim *sim, GDBusMethodInvocation
        DBUS_SIM_CHECK_SIM_STATUS(invocation, ENABLE_FACILITY, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Enable Facility");
 
-       memset(&en_facility, 0, sizeof(struct treq_sim_enable_facility));
+       memset(&req, 0x0, sizeof(struct treq_sim_enable_facility));
 
-       dbg("[%s] arg_type[%d]", GET_CP_NAME(invocation), arg_type);
-       switch (arg_type) {
+       dbg("[%s] facility_type: [%d]", GET_CP_NAME(invocation), facility_type);
+       switch (facility_type) {
        case 1:
-               en_facility.type = SIM_FACILITY_PS;
-               break;
+               req.type = SIM_FACILITY_PS;
+       break;
+
        case 3:
-               en_facility.type = SIM_FACILITY_SC;
-               break;
+               req.type = SIM_FACILITY_SC;
+       break;
+
        case 4:
-               en_facility.type = SIM_FACILITY_FD;
-               break;
+               req.type = SIM_FACILITY_FD;
+       break;
+
        case 5:
-               en_facility.type = SIM_FACILITY_PN;
-               break;
+               req.type = SIM_FACILITY_PN;
+       break;
+
        case 6:
-               en_facility.type = SIM_FACILITY_PU;
-               break;
+               req.type = SIM_FACILITY_PU;
+       break;
+
        case 7:
-               en_facility.type = SIM_FACILITY_PP;
-               break;
+               req.type = SIM_FACILITY_PP;
+       break;
+
        case 8:
-               en_facility.type = SIM_FACILITY_PC;
-               break;
+               req.type = SIM_FACILITY_PC;
+       break;
+
        default:
-               err("Unhandled/Unknown type[0x%x]", arg_type);
-               break;
-       }
-       en_facility.password_length = strlen(arg_password);
-       memcpy(en_facility.password, arg_password, en_facility.password_length);
+               err("Unhandled/Unknown Facility type: [0x%x]", facility_type);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_enable_facility), &en_facility);
-       tcore_user_request_set_command(ur, TREQ_SIM_ENABLE_FACILITY);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
+
+               return TRUE;
        }
 
+       req.password_length = strlen(password);
+       memcpy(req.password, password, req.password_length);
+
+       dbg("[%s] Facility - type: [0x%02x] Passowrd len: [%d]",
+               GET_CP_NAME(invocation),
+               req.type, req.password_length);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_ENABLE_FACILITY,
+               &req, sizeof(struct treq_sim_enable_facility));
+
        return TRUE;
 }
 
-static gboolean on_sim_get_facility(TelephonySim *sim, GDBusMethodInvocation *invocation,
-           gint arg_type,
-               gpointer user_data)
+static gboolean on_sim_get_facility(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gint facility_type, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_sim_get_facility_status facility;
+       struct treq_sim_get_facility_status req;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1554,59 +1543,62 @@ static gboolean on_sim_get_facility(TelephonySim *sim, GDBusMethodInvocation *in
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_FACILITY, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get Facility");
 
-       memset(&facility, 0, sizeof(struct treq_sim_get_facility_status));
+       memset(&req, 0x0, sizeof(struct treq_sim_get_facility_status));
 
-       dbg("[%s] arg_type[%d]", GET_CP_NAME(invocation), arg_type);
+       dbg("[%s] facility_type: [%d]", GET_CP_NAME(invocation), facility_type);
 
-       switch (arg_type) {
+       switch (facility_type) {
        case 1:
-               facility.type = SIM_FACILITY_PS;
-               break;
+               req.type = SIM_FACILITY_PS;
+       break;
+
        case 3:
-               facility.type = SIM_FACILITY_SC;
-               break;
+               req.type = SIM_FACILITY_SC;
+       break;
+
        case 4:
-               facility.type = SIM_FACILITY_FD;
-               break;
+               req.type = SIM_FACILITY_FD;
+       break;
+
        case 5:
-               facility.type = SIM_FACILITY_PN;
-               break;
+               req.type = SIM_FACILITY_PN;
+       break;
+
        case 6:
-               facility.type = SIM_FACILITY_PU;
-               break;
+               req.type = SIM_FACILITY_PU;
+       break;
+
        case 7:
-               facility.type = SIM_FACILITY_PP;
-               break;
+               req.type = SIM_FACILITY_PP;
+       break;
+
        case 8:
-               facility.type = SIM_FACILITY_PC;
-               break;
+               req.type = SIM_FACILITY_PC;
+       break;
+
        default:
-               err("Unhandled/Unknown type[0x%x]", arg_type);
-               break;
-       }
+               err("Unhandled/Unknown Facility type: [0x%x]", facility_type);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_get_facility_status), &facility);
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_FACILITY_STATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
+
+               return TRUE;
        }
 
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_FACILITY_STATUS,
+               &req, sizeof(struct treq_sim_get_facility_status));
+
        return TRUE;
 }
 
-static gboolean on_sim_get_lock_info(TelephonySim *sim, GDBusMethodInvocation *invocation,
-           gint arg_type,
-               gpointer user_data)
+static gboolean on_sim_get_lock_info(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       gint facility_type, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_get_lock_info lock_info;
+       struct treq_sim_get_lock_info req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "r"))
@@ -1616,60 +1608,63 @@ static gboolean on_sim_get_lock_info(TelephonySim *sim, GDBusMethodInvocation *i
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_LOCK_INFO, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get Lock Info");
 
-       memset(&lock_info, 0, sizeof(struct treq_sim_get_lock_info));
+       memset(&req, 0x0, sizeof(struct treq_sim_get_lock_info));
 
-       dbg("[%s] arg_type[%d]", GET_CP_NAME(invocation), arg_type);
-       switch (arg_type) {
+       dbg("[%s] facility_type: [%d]", GET_CP_NAME(invocation), facility_type);
+       switch (facility_type) {
        case 1:
-               lock_info.type = SIM_FACILITY_PS;
-               break;
+               req.type = SIM_FACILITY_PS;
+       break;
+
        case 3:
-               lock_info.type = SIM_FACILITY_SC;
-               break;
+               req.type = SIM_FACILITY_SC;
+       break;
+
        case 4:
-               lock_info.type = SIM_FACILITY_FD;
-               break;
+               req.type = SIM_FACILITY_FD;
+       break;
+
        case 5:
-               lock_info.type = SIM_FACILITY_PN;
-               break;
+               req.type = SIM_FACILITY_PN;
+       break;
+
        case 6:
-               lock_info.type = SIM_FACILITY_PU;
-               break;
+               req.type = SIM_FACILITY_PU;
+       break;
+
        case 7:
-               lock_info.type = SIM_FACILITY_PP;
-               break;
+               req.type = SIM_FACILITY_PP;
+       break;
+
        case 8:
-               lock_info.type = SIM_FACILITY_PC;
-               break;
+               req.type = SIM_FACILITY_PC;
+       break;
+
        default:
-               err("Unhandled/Unknown type[0x%x]", arg_type);
-               break;
-       }
+               err("Unhandled/Unknown Facility type: [0x%x]", facility_type);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_get_lock_info), &lock_info);
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_LOCK_INFO);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
+
+               return TRUE;
        }
 
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_LOCK_INFO,
+               &req, sizeof(struct treq_sim_get_lock_info));
+
        return TRUE;
 }
 
-static gboolean on_sim_transfer_apdu(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               GVariant *arg_apdu,
-               gpointer user_data)
+static gboolean on_sim_transfer_apdu(TelephonySim *sim,
+       GDBusMethodInvocation *invocation,
+       GVariant *apdu, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       struct treq_sim_transmit_apdu send_apdu;
+       struct treq_sim_transmit_apdu req;
        GVariantIter *iter = NULL;
        GVariant *inner_gv = NULL;
        guchar rt_i;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        int i = 0;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
@@ -1681,41 +1676,34 @@ static gboolean on_sim_transfer_apdu(TelephonySim *sim, GDBusMethodInvocation *i
        DBUS_SIM_CHECK_SIM_STATUS(invocation, TRANSFER_APDU, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Transfer APDU");
 
-       memset(&send_apdu, 0, sizeof(struct treq_sim_transmit_apdu));
+       memset(&req, 0x0, sizeof(struct treq_sim_transmit_apdu));
 
-       inner_gv = g_variant_get_variant(arg_apdu);
+       inner_gv = g_variant_get_variant(apdu);
 
        g_variant_get(inner_gv, "ay", &iter);
        while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               send_apdu.apdu[i] = rt_i;
+               req.apdu[i] = rt_i;
                i++;
        }
-       send_apdu.apdu_length = (unsigned int)i;
+       req.apdu_length = (unsigned int)i;
        g_variant_iter_free(iter);
        g_variant_unref(inner_gv);
-       g_variant_unref(arg_apdu);
+       g_variant_unref(apdu);
 
-       tcore_util_hex_dump("[APDU_REQ] ", send_apdu.apdu_length, send_apdu.apdu);
+       tcore_util_hex_dump("[APDU_REQ] ", req.apdu_length, req.apdu);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_transmit_apdu), &send_apdu);
-       tcore_user_request_set_command(ur, TREQ_SIM_TRANSMIT_APDU);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_TRANSMIT_APDU,
+               &req, sizeof(struct treq_sim_transmit_apdu));
 
        return TRUE;
 }
 
-static gboolean on_sim_get_atr(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_atr(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1726,21 +1714,16 @@ static gboolean on_sim_get_atr(TelephonySim *sim, GDBusMethodInvocation *invocat
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_ATR, co_sim);
        DBUS_SIM_CHECK_SIM_TYPE(co_sim, "Get ATR");
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_ATR);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_ATR,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean on_sim_get_fields(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gpointer user_data)
+static gboolean on_sim_get_fields(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        struct tel_sim_imsi *n_imsi = NULL;
@@ -1760,38 +1743,45 @@ static gboolean on_sim_get_fields(TelephonySim *sim, GDBusMethodInvocation *invo
 
        n_imsi = tcore_sim_get_imsi(co_sim);
        if (n_imsi != NULL) {
-               g_variant_builder_add(&b, "{svv}", "imsi", g_variant_new_string("plmn"), g_variant_new_string(n_imsi->plmn));
-               g_variant_builder_add(&b, "{svv}", "imsi", g_variant_new_string("msin"), g_variant_new_string(n_imsi->msin));
+               g_variant_builder_add(&b, "{svv}", "imsi",
+                       g_variant_new_string("plmn"),
+                       g_variant_new_string(n_imsi->plmn));
+               g_variant_builder_add(&b, "{svv}", "imsi",
+                       g_variant_new_string("msin"),
+                       g_variant_new_string(n_imsi->msin));
                free(n_imsi);
        }
 
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_ICCID, co_sim);
-       g_variant_builder_add(&b, "{svv}", "iccid", g_variant_new_string(""), g_variant_new_string(""));
+       g_variant_builder_add(&b, "{svv}", "iccid",
+               g_variant_new_string(""), g_variant_new_string(""));
 
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_MSISDN, co_sim);
-       g_variant_builder_add(&b, "{svv}", "msisdn", g_variant_new_string("name"), g_variant_new_string("number"));
+       g_variant_builder_add(&b, "{svv}", "msisdn",
+               g_variant_new_string("name"), g_variant_new_string("number"));
 
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_SPN, co_sim);
-       g_variant_builder_add(&b, "{svv}", "spn", g_variant_new_uint16(255), g_variant_new_string("network name"));
+       g_variant_builder_add(&b, "{svv}", "spn",
+               g_variant_new_uint16(255), g_variant_new_string("network name"));
 
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_INIT_STATUS, co_sim);
-       g_variant_builder_add(&b, "{svv}", "init_status", g_variant_new_uint16(0), g_variant_new_boolean(TRUE));
+       g_variant_builder_add(&b, "{svv}", "init_status",
+               g_variant_new_uint16(0), g_variant_new_boolean(TRUE));
 
        gv_fields = g_variant_builder_end(&b);
 
-       telephony_sim_complete_get_fields(sim, invocation, 0, gv_fields);
+       telephony_sim_complete_get_fields(sim,
+               invocation, 0, gv_fields);
 
        return TRUE;
 }
 
-static gboolean on_sim_set_power_state(TelephonySim *sim, GDBusMethodInvocation *invocation,
-               gint arg_state, gpointer user_data)
+static gboolean on_sim_set_power_state(TelephonySim *sim,
+       GDBusMethodInvocation *invocation, gint state, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
-       struct treq_sim_set_powerstate set_powerstate;
+       struct treq_sim_set_powerstate req;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SIM, "w"))
@@ -1800,20 +1790,17 @@ static gboolean on_sim_set_power_state(TelephonySim *sim, GDBusMethodInvocation
        DBUS_SIM_GET_COSIM(invocation, co_sim, ctx->server);
        DBUS_SIM_CHECK_SIM_STATUS(invocation, SET_POWERSTATE, co_sim);
 
-       memset(&set_powerstate, 0, sizeof(struct treq_sim_set_powerstate));
-       set_powerstate.state = arg_state;
+       memset(&req, 0x0, sizeof(struct treq_sim_set_powerstate));
 
-       dbg("[%s] powerstate:[%d]", GET_CP_NAME(invocation), set_powerstate.state);
-       ur = MAKE_UR(ctx, sim, invocation);
+       req.state = state;
 
-       tcore_user_request_set_data(ur, sizeof(struct treq_sim_set_powerstate), &set_powerstate);
-       tcore_user_request_set_command(ur, TREQ_SIM_SET_POWERSTATE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
+       dbg("[%s] SIM Power state: [%d]",
+               GET_CP_NAME(invocation), req.state);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_SET_POWERSTATE,
+               &req, sizeof(struct treq_sim_set_powerstate));
 
        return TRUE;
 }
@@ -1822,8 +1809,6 @@ static gboolean on_sim_get_impi(TelephonySim *sim,
        GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1833,15 +1818,10 @@ static gboolean on_sim_get_impi(TelephonySim *sim,
        DBUS_SIM_GET_COSIM(invocation, co_sim, ctx->server);
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_IMPI, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_IMPI);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               err("[ERROR] tcore_communicator_dispatch_request(): [%d]", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_IMPI,
+               NULL, 0);
 
        return TRUE;
 }
@@ -1850,8 +1830,6 @@ static gboolean on_sim_get_impu(TelephonySim *sim,
        GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1861,15 +1839,10 @@ static gboolean on_sim_get_impu(TelephonySim *sim,
        DBUS_SIM_GET_COSIM(invocation, co_sim, ctx->server);
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_IMPU, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_IMPU);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               err("[ERROR] tcore_communicator_dispatch_request(): [%d]", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_IMPU,
+               NULL, 0);
 
        return TRUE;
 }
@@ -1878,8 +1851,6 @@ static gboolean on_sim_get_domain(TelephonySim *sim,
        GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1889,15 +1860,10 @@ static gboolean on_sim_get_domain(TelephonySim *sim,
        DBUS_SIM_GET_COSIM(invocation, co_sim, ctx->server);
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_DOMAIN, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_DOMAIN);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               err("[ERROR] tcore_communicator_dispatch_request(): [%d]", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_DOMAIN,
+               NULL, 0);
 
        return TRUE;
 }
@@ -1906,8 +1872,6 @@ static gboolean on_sim_get_pcscf(TelephonySim *sim,
        GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
        CoreObject *co_sim = NULL;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
@@ -1917,15 +1881,10 @@ static gboolean on_sim_get_pcscf(TelephonySim *sim,
        DBUS_SIM_GET_COSIM(invocation, co_sim, ctx->server);
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_PCSCF, co_sim);
 
-       ur = MAKE_UR(ctx, sim, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SIM_GET_PCSCF);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               err("[ERROR] tcore_communicator_dispatch_request(): [%d]", ret);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sim, invocation,
+               TREQ_SIM_GET_PCSCF,
+               NULL, 0);
 
        return TRUE;
 }
@@ -1945,7 +1904,10 @@ static gboolean on_sim_get_app_list(TelephonySim *sim,
        DBUS_SIM_CHECK_SIM_STATUS(invocation, GET_APP_LIST, co_sim);
 
        app_list = tcore_sim_get_app_list(co_sim);
-       telephony_sim_complete_get_app_list(sim, invocation, app_list);
+
+       telephony_sim_complete_get_app_list(sim,
+               invocation, app_list);
+
        return TRUE;
 }
 
@@ -1978,24 +1940,20 @@ static gboolean on_sim_get_isim_service_table(TelephonySim *sim,
 
                telephony_sim_complete_get_isim_service_table(sim, invocation,
                        SIM_ACCESS_SUCCESS, ist_gv);
+
                g_free(ist);
        } else {
-               UserRequest *ur = NULL;
-               TReturn ret;
-               ur = MAKE_UR(ctx, sim, invocation);
-
-               tcore_user_request_set_command(ur, TREQ_SIM_GET_ISIM_SERVICE_TABLE);
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-               if (ret != TCORE_RETURN_SUCCESS) {
-                       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-                       dbg("[ERROR] tcore_communicator_dispatch_request(): [%d]", ret);
-                       tcore_user_request_unref(ur);
-               }
+               /* Dispatch request */
+               dtapi_dispatch_request(ctx, sim, invocation,
+                       TREQ_SIM_GET_ISIM_SERVICE_TABLE,
+                       NULL, 0);
        }
+
        return TRUE;
 }
 
-gboolean dbus_plugin_setup_sim_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
+gboolean dbus_plugin_setup_sim_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
 {
        TelephonySim *sim;
 
@@ -2005,8 +1963,9 @@ gboolean dbus_plugin_setup_sim_interface(TelephonyObjectSkeleton *object, struct
 
        dbg("sim = %p", sim);
 
-       telephony_sim_set_cf_state(sim, FALSE);
-
+       /*
+        * Register signal handlers for SIM interface
+        */
        g_signal_connect(sim,
                "handle-get-init-status",
                G_CALLBACK(on_sim_get_init_status), ctx);
@@ -2159,12 +2118,17 @@ gboolean dbus_plugin_setup_sim_interface(TelephonyObjectSkeleton *object, struct
                "handle-get-isim-service-table",
                G_CALLBACK(on_sim_get_isim_service_table), ctx);
 
+       /*
+        * Initialize DBUS property
+        */
+       telephony_sim_set_cf_state(sim, FALSE);
+
        return TRUE;
 }
 
-gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
-       struct dbus_request_info *dbus_info, enum tcore_response_command command,
-       unsigned int data_len, const void *data)
+gboolean dbus_plugin_sim_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        char *cpname = dbus_info ? GET_CP_NAME(dbus_info->invocation) : "";
 
@@ -2176,7 +2140,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                int i = 0;
 
-               dbg("[%s] GET_ECC - [%s])", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_ECC - Result: [%s])", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                co_sim = __get_sim_co_from_ur(ctx->server, ur);
                if (!co_sim) {
@@ -2191,21 +2156,25 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp_read->data.ecc.ecc_count; i++) {
-                       dbg("[%s] ecc[%d] : ecc_category=[0x%x], ecc_num=[%s], ecc_string=[%s]",
-                               cpname, i,
+                       dbg("[%s] ecc[%d] : ecc_category=[0x%x], ecc_num=[%s], " \
+                               "ecc_string=[%s]", cpname, i,
                                resp_read->data.ecc.ecc[i].ecc_category,
                                resp_read->data.ecc.ecc[i].ecc_num,
                                resp_read->data.ecc.ecc[i].ecc_string);
 
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "category", g_variant_new_int32(resp_read->data.ecc.ecc[i].ecc_category));
-                       g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string(resp_read->data.ecc.ecc[i].ecc_num));
-                       g_variant_builder_add(&b, "{sv}", "name", g_variant_new_string(resp_read->data.ecc.ecc[i].ecc_string));
+                       g_variant_builder_add(&b, "{sv}", "category",
+                               g_variant_new_int32(resp_read->data.ecc.ecc[i].ecc_category));
+                       g_variant_builder_add(&b, "{sv}", "number",
+                               g_variant_new_string(resp_read->data.ecc.ecc[i].ecc_num));
+                       g_variant_builder_add(&b, "{sv}", "name",
+                               g_variant_new_string(resp_read->data.ecc.ecc[i].ecc_string));
                        g_variant_builder_close(&b);
                }
                gv = g_variant_builder_end(&b);
 
-               telephony_sim_complete_get_ecc(dbus_info->interface_object, dbus_info->invocation, gv);
+               telephony_sim_complete_get_ecc(dbus_info->interface_object,
+                       dbus_info->invocation, gv);
        }
        break;
 
@@ -2213,8 +2182,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                const struct tresp_sim_read *resp_read = data;
                CoreObject *co_sim = NULL;
 
-               dbg("[%s] GET_ICCID - [%s] ICCID: [%s])",
-                        cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
+               dbg("[%s] SIM_GET_ICCID - Result: [%s] ICCID: [%s])", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
                         resp_read->data.iccid.iccid);
 
                co_sim = __get_sim_co_from_ur(ctx->server, ur);
@@ -2228,28 +2197,30 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                else if (resp_read->result == SIM_ACCESS_FILE_NOT_FOUND)
                        tcore_sim_set_iccid(co_sim, NULL);
 
-               telephony_sim_complete_get_iccid(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, resp_read->data.iccid.iccid);
+               telephony_sim_complete_get_iccid(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       resp_read->data.iccid.iccid);
        }
        break;
 
        case TRESP_SIM_GET_LANGUAGE: {
                const struct tresp_sim_read *resp_read = data;
 
-               dbg("[%s] GET_LANGUAGE - [%s] Language: [0x%2x]",
-                       cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
+               dbg("[%s] SIM_GET_LANGUAGE - Result: [%s] Language: [0x%2x]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
                        resp_read->data.language.language[0]);
 
-               telephony_sim_complete_get_language(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, resp_read->data.language.language[0]);
+               telephony_sim_complete_get_language(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       resp_read->data.language.language[0]);
        }
        break;
 
        case TRESP_SIM_SET_LANGUAGE: {
                const struct tresp_sim_set_data *resp_set_data = data;
 
-               dbg("[%s] SET_LANGUAGE - [%s]",
-                       cpname, (resp_set_data->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_SET_LANGUAGE - Result: [%s]", cpname,
+                       (resp_set_data->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                telephony_sim_complete_set_language(dbus_info->interface_object,
                        dbus_info->invocation, resp_set_data->result);
@@ -2262,20 +2233,26 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariant *gv_cphs_cf = NULL;
                GVariantBuilder b;
 
-               dbg("[%s] GET_CALLFORWARDING - [%s] CPHS: [%s]",
+               dbg("[%s] SIM_GET_CALLFORWARDING - Result: [%s] CPHS: [%s]",
                        cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
                        (resp_read->data.cf.b_cphs ? "Yes" : "No"));
 
                if (resp_read->data.cf.b_cphs) {
                        dbg("[%s] b_line1[%d], b_line2[%d], b_fax[%d], b_data[%d]",
-                               cpname, resp_read->data.cf.cphs_cf.b_line1, resp_read->data.cf.cphs_cf.b_line2,
-                               resp_read->data.cf.cphs_cf.b_fax, resp_read->data.cf.cphs_cf.b_data);
+                               cpname, resp_read->data.cf.cphs_cf.b_line1,
+                               resp_read->data.cf.cphs_cf.b_line2,
+                               resp_read->data.cf.cphs_cf.b_fax,
+                               resp_read->data.cf.cphs_cf.b_data);
 
                        g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "b_line1", g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_line1));
-                       g_variant_builder_add(&b, "{sv}", "b_line2", g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_line2));
-                       g_variant_builder_add(&b, "{sv}", "b_fax", g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_fax));
-                       g_variant_builder_add(&b, "{sv}", "b_data", g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_data));
+                       g_variant_builder_add(&b, "{sv}", "b_line1",
+                               g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_line1));
+                       g_variant_builder_add(&b, "{sv}", "b_line2",
+                               g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_line2));
+                       g_variant_builder_add(&b, "{sv}", "b_fax",
+                               g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_fax));
+                       g_variant_builder_add(&b, "{sv}", "b_data",
+                               g_variant_new_boolean(resp_read->data.cf.cphs_cf.b_data));
                        gv_cphs_cf = g_variant_builder_end(&b);
 
                        g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
@@ -2284,26 +2261,39 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                } else {
                        int i = 0;
 
-                       dbg("[%s] profile_count[%d]", cpname, resp_read->data.cf.cf_list.profile_count);
+                       dbg("[%s] Profile count: [%d]", cpname, resp_read->data.cf.cf_list.profile_count);
 
                        g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                        for (i = 0; i < resp_read->data.cf.cf_list.profile_count; i++) {
-                               dbg("[%s] [%d] : rec_index[0x%x], msp_num[0x%x], cfu_status[0x%x], "
-                                       "cfu_num[%s], ton[0x%x], npi[0x%x], cc2_id[0x%x], ext7_id[0x%x]",
-                                       cpname, i, resp_read->data.cf.cf_list.cf[i].rec_index, resp_read->data.cf.cf_list.cf[i].msp_num,
-                                       resp_read->data.cf.cf_list.cf[i].cfu_status, resp_read->data.cf.cf_list.cf[i].cfu_num,
-                                       resp_read->data.cf.cf_list.cf[i].ton, resp_read->data.cf.cf_list.cf[i].npi,
-                                       resp_read->data.cf.cf_list.cf[i].cc2_id, resp_read->data.cf.cf_list.cf[i].ext7_id);
+                               dbg("[%s] [%d] : rec_index[0x%x], msp_num[0x%x], " \
+                                       "cfu_status[0x%x], cfu_num[%s], ton[0x%x], " \
+                                       "npi[0x%x], cc2_id[0x%x], ext7_id[0x%x]", cpname, i,
+                                       resp_read->data.cf.cf_list.cf[i].rec_index,
+                                       resp_read->data.cf.cf_list.cf[i].msp_num,
+                                       resp_read->data.cf.cf_list.cf[i].cfu_status,
+                                       resp_read->data.cf.cf_list.cf[i].cfu_num,
+                                       resp_read->data.cf.cf_list.cf[i].ton,
+                                       resp_read->data.cf.cf_list.cf[i].npi,
+                                       resp_read->data.cf.cf_list.cf[i].cc2_id,
+                                       resp_read->data.cf.cf_list.cf[i].ext7_id);
 
                                g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                               g_variant_builder_add(&b, "{sv}", "rec_index", g_variant_new_int32(resp_read->data.cf.cf_list.cf[i].rec_index));
-                               g_variant_builder_add(&b, "{sv}", "msp_num", g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].msp_num));
-                               g_variant_builder_add(&b, "{sv}", "cfu_status", g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].cfu_status));
-                               g_variant_builder_add(&b, "{sv}", "cfu_num", g_variant_new_string(resp_read->data.cf.cf_list.cf[i].cfu_num));
-                               g_variant_builder_add(&b, "{sv}", "ton", g_variant_new_int32(resp_read->data.cf.cf_list.cf[i].ton));
-                               g_variant_builder_add(&b, "{sv}", "npi", g_variant_new_int32(resp_read->data.cf.cf_list.cf[i].npi));
-                               g_variant_builder_add(&b, "{sv}", "cc2_id", g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].cc2_id));
-                               g_variant_builder_add(&b, "{sv}", "ext7_id", g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].ext7_id));
+                               g_variant_builder_add(&b, "{sv}", "rec_index",
+                                       g_variant_new_int32(resp_read->data.cf.cf_list.cf[i].rec_index));
+                               g_variant_builder_add(&b, "{sv}", "msp_num",
+                                       g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].msp_num));
+                               g_variant_builder_add(&b, "{sv}", "cfu_status",
+                                       g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].cfu_status));
+                               g_variant_builder_add(&b, "{sv}", "cfu_num",
+                                       g_variant_new_string(resp_read->data.cf.cf_list.cf[i].cfu_num));
+                               g_variant_builder_add(&b, "{sv}", "ton",
+                                       g_variant_new_int32(resp_read->data.cf.cf_list.cf[i].ton));
+                               g_variant_builder_add(&b, "{sv}", "npi",
+                                       g_variant_new_int32(resp_read->data.cf.cf_list.cf[i].npi));
+                               g_variant_builder_add(&b, "{sv}", "cc2_id",
+                                       g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].cc2_id));
+                               g_variant_builder_add(&b, "{sv}", "ext7_id",
+                                       g_variant_new_byte(resp_read->data.cf.cf_list.cf[i].ext7_id));
                                g_variant_builder_close(&b);
                        }
                        gv_cf = g_variant_builder_end(&b);
@@ -2312,19 +2302,20 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                        gv_cphs_cf = g_variant_builder_end(&b);
                }
 
-               telephony_sim_complete_get_call_forwarding(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, resp_read->data.cf.b_cphs, gv_cf, gv_cphs_cf);
+               telephony_sim_complete_get_call_forwarding(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       resp_read->data.cf.b_cphs, gv_cf, gv_cphs_cf);
        }
        break;
 
        case TRESP_SIM_SET_CALLFORWARDING: {
                const struct tresp_sim_set_data *resp_set_data = data;
 
-               dbg("[%s] SET_CALLFORWARDING - [%s]",
-                       cpname, (resp_set_data->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_SET_CALLFORWARDING - Result: [%s]", cpname,
+                       (resp_set_data->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
-               telephony_sim_complete_set_call_forwarding(dbus_info->interface_object, dbus_info->invocation,
-                               resp_set_data->result);
+               telephony_sim_complete_set_call_forwarding(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_data->result);
        }
        break;
 
@@ -2334,20 +2325,26 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariant *gv_cphs_mw = NULL;
                GVariantBuilder b;
 
-               dbg("[%s] GET_MESSAGEWAITING - [%s] CPHS: [%s]",
+               dbg("[%s] SIM_GET_MESSAGEWAITING - Result: [%s] CPHS: [%s]",
                        cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
                        (resp_read->data.mw.b_cphs ? "Yes" : "No"));
 
                if (resp_read->data.mw.b_cphs) {
                        dbg("[%s] b_voice1[%d], b_voice2[%d], b_fax[%d], b_data[%d]",
-                               cpname, resp_read->data.mw.cphs_mw.b_voice1, resp_read->data.mw.cphs_mw.b_voice2,
-                               resp_read->data.mw.cphs_mw.b_fax, resp_read->data.mw.cphs_mw.b_data);
+                               cpname, resp_read->data.mw.cphs_mw.b_voice1,
+                               resp_read->data.mw.cphs_mw.b_voice2,
+                               resp_read->data.mw.cphs_mw.b_fax,
+                               resp_read->data.mw.cphs_mw.b_data);
 
                        g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "b_voice1",   g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_voice1));
-                       g_variant_builder_add(&b, "{sv}", "b_voice2",   g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_voice2));
-                       g_variant_builder_add(&b, "{sv}", "b_fax",      g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_fax));
-                       g_variant_builder_add(&b, "{sv}", "b_data",     g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_data));
+                       g_variant_builder_add(&b, "{sv}", "b_voice1",
+                               g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_voice1));
+                       g_variant_builder_add(&b, "{sv}", "b_voice2",
+                               g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_voice2));
+                       g_variant_builder_add(&b, "{sv}", "b_fax",
+                               g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_fax));
+                       g_variant_builder_add(&b, "{sv}", "b_data",
+                               g_variant_new_boolean(resp_read->data.mw.cphs_mw.b_data));
                        gv_cphs_mw = g_variant_builder_end(&b);
 
                        g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
@@ -2356,25 +2353,37 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                } else {
                        int i = 0;
 
-                       dbg("[%s] profile_count[%d]", cpname, resp_read->data.mw.mw_list.profile_count);
+                       dbg("[%s] Profile count: [%d]", cpname,
+                               resp_read->data.mw.mw_list.profile_count);
 
                        g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                        for (i = 0; i < resp_read->data.mw.mw_list.profile_count; i++) {
-                               dbg("[%s] mw[%d] : rec_index[0x%x], indicator_status[0x%x], voice_count[0x%x], "
-                                       "fax_count[0x%x] email_count[0x%x], other_count[0x%x], video_count[0x%x]",
-                                       cpname, i, resp_read->data.mw.mw_list.mw[i].rec_index, resp_read->data.mw.mw_list.mw[i].indicator_status,
-                                       resp_read->data.mw.mw_list.mw[i].voice_count, resp_read->data.mw.mw_list.mw[i].fax_count,
-                                       resp_read->data.mw.mw_list.mw[i].email_count, resp_read->data.mw.mw_list.mw[i].other_count,
+                               dbg("[%s] mw[%d] : rec_index[0x%x], indicator_status[0x%x], " \
+                                       "voice_count[0x%x], fax_count[0x%x] email_count[0x%x], " \
+                                       "other_count[0x%x], video_count[0x%x]", cpname, i,
+                                       resp_read->data.mw.mw_list.mw[i].rec_index,
+                                       resp_read->data.mw.mw_list.mw[i].indicator_status,
+                                       resp_read->data.mw.mw_list.mw[i].voice_count,
+                                       resp_read->data.mw.mw_list.mw[i].fax_count,
+                                       resp_read->data.mw.mw_list.mw[i].email_count,
+                                       resp_read->data.mw.mw_list.mw[i].other_count,
                                        resp_read->data.mw.mw_list.mw[i].video_count);
 
                                g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                               g_variant_builder_add(&b, "{sv}", "rec_index", g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].rec_index));
-                               g_variant_builder_add(&b, "{sv}", "indicator_status", g_variant_new_byte(resp_read->data.mw.mw_list.mw[i].indicator_status));
-                               g_variant_builder_add(&b, "{sv}", "voice_count", g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].voice_count));
-                               g_variant_builder_add(&b, "{sv}", "fax_count", g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].fax_count));
-                               g_variant_builder_add(&b, "{sv}", "email_count", g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].email_count));
-                               g_variant_builder_add(&b, "{sv}", "other_count", g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].other_count));
-                               g_variant_builder_add(&b, "{sv}", "video_count", g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].video_count));
+                               g_variant_builder_add(&b, "{sv}", "rec_index",
+                                       g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].rec_index));
+                               g_variant_builder_add(&b, "{sv}", "indicator_status",
+                                       g_variant_new_byte(resp_read->data.mw.mw_list.mw[i].indicator_status));
+                               g_variant_builder_add(&b, "{sv}", "voice_count",
+                                       g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].voice_count));
+                               g_variant_builder_add(&b, "{sv}", "fax_count",
+                                       g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].fax_count));
+                               g_variant_builder_add(&b, "{sv}", "email_count",
+                                       g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].email_count));
+                               g_variant_builder_add(&b, "{sv}", "other_count",
+                                       g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].other_count));
+                               g_variant_builder_add(&b, "{sv}", "video_count",
+                                       g_variant_new_int32(resp_read->data.mw.mw_list.mw[i].video_count));
                                g_variant_builder_close(&b);
                        }
                        gv_mw = g_variant_builder_end(&b);
@@ -2382,19 +2391,20 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                        gv_cphs_mw = g_variant_builder_end(&b);
                }
 
-               telephony_sim_complete_get_message_waiting(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, resp_read->data.mw.b_cphs, gv_mw, gv_cphs_mw);
+               telephony_sim_complete_get_message_waiting(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       resp_read->data.mw.b_cphs, gv_mw, gv_cphs_mw);
        }
        break;
 
        case TRESP_SIM_SET_MESSAGEWAITING: {
                const struct tresp_sim_set_data *resp_set_data = data;
 
-               dbg("[%s] SET_MESSAGEWAITING - [%s]",
+               dbg("[%s] SIM_SET_MESSAGEWAITING - Result: [%s]",
                        cpname, (resp_set_data->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
-               telephony_sim_complete_set_message_waiting(dbus_info->interface_object, dbus_info->invocation,
-                               resp_set_data->result);
+               telephony_sim_complete_set_message_waiting(dbus_info->interface_object,
+                       dbus_info->invocation, resp_set_data->result);
        }
        break;
 
@@ -2404,33 +2414,44 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                int i = 0;
 
-               dbg("[%s] GET_MAILBOX - [%s] CPHS: [%s] Count: [%d])",
+               dbg("[%s] SIM_GET_MAILBOX - Result: [%s] CPHS: [%s] Count: [%d])",
                        cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
                        (resp_read->data.mb.b_cphs ? "Yes" : "No"),
                        resp_read->data.mb.count);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp_read->data.mb.count; i++) {
-                               dbg("[%s] mb[%d] : rec_index[%d], profile_number[%d], mb_type[%d], alpha_id_max_len[%d]"
-                                               "alpha_id[%s], ton[%d], npi[%d], num[%s], cc_id[%d], ext1_id[%d]",
-                                               cpname, i, resp_read->data.mb.mb[i].rec_index, resp_read->data.mb.mb[i].profile_number,
-                                               resp_read->data.mb.mb[i].mb_type, resp_read->data.mb.mb[i].number_info.alpha_id_max_len,
-                                               resp_read->data.mb.mb[i].number_info.alpha_id, resp_read->data.mb.mb[i].number_info.ton,
-                                               resp_read->data.mb.mb[i].number_info.npi, resp_read->data.mb.mb[i].number_info.num,
-                                               resp_read->data.mb.mb[i].number_info.cc_id, resp_read->data.mb.mb[i].number_info.ext1_id);
+                       dbg("[%s] mb[%d] : rec_index[%d], profile_number[%d], mb_type[%d], " \
+                               "alpha_id_max_len[%d]alpha_id[%s], ton[%d], npi[%d], num[%s], " \
+                               "cc_id[%d], ext1_id[%d]", cpname, i,
+                               resp_read->data.mb.mb[i].rec_index, resp_read->data.mb.mb[i].profile_number,
+                               resp_read->data.mb.mb[i].mb_type, resp_read->data.mb.mb[i].number_info.alpha_id_max_len,
+                               resp_read->data.mb.mb[i].number_info.alpha_id, resp_read->data.mb.mb[i].number_info.ton,
+                               resp_read->data.mb.mb[i].number_info.npi, resp_read->data.mb.mb[i].number_info.num,
+                               resp_read->data.mb.mb[i].number_info.cc_id, resp_read->data.mb.mb[i].number_info.ext1_id);
 
-                               g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                               g_variant_builder_add(&b, "{sv}", "rec_index", g_variant_new_int32(resp_read->data.mb.mb[i].rec_index));
-                               g_variant_builder_add(&b, "{sv}", "profile_num", g_variant_new_int32(resp_read->data.mb.mb[i].profile_number));
-                               g_variant_builder_add(&b, "{sv}", "mb_type", g_variant_new_int32(resp_read->data.mb.mb[i].mb_type));
-                               g_variant_builder_add(&b, "{sv}", "alpha_id_max_len", g_variant_new_int32(resp_read->data.mb.mb[i].number_info.alpha_id_max_len));
-                               g_variant_builder_add(&b, "{sv}", "alpha_id", g_variant_new_string(resp_read->data.mb.mb[i].number_info.alpha_id));
-                               g_variant_builder_add(&b, "{sv}", "ton", g_variant_new_int32(resp_read->data.mb.mb[i].number_info.ton));
-                               g_variant_builder_add(&b, "{sv}", "npi", g_variant_new_int32(resp_read->data.mb.mb[i].number_info.npi));
-                               g_variant_builder_add(&b, "{sv}", "num", g_variant_new_string(resp_read->data.mb.mb[i].number_info.num));
-                               g_variant_builder_add(&b, "{sv}", "cc_id", g_variant_new_byte(resp_read->data.mb.mb[i].number_info.cc_id));
-                               g_variant_builder_add(&b, "{sv}", "ext1_id", g_variant_new_byte(resp_read->data.mb.mb[i].number_info.ext1_id));
-                               g_variant_builder_close(&b);
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "rec_index",
+                       g_variant_new_int32(resp_read->data.mb.mb[i].rec_index));
+                       g_variant_builder_add(&b, "{sv}", "profile_num",
+                       g_variant_new_int32(resp_read->data.mb.mb[i].profile_number));
+                       g_variant_builder_add(&b, "{sv}", "mb_type",
+                       g_variant_new_int32(resp_read->data.mb.mb[i].mb_type));
+                       g_variant_builder_add(&b, "{sv}", "alpha_id_max_len",
+                       g_variant_new_int32(resp_read->data.mb.mb[i].number_info.alpha_id_max_len));
+                       g_variant_builder_add(&b, "{sv}", "alpha_id",
+                       g_variant_new_string(resp_read->data.mb.mb[i].number_info.alpha_id));
+                       g_variant_builder_add(&b, "{sv}", "ton",
+                       g_variant_new_int32(resp_read->data.mb.mb[i].number_info.ton));
+                       g_variant_builder_add(&b, "{sv}", "npi",
+                       g_variant_new_int32(resp_read->data.mb.mb[i].number_info.npi));
+                       g_variant_builder_add(&b, "{sv}", "num",
+                       g_variant_new_string(resp_read->data.mb.mb[i].number_info.num));
+                       g_variant_builder_add(&b, "{sv}", "cc_id",
+                       g_variant_new_byte(resp_read->data.mb.mb[i].number_info.cc_id));
+                       g_variant_builder_add(&b, "{sv}", "ext1_id",
+                       g_variant_new_byte(resp_read->data.mb.mb[i].number_info.ext1_id));
+                       g_variant_builder_close(&b);
                }
 
                gv = g_variant_builder_end(&b);
@@ -2443,8 +2464,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_SIM_SET_MAILBOX: {
                const struct tresp_sim_set_data *resp_set_data = data;
 
-               dbg("[%s] SET_MAILBOX - [%s]",
-                       cpname, (resp_set_data->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_SET_MAILBOX - Result: [%s]", cpname,
+                       (resp_set_data->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                telephony_sim_complete_set_mailbox(dbus_info->interface_object,
                        dbus_info->invocation, resp_set_data->result);
@@ -2454,11 +2475,11 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_SIM_GET_CPHS_INFO: {
                const struct tresp_sim_read *resp_read = data;
 
-               dbg("[%s] GET_CPHS_INFO - [%s]",
-                       cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_CPHS_INFO - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
-               telephony_sim_complete_get_cphsinfo(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result,
+               telephony_sim_complete_get_cphsinfo(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
                        resp_read->data.cphs.CphsPhase,
                        resp_read->data.cphs.CphsServiceTable.bOperatorNameShortForm,
                        resp_read->data.cphs.CphsServiceTable.bMailBoxNumbers,
@@ -2476,8 +2497,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariant *svct_gv = NULL;
                int i = 0;
 
-               dbg("[%s] GET_SERVICE_TABLE - [%s]",
-                       cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_SERVICE_TABLE - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                co_sim = __get_sim_co_from_ur(ctx->server, ur);
                if (!co_sim) {
@@ -2491,22 +2512,25 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                        tcore_sim_set_service_table(co_sim, NULL);
 
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
-
                if (resp_read->data.svct.sim_type == SIM_TYPE_GSM) {
                        for (i = 0; i < SIM_SST_SERVICE_CNT_MAX; i++)
-                               g_variant_builder_add(&builder, "y", resp_read->data.svct.table.sst.service[i]);
+                               g_variant_builder_add(&builder, "y",
+                                       resp_read->data.svct.table.sst.service[i]);
                } else if (resp_read->data.svct.sim_type == SIM_TYPE_USIM) {
                        for (i = 0; i < SIM_UST_SERVICE_CNT_MAX; i++)
-                               g_variant_builder_add(&builder, "y", resp_read->data.svct.table.ust.service[i]);
+                               g_variant_builder_add(&builder, "y",
+                                       resp_read->data.svct.table.ust.service[i]);
                } else if (resp_read->data.svct.sim_type == SIM_TYPE_RUIM) {
                        if (SIM_CDMA_SVC_TABLE == resp_read->data.svct.table.cst.cdma_svc_table) {
                                for (i = 0; i < SIM_CDMA_ST_SERVICE_CNT_MAX; i++) {
-                                       g_variant_builder_add(&builder, "iy", resp_read->data.svct.table.cst.cdma_svc_table,
+                                       g_variant_builder_add(&builder, "iy",
+                                               resp_read->data.svct.table.cst.cdma_svc_table,
                                                resp_read->data.svct.table.cst.service.cdma_service[i]);
                                }
                        } else if (SIM_CSIM_SVC_TABLE == resp_read->data.svct.table.cst.cdma_svc_table) {
                                for (i = 0; i < SIM_CSIM_ST_SERVICE_CNT_MAX; i++) {
-                                       g_variant_builder_add(&builder, "iy", resp_read->data.svct.table.cst.cdma_svc_table,
+                                       g_variant_builder_add(&builder, "iy",
+                                               resp_read->data.svct.table.cst.cdma_svc_table,
                                                resp_read->data.svct.table.cst.service.csim_service[i]);
                                }
                        } else {
@@ -2518,15 +2542,17 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                inner_gv = g_variant_builder_end(&builder);
                svct_gv = g_variant_new("v", inner_gv);
 
-               telephony_sim_complete_get_service_table(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, resp_read->data.svct.sim_type, svct_gv);
-       }       break;
+               telephony_sim_complete_get_service_table(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       resp_read->data.svct.sim_type, svct_gv);
+       }
+       break;
 
        case TRESP_SIM_GET_SPN: {
                const struct tresp_sim_read *resp_read = data;
                CoreObject *co_sim = NULL;
 
-               dbg("[%s] GET_SPN - [%s] Display condition: [%d] SPN: [%s]",
+               dbg("[%s] SIM_GET_SPN - Result: [%s] Display condition: [%d] SPN: [%s]",
                        cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"),
                        resp_read->data.spn.display_condition, (const gchar *)resp_read->data.spn.spn);
 
@@ -2541,8 +2567,9 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                else if (resp_read->result == SIM_ACCESS_FILE_NOT_FOUND)
                        tcore_sim_set_spn(co_sim, NULL);
 
-               telephony_sim_complete_get_spn(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, resp_read->data.spn.display_condition,
+               telephony_sim_complete_get_spn(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       resp_read->data.spn.display_condition,
                        (const gchar *)resp_read->data.spn.spn);
        }
        break;
@@ -2551,8 +2578,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                const struct tresp_sim_read *resp_read = data;
                CoreObject *co_sim = NULL;
 
-               dbg("[%s] GET_CPHS_NETNAME - [%s]",
-                       cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_CPHS_NETNAME - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                co_sim = __get_sim_co_from_ur(ctx->server, ur);
                if (!co_sim) {
@@ -2565,30 +2592,32 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                else if (resp_read->result == SIM_ACCESS_FILE_NOT_FOUND)
                        tcore_sim_set_cphs_netname(co_sim, NULL);
 
-               telephony_sim_complete_get_cphs_net_name(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, (const gchar *)resp_read->data.cphs_net.full_name,
+               telephony_sim_complete_get_cphs_net_name(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       (const gchar *)resp_read->data.cphs_net.full_name,
                        (const gchar *)resp_read->data.cphs_net.short_name);
        }
        break;
 
        case TRESP_SIM_GET_GID: {
                const struct tresp_sim_read *resp_read = data;
-               GVariantBuilder *builder = NULL;
-               GVariant * inner_gv = NULL;
+               GVariantBuilder builder;
+               GVariant *inner_gv = NULL;
                GVariant *gid_gv = NULL;
                int i = 0;
 
-               dbg("[%s] GET_GID - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
-
-               builder = g_variant_builder_new(G_VARIANT_TYPE("ay"));
+               dbg("[%s] SIM_GET_GID - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
+               g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < resp_read->data.gid.GroupIdentifierLen; i++)
-                       g_variant_builder_add(builder, "y", resp_read->data.gid.szGroupIdentifier[i]);
-               inner_gv = g_variant_builder_end(builder);
+                       g_variant_builder_add(&builder, "y", resp_read->data.gid.szGroupIdentifier[i]);
+               inner_gv = g_variant_builder_end(&builder);
                gid_gv = g_variant_new("v", inner_gv);
 
-               telephony_sim_complete_get_gid(dbus_info->interface_object, dbus_info->invocation,
-                       resp_read->result, resp_read->data.gid.GroupIdentifierLen, gid_gv);
+               telephony_sim_complete_get_gid(dbus_info->interface_object,
+                       dbus_info->invocation, resp_read->result,
+                       resp_read->data.gid.GroupIdentifierLen, gid_gv);
        }
        break;
 
@@ -2599,7 +2628,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                int i = 0;
 
-               dbg("[%s] GET_MSISDN - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_MSISDN - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                co_sim = __get_sim_co_from_ur(ctx->server, ur);
                if (!co_sim) {
@@ -2615,21 +2645,30 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
 
                for (i = 0; i < resp_read->data.msisdn_list.count; i++) {
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "name", g_variant_new_string((const gchar *)resp_read->data.msisdn_list.msisdn[i].name));
+                       g_variant_builder_add(&b, "{sv}", "name",
+                               g_variant_new_string((const gchar *)resp_read->data.msisdn_list.msisdn[i].name));
                        if (resp_read->data.msisdn_list.msisdn[i].ton == SIM_TON_INTERNATIONAL) {
                                unsigned char *tmp = (unsigned char *)calloc(SIM_MSISDN_NUMBER_LEN_MAX + 1, 1);
                                if (tmp != NULL) {
                                        tmp[0] = '+';
-                                       strncpy((char *)tmp+1, (const char*)resp_read->data.msisdn_list.msisdn[i].num, SIM_MSISDN_NUMBER_LEN_MAX - 1);
+
+                                       strncpy((char *)tmp + 1,
+                                               (const char*)resp_read->data.msisdn_list.msisdn[i].num,
+                                               SIM_MSISDN_NUMBER_LEN_MAX - 1);
                                        tmp[SIM_MSISDN_NUMBER_LEN_MAX] = '\0';
-                                       g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string((const gchar *)tmp));
+
+                                       g_variant_builder_add(&b, "{sv}", "number",
+                                               g_variant_new_string((const gchar *)tmp));
                                        free(tmp);
                                } else {
-                                       dbg("calloc failed.");
-                                       g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string((const gchar *)resp_read->data.msisdn_list.msisdn[i].num));
+                                       dbg("Memory allocation failed");
+
+                                       g_variant_builder_add(&b, "{sv}", "number",
+                                               g_variant_new_string((const gchar *)resp_read->data.msisdn_list.msisdn[i].num));
                                }
                        } else {
-                               g_variant_builder_add(&b, "{sv}", "number", g_variant_new_string((const gchar *)resp_read->data.msisdn_list.msisdn[i].num));
+                               g_variant_builder_add(&b, "{sv}", "number",
+                                       g_variant_new_string((const gchar *)resp_read->data.msisdn_list.msisdn[i].num));
                        }
                        g_variant_builder_close(&b);
                }
@@ -2646,14 +2685,18 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                int i = 0;
 
-               dbg("[%s] GET_OPLMNWACT - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_OPLMNWACT - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp_read->data.opwa.opwa_count; i++) {
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "plmn", g_variant_new_string((const gchar *)resp_read->data.opwa.opwa[i].plmn));
-                       g_variant_builder_add(&b, "{sv}", "b_umts", g_variant_new_boolean(resp_read->data.opwa.opwa[i].b_umts));
-                       g_variant_builder_add(&b, "{sv}", "b_gsm", g_variant_new_boolean(resp_read->data.opwa.opwa[i].b_gsm));
+                       g_variant_builder_add(&b, "{sv}", "plmn",
+                               g_variant_new_string((const gchar *)resp_read->data.opwa.opwa[i].plmn));
+                       g_variant_builder_add(&b, "{sv}", "b_umts",
+                               g_variant_new_boolean(resp_read->data.opwa.opwa[i].b_umts));
+                       g_variant_builder_add(&b, "{sv}", "b_gsm",
+                               g_variant_new_boolean(resp_read->data.opwa.opwa[i].b_gsm));
                        g_variant_builder_close(&b);
                }
                gv = g_variant_builder_end(&b);
@@ -2676,86 +2719,84 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariant *resp_gv = NULL;
                int i = 0;
 
-               dbg("[%s] REQ_AUTHENTICATION - [%s]", cpname, (resp_auth->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_REQ_AUTHENTICATION - Result: [%s]", cpname,
+                       (resp_auth->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
-               tcore_util_hex_dump("[AUTH_KEY] ", resp_auth->authentication_key_length, resp_auth->authentication_key);
+               tcore_util_hex_dump("[AUTH_KEY] ",
+                       resp_auth->authentication_key_length, resp_auth->authentication_key);
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)resp_auth->authentication_key_length; i++)
                        g_variant_builder_add(&builder, "y", resp_auth->authentication_key[i]);
                ak = g_variant_builder_end(&builder);
                ak_gv = g_variant_new("v", ak);
 
-               tcore_util_hex_dump("[CIPHER_DATA] ", resp_auth->cipher_length, resp_auth->cipher_data);
+               tcore_util_hex_dump("[CIPHER_DATA] ",
+                       resp_auth->cipher_length, resp_auth->cipher_data);
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)resp_auth->cipher_length; i++)
                        g_variant_builder_add(&builder, "y", resp_auth->cipher_data[i]);
                cp = g_variant_builder_end(&builder);
                cp_gv = g_variant_new("v", cp);
 
-               tcore_util_hex_dump("[INTEGRITY_DATA] ", resp_auth->integrity_length, resp_auth->integrity_data);
+               tcore_util_hex_dump("[INTEGRITY_DATA] ",
+                       resp_auth->integrity_length, resp_auth->integrity_data);
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)resp_auth->integrity_length; i++)
                        g_variant_builder_add(&builder, "y", resp_auth->integrity_data[i]);
                it = g_variant_builder_end(&builder);
                it_gv = g_variant_new("v", it);
 
-               tcore_util_hex_dump("[RESP_DATA] ", resp_auth->resp_length, resp_auth->resp_data);
+               tcore_util_hex_dump("[RESP_DATA] ",
+                       resp_auth->resp_length, resp_auth->resp_data);
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)resp_auth->resp_length; i++)
                        g_variant_builder_add(&builder, "y", resp_auth->resp_data[i]);
                resp = g_variant_builder_end(&builder);
                resp_gv = g_variant_new("v", resp);
 
-               telephony_sim_complete_authentication(dbus_info->interface_object, dbus_info->invocation,
-                               resp_auth->result,
-                               resp_auth->auth_type,
-                               resp_auth->auth_result,
-                               ak_gv,
-                               cp_gv,
-                               it_gv,
-                               resp_gv);
+               telephony_sim_complete_authentication(dbus_info->interface_object,
+                       dbus_info->invocation, resp_auth->result,
+                       resp_auth->auth_type, resp_auth->auth_result,
+                       ak_gv, cp_gv, it_gv, resp_gv);
        }
        break;
 
        case TRESP_SIM_VERIFY_PINS: {
                const struct tresp_sim_verify_pins *resp_verify_pins = data;
 
-               dbg("[%s] VERIFY_PINS - [%s] PIN Type: [%d] Re-try count: [%d]",
+               dbg("[%s] SIM_VERIFY_PINS - Result: [%s] PIN Type: [%d] Re-try count: [%d]",
                        cpname, (resp_verify_pins->result == SIM_PIN_OPERATION_SUCCESS ? "Success" : "Fail"),
                        resp_verify_pins->pin_type, resp_verify_pins->retry_count);
 
-               telephony_sim_complete_verify_sec(dbus_info->interface_object, dbus_info->invocation,
-                               resp_verify_pins->result,
-                               resp_verify_pins->pin_type,
-                               resp_verify_pins->retry_count);
+               telephony_sim_complete_verify_sec(dbus_info->interface_object,
+                       dbus_info->invocation, resp_verify_pins->result,
+                       resp_verify_pins->pin_type, resp_verify_pins->retry_count);
        }
        break;
 
        case TRESP_SIM_VERIFY_PUKS: {
                const struct tresp_sim_verify_puks *resp_verify_puks = data;
 
-               dbg("[%s] VERIFY_PUKS - [%s] PIN Type: [%d] Re-try count: [%d]",
+               dbg("[%s] SIM_VERIFY_PUKS - Result: [%s] PIN Type: [%d] Re-try count: [%d]",
                        cpname, (resp_verify_puks->result == SIM_PIN_OPERATION_SUCCESS ? "Success" : "Fail"),
                        resp_verify_puks->pin_type, resp_verify_puks->retry_count);
 
-               telephony_sim_complete_verify_puk(dbus_info->interface_object, dbus_info->invocation,
-                               resp_verify_puks->result,
-                               resp_verify_puks->pin_type,
-                               resp_verify_puks->retry_count);
+               telephony_sim_complete_verify_puk(dbus_info->interface_object,
+                       dbus_info->invocation, resp_verify_puks->result,
+                       resp_verify_puks->pin_type, resp_verify_puks->retry_count);
        }
        break;
 
        case TRESP_SIM_CHANGE_PINS: {
                const struct tresp_sim_change_pins *resp_change_pins = data;
 
-               dbg("[%s] CHANGE_PINS - [%s] PIN Type: [%d] Re-try count: [%d]",
+               dbg("[%s] SIM_CHANGE_PINS - Result: [%s] PIN Type: [%d] Re-try count: [%d]",
                        cpname, (resp_change_pins->result == SIM_PIN_OPERATION_SUCCESS ? "Success" : "Fail"),
                        resp_change_pins->pin_type, resp_change_pins->retry_count);
 
-               telephony_sim_complete_change_pin(dbus_info->interface_object, dbus_info->invocation,
-                               resp_change_pins->result,
-                               resp_change_pins->pin_type,
-                               resp_change_pins->retry_count);
+               telephony_sim_complete_change_pin(dbus_info->interface_object,
+                       dbus_info->invocation, resp_change_pins->result,
+                       resp_change_pins->pin_type, resp_change_pins->retry_count);
        }
        break;
 
@@ -2763,7 +2804,7 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                const struct tresp_sim_disable_facility *resp_dis_facility = data;
                gint f_type = 0;
 
-               dbg("[%s] DISABLE_FACILITY - [%s] Type: [%d] Re-try count: [%d]",
+               dbg("[%s] SIM_DISABLE_FACILITY - Result: [%s] Type: [%d] Re-try count: [%d]",
                        cpname, (resp_dis_facility->result == SIM_PIN_OPERATION_SUCCESS ? "Success" : "Fail"),
                        resp_dis_facility->type, resp_dis_facility->retry_count);
 
@@ -2771,33 +2812,39 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                case SIM_FACILITY_PS:
                        f_type = 1;
                break;
+
                case SIM_FACILITY_SC:
                        f_type = 3;
                break;
+
                case SIM_FACILITY_FD:
                        f_type = 4;
                break;
+
                case SIM_FACILITY_PN:
                        f_type = 5;
                break;
+
                case SIM_FACILITY_PU:
                        f_type = 6;
                break;
+
                case SIM_FACILITY_PP:
                        f_type = 7;
                break;
+
                case SIM_FACILITY_PC:
                        f_type = 8;
                break;
+
                default:
-                       err("Unhandled/Unknown type[0x%x]", resp_dis_facility->type);
+                       err("Unhandled/Unknown Facility type: [0x%x]", resp_dis_facility->type);
                break;
                }
 
-               telephony_sim_complete_disable_facility(dbus_info->interface_object, dbus_info->invocation,
-                               resp_dis_facility->result,
-                               f_type,
-                               resp_dis_facility->retry_count);
+               telephony_sim_complete_disable_facility(dbus_info->interface_object,
+                       dbus_info->invocation, resp_dis_facility->result,
+                       f_type, resp_dis_facility->retry_count);
        }
        break;
 
@@ -2805,7 +2852,7 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                const struct tresp_sim_enable_facility *resp_en_facility = data;
                gint f_type = 0;
 
-               dbg("[%s] ENABLE_FACILITY - [%s] Type: [%d] Re-try count: [%d]",
+               dbg("[%s] SIM_ENABLE_FACILITY - Result: [%s] Type: [%d] Re-try count: [%d]",
                        cpname, (resp_en_facility->result == SIM_PIN_OPERATION_SUCCESS ? "Success" : "Fail"),
                        resp_en_facility->type, resp_en_facility->retry_count);
 
@@ -2813,33 +2860,39 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                case SIM_FACILITY_PS:
                        f_type = 1;
                break;
+
                case SIM_FACILITY_SC:
                        f_type = 3;
                break;
+
                case SIM_FACILITY_FD:
                        f_type = 4;
                break;
+
                case SIM_FACILITY_PN:
                        f_type = 5;
                break;
+
                case SIM_FACILITY_PU:
                        f_type = 6;
                break;
+
                case SIM_FACILITY_PP:
                        f_type = 7;
                break;
+
                case SIM_FACILITY_PC:
                        f_type = 8;
                break;
+
                default:
-                       err("Unhandled/Unknown type[0x%x]", resp_en_facility->type);
+                       err("Unhandled/Unknown Facility type: [0x%x]", resp_en_facility->type);
                break;
                }
 
-               telephony_sim_complete_enable_facility(dbus_info->interface_object, dbus_info->invocation,
-                               resp_en_facility->result,
-                               f_type,
-                               resp_en_facility->retry_count);
+               telephony_sim_complete_enable_facility(dbus_info->interface_object,
+                       dbus_info->invocation, resp_en_facility->result,
+                       f_type, resp_en_facility->retry_count);
        }
        break;
 
@@ -2847,7 +2900,7 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                const struct tresp_sim_get_facility_status *resp_get_facility = data;
                gint f_type = 0;
 
-               dbg("[%s] GET_FACILITY_STATUS - [%s] Type: [%d] Enable: [%s]",
+               dbg("[%s] SIM_GET_FACILITY_STATUS - Result: [%s] Type: [%d] Enable: [%s]",
                        cpname, (resp_get_facility->result == SIM_PIN_OPERATION_SUCCESS ? "Success" : "Fail"),
                        resp_get_facility->type,
                        (resp_get_facility->b_enable ? "Yes" : "No"));
@@ -2856,33 +2909,39 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                case SIM_FACILITY_PS:
                        f_type = 1;
                break;
+
                case SIM_FACILITY_SC:
                        f_type = 3;
                break;
+
                case SIM_FACILITY_FD:
                        f_type = 4;
                break;
+
                case SIM_FACILITY_PN:
                        f_type = 5;
                break;
+
                case SIM_FACILITY_PU:
                        f_type = 6;
                break;
+
                case SIM_FACILITY_PP:
                        f_type = 7;
                break;
+
                case SIM_FACILITY_PC:
                        f_type = 8;
                break;
+
                default:
-                       err("Unhandled/Unknown type[0x%x]", resp_get_facility->type);
+                       err("Unhandled/Unknown Facility type: [0x%x]", resp_get_facility->type);
                break;
                }
 
-               telephony_sim_complete_get_facility(dbus_info->interface_object, dbus_info->invocation,
-                               resp_get_facility->result,
-                               f_type,
-                               resp_get_facility->b_enable);
+               telephony_sim_complete_get_facility(dbus_info->interface_object,
+                       dbus_info->invocation, resp_get_facility->result,
+                       f_type, resp_get_facility->b_enable);
        }
        break;
 
@@ -2890,7 +2949,7 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                const struct tresp_sim_get_lock_info *resp_lock = data;
                gint f_type = 0;
 
-               dbg("[%s] GET_LOCK_INFO - [%s] Type: [%d] Re-try count: [%d]",
+               dbg("[%s] SIM_GET_LOCK_INFO - Result: [%s] Type: [%d] Re-try count: [%d]",
                        cpname, (resp_lock->result == SIM_PIN_OPERATION_SUCCESS ? "Success" : "Fail"),
                        resp_lock->type, resp_lock->retry_count);
 
@@ -2898,34 +2957,39 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                case SIM_FACILITY_PS:
                        f_type = 1;
                break;
+
                case SIM_FACILITY_SC:
                        f_type = 3;
                break;
+
                case SIM_FACILITY_FD:
                        f_type = 4;
                break;
+
                case SIM_FACILITY_PN:
                        f_type = 5;
                break;
+
                case SIM_FACILITY_PU:
                        f_type = 6;
                break;
+
                case SIM_FACILITY_PP:
                        f_type = 7;
                break;
+
                case SIM_FACILITY_PC:
                        f_type = 8;
                break;
+
                default:
-                       err("Unhandled/Unknown type[0x%x]", resp_lock->type);
+                       err("Unhandled/Unknown Lock type: [0x%x]", resp_lock->type);
                break;
                }
 
-               telephony_sim_complete_get_lock_info(dbus_info->interface_object, dbus_info->invocation,
-                               resp_lock->result,
-                               f_type,
-                               resp_lock->lock_status,
-                               resp_lock->retry_count);
+               telephony_sim_complete_get_lock_info(dbus_info->interface_object,
+                       dbus_info->invocation, resp_lock->result,
+                       f_type, resp_lock->lock_status, resp_lock->retry_count);
        }
        break;
 
@@ -2936,9 +3000,11 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariant *inner_gv = NULL;
                int i = 0;
 
-               dbg("[%s] TRANSMIT_APDU - [%s]",
-                       cpname, (resp_apdu->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
-               tcore_util_hex_dump("[APDU_RESP] ",     resp_apdu->apdu_resp_length, resp_apdu->apdu_resp);
+               dbg("[%s] SIM_TRANSMIT_APDU - Result: [%s]", cpname,
+                       (resp_apdu->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+
+               tcore_util_hex_dump("[APDU_RESP] ",
+                       resp_apdu->apdu_resp_length, resp_apdu->apdu_resp);
 
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)resp_apdu->apdu_resp_length; i++)
@@ -2946,9 +3012,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                inner_gv = g_variant_builder_end(&builder);
                apdu_gv = g_variant_new("v", inner_gv);
 
-               telephony_sim_complete_transfer_apdu(dbus_info->interface_object, dbus_info->invocation,
-                               resp_apdu->result,
-                               apdu_gv);
+               telephony_sim_complete_transfer_apdu(dbus_info->interface_object,
+                       dbus_info->invocation, resp_apdu->result, apdu_gv);
        }
        break;
 
@@ -2959,8 +3024,11 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariant *inner_gv = NULL;
                int i = 0;
 
-               dbg("[%s] GET_ATR - [%s]", cpname, (resp_get_atr->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
-               tcore_util_hex_dump("[ATR_RESP] ", resp_get_atr->atr_length, resp_get_atr->atr);
+               dbg("[%s] SIM_GET_ATR - Result: [%s]", cpname,
+                       (resp_get_atr->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+
+               tcore_util_hex_dump("[ATR_RESP] ",
+                       resp_get_atr->atr_length, resp_get_atr->atr);
 
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)resp_get_atr->atr_length; i++)
@@ -2968,26 +3036,27 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                inner_gv = g_variant_builder_end(&builder);
                atr_gv = g_variant_new("v", inner_gv);
 
-               telephony_sim_complete_get_atr(dbus_info->interface_object, dbus_info->invocation,
-                               resp_get_atr->result,
-                               atr_gv);
+               telephony_sim_complete_get_atr(dbus_info->interface_object,
+                       dbus_info->invocation, resp_get_atr->result, atr_gv);
        }
        break;
 
        case TRESP_SIM_SET_POWERSTATE: {
                const struct tresp_sim_set_powerstate *resp_power = data;
 
-               info("[%s] SET_POWERSTATE - [%s]", cpname, (resp_power->result == SIM_POWER_SET_SUCCESS ? "Success" : "Fail"));
+               info("[%s] SIM_SET_POWERSTATE - Result: [%s]", cpname,
+                       (resp_power->result == SIM_POWER_SET_SUCCESS ? "Success" : "Fail"));
 
-               telephony_sim_complete_set_powerstate(dbus_info->interface_object, dbus_info->invocation,
-                               resp_power->result);
+               telephony_sim_complete_set_powerstate(dbus_info->interface_object,
+                       dbus_info->invocation, resp_power->result);
        }
        break;
 
        case TRESP_SIM_GET_IMPI: {
                const struct tresp_sim_read *resp_read = data;
 
-               dbg("[%s] GET_IMPI - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_IMPI - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                telephony_sim_complete_get_impi(dbus_info->interface_object,
                        dbus_info->invocation, resp_read->result,
@@ -3001,12 +3070,14 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                unsigned int i;
 
-               dbg("[%s] GET_IMPU - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_IMPU - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp_read->data.impu_list.count; i++) {
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "impu", g_variant_new_string(resp_read->data.impu_list.impu[i].impu));
+                       g_variant_builder_add(&b, "{sv}", "impu",
+                               g_variant_new_string(resp_read->data.impu_list.impu[i].impu));
                        g_variant_builder_close(&b);
                }
                gv = g_variant_builder_end(&b);
@@ -3019,7 +3090,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
        case TRESP_SIM_GET_DOMAIN: {
                const struct tresp_sim_read *resp_read = data;
 
-               dbg("[%s] GET_DOMAIN - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_DOMAIN - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                telephony_sim_complete_get_domain(dbus_info->interface_object,
                        dbus_info->invocation, resp_read->result,
@@ -3033,7 +3105,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariantBuilder b;
                unsigned int i;
 
-               dbg("[%s] GET_PCSCF - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_PCSCF - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp_read->data.pcscf_list.count; i++) {
@@ -3058,7 +3131,8 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
                GVariant *inner_gv = NULL;
                int i;
 
-               dbg("[%s] GET_ISIM_SERVICE_TABLE - [%s]", cpname, (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
+               dbg("[%s] SIM_GET_ISIM_SERVICE_TABLE - Result: [%s]", cpname,
+                       (resp_read->result == SIM_ACCESS_SUCCESS ? "Success" : "Fail"));
 
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < SIM_IST_SERVICE_CNT_MAX; i++)
@@ -3072,19 +3146,20 @@ gboolean dbus_plugin_sim_response(struct custom_data *ctx, UserRequest *ur,
        break;
 
        default:
-               err("Unhandled/Unknown Response!!!");
+               err("Unhandled/Unknown Response: [0x%x]", command);
        break;
        }
 
        return TRUE;
 }
 
-gboolean dbus_plugin_sim_notification(struct custom_data *ctx, CoreObject *source,
-       TelephonyObjectSkeleton *object, enum tcore_notification_command command,
-       unsigned int data_len, const void *data)
+gboolean dbus_plugin_sim_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
        TelephonySim *sim;
        const char *cp_name;
+       enum dbus_tapi_sim_slot_id slot_id = SIM_SLOT_PRIMARY;
 
        cp_name = tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
 
@@ -3099,7 +3174,8 @@ gboolean dbus_plugin_sim_notification(struct custom_data *ctx, CoreObject *sourc
                const struct tnoti_sim_status *n_sim_status = data;
                int count = 0;
 
-               info("[%s] SIM_STATUS : [%d]", cp_name, n_sim_status->sim_status);
+               info("[%s] SIM_STATUS - [%d]", cp_name,
+                       n_sim_status->sim_status);
 
 #ifdef ENABLE_KPI_LOGS
                if (n_sim_status->sim_status == SIM_STATUS_INIT_COMPLETED)
@@ -3108,13 +3184,23 @@ gboolean dbus_plugin_sim_notification(struct custom_data *ctx, CoreObject *sourc
 
                telephony_sim_emit_status(sim, n_sim_status->sim_status);
 
-               if (__is_valid_sim_status(ctx->sim1_status))
+               slot_id = get_sim_slot_id_by_cp_name(cp_name);
+               if (slot_id == SIM_SLOT_PRIMARY)
+                       ctx->sim1_status = n_sim_status->sim_status;
+               else if (slot_id == SIM_SLOT_SECONDARY)
+                       ctx->sim2_status = n_sim_status->sim_status;
+               else
+                       warn("NOT handled Slot ID: [%d]", slot_id);
+
+               if (__is_sim_status_valid(ctx->sim1_status))
                        count++;
-               if (__is_valid_sim_status(ctx->sim2_status))
+
+               if (__is_sim_status_valid(ctx->sim2_status))
                        count++;
 
                if (ctx->valid_sim_count != count) {
                        ctx->valid_sim_count = count;
+
                        telephony_manager_emit_sim_inserted(ctx->mgr, count);
                }
        }
@@ -3122,8 +3208,10 @@ gboolean dbus_plugin_sim_notification(struct custom_data *ctx, CoreObject *sourc
 
        case TNOTI_SIM_REFRESHED: {
                const struct tnoti_sim_refreshed *n_sim_refreshed = data;
-               info("[%s] SIM_REFRESHED : b_full_file_changed: [%s] changed_file_count: [%d]",
-                       cp_name, (n_sim_refreshed->b_full_file_changed ? "Yes" : "No"), n_sim_refreshed->file_list.file_count);
+
+               info("[%s] SIM_REFRESHED - b_full_file_changed: [%s] changed_file_count: [%d]",
+                       cp_name, (n_sim_refreshed->b_full_file_changed ? "YES" : "NO"),
+                       n_sim_refreshed->file_list.file_count);
 
                telephony_sim_emit_refreshed(sim, n_sim_refreshed->cmd_type);
        }
@@ -3131,7 +3219,8 @@ gboolean dbus_plugin_sim_notification(struct custom_data *ctx, CoreObject *sourc
 
        case TNOTI_SIM_CALL_FORWARD_STATE: {
                const struct tnoti_sim_call_forward_state *info = data;
-               info("[%s] SIM_CALL_FORWARD_STATE : [%s]",
+
+               info("[%s] SIM_CALL_FORWARD_STATE - Call Forwarding: [%s]",
                        cp_name, info->b_forward ? "ON" : "OFF");
 
                telephony_sim_set_cf_state(sim, info->b_forward);
@@ -3139,7 +3228,7 @@ gboolean dbus_plugin_sim_notification(struct custom_data *ctx, CoreObject *sourc
        break;
 
        default:
-               err("Unhandled/Unknown Notification!!!");
+               err("Unhandled/Unknown Notification: [0x%x]", command);
        break;
        }
 
similarity index 50%
rename from src/sms.c
rename to src/dtapi_sms.c
index 65acbbf..5746a96 100644 (file)
--- a/src/sms.c
@@ -1,5 +1,5 @@
 /*
- * tel-plugin-socket-communicator
+ * tel-plugin-dbus-tapi
  *
  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
 
 #include <stdio.h>
 #include <string.h>
-#include <pthread.h>
-#include <unistd.h>
 #include <stdlib.h>
-#include <time.h>
+
 #include <glib.h>
-#include <gio/gio.h>
 
 #include <tcore.h>
 #include <server.h>
 #include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <storage.h>
-#include <queue.h>
-#include <user_request.h>
 #include <co_sms.h>
 
 #include "generated-code.h"
-#include "common.h"
-
-static gboolean
-on_sms_send_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint format,
-       GVariant *sca,
-       gint tpdu_length,
-       GVariant *tpdu_data,
-       gint moreMsg,
-       gpointer user_data)
+#include "dtapi_common.h"
+
+static gboolean on_sms_send_msg(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint format, GVariant *sca,
+       gint tpdu_length, GVariant *tpdu_data,
+       gint more_msg, gpointer user_data)
 {
-       struct treq_sms_send_msg sendMsg;
+       struct treq_sms_send_msg req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
+       enum tcore_request_command command;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        int i = 0;
-       GVariantIter *iter = 0;
-       GVariant *inner_gv = 0;
+       GVariantIter *iter = NULL;
+       GVariant *inner_gv = NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "x"))
                return TRUE;
 
-       memset(&sendMsg, 0 , sizeof(struct treq_sms_send_msg));
+       memset(&req, 0x0, sizeof(struct treq_sms_send_msg));
+
+       if (SMS_NETTYPE_3GPP == format) {
+               command =  TREQ_SMS_SEND_UMTS_MSG;
+       } else if (SMS_NETTYPE_3GPP2 == format) {
+               command = TREQ_SMS_SEND_CDMA_MSG;
+       } else {
+               err("Invalid Format Received:[%d]", format);
+
+               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+
+               return TRUE;
+       }
 
        inner_gv = g_variant_get_variant(sca);
        g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &sendMsg.msgDataPackage.sca[i])) {
+       while (g_variant_iter_loop(iter, "y", &req.msgDataPackage.sca[i])) {
                i++;
                if (i >= SMS_SMSP_ADDRESS_LEN)
                        break;
        }
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
 
-       sendMsg.msgDataPackage.msgLength = tpdu_length;
+       req.msgDataPackage.msgLength = tpdu_length;
 
        i = 0;
        inner_gv = g_variant_get_variant(tpdu_data);
        g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &sendMsg.msgDataPackage.tpduData[i])) {
+       while (g_variant_iter_loop(iter, "y", &req.msgDataPackage.tpduData[i])) {
                i++;
                if (i >= SMS_SMDATA_SIZE_MAX + 1)
                        break;
@@ -85,109 +87,82 @@ on_sms_send_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
        g_variant_iter_free(iter);
        g_variant_unref(inner_gv);
 
-       sendMsg.msgDataPackage.format = format;
-       sendMsg.more = moreMsg;
-
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_send_msg), &sendMsg);
-
-       if (SMS_NETTYPE_3GPP == format) {
-               tcore_user_request_set_command(ur, TREQ_SMS_SEND_UMTS_MSG);
-       } else if (SMS_NETTYPE_3GPP2 == format) {
-               tcore_user_request_set_command(ur, TREQ_SMS_SEND_CDMA_MSG);
-       } else {
-               err("Invalid Format Received:[%d]", format);
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-               return TRUE;
-       }
+       req.msgDataPackage.format = format;
+       req.more = more_msg;
 
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               command,
+               &req, sizeof(struct treq_sms_send_msg));
 
        return  TRUE;
 }
 
-static gboolean
-on_sms_read_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_index,
-       gpointer user_data)
+static gboolean on_sms_read_msg(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gint msg_index, gpointer user_data)
 {
-       struct treq_sms_read_msg readMsg = {0,};
+       struct treq_sms_read_msg req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "r"))
                return TRUE;
 
-       readMsg.index = arg_index;
-
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_read_msg), &readMsg);
-       tcore_user_request_set_command(ur, TREQ_SMS_READ_MSG);
+       req.index = msg_index;
 
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_READ_MSG,
+               &req, sizeof(struct treq_sms_read_msg));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_save_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint format,
-       gint arg_msg_status,
-       GVariant * arg_sca,
-       gint arg_tpdu_length,
-       GVariant * arg_tpdu_data,
-       gpointer user_data)
+static gboolean on_sms_save_msg(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint format, gint msg_status, GVariant *sca,
+       gint tpdu_length, GVariant *tpdu_data, gpointer user_data)
 {
-       struct treq_sms_save_msg saveMsg = {0,};
+       struct treq_sms_save_msg req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        int i = 0;
-       GVariantIter *iter = 0;
-       GVariant *inner_gv = 0;
+       GVariantIter *iter = NULL;
+       GVariant *inner_gv = NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
        if (SMS_NETTYPE_3GPP == format) {
-               saveMsg.msgDataPackage.format = SMS_NETTYPE_3GPP;
+               req.msgDataPackage.format = SMS_NETTYPE_3GPP;
        } else if (SMS_NETTYPE_3GPP2 == format) {
-               saveMsg.msgDataPackage.format = SMS_NETTYPE_3GPP2;
+               req.msgDataPackage.format = SMS_NETTYPE_3GPP2;
        } else {
                err("Invalid Format Received:[%d]", format);
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
+
                return TRUE;
        }
 
-       saveMsg.simIndex = 0xffff;
-       saveMsg.msgStatus = arg_msg_status;
+       req.simIndex = 0xffff;
+       req.msgStatus = msg_status;
 
-       inner_gv = g_variant_get_variant(arg_sca);
+       inner_gv = g_variant_get_variant(sca);
        g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &saveMsg.msgDataPackage.sca[i])) {
+       while (g_variant_iter_loop(iter, "y", &req.msgDataPackage.sca[i])) {
                i++;
                if (i >= SMS_SMSP_ADDRESS_LEN)
                        break;
        }
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
 
        i = 0;
-       inner_gv = g_variant_get_variant(arg_tpdu_data);
+       inner_gv = g_variant_get_variant(tpdu_data);
        g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &saveMsg.msgDataPackage.tpduData[i])) {
+       while (g_variant_iter_loop(iter, "y", &req.msgDataPackage.tpduData[i])) {
                i++;
                if (i >= SMS_SMDATA_SIZE_MAX + 1)
                        break;
@@ -195,209 +170,157 @@ on_sms_save_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
        g_variant_iter_free(iter);
        g_variant_unref(inner_gv);
 
-       saveMsg.msgDataPackage.msgLength = arg_tpdu_length;
+       req.msgDataPackage.msgLength = tpdu_length;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_save_msg), &saveMsg);
-       tcore_user_request_set_command(ur, TREQ_SMS_SAVE_MSG);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_SAVE_MSG,
+               &req, sizeof(struct treq_sms_save_msg));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_delete_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_index,
-       gpointer user_data)
+static gboolean on_sms_delete_msg(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gint msg_index, gpointer user_data)
 {
-       struct treq_sms_delete_msg deleteMsg = {0,};
+       struct treq_sms_delete_msg req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "x"))
                return TRUE;
 
-       deleteMsg.index = arg_index;
+       req.index = msg_index;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_delete_msg), &deleteMsg);
-       tcore_user_request_set_command(ur, TREQ_SMS_DELETE_MSG);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_DELETE_MSG,
+               &req, sizeof(struct treq_sms_delete_msg));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_get_msg_count(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_sms_get_msg_count(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, 0, NULL);
-       tcore_user_request_set_command(ur, TREQ_SMS_GET_COUNT);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_GET_COUNT,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_sms_get_sca(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_index,
-       gpointer user_data)
+static gboolean on_sms_get_sca(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gint msg_index, gpointer user_data)
 {
-       struct treq_sms_get_sca getSca = {0,};
+       struct treq_sms_get_sca req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "r"))
                return TRUE;
 
-       getSca.index = arg_index;
+       req.index = msg_index;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_sca), &getSca);
-       tcore_user_request_set_command(ur, TREQ_SMS_GET_SCA);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_GET_SCA,
+               &req, sizeof(struct treq_sms_get_sca));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_set_sca(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_index,
-       gint arg_ton,
-       gint arg_npi,
-       gint arg_dialNumberLength,
-       GVariant *arg_dialNumber,
+static gboolean on_sms_set_sca(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint msg_index,
+       gint sca_ton, gint sca_npi, gint sca_length, GVariant *sca,
        gpointer user_data)
 {
-       struct treq_sms_set_sca setSca;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
-       int i = 0;
-       GVariantIter *iter = 0;
-       GVariant *inner_gv = 0;
-
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
-       memset(&setSca, 0, sizeof(struct treq_sms_set_sca));
-
-       setSca.index = arg_index;
-       setSca.scaInfo.dialNumLen = arg_dialNumberLength;
-       setSca.scaInfo.typeOfNum = arg_ton;
-       setSca.scaInfo.numPlanId = arg_npi;
-
-       if ((setSca.scaInfo.dialNumLen <= 0) || (setSca.scaInfo.dialNumLen > (SMS_MAX_SMS_SERVICE_CENTER_ADDR + 1))) {
+       if ((sca_length <= 0)
+                       || (sca_length > (SMS_MAX_SMS_SERVICE_CENTER_ADDR + 1))) {
                err("[tcore_SMS] TAPI_API_INVALID_INPUT !!!");
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               return  TRUE;
-       } else if (setSca.index != 0) {
+       } else if (msg_index != 0) {
                err("[tcore_SMS] Index except 0 is supported");
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               return  TRUE;
        } else {
-               inner_gv = g_variant_get_variant(arg_dialNumber);
+               struct treq_sms_set_sca req;
+
+               int i = 0;
+               GVariantIter *iter = NULL;
+               GVariant *inner_gv = NULL;
+
+               memset(&req, 0, sizeof(struct treq_sms_set_sca));
+
+               req.index = msg_index;
+               req.scaInfo.dialNumLen = sca_length;
+               req.scaInfo.typeOfNum = sca_ton;
+               req.scaInfo.numPlanId = sca_npi;
+
+               inner_gv = g_variant_get_variant(sca);
                g_variant_get(inner_gv, "ay", &iter);
-               while (g_variant_iter_loop(iter, "y", &setSca.scaInfo.diallingNum[i])) {
+               while (g_variant_iter_loop(iter, "y", &req.scaInfo.diallingNum[i])) {
                        i++;
                        if (i >= SMS_SMSP_ADDRESS_LEN + 1)
                                break;
                }
 
-               ur = MAKE_UR(ctx, sms, invocation);
-               tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_sca), &setSca);
-               tcore_user_request_set_command(ur, TREQ_SMS_SET_SCA);
-
                g_variant_iter_free(iter);
                g_variant_unref(inner_gv);
 
-               ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-               if (ret != TCORE_RETURN_SUCCESS) {
-                       FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-                       tcore_user_request_unref(ur);
-               }
+               /* Dispatch request */
+               dtapi_dispatch_request(ctx, sms, invocation,
+                       TREQ_SMS_SET_SCA,
+                       &req, sizeof(struct treq_sms_set_sca));
        }
 
        return TRUE;
 }
 
-static gboolean
-on_sms_get_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_sms_get_cb_config(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, 0, NULL);
-       tcore_user_request_set_command(ur, TREQ_SMS_GET_CB_CONFIG);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_GET_CB_CONFIG,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_sms_set_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_net3gppType,
-       gboolean arg_cbEnable,
-       gint arg_msgIdMaxCount,
-       gint arg_msgIdRangeCount,
-       GVariant *arg_mdgId,
-       gpointer user_data)
+static gboolean on_sms_set_cb_config(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint network_type, gboolean enable_cb,
+       gint msg_id_max_cnt, gint msg_id_range_cnt,
+       GVariant *arg_mdgId, gpointer user_data)
 {
-       struct treq_sms_set_cb_config setCbConfig = {0,};
+       struct treq_sms_set_cb_config req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        GVariant *value = NULL;
-       GVariant *inner_gv = 0;
+       GVariant *inner_gv = NULL;
        GVariantIter *iter = NULL;
        GVariantIter *iter_row = NULL;
        const gchar *key = NULL;
@@ -406,144 +329,110 @@ on_sms_set_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
-       setCbConfig.net3gppType = arg_net3gppType;
-       setCbConfig.cbEnabled = arg_cbEnable;
-       setCbConfig.msgIdMaxCount = arg_msgIdMaxCount;
-       setCbConfig.msgIdRangeCount = arg_msgIdRangeCount;
+       req.net3gppType = network_type;
+       req.cbEnabled = enable_cb;
+       req.msgIdMaxCount = msg_id_max_cnt;
+       req.msgIdRangeCount = msg_id_range_cnt;
 
        inner_gv = g_variant_get_variant(arg_mdgId);
        g_variant_get(inner_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, "FromMsgId"))
-                               setCbConfig.msgIDs[i].net3gpp.fromMsgId = g_variant_get_uint16(value);
-                       if (!g_strcmp0(key, "ToMsgId"))
-                               setCbConfig.msgIDs[i].net3gpp.toMsgId = g_variant_get_uint16(value);
-                       if (!g_strcmp0(key, "CBCategory"))
-                               setCbConfig.msgIDs[i].net3gpp2.cbCategory = g_variant_get_uint16(value);
-                       if (!g_strcmp0(key, "CBLanguage"))
-                               setCbConfig.msgIDs[i].net3gpp2.cbLanguage = g_variant_get_uint16(value);
-                       if (!g_strcmp0(key, "Selected"))
-                               setCbConfig.msgIDs[i].net3gpp2.selected = g_variant_get_byte(value);
+                               req.msgIDs[i].net3gpp.fromMsgId = g_variant_get_uint16(value);
+                       else if (!g_strcmp0(key, "ToMsgId"))
+                               req.msgIDs[i].net3gpp.toMsgId = g_variant_get_uint16(value);
+                       else if (!g_strcmp0(key, "CBCategory"))
+                               req.msgIDs[i].net3gpp2.cbCategory = g_variant_get_uint16(value);
+                       else if (!g_strcmp0(key, "CBLanguage"))
+                               req.msgIDs[i].net3gpp2.cbLanguage = g_variant_get_uint16(value);
+                       else if (!g_strcmp0(key, "Selected"))
+                               req.msgIDs[i].net3gpp2.selected = g_variant_get_byte(value);
                }
-               i++;
                g_variant_iter_free(iter_row);
+
+               i++;
                if (i >= SMS_GSM_SMS_CBMI_LIST_SIZE_MAX)
                        break;
        }
        g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_cb_config), &setCbConfig);
-       tcore_user_request_set_command(ur, TREQ_SMS_SET_CB_CONFIG);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_SET_CB_CONFIG,
+               &req, sizeof(struct treq_sms_set_cb_config));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_set_mem_status(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_memoryStatus,
-       gpointer user_data)
+static gboolean on_sms_set_mem_status(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint memory_status, gpointer user_data)
 {
-       struct treq_sms_set_mem_status memStatus = {0,};
+       struct treq_sms_set_mem_status req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
-       memStatus.memory_status = arg_memoryStatus;
+       req.memory_status = memory_status;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_mem_status), &memStatus);
-       tcore_user_request_set_command(ur, TREQ_SMS_SET_MEM_STATUS);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_SET_MEM_STATUS,
+               &req, sizeof(struct treq_sms_set_mem_status));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_get_pref_bearer(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_sms_get_pref_bearer(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
-       struct treq_sms_get_pref_bearer getPrefBearer;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_pref_bearer), &getPrefBearer);
-       tcore_user_request_set_command(ur, TREQ_SMS_GET_PREF_BEARER);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_GET_PREF_BEARER,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_sms_set_pref_bearer(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_bearerType,
-       gpointer user_data)
+static gboolean on_sms_set_pref_bearer(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint bearer_type, gpointer user_data)
 {
-       struct treq_sms_set_pref_bearer setPrefBearer = {0,};
+       struct treq_sms_set_pref_bearer req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
-       setPrefBearer.svc = arg_bearerType;
-
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_pref_bearer), &setPrefBearer);
-       tcore_user_request_set_command(ur, TREQ_SMS_SET_PREF_BEARER);
+       req.svc = bearer_type;
 
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_SET_PREF_BEARER,
+               &req, sizeof(struct treq_sms_set_pref_bearer));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_set_delivery_report(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint format,
-       const gchar *arg_sca,
-       gint arg_tpdu_length,
-       const gchar *arg_tpdu_data,
-       gint arg_rpCause,
-       gpointer user_data)
+static gboolean on_sms_set_delivery_report(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint format, const gchar *sca,
+       gint tpdu_length, const gchar *tpdu_data,
+       gint rp_cause, gpointer user_data)
 {
-       struct treq_sms_set_delivery_report deliveryReport;
+       struct treq_sms_set_delivery_report req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        guchar *decoded_sca = NULL;
@@ -555,256 +444,212 @@ on_sms_set_delivery_report(TelephonySms *sms, GDBusMethodInvocation *invocation,
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
-       memset(&deliveryReport, 0, sizeof(struct treq_sms_set_delivery_report));
+       memset(&req, 0, sizeof(struct treq_sms_set_delivery_report));
 
        if (SMS_NETTYPE_3GPP == format) {
-               deliveryReport.dataInfo.format = SMS_NETTYPE_3GPP;
+               req.dataInfo.format = SMS_NETTYPE_3GPP;
        } else if (SMS_NETTYPE_3GPP2 == format) {
-               deliveryReport.dataInfo.format = SMS_NETTYPE_3GPP2;
+               req.dataInfo.format = SMS_NETTYPE_3GPP2;
        } else {
                err("Invalid Format Received:[%d]", format);
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
+
                return TRUE;
        }
 
-       decoded_sca = g_base64_decode(arg_sca, &decoded_sca_len);
+       decoded_sca = g_base64_decode(sca, &decoded_sca_len);
        if (NULL == decoded_sca) {
                warn("g_base64_decode: Failed to decode sca");
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               return TRUE;
-       }
 
-       if (decoded_sca_len > SMS_SMSP_ADDRESS_LEN) {
+               return TRUE;
+       } else if (decoded_sca_len > SMS_SMSP_ADDRESS_LEN) {
                err("Invalid Sca length");
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+
                goto EXIT;
        }
-       memcpy(deliveryReport.dataInfo.sca, decoded_sca, decoded_sca_len);
+       memcpy(req.dataInfo.sca, decoded_sca, decoded_sca_len);
 
-       decoded_tpdu = g_base64_decode(arg_tpdu_data, &decoded_tpdu_len);
+       decoded_tpdu = g_base64_decode(tpdu_data, &decoded_tpdu_len);
        if (NULL == decoded_tpdu) {
                warn("g_base64_decode: Failed to decode tpdu");
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
                goto EXIT;
-       }
-
-       info("[%s] Decoded SCA len:(%d) TPDU len:(%d)", GET_CP_NAME(invocation), decoded_sca_len, decoded_tpdu_len);
-
-       if (decoded_tpdu_len > SMS_SMDATA_SIZE_MAX+1) {
+       } else if (decoded_tpdu_len > SMS_SMDATA_SIZE_MAX+1) {
                err("Invalid tpdu length");
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+
                goto EXIT;
        }
-       memcpy(deliveryReport.dataInfo.tpduData, decoded_tpdu, decoded_tpdu_len);
+       memcpy(req.dataInfo.tpduData, decoded_tpdu, decoded_tpdu_len);
 
-       deliveryReport.dataInfo.msgLength = arg_tpdu_length;
-       deliveryReport.rspType = arg_rpCause;
+       info("[%s] Decoded SCA len: [%d] TPDU len: [%d]", GET_CP_NAME(invocation),
+               decoded_sca_len, decoded_tpdu_len);
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_delivery_report), &deliveryReport);
-       tcore_user_request_set_command(ur, TREQ_SMS_SET_DELIVERY_REPORT);
+       req.dataInfo.msgLength = tpdu_length;
+       req.rspType = rp_cause;
 
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_SET_DELIVERY_REPORT,
+               &req, sizeof(struct treq_sms_set_delivery_report));
 
 EXIT:
-
        g_free(decoded_sca);
        g_free(decoded_tpdu);
 
        return TRUE;
 }
 
-static gboolean
-on_sms_set_msg_status(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_index,
-       gint arg_msgStatus,
-       gpointer user_data)
+static gboolean on_sms_set_msg_status(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint msg_index, gint msg_status, gpointer user_data)
 {
-       struct treq_sms_set_msg_status msgStatus = {0,};
+       struct treq_sms_set_msg_status req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
-       msgStatus.index = arg_index;
-       msgStatus.msgStatus = arg_msgStatus;
+       req.index = msg_index;
+       req.msgStatus = msg_status;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_msg_status), &msgStatus);
-       tcore_user_request_set_command(ur, TREQ_SMS_SET_MSG_STATUS);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_SET_MSG_STATUS,
+               &req, sizeof(struct treq_sms_set_msg_status));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_get_sms_params(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_index,
-       gpointer user_data)
+static gboolean on_sms_get_sms_params(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint msg_index, gpointer user_data)
 {
-       struct treq_sms_get_params getParams = {0,};
+       struct treq_sms_get_params req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "r"))
                return TRUE;
 
-       getParams.index = arg_index;
+       req.index = msg_index;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_params), &getParams);
-       tcore_user_request_set_command(ur, TREQ_SMS_GET_PARAMS);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_GET_PARAMS,
+               &req, sizeof(struct treq_sms_get_params));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_set_sms_params(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gint arg_recordIndex,
-       gint arg_recordLen,
-       gint arg_alphaIdLen,
-       GVariant *arg_alphaId,
-       gint arg_paramIndicator,
-       gint arg_destAddr_DialNumLen,
-       gint arg_destAddr_Ton,
-       gint arg_destAddr_Npi,
-       GVariant *arg_destAddr_DiallingNum,
-       gint arg_svcCntrAddr_DialNumLen,
-       gint arg_SvcCntrAddr_Ton,
-       gint arg_svcCntrAddr_Npi,
-       GVariant *arg_svcCntrAddr_DialNum,
-       gint arg_protocolId,
-       gint arg_dataCodingScheme,
-       gint arg_validityPeriod,
+static gboolean on_sms_set_sms_params(TelephonySms *sms,
+       GDBusMethodInvocation *invocation,
+       gint record_index, gint record_len,
+       gint alpha_id_len, GVariant *alpha_id,
+       gint param_indicator,
+       gint dial_num_len, gint dial_num_ton, gint dial_num_npi, GVariant *dial_num,
+       gint sca_len, gint sca_ton, gint sca_npi, GVariant *sca,
+       gint protocol_id, gint dcs, gint validity_period,
        gpointer user_data)
 {
-       struct treq_sms_set_params setParams;
+       struct treq_sms_set_params req;
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        int i = 0;
-       GVariantIter *iter = 0;
-       GVariant *inner_gv = 0;
+       GVariantIter *iter = NULL;
+       GVariant *inner_gv = NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "w"))
                return TRUE;
 
-       memset(&setParams, 0, sizeof(struct treq_sms_set_params));
+       memset(&req, 0x0, sizeof(struct treq_sms_set_params));
 
-       setParams.params.recordIndex = arg_recordIndex;
-       setParams.params.recordLen = arg_recordLen;
-       setParams.params.alphaIdLen = arg_alphaIdLen;
+       req.params.recordIndex = record_index;
+       req.params.recordLen = record_len;
+       req.params.alphaIdLen = alpha_id_len;
 
-       inner_gv = g_variant_get_variant(arg_alphaId);
+       inner_gv = g_variant_get_variant(alpha_id);
        g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &setParams.params.szAlphaId[i])) {
+       while (g_variant_iter_loop(iter, "y", &req.params.szAlphaId[i])) {
                i++;
                if (i >= SMS_SMSP_ALPHA_ID_LEN_MAX + 1)
                        break;
        }
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
 
-       setParams.params.paramIndicator = arg_paramIndicator;
-
-       setParams.params.tpDestAddr.dialNumLen = arg_destAddr_DialNumLen;
-       setParams.params.tpDestAddr.typeOfNum = arg_destAddr_Ton;
-       setParams.params.tpDestAddr.numPlanId = arg_destAddr_Npi;
+       req.params.paramIndicator = param_indicator;
+       req.params.tpDestAddr.dialNumLen = dial_num_len;
+       req.params.tpDestAddr.typeOfNum = dial_num_ton;
+       req.params.tpDestAddr.numPlanId = dial_num_npi;
 
        i = 0;
-       inner_gv = g_variant_get_variant(arg_destAddr_DiallingNum);
+       inner_gv = g_variant_get_variant(dial_num);
        g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &setParams.params.tpDestAddr.diallingNum[i])) {
+       while (g_variant_iter_loop(iter, "y", &req.params.tpDestAddr.diallingNum[i])) {
                i++;
                if (i >= SMS_SMSP_ADDRESS_LEN + 1)
                        break;
        }
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
 
-       setParams.params.tpSvcCntrAddr.dialNumLen = arg_svcCntrAddr_DialNumLen;
-       setParams.params.tpSvcCntrAddr.typeOfNum = arg_SvcCntrAddr_Ton;
-       setParams.params.tpSvcCntrAddr.numPlanId = arg_svcCntrAddr_Npi;
+       req.params.tpSvcCntrAddr.dialNumLen = sca_len;
+       req.params.tpSvcCntrAddr.typeOfNum = sca_ton;
+       req.params.tpSvcCntrAddr.numPlanId = sca_npi;
 
        i = 0;
-       inner_gv = g_variant_get_variant(arg_svcCntrAddr_DialNum);
+       inner_gv = g_variant_get_variant(sca);
        g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &setParams.params.tpSvcCntrAddr.diallingNum[i])) {
+       while (g_variant_iter_loop(iter, "y", &req.params.tpSvcCntrAddr.diallingNum[i])) {
                i++;
                if (i >= SMS_SMSP_ADDRESS_LEN + 1)
                        break;
        }
-
-       setParams.params.tpProtocolId = arg_protocolId;
-       setParams.params.tpDataCodingScheme = arg_dataCodingScheme;
-       setParams.params.tpValidityPeriod = arg_validityPeriod;
-
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_params), &setParams);
-       tcore_user_request_set_command(ur, TREQ_SMS_SET_PARAMS);
-
        g_variant_iter_free(iter);
        g_variant_unref(inner_gv);
 
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       req.params.tpProtocolId = protocol_id;
+       req.params.tpDataCodingScheme = dcs;
+       req.params.tpValidityPeriod = validity_period;
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_SET_PARAMS,
+               &req, sizeof(struct treq_sms_set_params));
 
        return TRUE;
 }
 
-static gboolean
-on_sms_get_sms_param_cnt(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_sms_get_sms_param_cnt(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret = TCORE_RETURN_SUCCESS;
        cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
 
        if (!check_access_control(p_cynara, invocation, AC_SMS, "r"))
                return TRUE;
 
-       ur = MAKE_UR(ctx, sms, invocation);
-       tcore_user_request_set_data(ur, 0, NULL);
-       tcore_user_request_set_command(ur, TREQ_SMS_GET_PARAMCNT);
-
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, sms, invocation,
+               TREQ_SMS_GET_PARAMCNT,
+               NULL, 0);
 
        return TRUE;
 }
 
-static gboolean
-on_sms_get_sms_ready_status(TelephonySms *sms, GDBusMethodInvocation *invocation,
-       gpointer user_data)
+static gboolean on_sms_get_sms_ready_status(TelephonySms *sms,
+       GDBusMethodInvocation *invocation, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
-       GSList *co_list = NULL;
        CoreObject *co_sms = NULL;
        TcorePlugin *plugin = NULL;
        gboolean ready_status = FALSE;
@@ -814,30 +659,25 @@ on_sms_get_sms_ready_status(TelephonySms *sms, GDBusMethodInvocation *invocation
                return TRUE;
 
        plugin = tcore_server_find_plugin(ctx->server, GET_CP_NAME(invocation));
-       co_list = tcore_plugin_get_core_objects_bytype(plugin, CORE_OBJECT_TYPE_SMS);
-       if (!co_list) {
-               err("error- co_list is NULL");
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               return TRUE;
-       }
-
-       co_sms = (CoreObject *)co_list->data;
-       g_slist_free(co_list);
-
+       co_sms = tcore_plugin_ref_core_object(plugin, CORE_OBJECT_TYPE_SMS);
        if (!co_sms) {
-               err("error- co_sms is NULL");
+               err("co_sms is NULL");
+
                FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
+
                return TRUE;
        }
 
        ready_status = tcore_sms_get_ready_status(co_sms);
        dbg("[%s] ready_status = %d", GET_CP_NAME(invocation), ready_status);
+
        telephony_sms_complete_get_sms_ready_status(sms, invocation, ready_status);
 
        return TRUE;
 }
 
-gboolean dbus_plugin_setup_sms_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
+gboolean dbus_plugin_setup_sms_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
 {
        TelephonySms *sms;
 
@@ -845,6 +685,11 @@ gboolean dbus_plugin_setup_sms_interface(TelephonyObjectSkeleton *object, struct
        telephony_object_skeleton_set_sms(object, sms);
        g_object_unref(sms);
 
+       dbg("sms = %p", sms);
+
+       /*
+        * Register signal handlers for SMS interface
+        */
        g_signal_connect(sms,
                "handle-send-msg",
                G_CALLBACK(on_sms_send_msg), ctx);
@@ -920,7 +765,9 @@ gboolean dbus_plugin_setup_sms_interface(TelephonyObjectSkeleton *object, struct
        return TRUE;
 }
 
-gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data)
+gboolean dbus_plugin_sms_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        char *cpname = dbus_info ? GET_CP_NAME(dbus_info->invocation) : "";
 
@@ -929,34 +776,37 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                const struct tresp_sms_send_msg *resp = data;
 
                dbg("[%s] SEND_UMTS_MSG (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_send_msg(dbus_info->interface_object, dbus_info->invocation, resp->result);
-               }
-               break;
+
+               telephony_sms_complete_send_msg(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_SEND_CDMA_MSG: {
                const struct tresp_sms_send_msg *resp = data;
 
                dbg("[%s] SEND_CDMA_MSG (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_send_msg(dbus_info->interface_object, dbus_info->invocation, resp->result);
-               }
-               break;
+
+               telephony_sms_complete_send_msg(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_READ_MSG: {
                const struct tresp_sms_read_msg *resp = data;
-               GVariant *sca = 0, *packet_sca = 0;
-               GVariant *tpdu = 0, *packet_tpdu = 0;
+               GVariant *sca = NULL, *packet_sca = NULL;
+               GVariant *tpdu = NULL, *packet_tpdu = NULL;
                GVariantBuilder b;
                unsigned int i;
 
                dbg("[%s] READ_MSG (result:[0x%x])", cpname, resp->result);
-               g_variant_builder_init(&b, G_VARIANT_TYPE("ay"));
 
+               g_variant_builder_init(&b, G_VARIANT_TYPE("ay"));
                for (i = 0; i < SMS_SMSP_ADDRESS_LEN; i++)
                        g_variant_builder_add(&b, "y", resp->dataInfo.smsData.sca[i]);
                sca = g_variant_builder_end(&b);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("ay"));
-
                for (i = 0; i < SMS_SMDATA_SIZE_MAX + 1; i++)
                        g_variant_builder_add(&b, "y", resp->dataInfo.smsData.tpduData[i]);
                tpdu = g_variant_builder_end(&b);
@@ -964,34 +814,35 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                packet_sca = g_variant_new("v", sca);
                packet_tpdu = g_variant_new("v", tpdu);
 
-               telephony_sms_complete_read_msg(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result,
-                       resp->dataInfo.simIndex,
-                       resp->dataInfo.msgStatus,
+               telephony_sms_complete_read_msg(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result,
+                       resp->dataInfo.simIndex, resp->dataInfo.msgStatus,
                        resp->dataInfo.smsData.format,
                        packet_sca,
                        resp->dataInfo.smsData.msgLength,
                        packet_tpdu);
-               }
-               break;
+       }
+       break;
 
        case TRESP_SMS_SAVE_MSG: {
                const struct tresp_sms_save_msg *resp = data;
 
                dbg("[%s] SAVE_MSG (index:[%d] result:[0x%x])", cpname, resp->index, resp->result);
-               telephony_sms_complete_save_msg(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result, resp->index);
-               }
-               break;
+
+               telephony_sms_complete_save_msg(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result, resp->index);
+       }
+       break;
 
        case TRESP_SMS_DELETE_MSG: {
                const struct tresp_sms_delete_msg *resp = data;
 
                dbg("[%s] DELETE_MSG (index:[%d] result:[0x%x])", cpname, resp->index, resp->result);
-               telephony_sms_complete_delete_msg(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result, resp->index);
-               }
-               break;
+
+               telephony_sms_complete_delete_msg(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result, resp->index);
+       }
+       break;
 
        case TRESP_SMS_GET_STORED_MSG_COUNT: {
                const struct tresp_sms_get_storedMsgCnt *resp = data;
@@ -1000,52 +851,53 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                unsigned int i;
 
                dbg("[%s] GET_STORED_MSG_COUNT (result:[0x%x])", cpname, resp->result);
-               g_variant_builder_init(&b, G_VARIANT_TYPE("ai"));
 
+               g_variant_builder_init(&b, G_VARIANT_TYPE("ai"));
                for (i = 0; i < resp->storedMsgCnt.totalCount; i++)
                        g_variant_builder_add(&b, "i", resp->storedMsgCnt.indexList[i]);
                list = g_variant_builder_end(&b);
 
-               telephony_sms_complete_get_msg_count(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result,
+               telephony_sms_complete_get_msg_count(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result,
                        resp->storedMsgCnt.totalCount,
                        resp->storedMsgCnt.usedCount,
                        list);
-               }
-               break;
+       }
+       break;
 
        case TRESP_SMS_GET_SCA: {
                const struct tresp_sms_get_sca *resp = data;
-               GVariant *sca = 0, *packet_sca = 0;
+               GVariant *sca = NULL, *packet_sca = NULL;
                GVariantBuilder b;
                unsigned int i;
 
                dbg("[%s] GET_SCA (result:[0x%x])", cpname, resp->result);
-               g_variant_builder_init(&b, G_VARIANT_TYPE("ay"));
 
+               g_variant_builder_init(&b, G_VARIANT_TYPE("ay"));
                for (i = 0; i < SMS_SMSP_ADDRESS_LEN + 1; i++)
                        g_variant_builder_add(&b, "y", resp->scaAddress.diallingNum[i]);
                sca = g_variant_builder_end(&b);
 
                packet_sca = g_variant_new("v", sca);
 
-               telephony_sms_complete_get_sca(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result,
+               telephony_sms_complete_get_sca(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result,
                        resp->scaAddress.typeOfNum,
                        resp->scaAddress.numPlanId,
                        resp->scaAddress.dialNumLen,
                        packet_sca);
-               }
-               break;
+       }
+       break;
 
        case TRESP_SMS_SET_SCA: {
                const struct tresp_sms_set_sca *resp = data;
 
                dbg("[%s] SET_SCA (result:[0x%x])", cpname, resp->result);
+
                telephony_sms_complete_set_sca(dbus_info->interface_object, dbus_info->invocation,
                        resp->result);
-               }
-               break;
+       }
+       break;
 
        case TRESP_SMS_GET_CB_CONFIG: {
                const struct tresp_sms_get_cb_config *resp = data;
@@ -1054,101 +906,112 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                int i;
 
                dbg("[%s] GET_CB_CONFIG (result:[0x%x])", cpname, resp->result);
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
 
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->cbConfig.msgIdRangeCount; i++) {
                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
 
                        if (resp->cbConfig.net3gppType == SMS_NETTYPE_3GPP) {
-                               g_variant_builder_add(&b, "{sv}", "FromMsgId", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp.fromMsgId));
-                               g_variant_builder_add(&b, "{sv}", "ToMsgId", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp.toMsgId));
+                               g_variant_builder_add(&b, "{sv}", "FromMsgId",
+                                       g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp.fromMsgId));
+                               g_variant_builder_add(&b, "{sv}", "ToMsgId",
+                                       g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp.toMsgId));
                        } else if (resp->cbConfig.net3gppType == SMS_NETTYPE_3GPP2) {
-                               g_variant_builder_add(&b, "{sv}", "CBCategory", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbCategory));
-                               g_variant_builder_add(&b, "{sv}", "CBLanguage", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbLanguage));
+                               g_variant_builder_add(&b, "{sv}", "CBCategory",
+                                       g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbCategory));
+                               g_variant_builder_add(&b, "{sv}", "CBLanguage",
+                                       g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbLanguage));
                        } else {
                                dbg("Unknown 3gpp type");
                                return FALSE;
                        }
 
-                       g_variant_builder_add(&b, "{sv}", "Selected", g_variant_new_byte(resp->cbConfig.msgIDs[i].net3gpp.selected));
+                       g_variant_builder_add(&b, "{sv}", "Selected",
+                               g_variant_new_byte(resp->cbConfig.msgIDs[i].net3gpp.selected));
                        g_variant_builder_close(&b);
                }
-
                result = g_variant_builder_end(&b);
 
-               telephony_sms_complete_get_cb_config(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result,
+               telephony_sms_complete_get_cb_config(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result,
                        resp->cbConfig.net3gppType,
                        resp->cbConfig.cbEnabled,
                        resp->cbConfig.msgIdMaxCount,
                        resp->cbConfig.msgIdRangeCount,
                        result);
-               }
-               break;
+       }
+       break;
 
        case TRESP_SMS_SET_CB_CONFIG: {
                const struct tresp_sms_set_cb_config *resp = data;
 
                dbg("[%s] SET_CB_CONFIG (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_set_cb_config(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result);
-               }
-               break;
+
+               telephony_sms_complete_set_cb_config(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_SET_MEM_STATUS: {
                const struct tresp_sms_set_mem_status *resp = data;
 
                dbg("[%s] SET_MEM_STATUS (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_set_mem_status(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result);
-               }
-               break;
+
+               telephony_sms_complete_set_mem_status(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_GET_PREF_BEARER: {
                const struct tresp_sms_get_pref_bearer *resp = data;
 
                dbg("[%s] GET_PREF_BEARER (result:[0x%x] svc:[0x%2x])", cpname, resp->result, resp->svc);
-               telephony_sms_complete_get_pref_bearer(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result, resp->svc);
-               }
-               break;
+
+               telephony_sms_complete_get_pref_bearer(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result, resp->svc);
+       }
+       break;
 
        case TRESP_SMS_SET_PREF_BEARER: {
                const struct tresp_sms_set_pref_bearer *resp = data;
 
                dbg("[%s] SET_PREF_BEARER (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_set_pref_bearer(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result);
-               }
-               break;
+
+               telephony_sms_complete_set_pref_bearer(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_SET_DELIVERY_REPORT: {
                const struct tresp_sms_set_delivery_report *resp = data;
 
                dbg("[%s] SET_DELIVERY_REPORT (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_set_delivery_report(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result);
-               }
-               break;
+
+               telephony_sms_complete_set_delivery_report(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_SET_MSG_STATUS: {
                const struct tresp_sms_set_mem_status *resp = data;
 
                dbg("[%s] SET_MSG_STATUS (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_set_msg_status(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result);
-               }
-               break;
+
+               telephony_sms_complete_set_msg_status(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_GET_PARAMS: {
                const struct tresp_sms_get_params *resp = data;
-               GVariant *alphaId = 0, *packet_alphaId = 0;
-               GVariant *destDialNum = 0, *packet_destDialNum = 0;
-               GVariant *scaDialNum = 0, *packet_scaDialNum = 0;
+               GVariant *alphaId = NULL, *packet_alphaId = NULL;
+               GVariant *destDialNum = NULL, *packet_destDialNum = NULL;
+               GVariant *scaDialNum = NULL, *packet_scaDialNum = NULL;
                GVariantBuilder b;
                unsigned int i;
 
                dbg("[%s] GET_PARAMS (result:[0x%x])", cpname, resp->result);
+
                g_variant_builder_init(&b, G_VARIANT_TYPE("ay"));
                for (i = 0; i < SMS_SMSP_ALPHA_ID_LEN_MAX + 1; i++)
                        g_variant_builder_add(&b, "y", resp->paramsInfo.szAlphaId[i]);
@@ -1168,8 +1031,8 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                packet_destDialNum = g_variant_new("v", destDialNum);
                packet_scaDialNum = g_variant_new("v", scaDialNum);
 
-               telephony_sms_complete_get_sms_params(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result,
+               telephony_sms_complete_get_sms_params(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result,
                        resp->paramsInfo.recordIndex,
                        resp->paramsInfo.recordLen,
                        resp->paramsInfo.alphaIdLen,
@@ -1186,35 +1049,40 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                        resp->paramsInfo.tpProtocolId,
                        resp->paramsInfo.tpDataCodingScheme,
                        resp->paramsInfo.tpValidityPeriod);
-               }
-               break;
+       }
+       break;
 
        case TRESP_SMS_SET_PARAMS:{
                const struct tresp_sms_set_params *resp = data;
 
                dbg("[%s] SET_PARAMS (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_set_sms_params(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result);
-               }
-               break;
+
+               telephony_sms_complete_set_sms_params(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result);
+       }
+       break;
 
        case TRESP_SMS_GET_PARAMCNT: {
                const struct tresp_sms_get_paramcnt *resp = data;
 
                dbg("[%s] GET_PARAMCNT (result:[0x%x])", cpname, resp->result);
-               telephony_sms_complete_get_sms_param_cnt(dbus_info->interface_object, dbus_info->invocation,
-                       resp->result, resp->recordCount);
-               }
-               break;
+
+               telephony_sms_complete_get_sms_param_cnt(dbus_info->interface_object,
+                       dbus_info->invocation, resp->result, resp->recordCount);
+       }
+       break;
 
        default:
-               break;
+               err("Unhandled/Unknown Response: [0x%x]", command);
+       break;
        }
 
        return TRUE;
 }
 
-gboolean dbus_plugin_sms_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data)
+gboolean dbus_plugin_sms_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
 {
        TelephonySms *sms;
        const char *cp_name;
@@ -1251,8 +1119,8 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, CoreObject *sourc
 
                g_free(sca);
                g_free(tpdu);
-               }
-               break;
+       }
+       break;
 
        case TNOTI_SMS_CB_INCOM_MSG: {
                const struct tnoti_sms_cellBroadcast_msg *noti = data;
@@ -1266,13 +1134,14 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, CoreObject *sourc
                        noti->cbMsg.cbMsgType,
                        noti->cbMsg.length,
                        tpdu);
+
                g_free(tpdu);
-               }
-               break;
+       }
+       break;
 
        case TNOTI_SMS_ETWS_INCOM_MSG: {
                const struct tnoti_sms_etws_msg *noti = data;
-               GVariant *msgData = 0, *packet_msgData = 0;
+               GVariant *msg_data = NULL, *packet_msg_data = NULL;
                GVariantBuilder b;
                unsigned int i;
 
@@ -1282,49 +1151,52 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, CoreObject *sourc
 
                for (i = 0; i < SMS_ETWS_SIZE_MAX + 1; i++)
                        g_variant_builder_add(&b, "y", noti->etwsMsg.msgData[i]);
-               msgData = g_variant_builder_end(&b);
-               packet_msgData = g_variant_new("v", msgData);
+               msg_data = g_variant_builder_end(&b);
+               packet_msg_data = g_variant_new("v", msg_data);
 
                telephony_sms_emit_incomming_etws_msg(sms,
                        noti->etwsMsg.etwsMsgType,
                        noti->etwsMsg.length,
-                       packet_msgData);
-               }
-               break;
+                       packet_msg_data);
+       }
+       break;
 
        case TNOTI_SMS_INCOM_EX_MSG: {
                info("[%s] SMS_INCOM_EX_MSG (len[%d])", cp_name, data_len);
-               }
-               break;
+       }
+       break;
 
        case TNOTI_SMS_CB_INCOM_EX_MSG: {
                info("[%s] CB_INCOM_EX_MSG (len[%d])", cp_name, data_len);
-               }
-               break;
+       }
+       break;
 
        case TNOTI_SMS_MEMORY_STATUS: {
                const struct tnoti_sms_memory_status *noti = data;
+
                info("[%s] SMS_MEMORY_STATUS (%d)", cp_name, noti->status);
+
                telephony_sms_emit_memory_status(sms, noti->status);
-               }
-               break;
+       }
+       break;
 
        case TNOTI_SMS_DEVICE_READY: {
                const struct tnoti_sms_ready_status *noti = data;
+
                info("[%s] SMS_DEVICE_READY (%d)", cp_name, noti->status);
+
 #ifdef ENABLE_KPI_LOGS
                if (noti->status != SMS_READY_STATUS_NONE)
                        TIME_CHECK("[%s] SMS Service Ready", cp_name);
 #endif
-               telephony_sms_emit_sms_ready(sms, noti->status);
 
-               }
-               break;
+               telephony_sms_emit_sms_ready(sms, noti->status);
+       }
+       break;
 
        default:
-               dbg("unknown notification");
-               return FALSE;
-               break;
+               err("Unhandled/Unknown Notification: [0x%x]", command);
+       break;
        }
 
        return TRUE;
diff --git a/src/dtapi_ss.c b/src/dtapi_ss.c
new file mode 100644 (file)
index 0000000..48e7371
--- /dev/null
@@ -0,0 +1,1205 @@
+/*
+ * tel-plugin-dbus-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 <string.h>
+#include <stdlib.h>
+
+#include <glib.h>
+
+#include <appsvc.h>
+#include <bundle_internal.h>
+
+#include <tcore.h>
+#include <server.h>
+#include <plugin.h>
+#include <co_ss.h>
+
+#include "generated-code.h"
+#include "dtapi_common.h"
+
+/*
+ * CISS application package name
+ */
+#define CISS_APP "org.tizen.ciss"
+
+typedef struct {
+       int status;
+       int dcs;
+       int length;
+       char data[MAX_SS_USSD_LEN];
+} CissDataType;
+
+typedef struct {
+       int err;
+       int ss_type;
+} CissInformation;
+
+static void __launch_ciss_information(const struct tnoti_ss_information *ss_info)
+{
+       gchar *encoded_data;
+       CissInformation ciss_inform;
+
+       bundle *kb = NULL;
+
+       memset(&ciss_inform, 0x0, sizeof(CissInformation));
+       ciss_inform.err = ss_info->err;
+       ciss_inform.ss_type = ss_info->ss_type;
+
+       dbg("Explicit launch CISS application by appsvc");
+
+       kb = bundle_create();
+       if (!kb) {
+               warn("bundle_create() failed");
+               return;
+       }
+
+       appsvc_set_pkgname(kb, CISS_APP);
+
+       encoded_data = g_base64_encode((guchar *)&ciss_inform, sizeof(CissInformation));
+
+       appsvc_add_data(kb, "CISS_LAUNCHING_MODE", "RESP");
+       appsvc_add_data(kb, "KEY_EVENT_TYPE", "200");
+       appsvc_add_data(kb, "KEY_ENCODED_DATA", encoded_data);
+
+       dbg("CISS appsvc run!");
+       appsvc_run_service(kb, 0, NULL, NULL);
+
+       bundle_free(kb);
+       g_free(encoded_data);
+}
+
+static void __launch_ciss(const struct tnoti_ss_ussd *ussd, enum dbus_tapi_sim_slot_id slot_id)
+{
+       gchar *encoded_data;
+       CissDataType ciss_data;
+       char slot_info[2] = {0,};
+
+       bundle *kb = NULL;
+
+       memset(&ciss_data, 0x0, sizeof(CissDataType));
+       ciss_data.status = ussd->dcs;
+       ciss_data.status = ussd->status;
+       ciss_data.length = ussd->len;
+       memcpy(ciss_data.data, ussd->str, ciss_data.length);
+
+       snprintf(slot_info, 2, "%d", slot_id);
+       dbg("slot_id : [%s]", slot_info);
+
+       dbg("Explicit launch CISS application by appsvc");
+
+       kb = bundle_create();
+       if (!kb) {
+               warn("bundle_create() failed");
+               return;
+       }
+
+       appsvc_set_pkgname(kb, CISS_APP);
+
+       encoded_data = g_base64_encode((guchar *)&ciss_data, sizeof(CissDataType));
+
+       appsvc_add_data(kb, "CISS_LAUNCHING_MODE", "RESP");
+       appsvc_add_data(kb, "KEY_EVENT_TYPE", "100");
+       appsvc_add_data(kb, "KEY_ENCODED_DATA", encoded_data);
+       appsvc_add_data(kb, "KEY_SLOT_ID", slot_info);
+
+       dbg("CISS appsvc run!");
+       appsvc_run_service(kb, 0, NULL, NULL);
+
+       bundle_free(kb);
+       g_free(encoded_data);
+}
+
+static gboolean on_ss_activate_barring(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class,
+       gint barring_mode, const gchar *barring_password,
+       gpointer user_data)
+{
+       struct treq_ss_barring req;
+       struct custom_data *ctx = user_data;
+       char buf[MAX_SS_BARRING_PASSWORD_LEN + 1];
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_barring));
+
+       req.class = ss_class;
+       req.mode = barring_mode;
+
+       memcpy(req.password, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
+
+       memcpy(buf, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
+       buf[MAX_SS_BARRING_PASSWORD_LEN] = '\0';
+       dbg("Class: [%d] Barring - mode: [%d] password: [%s]",
+               req.class, req.mode, buf);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_BARRING_ACTIVATE,
+               &req, sizeof(struct treq_ss_barring));
+
+       return TRUE;
+}
+
+static gboolean on_ss_deactivate_barring(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class,
+       gint barring_mode, const gchar *barring_password,
+       gpointer user_data)
+{
+       struct treq_ss_barring req;
+       struct custom_data *ctx = user_data;
+       char buf[MAX_SS_BARRING_PASSWORD_LEN + 1];
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_barring));
+
+       req.class = ss_class;
+       req.mode = barring_mode;
+
+       memcpy(req.password, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
+
+       memcpy(buf, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
+       buf[MAX_SS_BARRING_PASSWORD_LEN] = '\0';
+       dbg("Class: [%d] Barring - mode: [%d] password: [%s]",
+               req.class, req.mode, buf);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_BARRING_DEACTIVATE,
+               &req, sizeof(struct treq_ss_barring));
+
+       return TRUE;
+}
+
+static gboolean on_ss_change_barring_password(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       const gchar *barring_password,
+       const gchar *barring_password_new,
+       const gchar *barring_password_confirm,
+       gpointer user_data)
+{
+       struct treq_ss_barring_change_password req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_barring_change_password));
+
+       memcpy(req.password_old, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
+       memcpy(req.password_new, barring_password_new, MAX_SS_BARRING_PASSWORD_LEN);
+       memcpy(req.password_confirm, barring_password_confirm, MAX_SS_BARRING_PASSWORD_LEN);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_BARRING_CHANGE_PASSWORD,
+               &req, sizeof(struct treq_ss_barring_change_password));
+
+       return TRUE;
+}
+
+static gboolean on_ss_get_barring_status(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class, gint barring_mode,
+       gpointer user_data)
+{
+       struct treq_ss_barring req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_barring));
+
+       req.class = ss_class;
+       req.mode = barring_mode;
+
+       dbg("Class: [%d] Barring mode: [%d]", req.class, req.mode);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_BARRING_GET_STATUS,
+               &req, sizeof(struct treq_ss_barring));
+
+       return TRUE;
+}
+
+static gboolean on_ss_register_forwarding(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class,
+       gint forward_mode,
+       gint forward_no_reply_time,
+       gint forward_ton, gint forward_npi, const gchar *forward_number,
+       gpointer user_data)
+{
+       struct treq_ss_forwarding req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_forwarding));
+
+       req.class = ss_class;
+       req.mode = forward_mode;
+       req.time = forward_no_reply_time;
+       req.ton  = forward_ton;
+       req.npi  = forward_npi;
+       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
+
+       dbg("Class: [%d] Forwarding - mode: [%d] time: [%d] number: [%s]",
+               req.class, req.mode, req.time, req.number);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_FORWARDING_REGISTER,
+               &req, sizeof(struct treq_ss_forwarding));
+
+       return TRUE;
+}
+
+static gboolean on_ss_deregister_forwarding(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class,
+       gint forward_mode,
+       gint forward_no_reply_time,
+       gint forward_ton, gint forward_npi, const gchar *forward_number,
+       gpointer user_data)
+{
+       struct treq_ss_forwarding req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_forwarding));
+
+       req.class = ss_class;
+       req.mode = forward_mode;
+       req.time = forward_no_reply_time;
+       req.ton = forward_ton;
+       req.npi = forward_npi;
+       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
+
+       dbg("Class: [%d] Forwarding - mode: [%d] time: [%d] number: [%s]",
+               req.class, req.mode, req.time, req.number);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_FORWARDING_DEREGISTER,
+               &req, sizeof(struct treq_ss_forwarding));
+
+       return TRUE;
+}
+
+static gboolean on_ss_activate_forwarding(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class,
+       gint forward_mode,
+       gint forward_no_reply_time,
+       gint forward_ton, gint forward_npi, const gchar *forward_number,
+       gpointer user_data)
+{
+       struct treq_ss_forwarding req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_forwarding));
+
+       req.class = ss_class;
+       req.mode = forward_mode;
+       req.time = forward_no_reply_time;
+       req.ton = forward_ton;
+       req.npi = forward_npi;
+       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
+
+       dbg("Class: [%d] Forwarding - mode: [%d] time: [%d] number: [%s]",
+               req.class, req.mode, req.time, req.number);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_FORWARDING_ACTIVATE,
+               &req, sizeof(struct treq_ss_forwarding));
+
+       return TRUE;
+}
+
+static gboolean on_ss_deactivate_forwarding(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class,
+       gint forward_mode,
+       gint forward_no_reply_time,
+       gint forward_ton, gint forward_npi, const gchar *forward_number,
+       gpointer user_data)
+{
+       struct treq_ss_forwarding req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_forwarding));
+
+       req.class = ss_class;
+       req.mode = forward_mode;
+       req.time = forward_no_reply_time;
+       req.ton = forward_ton;
+       req.npi = forward_npi;
+       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
+
+       dbg("Class: [%d] Forwarding - mode: [%d] time: [%d] number: [%s]",
+               req.class, req.mode, req.time, req.number);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_FORWARDING_DEACTIVATE,
+               &req, sizeof(struct treq_ss_forwarding));
+
+       return TRUE;
+}
+
+static gboolean on_ss_get_forwarding_status(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class,
+       gint forward_mode,
+       gpointer user_data)
+{
+       struct treq_ss_forwarding req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_forwarding));
+
+       req.class = ss_class;
+       req.mode = forward_mode;
+
+       dbg("Class: [%d] Forwarding mode: [%d]", req.class, req.mode);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_FORWARDING_GET_STATUS,
+               &req, sizeof(struct treq_ss_forwarding));
+
+       return TRUE;
+}
+
+static gboolean on_ss_activate_waiting(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class, gpointer user_data)
+{
+       struct treq_ss_waiting req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_waiting));
+
+       req.class = ss_class;
+
+       dbg("Class: [%d]", req.class);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_WAITING_ACTIVATE,
+               &req, sizeof(struct treq_ss_waiting));
+
+       return TRUE;
+}
+
+static gboolean on_ss_deactivate_waiting(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class, gpointer user_data)
+{
+       struct treq_ss_waiting req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_waiting));
+
+       req.class = ss_class;
+
+       dbg("Class: [%d]", req.class);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_WAITING_DEACTIVATE,
+               &req, sizeof(struct treq_ss_waiting));
+
+       return TRUE;
+}
+
+static gboolean on_ss_get_waiting_status(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ss_class, gpointer user_data)
+{
+       struct treq_ss_waiting req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_waiting));
+
+       req.class = ss_class;
+
+       dbg("Class: [%d]", req.class);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_WAITING_GET_STATUS,
+               &req, sizeof(struct treq_ss_waiting));
+
+       return TRUE;
+}
+
+static gboolean on_ss_set_cli_status(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint cli_type, gint cli_status, gpointer user_data)
+{
+       struct treq_ss_set_cli req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_set_cli));
+
+       req.type = cli_type;
+       req.status = cli_status;
+
+       dbg("CLI - type: [%d] status: [%d]", req.type, req.status);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_CLI_SET_STATUS,
+               &req, sizeof(struct treq_ss_set_cli));
+
+       return TRUE;
+}
+
+
+static gboolean on_ss_get_cli_status(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint cli_type, gpointer user_data)
+{
+       struct treq_ss_cli req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_cli));
+
+       req.type = cli_type;
+
+       dbg("CLI type: [%d]", req.type);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_CLI_GET_STATUS,
+               &req, sizeof(struct treq_ss_cli));
+
+       return TRUE;
+}
+
+static gboolean on_ss_send_ussd(TelephonySs *ss,
+       GDBusMethodInvocation *invocation,
+       gint ussd_type, gint ussd_dcs,
+       gint ussd_len, const gchar *ussd_string,
+       gpointer user_data)
+{
+       struct treq_ss_ussd req;
+       struct custom_data *ctx = user_data;
+       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
+
+       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
+               return TRUE;
+
+       memset(&req, 0x0, sizeof(struct treq_ss_ussd));
+
+       req.type = ussd_type;
+       req.dcs = (unsigned char)ussd_dcs;
+       req.len = (unsigned short)ussd_len;
+
+       snprintf((char *)req.str, MAX_SS_USSD_LEN, "%s", ussd_string);
+
+       dbg("USSD - type: [%d] dcs: [%d] len: [%d] string: [%s]",
+               req.type, req.dcs, req.len, req.str);
+
+       /* Dispatch request */
+       dtapi_dispatch_request(ctx, ss, invocation,
+               TREQ_SS_SEND_USSD,
+               &req, sizeof(struct treq_ss_ussd));
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_setup_ss_interface(TelephonyObjectSkeleton *object,
+       struct custom_data *ctx)
+{
+       TelephonySs *ss;
+
+       ss = telephony_ss_skeleton_new();
+       telephony_object_skeleton_set_ss(object, ss);
+       g_object_unref(ss);
+
+       dbg("ss = %p", ss);
+
+       /*
+        * Register signal handlers for SS interface
+        */
+       g_signal_connect(ss,
+               "handle-activate-barring",
+               G_CALLBACK(on_ss_activate_barring), ctx);
+
+       g_signal_connect(ss,
+               "handle-deactivate-barring",
+               G_CALLBACK(on_ss_deactivate_barring), ctx);
+
+       g_signal_connect(ss,
+               "handle-change-barring-password",
+               G_CALLBACK(on_ss_change_barring_password), ctx);
+
+       g_signal_connect(ss,
+               "handle-get-barring-status",
+               G_CALLBACK(on_ss_get_barring_status), ctx);
+
+       g_signal_connect(ss,
+               "handle-register-forwarding",
+               G_CALLBACK(on_ss_register_forwarding), ctx);
+
+       g_signal_connect(ss,
+               "handle-deregister-forwarding",
+               G_CALLBACK(on_ss_deregister_forwarding), ctx);
+
+       g_signal_connect(ss,
+               "handle-activate-forwarding",
+               G_CALLBACK(on_ss_activate_forwarding), ctx);
+
+       g_signal_connect(ss,
+               "handle-deactivate-forwarding",
+               G_CALLBACK(on_ss_deactivate_forwarding), ctx);
+
+       g_signal_connect(ss,
+               "handle-get-forwarding-status",
+               G_CALLBACK(on_ss_get_forwarding_status), ctx);
+
+       g_signal_connect(ss,
+               "handle-activate-waiting",
+               G_CALLBACK(on_ss_activate_waiting), ctx);
+
+       g_signal_connect(ss,
+               "handle-deactivate-waiting",
+               G_CALLBACK(on_ss_deactivate_waiting), ctx);
+
+       g_signal_connect(ss,
+               "handle-get-waiting-status",
+               G_CALLBACK(on_ss_get_waiting_status), ctx);
+
+       g_signal_connect(ss,
+               "handle-set-clistatus",
+               G_CALLBACK(on_ss_set_cli_status), ctx);
+
+       g_signal_connect(ss,
+               "handle-get-clistatus",
+               G_CALLBACK(on_ss_get_cli_status), ctx);
+
+       g_signal_connect(ss,
+               "handle-send-ussd",
+               G_CALLBACK(on_ss_send_ussd), ctx);
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_ss_response(struct custom_data *ctx,
+       UserRequest *ur, struct dbus_request_info *dbus_info,
+       enum tcore_response_command command, unsigned int data_len, const void *data)
+{
+       GVariant *result = 0;
+       GVariantBuilder b;
+       int i = 0;
+
+       if (!data) {
+               err("response data : 0");
+               return FALSE;
+       }
+
+       switch (command) {
+       case TRESP_SS_BARRING_ACTIVATE: {
+               const struct tresp_ss_barring *resp = data;
+
+               dbg("receive TRESP_SS_BARRING_ACTIVATE (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "barring_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_activate_barring(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_BARRING_DEACTIVATE: {
+               const struct tresp_ss_barring *resp = data;
+
+               dbg("receive TRESP_SS_BARRING_DEACTIVATE (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "barring_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_deactivate_barring(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_BARRING_CHANGE_PASSWORD: {
+               const struct tresp_ss_general *resp = data;
+
+               dbg("receive TRESP_SS_BARRING_CHANGE_PASSWORD (err[%d])", resp->err);
+
+               telephony_ss_complete_change_barring_password(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_SS_BARRING_GET_STATUS: {
+               const struct tresp_ss_barring *resp = data;
+
+               dbg("receive TRESP_SS_BARRING_GET_STATUS (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "barring_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_get_barring_status(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_FORWARDING_ACTIVATE: {
+               const struct tresp_ss_forwarding *resp = data;
+
+               dbg("receive TRESP_SS_FORWARDING_ACTIVATE (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_add(&b, "{sv}", "number_present",
+                               g_variant_new_int32(resp->record[i].number_present));
+                       g_variant_builder_add(&b, "{sv}", "no_reply_time",
+                               g_variant_new_int32(resp->record[i].time));
+                       g_variant_builder_add(&b, "{sv}", "type_of_number",
+                               g_variant_new_int32(resp->record[i].ton));
+                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity",
+                               g_variant_new_int32(resp->record[i].npi));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_number",
+                               g_variant_new_string(resp->record[i].number));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_activate_forwarding(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_FORWARDING_DEACTIVATE: {
+               const struct tresp_ss_forwarding *resp = data;
+
+               dbg("receive TRESP_SS_FORWARDING_DEACTIVATE (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_add(&b, "{sv}", "number_present",
+                               g_variant_new_int32(resp->record[i].number_present));
+                       g_variant_builder_add(&b, "{sv}", "no_reply_time",
+                               g_variant_new_int32(resp->record[i].time));
+                       g_variant_builder_add(&b, "{sv}", "type_of_number",
+                               g_variant_new_int32(resp->record[i].ton));
+                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity",
+                               g_variant_new_int32(resp->record[i].npi));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_number",
+                               g_variant_new_string(resp->record[i].number));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_deactivate_forwarding(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_FORWARDING_REGISTER: {
+               const struct tresp_ss_forwarding *resp = data;
+
+               dbg("receive TRESP_SS_FORWARDING_REGISTER (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_add(&b, "{sv}", "number_present",
+                               g_variant_new_int32(resp->record[i].number_present));
+                       g_variant_builder_add(&b, "{sv}", "no_reply_time",
+                               g_variant_new_int32(resp->record[i].time));
+                       g_variant_builder_add(&b, "{sv}", "type_of_number",
+                               g_variant_new_int32(resp->record[i].ton));
+                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity",
+                               g_variant_new_int32(resp->record[i].npi));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_number",
+                               g_variant_new_string(resp->record[i].number));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_register_forwarding(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_FORWARDING_DEREGISTER: {
+               const struct tresp_ss_forwarding *resp = data;
+
+               dbg("receive TRESP_SS_FORWARDING_DEREGISTER (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_add(&b, "{sv}", "number_present",
+                               g_variant_new_int32(resp->record[i].number_present));
+                       g_variant_builder_add(&b, "{sv}", "no_reply_time",
+                               g_variant_new_int32(resp->record[i].time));
+                       g_variant_builder_add(&b, "{sv}", "type_of_number",
+                               g_variant_new_int32(resp->record[i].ton));
+                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity",
+                               g_variant_new_int32(resp->record[i].npi));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_number",
+                               g_variant_new_string(resp->record[i].number));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_deregister_forwarding(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_FORWARDING_GET_STATUS: {
+               const struct tresp_ss_forwarding *resp = data;
+
+               dbg("receive TRESP_SS_FORWARDING_GET_STATUS (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_mode",
+                               g_variant_new_int32(resp->record[i].mode));
+                       g_variant_builder_add(&b, "{sv}", "number_present",
+                               g_variant_new_int32(resp->record[i].number_present));
+                       g_variant_builder_add(&b, "{sv}", "no_reply_time",
+                               g_variant_new_int32(resp->record[i].time));
+                       g_variant_builder_add(&b, "{sv}", "type_of_number",
+                               g_variant_new_int32(resp->record[i].ton));
+                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity",
+                               g_variant_new_int32(resp->record[i].npi));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_number",
+                               g_variant_new_string(resp->record[i].number));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_get_forwarding_status(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_WAITING_ACTIVATE: {
+               const struct tresp_ss_waiting *resp = data;
+
+               dbg("receive TRESP_SS_WAITING_ACTIVATE (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_activate_waiting(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_WAITING_DEACTIVATE: {
+               const struct tresp_ss_waiting *resp = data;
+
+               dbg("receive TRESP_SS_WAITING_DEACTIVATE (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_deactivate_waiting(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_WAITING_GET_STATUS: {
+               const struct tresp_ss_waiting *resp = data;
+
+               dbg("receive TRESP_SS_WAITING_GET_STATUS (err[%d])", resp->err);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < resp->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(resp->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(resp->record[i].status));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_complete_get_waiting_status(dbus_info->interface_object,
+                       dbus_info->invocation, result, resp->err);
+       }
+       break;
+
+       case TRESP_SS_CLI_SET_STATUS: {
+               const struct tresp_ss_set_cli *resp = data;
+
+               dbg("receive TRESP_SS_CLI_SET_STATUS (err[%d])", resp->err);
+
+               telephony_ss_complete_set_clistatus(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err);
+       }
+       break;
+
+       case TRESP_SS_CLI_GET_STATUS: {
+               const struct tresp_ss_cli *resp = data;
+
+               dbg("receive TRESP_SS_CLI_GET_STATUS (err[%d])", resp->err);
+
+               telephony_ss_complete_get_clistatus(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err, resp->type, resp->status);
+       }
+       break;
+
+       case TRESP_SS_SEND_USSD: {
+               const struct tresp_ss_ussd *resp = data;
+
+               dbg("receive TRESP_SS_SEND_USSD (err[%d])", resp->err);
+               dbg("USSD - type: [0x%x] status: [0x%x] dcs: [0x%x] len: [%d] string: [%s])",
+                       resp->type, resp->status, resp->dcs, resp->len, resp->str);
+
+               telephony_ss_complete_send_ussd(dbus_info->interface_object,
+                       dbus_info->invocation, resp->err,
+                       resp->type, resp->status, resp->dcs,
+                       resp->len, (char *)resp->str);
+       }
+       break;
+
+       default:
+               err("Unhandled/Unknown Response: [0x%x]", command);
+       break;
+       }
+
+       return TRUE;
+}
+
+gboolean dbus_plugin_ss_notification(struct custom_data *ctx,
+       CoreObject *source, TelephonyObjectSkeleton *object,
+       enum tcore_notification_command command, unsigned int data_len, const void *data)
+{
+       TelephonySs *ss = 0;
+       GVariant *result = 0;
+       GVariantBuilder b;
+       int i = 0;
+       char *cp_name = NULL;
+
+       if (!object) {
+               err("object is NULL");
+               return FALSE;
+       }
+
+       if (!data) {
+               err("data is NULL");
+               return FALSE;
+       }
+
+       cp_name =  (char *)tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
+       ss = telephony_object_peek_ss(TELEPHONY_OBJECT(object));
+       if (ss == NULL) {
+               err("ss object is NULL!!!");
+               return FALSE;
+       }
+
+       switch (command) {
+       case TNOTI_SS_USSD: {
+               const struct tnoti_ss_ussd *ussd = data;
+               enum dbus_tapi_sim_slot_id slot_id;
+
+               dbg("[%s] SS_USSD - status: [0x%x] dcs: [0x%x] len: [%d] string: [%s])",
+                       cp_name, ussd->status, ussd->dcs, ussd->len, ussd->str);
+
+               telephony_ss_emit_notify_ussd(ss,
+                               ussd->status,
+                               ussd->dcs,
+                               ussd->len,
+                               (char *)ussd->str);
+
+               /*
+                * Launch CISS application for specific slot ID.
+                */
+               slot_id = get_sim_slot_id_by_cp_name(cp_name);
+               __launch_ciss(ussd, slot_id);
+       }
+       break;
+
+       case TNOTI_SS_FORWARDING_STATUS: {
+               const struct tnoti_ss_forwarding_status *fwrd = data;
+
+               dbg("[%s] SS_FORWARDING_STATUS", cp_name);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < fwrd->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(fwrd->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(fwrd->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_mode",
+                               g_variant_new_int32(fwrd->record[i].mode));
+                       g_variant_builder_add(&b, "{sv}", "number_present",
+                               g_variant_new_int32(fwrd->record[i].number_present));
+                       g_variant_builder_add(&b, "{sv}", "no_reply_time",
+                               g_variant_new_int32(fwrd->record[i].time));
+                       g_variant_builder_add(&b, "{sv}", "type_of_number",
+                               g_variant_new_int32(fwrd->record[i].ton));
+                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity",
+                               g_variant_new_int32(fwrd->record[i].npi));
+                       g_variant_builder_add(&b, "{sv}", "forwarding_number",
+                               g_variant_new_string(fwrd->record[i].number));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_emit_notify_forwarding(ss, result);
+       }
+       break;
+
+       case TNOTI_SS_BARRING_STATUS: {
+               const struct tnoti_ss_barring_status *barr = data;
+
+               dbg("[%s] SS_BARRING_STATUS", cp_name);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < barr->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(barr->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(barr->record[i].status));
+                       g_variant_builder_add(&b, "{sv}", "barring_mode",
+                               g_variant_new_int32(barr->record[i].mode));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_emit_notify_barring(ss, result);
+       }
+       break;
+
+       case TNOTI_SS_WAITING_STATUS: {
+               const struct tnoti_ss_waiting_status *wait = data;
+
+               dbg("[%s] SS_WAITING_STATUS", cp_name);
+
+               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+               for (i = 0; i < wait->record_num; i++) {
+                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+                       g_variant_builder_add(&b, "{sv}", "ss_class",
+                               g_variant_new_int32(wait->record[i].class));
+                       g_variant_builder_add(&b, "{sv}", "ss_status",
+                               g_variant_new_int32(wait->record[i].status));
+                       g_variant_builder_close(&b);
+               }
+               result = g_variant_builder_end(&b);
+
+               telephony_ss_emit_notify_waiting(ss, result);
+       }
+       break;
+
+       case TNOTI_SS_RELEASE_COMPLETE: {
+               int i = 0;
+               GVariantBuilder builder;
+               GVariant *msg_data = 0, *packet = NULL;
+               const struct tnoti_ss_release_complete *msg = data;
+
+               dbg("[%s] SS_RELEASE_COMPLETE", cp_name);
+
+               if (msg) {
+                       g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
+                       for (i = 0; i < msg->data_len; i++)
+                               g_variant_builder_add(&builder, "y", msg->data[i]);
+                       msg_data = g_variant_builder_end(&builder);
+
+                       packet = g_variant_new("v", msg_data);
+                       dbg("type_format(%s)", g_variant_get_type_string(packet));
+
+                       telephony_ss_emit_release_complete(ss,
+                               msg->data_len, packet);
+               } else {
+                       dbg("No data is passed in USSD release notification");
+
+                       g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
+                       g_variant_builder_add(&builder, "y", '\0');
+                       msg_data = g_variant_builder_end(&builder);
+
+                       packet = g_variant_new("v", msg_data);
+                       dbg("type_format(%s)", g_variant_get_type_string(packet));
+
+                       telephony_ss_emit_release_complete(ss,
+                               1, packet);
+               }
+       }
+       break;
+
+       case TNOTI_SS_INFO: {
+               const struct tnoti_ss_information *ss_info = data;
+
+               dbg("[%s] SS_INFO", cp_name);
+
+               telephony_ss_emit_notify_ss_info(ss,
+                               ss_info->err,
+                               ss_info->ss_type);
+
+               /*
+                * Launch CISS information.
+                */
+               __launch_ciss_information(ss_info);
+#if 0
+               /* Launch CISS application */
+               __launch_ciss(ss_info);
+#endif
+       }
+       break;
+
+       default:
+               err("Unhandled/Unknown Notification: [0x%x]", command);
+       break;
+       }
+
+       return TRUE;
+}
+
diff --git a/src/gps.c b/src/gps.c
deleted file mode 100644 (file)
index 72d7029..0000000
--- a/src/gps.c
+++ /dev/null
@@ -1,545 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <time.h>
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <tcore.h>
-#include <server.h>
-#include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <storage.h>
-#include <queue.h>
-#include <user_request.h>
-#include <co_gps.h>
-#include <co_sim.h>
-#include <co_ps.h>
-
-#include "generated-code.h"
-#include "common.h"
-
-static gboolean
-on_gps_set_frequency_aiding(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               guchar data,
-               gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-       dbg("data=%d", data);
-
-       tcore_user_request_set_data(ur, sizeof(data), (const char*)&data);
-       tcore_user_request_set_command(ur, TREQ_GPS_SET_FREQUENCY_AIDING);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_gps_confirm_measure_pos(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               const gchar *data,
-               gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       gboolean result = TRUE;
-       guchar *decoded_data = NULL;
-       gsize length;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-
-       decoded_data = g_base64_decode(data, &length);
-       dbg("decoded length=%d", length);
-       tcore_user_request_set_data(ur, length, decoded_data);
-       tcore_user_request_set_command(ur, TREQ_GPS_CONFIRM_MEASURE_POS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-               g_free(decoded_data);
-               return TRUE;
-       }
-
-       telephony_gps_complete_confirm_measure_pos(gps, invocation, result);
-       g_free(decoded_data);
-
-       return TRUE;
-}
-
-static gboolean
-on_enable_smart_assistant(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_ENABLE_SMART_ASSISTANT);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_disable_smart_assistant(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_DISABLE_SMART_ASSISTANT);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_sync_smart_assistant_area_list(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               gint count,
-               GVariant *gv,
-               gpointer user_data)
-{
-       struct tel_smart_assistant_area_list req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       GVariantIter *iter = NULL;
-       GVariant *b = NULL;
-       int i = 0;
-       gint item1, item2;
-       dbg("enter count=%d", count);
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-       memset(&req, 0, sizeof(struct tel_smart_assistant_area_list));
-
-       dbg("count=%d", count);
-       if (count > SMART_ASSISTANT_AREA_LIST_MAX)
-               count = SMART_ASSISTANT_AREA_LIST_MAX;
-
-       req.count = count;
-
-       g_variant_get(gv, "v", &b);
-       g_variant_unref(gv);
-
-       g_variant_get(b, "a(ii)", &iter);
-       while (g_variant_iter_loop(iter, "(ii)", &item1, &item2)) {
-               req.area[i].index = item1;
-               req.area[i].mode_state = item2;
-               i++;
-               if (i == count)
-                       break;
-       }
-       g_variant_iter_free(iter);
-
-       tcore_user_request_set_data(ur, sizeof(struct tel_smart_assistant_area_list), &req);
-       tcore_user_request_set_command(ur, TREQ_SYNC_SMART_ASSISTANT_AREA_LIST);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_del_smart_assistant_area_list(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               gint count,
-               GVariant *gv,
-               gpointer user_data)
-{
-       struct tel_smart_assistant_area_list req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       GVariantIter *iter = NULL;
-       GVariant *b = NULL;
-       int i = 0;
-       gint item1, item2;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-       memset(&req, 0, sizeof(struct tel_smart_assistant_area_list));
-
-       dbg("count=%d", count);
-       if (count > SMART_ASSISTANT_AREA_LIST_MAX)
-               count = SMART_ASSISTANT_AREA_LIST_MAX;
-
-       req.count = count;
-
-       g_variant_get(gv, "v", &b);
-       g_variant_unref(gv);
-
-       g_variant_get(b, "a(ii)", &iter);
-       while (g_variant_iter_loop(iter, "(ii)", &item1, &item2)) {
-               req.area[i].index = item1;
-               req.area[i].mode_state = item2;
-               i++;
-               if (i == count)
-                       break;
-       }
-       g_variant_iter_free(iter);
-
-       tcore_user_request_set_data(ur, sizeof(struct tel_smart_assistant_area_list), &req);
-       tcore_user_request_set_command(ur, TREQ_DEL_SMART_ASSISTANT_AREA_LIST);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_add_smart_assistant_area(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               gint fn_index,
-               gint mode_state,
-               gpointer user_data)
-{
-       struct tel_smart_assistant_area req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-       req.index = fn_index;
-       req.mode_state = mode_state;
-       dbg("index=%d, mode_state=%d", req.index, req.mode_state);
-
-       tcore_user_request_set_data(ur, sizeof(struct tel_smart_assistant_area), &req);
-       tcore_user_request_set_command(ur, TREQ_ADD_SMART_ASSISTANT_AREA);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-static gboolean
-on_modify_smart_assistant_area(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               gint fn_index,
-               gint mode_state,
-               gpointer user_data)
-{
-       struct tel_smart_assistant_area req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-       req.index = fn_index;
-       req.mode_state = mode_state;
-       dbg("index=%d, mode_state=%d", req.index, req.mode_state);
-
-       tcore_user_request_set_data(ur, sizeof(struct tel_smart_assistant_area), &req);
-       tcore_user_request_set_command(ur, TREQ_MODIFY_SMART_ASSISTANT_AREA);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_set_smart_assistant_info(TelephonyGps *gps,
-               GDBusMethodInvocation *invocation,
-               gint fn_index,
-               gint lpp_state,
-               gpointer user_data)
-{
-       struct treq_set_smart_assistant_info req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_GPS, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, gps, invocation);
-       req.index = fn_index;
-       req.lpp_state = lpp_state;
-       dbg("index=%d, lpp_state=%d", req.index, req.lpp_state);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_set_smart_assistant_info), &req);
-       tcore_user_request_set_command(ur, TREQ_SET_SMART_ASSISTANT_INFO);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_setup_gps_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
-{
-       TelephonyGps *gps;
-
-       gps = telephony_gps_skeleton_new();
-       telephony_object_skeleton_set_gps(object, gps);
-
-       g_object_unref(gps);
-
-       dbg("gps = %p", gps);
-
-       g_signal_connect(gps,
-               "handle-set-frequency-aiding",
-               G_CALLBACK(on_gps_set_frequency_aiding), ctx);
-
-       g_signal_connect(gps,
-               "handle-confirm-measure-pos",
-               G_CALLBACK(on_gps_confirm_measure_pos), ctx);
-
-       g_signal_connect(gps,
-               "handle-enable-smart-assistant",
-               G_CALLBACK(on_enable_smart_assistant), ctx);
-
-       g_signal_connect(gps,
-               "handle-disable-smart-assistant",
-               G_CALLBACK(on_disable_smart_assistant), ctx);
-
-       g_signal_connect(gps,
-               "handle-sync-smart-assistant-area-list",
-               G_CALLBACK(on_sync_smart_assistant_area_list), ctx);
-
-       g_signal_connect(gps,
-               "handle-del-smart-assistant-area-list",
-               G_CALLBACK(on_del_smart_assistant_area_list), ctx);
-
-       g_signal_connect(gps,
-               "handle-add-smart-assistant-area",
-               G_CALLBACK(on_add_smart_assistant_area), ctx);
-
-       g_signal_connect(gps,
-               "handle-modify-smart-assistant-area",
-               G_CALLBACK(on_modify_smart_assistant_area), ctx);
-
-       g_signal_connect(gps,
-               "handle-set-smart-assistant-info",
-               G_CALLBACK(on_set_smart_assistant_info), ctx);
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_gps_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data)
-{
-       const struct tresp_gps_set_frequency_aiding *resp_gps_frequency_aiding = data;
-       const struct tresp_smart_assistant_result *resp_smart_assistant_result = data;
-
-       GSList *co_list;
-       CoreObject *co_gps;
-       char *modem_name = NULL;
-       TcorePlugin *p = NULL;
-
-       modem_name = tcore_user_request_get_modem_name(ur);
-       if (!modem_name)
-               return FALSE;
-
-       p = tcore_server_find_plugin(ctx->server, modem_name);
-       free(modem_name);
-       if (!p)
-               return FALSE;
-
-       co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_GPS);
-       if (!co_list)
-               return FALSE;
-
-       co_gps = (CoreObject *)co_list->data;
-       g_slist_free(co_list);
-
-       if (!co_gps)
-               return FALSE;
-
-       switch (command) {
-       case TRESP_GPS_SET_FREQUENCY_AIDING:
-               dbg("TRESP_GPS_SET_FREQUENCY_AIDING result=%d", resp_gps_frequency_aiding->result);
-               telephony_gps_complete_set_frequency_aiding(dbus_info->interface_object, dbus_info->invocation, resp_gps_frequency_aiding->result);
-               break;
-
-       case TRESP_ENABLE_SMART_ASSISTANT:
-               dbg("TRESP_ENABLE_SMART_ASSISTANT result=%d", resp_smart_assistant_result->result);
-               telephony_gps_complete_enable_smart_assistant(dbus_info->interface_object, dbus_info->invocation, resp_smart_assistant_result->result);
-               break;
-
-       case TRESP_DISABLE_SMART_ASSISTANT:
-               dbg("TRESP_ENABLE_SMART_ASSISTANT result=%d", resp_smart_assistant_result->result);
-               telephony_gps_complete_disable_smart_assistant(dbus_info->interface_object, dbus_info->invocation, resp_smart_assistant_result->result);
-               break;
-
-       case TRESP_SYNC_SMART_ASSISTANT_AREA_LIST:
-               dbg("TRESP_SYNC_SMART_ASSISTANT_AREA_LIST result=%d", resp_smart_assistant_result->result);
-               telephony_gps_complete_sync_smart_assistant_area_list(dbus_info->interface_object, dbus_info->invocation, resp_smart_assistant_result->result);
-               break;
-
-       case TRESP_DEL_SMART_ASSISTANT_AREA_LIST:
-               dbg("TRESP_DEL_SMART_ASSISTANT_AREA_LIST result=%d", resp_smart_assistant_result->result);
-               telephony_gps_complete_del_smart_assistant_area_list(dbus_info->interface_object, dbus_info->invocation, resp_smart_assistant_result->result);
-               break;
-
-       case TRESP_ADD_SMART_ASSISTANT_AREA:
-               dbg("TRESP_ADD_SMART_ASSISTANT_AREA result=%d", resp_smart_assistant_result->result);
-               telephony_gps_complete_add_smart_assistant_area(dbus_info->interface_object, dbus_info->invocation, resp_smart_assistant_result->result);
-               break;
-
-       case TRESP_MODIFY_SMART_ASSISTANT_AREA:
-               dbg("TRESP_MODIFY_SMART_ASSISTANT_AREA result=%d", resp_smart_assistant_result->result);
-               telephony_gps_complete_modify_smart_assistant_area(dbus_info->interface_object, dbus_info->invocation, resp_smart_assistant_result->result);
-               break;
-
-       case TRESP_SET_SMART_ASSISTANT_INFO:
-               dbg("TRESP_SET_SMART_ASSISTANT_INFO result=%d", resp_smart_assistant_result->result);
-               telephony_gps_complete_set_smart_assistant_info(dbus_info->interface_object, dbus_info->invocation, resp_smart_assistant_result->result);
-               break;
-
-       default:
-               dbg("not handled cmd[0x%x]", command);
-               break;
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_gps_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data)
-{
-       TelephonyGps *gps;
-
-       if (!object) {
-               dbg("object is NULL");
-               return FALSE;
-       }
-
-       gps = telephony_object_peek_gps(TELEPHONY_OBJECT(object));
-       if (gps == NULL) {
-               err("gps object is NULL!!!");
-               return FALSE;
-       }
-
-       switch (command) {
-       case TNOTI_GPS_ASSIST_DATA:
-       {
-               gchar *encoded_data = NULL;
-               dbg("gps(%p) TNOTI_GPS_ASSIST_DATA. data=%p, data_len=%d", gps, data, data_len);
-               encoded_data = g_base64_encode((const guchar*)data, data_len);
-               telephony_gps_emit_assist_data(gps, encoded_data);
-               g_free(encoded_data);
-       }
-               break;
-
-       case TNOTI_GPS_MEASURE_POSITION:
-       {
-               gchar *encoded_data = NULL;
-               dbg("gps(%p) TNOTI_GPS_MEASURE_POSITION. data=%p, data_len=%d", gps, data, data_len);
-               encoded_data = g_base64_encode((const guchar*)data, data_len);
-               telephony_gps_emit_measure_position(gps, encoded_data);
-               g_free(encoded_data);
-       }
-               break;
-
-       case TNOTI_GPS_RESET_ASSIST_DATA:
-               dbg("gps(%p) TNOTI_GPS_RESET_ASSIST_DATA", gps);
-               telephony_gps_emit_reset_assist_data(gps);
-               break;
-
-       case TNOTI_GPS_FREQUENCY_AIDING_DATA:
-       {
-               gchar *encoded_data = NULL;
-               dbg("gps(%p) TNOTI_GPS_FREQUENCY_AIDING_DATA. data=%p, data_len=%d", gps, data, data_len);
-               encoded_data = g_base64_encode((const guchar*)data, data_len);
-               telephony_gps_emit_frequency_aiding(gps, encoded_data);
-               g_free(encoded_data);
-       }
-               break;
-
-       case TNOTI_SMART_ASSISTANT_AREA_STATUS:
-       {
-               const struct tnoti_smart_assistant_area_status *noti = data;
-               dbg("gps(%p) TNOTI_SMART_ASSISTANT_AREA_STATUS", gps);
-               telephony_gps_emit_area_status(gps, noti->area_status, noti->index);
-       }
-               break;
-
-       case TNOTI_SMART_ASSISTANT_SYNC_STATUS:
-       {
-               const struct tnoti_smart_assistant_sync_status *noti = data;
-               dbg("gps(%p) TNOTI_SMART_ASSISTANT_SYNC_STATUS", gps);
-               telephony_gps_emit_sync_status(gps, noti->init_status, noti->init_fail_cause);
-       }
-               break;
-
-       default:
-               dbg("not handled cmd[0x%x]", command);
-               break;
-       }
-
-       return TRUE;
-}
diff --git a/src/sap.c b/src/sap.c
deleted file mode 100644 (file)
index cf63a0a..0000000
--- a/src/sap.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * tel-plugin-dbus-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 <string.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include <tcore.h>
-#include <server.h>
-#include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <core_object.h>
-#include <queue.h>
-#include <user_request.h>
-#include <util.h>
-#include <co_sap.h>
-#include <co_sim.h>
-
-#include "generated-code.h"
-#include "common.h"
-
-static gboolean on_sap_connect(TelephonySap *sap, GDBusMethodInvocation *invocation,
-               gint arg_req_max_size, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_sap_req_connect req_conn;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, sap, invocation);
-       memset(&req_conn, 0, sizeof(struct treq_sap_req_connect));
-
-       req_conn.max_msg_size = (unsigned short)arg_req_max_size;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_sap_req_connect), &req_conn);
-       tcore_user_request_set_command(ur, TREQ_SAP_REQ_CONNECT);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_sap_disconnect(TelephonySap *sap, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "x"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, sap, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SAP_REQ_DISCONNECT);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_sap_get_status(TelephonySap *sap, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "r"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, sap, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SAP_REQ_STATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_sap_get_atr(TelephonySap *sap, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "r"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, sap, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SAP_REQ_ATR);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_sap_transfer_apdu(TelephonySap *sap, GDBusMethodInvocation *invocation,
-               GVariant *arg_req_apdu, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       struct treq_sap_transfer_apdu t_apdu;
-       TReturn ret;
-       GVariantIter *iter = NULL;
-       GVariant *inner_gv = NULL;
-       guchar rt_i;
-       int i = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       dbg("Func Entrance");
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "x"))
-               return TRUE;
-
-       memset(&t_apdu, 0, sizeof(struct treq_sap_transfer_apdu));
-
-       inner_gv = g_variant_get_variant(arg_req_apdu);
-
-       g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               t_apdu.apdu_data[i] = rt_i;
-               i++;
-       }
-       t_apdu.apdu_length = (unsigned int)i;
-       g_variant_iter_free(iter);
-       g_variant_unref(inner_gv);
-       g_variant_unref(arg_req_apdu);
-
-       for (i = 0; i < (int)t_apdu.apdu_length; i++)
-               dbg("apdu[%d][0x%02x]", i, t_apdu.apdu_data[i]);
-
-       ur = MAKE_UR(ctx, sap, invocation);
-       tcore_user_request_set_data(ur, sizeof(struct treq_sap_transfer_apdu), &t_apdu);
-       tcore_user_request_set_command(ur, TREQ_SAP_TRANSFER_APDU);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_sap_set_protocol(TelephonySap *sap, GDBusMethodInvocation *invocation,
-               gint arg_protocol, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_sap_set_protocol set_protocol;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, sap, invocation);
-       memset(&set_protocol, 0, sizeof(struct treq_sap_set_protocol));
-
-       set_protocol.protocol = arg_protocol;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_sap_set_protocol), &set_protocol);
-       tcore_user_request_set_command(ur, TREQ_SAP_SET_PROTOCOL);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_sap_set_power(TelephonySap *sap, GDBusMethodInvocation *invocation,
-               gint arg_mode, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       struct treq_sap_set_power set_power;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "w"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, sap, invocation);
-       memset(&set_power, 0, sizeof(struct treq_sap_set_power));
-
-       set_power.mode = arg_mode;
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_sap_set_power), &set_power);
-       tcore_user_request_set_command(ur, TREQ_SAP_SET_POWER);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean on_sap_get_card_reader_status(TelephonySap *sap, GDBusMethodInvocation *invocation, gpointer user_data)
-{
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       TReturn ret;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SAP, "r"))
-               return TRUE;
-
-       ur = MAKE_UR(ctx, sap, invocation);
-
-       tcore_user_request_set_command(ur, TREQ_SAP_REQ_CARDREADERSTATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_setup_sap_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
-{
-       TelephonySap *sap;
-
-       sap = telephony_sap_skeleton_new();
-       telephony_object_skeleton_set_sap(object, sap);
-       g_object_unref(sap);
-
-       dbg("sap = %p", sap);
-
-       g_signal_connect(sap,
-               "handle-connect",
-               G_CALLBACK(on_sap_connect), ctx);
-
-       g_signal_connect(sap,
-               "handle-disconnect",
-               G_CALLBACK(on_sap_disconnect), ctx);
-
-       g_signal_connect(sap,
-               "handle-get-status",
-               G_CALLBACK(on_sap_get_status), ctx);
-
-       g_signal_connect(sap,
-               "handle-get-atr",
-               G_CALLBACK(on_sap_get_atr), ctx);
-
-       g_signal_connect(sap,
-               "handle-transfer-apdu",
-               G_CALLBACK(on_sap_transfer_apdu), ctx);
-
-       g_signal_connect(sap,
-               "handle-set-protocol",
-               G_CALLBACK(on_sap_set_protocol), ctx);
-
-       g_signal_connect(sap,
-               "handle-set-power",
-               G_CALLBACK(on_sap_set_power), ctx);
-
-       g_signal_connect(sap,
-               "handle-get-card-reader-status",
-               G_CALLBACK(on_sap_get_card_reader_status), ctx);
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_sap_response(struct custom_data *ctx, UserRequest *ur,
-               struct dbus_request_info *dbus_info, enum tcore_response_command command,
-               unsigned int data_len, const void *data)
-{
-       const struct tresp_sap_req_connect *sap_conn = data;
-       const struct tresp_sap_req_disconnect *sap_disconn = data;
-       const struct tresp_sap_req_status *sap_status = data;
-       const struct tresp_sap_req_atr *sap_atr = data;
-       const struct tresp_sap_transfer_apdu *sap_apdu = data;
-       const struct tresp_sap_set_protocol *sap_protocol = data;
-       const struct tresp_sap_set_power *sap_power = data;
-       const struct tresp_sap_req_cardreaderstatus *sap_reader = data;
-
-       switch (command) {
-       case TRESP_SAP_REQ_CONNECT:
-               dbg("dbus comm - TRESP_SAP_REQ_CONNECT");
-               telephony_sap_complete_connect(dbus_info->interface_object, dbus_info->invocation,
-                               sap_conn->status, sap_conn->max_msg_size);
-               break;
-
-       case TRESP_SAP_REQ_DISCONNECT:
-               dbg("dbus comm - TRESP_SAP_REQ_DISCONNECT");
-               telephony_sap_complete_disconnect(dbus_info->interface_object, dbus_info->invocation,
-                               sap_disconn->result);
-               break;
-
-       case TRESP_SAP_REQ_STATUS:
-               dbg("dbus comm - TRESP_SAP_REQ_STATUS");
-               telephony_sap_complete_get_status(dbus_info->interface_object, dbus_info->invocation,
-                               sap_status->status);
-               break;
-
-       case TRESP_SAP_REQ_ATR: {
-               GVariantBuilder builder;
-               GVariant * atr_gv = NULL;
-               GVariant *inner_gv = NULL;
-               int i = 0;
-
-               dbg("dbus comm - TRESP_SAP_REQ_ATR");
-               g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
-               for (i = 0; i < (int)sap_atr->atr_length; i++) {
-                       dbg("sap_atr->atr[%d][0x%02x]", i, sap_atr->atr[i]);
-                       g_variant_builder_add(&builder, "y", sap_atr->atr[i]);
-               }
-               inner_gv = g_variant_builder_end(&builder);
-               atr_gv = g_variant_new("v", inner_gv);
-
-               telephony_sap_complete_get_atr(dbus_info->interface_object, dbus_info->invocation,
-                               sap_atr->result, atr_gv);
-       }
-               break;
-
-       case TRESP_SAP_TRANSFER_APDU: {
-               GVariantBuilder builder;
-               GVariant * apdu_gv = NULL;
-               GVariant *inner_gv = NULL;
-               int i = 0;
-
-               dbg("dbus comm - TRESP_SAP_TRANSFER_APDU");
-               g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
-               for (i = 0; i < (int)sap_apdu->resp_apdu_length; i++) {
-                       dbg("sap_apdu->resp_adpdu[%d][0x%02x]", i, sap_apdu->resp_adpdu[i]);
-                       g_variant_builder_add(&builder, "y", sap_apdu->resp_adpdu[i]);
-               }
-               inner_gv = g_variant_builder_end(&builder);
-               apdu_gv = g_variant_new("v", inner_gv);
-
-               telephony_sap_complete_transfer_apdu(dbus_info->interface_object, dbus_info->invocation,
-                               sap_apdu->result, apdu_gv);
-       }
-               break;
-
-       case TRESP_SAP_SET_PROTOCOL:
-               dbg("dbus comm - TRESP_SAP_SET_PROTOCOL");
-               telephony_sap_complete_set_protocol(dbus_info->interface_object, dbus_info->invocation,
-                               sap_protocol->result);
-               break;
-
-       case TRESP_SAP_SET_POWER:
-               dbg("dbus comm - TRESP_SAP_SET_POWER");
-               telephony_sap_complete_set_power(dbus_info->interface_object, dbus_info->invocation,
-                               sap_power->result);
-               break;
-
-       case TRESP_SAP_REQ_CARDREADERSTATUS:
-               dbg("dbus comm - TRESP_SAP_REQ_CARDREADERSTATUS");
-               telephony_sap_complete_get_card_reader_status(dbus_info->interface_object, dbus_info->invocation,
-                               sap_reader->result, sap_reader->reader_status);
-               break;
-
-       default:
-               dbg("not handled command[%d]", command);
-               break;
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_sap_notification(struct custom_data *ctx, CoreObject *source,
-               TelephonyObjectSkeleton *object, enum tcore_notification_command command,
-               unsigned int data_len, const void *data)
-{
-       TelephonySap *sap;
-       const struct tnoti_sap_status_changed *n_sap_status = data;
-       const struct tnoti_sap_disconnect *n_sap_disconn = data;
-
-       if (!object) {
-               dbg("object is NULL");
-               return FALSE;
-       }
-
-       sap = telephony_object_peek_sap(TELEPHONY_OBJECT(object));
-       if (sap == NULL) {
-               err("sap object is NULL!!!");
-               return FALSE;
-       }
-
-       switch (command) {
-       case TNOTI_SAP_STATUS:
-               dbg("notified sap_status[%d]", n_sap_status->status);
-               telephony_sap_emit_status(sap, n_sap_status->status);
-               break;
-       case TNOTI_SAP_DISCONNECT:
-               dbg("notified sap_disconnect type[%d]", n_sap_disconn->type);
-               telephony_sap_emit_disconnect(sap, n_sap_disconn->type);
-               break;
-       default:
-               dbg("not handled command[%d]", command);
-               break;
-       }
-
-       return TRUE;
-}
diff --git a/src/sat_ui_support/TelCall.h b/src/sat_ui_support/TelCall.h
deleted file mode 100644 (file)
index f822bdb..0000000
+++ /dev/null
@@ -1,1097 +0,0 @@
-/*
- * tel-plugin-dbus_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_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 TelCallNocliCause_t
- * This enumeration defines the value for "No Cli cause".
- */
-typedef enum {
-       TAPI_CALL_NO_CLI_CAUSE_NONE = -1,        /**< None */
-       TAPI_CALL_NO_CLI_CAUSE_UNAVAILABLE = 0x00,              /**< Unavailable */
-       TAPI_CALL_NO_CLI_CAUSE_REJECTBY_USER = 0x01,            /**< Rejected by User */
-       TAPI_CALL_NO_CLI_CAUSE_INTERACTION_OTHERSERVICES = 0x02, /**<  Other services */
-       TAPI_CALL_NO_CLI_CAUSE_COINLINE_PAYPHONE = 0x03,        /**< Coin line phone */
-} TelCallNocliCause_t;
-
-/**
- * @enum TelCallCliMode_t
- * This enumeration defines the value for "Cli mode".
- */
-typedef enum {
-       TAPI_CALL_PRES_AVAIL,           /** <Presentation Allowed */
-       TAPI_CALL_PRES_RESTRICTED,      /**<Presentation Restricted */
-       TAPI_CALL_NUM_UNAVAIL,          /**<Number Not Available */
-}TelCallCliMode_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 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 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 TelCallAlertSignalType_t
- * This structure contains the Alert Signal Type(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_SIGNAL_TYPE_TONE = 0x00,
-       TAPI_CALL_SIGNAL_TYPE_ISDN_ALERTING,
-       TAPI_CALL_SIGNAL_TYPE_IS54B_ALERTING,
-       TAPI_CALL_SIGNAL_TYPE_RESERVED
-} TelCallAlertSignalType_t;
-
-/**
- * @enum TelCallAlertPitchType_t
- * This structure contains the Alert Pitch Type(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_ALERT_PITCH_MED = 0x00,
-       TAPI_CALL_ALERT_PITCH_HIGH,
-       TAPI_CALL_ALERT_PITCH_LOW,
-       TAPI_CALL_ALERT_PITCH_RESERVED
-} TelCallAlertPitchType_t;
-
-/**
- * @enum TelCallToneSignal_t
- * This structure contains the Signals specific to alert signal type TAPI_CALL_SIGNAL_TYPE_TONE (CDMA only).
- */
-typedef enum {
-       TAPI_CALL_SIGNAL_TONE_DIAL = 0x00,
-       TAPI_CALL_SIGNAL_TONE_RINGBACK_TONE_ON,
-       TAPI_CALL_SIGNAL_TONE_INTERCEPT_TONE_ON,
-       TAPI_CALL_SIGNAL_TONE_ABBREV_TONE,
-       TAPI_CALL_SIGNAL_TONE_NETWORK_CONGESTION_TONE_ON,
-       TAPI_CALL_SIGNAL_TONE_ABBREV_NETWORK_CONGESTION,
-       TAPI_CALL_SIGNAL_TONE_BUSY_TONE_ON,
-       TAPI_CALL_SIGNAL_TONE_CFRM_TONE_ON,
-       TAPI_CALL_SIGNAL_TONE_ANSWER_TONE_ON,
-       TAPI_CALL_SIGNAL_TONE_CALL_WAITING_TONE_ON,
-       TAPI_CALL_SINGNAL_TONE_PIPE_TONE_ON,
-       TAPI_CALL_SIGNAL_TONE_OFF
-} TelCallToneSignal_t;
-
-/**
- * @enum TelCallIsdnAlertSignal_t
- * This structure contains the Signals specific to alert signal type TAPI_CALL_SIGNAL_TYPE_ISDN_ALERTING (CDMA only).
- */
-typedef enum {
-       TAPI_CALL_SIGNAL_ISDN_ALERT_NORMAL = 0x00,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_INTER_GROUP,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_SPECIAL_PRIORITY,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED1,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_PING_RING,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED2,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED3,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED4,
-       TAPI_CALL_SIGNAL_ISDN_ALERT_OFF
-} TelCallIsdnAlertSignal_t;
-
-/**
- * @enum TelCallIs54bAlertSignal_t
- * This structure contains the Signals specific to alert signal type TAPI_CALL_SIGNAL_TYPE_IS54B_ALERTING (CDMA only).
- */
-typedef enum {
-       TAPI_CALL_SIGNAL_IS54B_ALERT_NOTONE = 0x00,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_LONG,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT_LONG,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT_2,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_LONG_SHORT,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT_SHORT_SHORT,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_LONG,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_SHORT,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_SHORT_LONG,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_LONG_SHORT,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_SHORT_SHORT_SHORT,
-       TAPI_CALL_SIGNAL_IS54B_ALERT_PIP_PIP_PIP_PIP
-} TelCallIs54bAlertSignal_t;
-
-/**
- * @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.  */
-       TelCallCliMode_t CliMode;               /**<CLI Mode> */
-       TelCallNocliCause_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. */
-       TelCallCliMode_t CliMode;               /**<CLI Mode> */
-       TelCallNocliCause_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 {
-       TelCallCliMode_t CliMode;               /**<CLI Mode> */
-       TelCallNocliCause_t no_cli_cause; /**< Cause when no CLI number. */
-       unsigned char dcs;                                      /**< DCS */
-       unsigned char number_type;                      /**< Number type */
-       TelCallNameMode_t name_mode;            /**< Display mode of the name. */
-       char number[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];           /**< Caller number, null terminated ASCII */
-       char sub_address[TAPI_CALL_SUBADDRESS_LEN_MAX + 1]; /**< Called sub-address, null terminated ASCII */
-} TelCallConnectedNumberInfo_t;
-
-/**
- * This structure contains the voice privacy indication(CDMA only).
- */
-typedef struct {
-       TelCallPrivacyMode_t privacy_mode; /**< Voice Privacy Mode */
-} TelCallVoicePrivacyNoti_t;
-
-typedef struct {
-       TelCallAlertSignalType_t signal_type;
-       TelCallAlertPitchType_t pitch_type;
-       union {
-               TelCallToneSignal_t sig_tone_type;
-               TelCallIsdnAlertSignal_t sig_isdn_alert_type;
-               TelCallIs54bAlertSignal_t sig_is54b_alert_type;
-       } signal;
-} TelCallSignalInfoNoti_t;
-
-/**
- * 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;
-} TelCallInfoForwardedCallNoti_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 {
-       TelCallOtaspStatus_t otasp_status;
-} TelCallOtaspStatusNoti_t;
-
-typedef struct {
-       TelCallOtapaStatus_t otapa_status;
-} TelCallOtapaStatusNoti_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/src/sat_ui_support/TelDefines.h b/src/sat_ui_support/TelDefines.h
deleted file mode 100644 (file)
index 8badfbc..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * tel-plugin-dbus_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/src/sat_ui_support/TelErr.h b/src/sat_ui_support/TelErr.h
deleted file mode 100644 (file)
index 2567817..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * tel-plugin-dbus_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/src/sat_ui_support/TelSat.h b/src/sat_ui_support/TelSat.h
deleted file mode 100644 (file)
index 8fbf727..0000000
+++ /dev/null
@@ -1,719 +0,0 @@
-/*
- * tel-plugin-dbus_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*/
-       TelSimTypeOfNum_t ton; /**<     type of number          */
-       TelSimNumberingPlanIdentity_t npi; /**< number plan identity            */
-       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/src/sat_ui_support/TelSatEnvelope.h b/src/sat_ui_support/TelSatEnvelope.h
deleted file mode 100644 (file)
index 32903ca..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * tel-plugin-dbus_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/src/sat_ui_support/TelSatObj.h b/src/sat_ui_support/TelSatObj.h
deleted file mode 100644 (file)
index 6648cfc..0000000
+++ /dev/null
@@ -1,1399 +0,0 @@
-/*
- * tel-plugin-dbus_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                                             255      /**<   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/src/sat_ui_support/TelSatProactvCmd.h b/src/sat_ui_support/TelSatProactvCmd.h
deleted file mode 100644 (file)
index 545b093..0000000
+++ /dev/null
@@ -1,704 +0,0 @@
-/*
- * tel-plugin-dbus_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/src/sat_ui_support/TelSim.h b/src/sat_ui_support/TelSim.h
deleted file mode 100644 (file)
index 66593d0..0000000
+++ /dev/null
@@ -1,1384 +0,0 @@
-/*
- * 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
-
-/** MSISDN number max length */
-#define TAPI_SIM_MSISDN_DIALING_NUMBER_LEN     26
-
-/** 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 */
-/** 2048 is for QMI definition. (1024 : general length, 1024 : extra length for additional response) */
-#define TAPI_SIM_APDU_MAX_LEN 2048
-
-/** SIM 3G Phone book EF Max count */
-#define TAPI_SIM_PB_3G_FILE_MAX_COUNT 13
-
-/** SIM Phone book Record name max length */
-#define TAPI_SIM_PB_RECORD_NAME_MAX_LEN 255
-
-/** SIM Phone book Record number max length */
-#define TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN 255
-
-/** SIM Phone book Record email max length */
-#define TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN 255
-
-/** 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
-
-#define TAPI_SIM_SST_SERVICE_CNT_MAX 56
-
-#define TAPI_SIM_UST_SERVICE_CNT_MAX 64
-
-/**
- * @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 - 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 **/
-       TAPI_SIM_PERM_BLOCKED /**< Permanently Blocked **/
-} 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_CARD_CRASHED = 0x0d, /**< Runtime SIM card error **/
-       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, /**< Voicemail*/
-       TAPI_SIM_MAILBOX_FAX = 0x02, /**< Fax*/
-       TAPI_SIM_MAILBOX_EMAIL = 0x03, /**< Email*/
-       TAPI_SIM_MAILBOX_OTHER = 0x04, /**< Other*/
-       TAPI_SIM_MAILBOX_VIDEO = 0x05, /**< Videomail*/
-       TAPI_SIM_MAILBOX_DATA = 0x06, /**< Data*/
-} TelSimMailboxType_t;
-
-/**
- * @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;
-
-/**
- * @enum TelSimSSTService_t
- *  This enumeration defines the list of SST services in SIM Service Table. (GSM)
- */
-typedef enum {
-       // service 1 ~ 8
-       TAPI_SIM_SST_CHV1_DISABLE_FUNC = 0,     /**< CHV1 disable function */
-       TAPI_SIM_SST_ADN,                                       /**< abbreviated Dialing number */
-       TAPI_SIM_SST_FDN,                                       /**< fixed Dialing number */
-       TAPI_SIM_SST_SMS,                                       /**< short message storage */
-       TAPI_SIM_SST_AOC,                                       /**< advice of charge */
-       TAPI_SIM_SST_CCP,                                       /**< capability configuration parameters */
-       TAPI_SIM_SST_PLMN_SELECTOR,                     /**< plmn selector */
-       TAPI_SIM_SST_RFU1,                                      /**< rfu */
-
-       // service 9 ~ 16
-       TAPI_SIM_SST_MSISDN = 8,                        /**< msisdn */
-       TAPI_SIM_SST_EXT1,                                      /**< extension1 */
-       TAPI_SIM_SST_EXT2,                                      /**< extension2 */
-       TAPI_SIM_SST_SMS_PARAMS,                                /**< sms parameteres */
-       TAPI_SIM_SST_LND,                                       /**< last number dialed */
-       TAPI_SIM_SST_CELL_BROADCAST_MSG_ID,     /**< cell broadcast message identifier */
-       TAPI_SIM_SST_GID_LV1,                           /**< group identifier level 1 */
-       TAPI_SIM_SST_GID_LV2,                           /**< group identifier level 2 */
-
-       // service 17 ~ 24
-       TAPI_SIM_SST_SPN = 16,                          /**< service provider name */
-       TAPI_SIM_SST_SDN,                                       /**< service Dialing number */
-       TAPI_SIM_SST_EXT3,                                      /**< extension3 */
-       TAPI_SIM_SST_RFU2,                                      /**< rfu */
-       TAPI_SIM_SST_VGCS_GID_LIST,                     /**< vgcs group identifier (EF-VGCS, EF-VGCSS) */
-       TAPI_SIM_SST_VBS_GID_LIST,                      /**< vbs group identifier (EF-VBS, EF-VBSS) */
-       TAPI_SIM_SST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC,      /**< enhanced multi-level precedence and pre-emption service */
-       TAPI_SIM_SST_AUTO_ANSWER_FOR_EMLPP,     /**< automatic answer fro eMLPP */
-
-       // service 25 ~ 32,
-       TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_CB = 24,     /**< data download via sms-cb */
-       TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_PP,          /**< data download via sms-pp */
-       TAPI_SIM_SST_MENU_SELECTION,                                    /**< menu selection */
-       TAPI_SIM_SST_CALL_CTRL,                                         /**< call control */
-       TAPI_SIM_SST_PROACTIVE_SIM,                                     /**< proactive sim command */
-       TAPI_SIM_SST_CELL_BROADCAST_MSG_ID_RANGES,      /**< cell broadcast message identifier ranges */
-       TAPI_SIM_SST_BDN,                                                       /**< barred Dialing numbers */
-       TAPI_SIM_SST_EXT4,                                                      /**< extension 4 */
-
-       // service 33 ~ 40
-       TAPI_SIM_SST_DEPERSONALIZATION_CTRL_KEYS = 32,  /**< de-personalization control keys */
-       TAPI_SIM_SST_COOPERATIVE_NETWORK_LIST,                  /**< co-operative network list */
-       TAPI_SIM_SST_SMS_STATUS_REPORTS,                                        /**< short message status reports */
-       TAPI_SIM_SST_NIA,                                       /**< network's indication of alerting in the MS (NIA) */
-       TAPI_SIM_SST_MO_SMS_CTRL_BY_SIM,                /**< mobile-originated short message control by sim */
-       TAPI_SIM_SST_GPRS,                                      /**< gprs */
-       TAPI_SIM_SST_IMG,                                       /**< image */
-       TAPI_SIM_SST_SOLSA,                                     /**< support of local service area */
-
-       // service 41 ~ 48
-       TAPI_SIM_SST_USSD_STR_DATA_OBJECT_SUPPORTED_IN_CALL_CTRL = 40,  /**< ussd string data object supported in call control */
-       TAPI_SIM_SST_RUN_AT_CMD_CMD,                                                    /**< RUN AT COMMAND command */
-       TAPI_SIM_SST_USER_CTRLED_PLMN_SELECTOR_WACT,                    /**< user controlled PLMN selector with Access technology */
-       TAPI_SIM_SST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT,                /**< operator controlled PLMN selector with Access technology */
-       TAPI_SIM_SST_HPLMN_SELECTOR_WACT,                       /**< HPLMN selector with access technology */
-       TAPI_SIM_SST_CPBCCH_INFO,                                       /**< CPBCCH information */
-       TAPI_SIM_SST_INVESTIGATION_SCAN,                                /**< investigation scan */
-       TAPI_SIM_SST_EXTENDED_CAPA_CONF_PARAMS,         /**< extended capability configuration parameters */
-
-       //      service 49 ~ 56
-       TAPI_SIM_SST_MEXE = 48,                         /**< MExE */
-       TAPI_SIM_SST_RPLMN_LAST_USED_ACCESS_TECH,       /**< RPLMN last used access technology */
-       TAPI_SIM_SST_PLMN_NETWORK_NAME,         /*PLMN Network Name*/
-       TAPI_SIM_SST_OPERATOR_PLMN_LIST,                /*Operator PLMN List*/
-       TAPI_SIM_SST_MBDN,                                      /*Mailbox Dialling Numbers*/
-       TAPI_SIM_SST_MWIS,                                      /*Message Waiting Indication Status*/
-       TAPI_SIM_SST_CFIS,                                      /*Call Forwarding Indication Status*/
-       TAPI_SIM_SST_SPDI,                                      /*Service Provider Display Information*/
-} TelSimSSTService_t;
-
-/**
- * @enum TelSimUSTService_t
- *  This enumeration defines the list of UST services in SIM Service Table. (USIM)
- */
-typedef enum {
-       // service 1 ~ 8
-       TAPI_SIM_UST_LOCAL_PB = 0,              /**< local phone book */
-       TAPI_SIM_UST_FDN,                               /**< fixed Dialing number */
-       TAPI_SIM_UST_EXT2,                              /**< extension2 */
-       TAPI_SIM_UST_SDN,                               /**< service Dialing number */
-       TAPI_SIM_UST_EXT3,                              /**< extension3 */
-       TAPI_SIM_UST_BDN,                               /**< barred Dialing numbers */
-       TAPI_SIM_UST_EXT4,                              /**< extension 4 */
-       TAPI_SIM_UST_OUTGOING_CALL_INFO,        /**< outgoing call information */
-
-       // service 9 ~ 16
-       TAPI_SIM_UST_INCOMING_CALL_INFO = 8,            /**< incoming call information */
-       TAPI_SIM_UST_SMS,                                               /**< short message storage */
-       TAPI_SIM_UST_SMS_STATUS_REPORTS,                        /**< short message status reports */
-       TAPI_SIM_UST_SMS_PARAMS,                                        /**< sms parameteres */
-       TAPI_SIM_UST_AOC,                                               /**< advice of charge */
-       TAPI_SIM_UST_CCP,                                               /**< capability configuration parameters */
-       TAPI_SIM_UST_CELL_BROADCAST_MSG_ID,             /**< cell broadcast message identifier */
-       TAPI_SIM_UST_CELL_BROADCAST_MSG_ID_RANGES,      /**< cell broadcast message identifier ranges */
-
-       // service 17 ~ 24
-       TAPI_SIM_UST_GID_LV1 = 16,                                              /**< group identifier level 1 */
-       TAPI_SIM_UST_GID_LV2,                                                   /**< group identifier level 2 */
-       TAPI_SIM_UST_SPN,                                                               /**< service provider name */
-       TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_WACT,            /**< user controlled PLMN selector with Access technology */
-       TAPI_SIM_UST_MSISDN,                                                                                    /**< msisdn */
-       TAPI_SIM_UST_IMG,                                                                                       /**< image */
-       TAPI_SIM_UST_SOLSA,                                                                                     /**< support of local service area */
-       TAPI_SIM_UST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC,      /**< enhanced multi-level precedence and pre-emption service */
-
-       // service 25 ~ 32
-       TAPI_SIM_UST_AUTO_ANSWER_FOR_EMLPP = 24,        /**< automatic answer fro eMLPP */
-       TAPI_SIM_UST_RFU1,                                              /**< rfu */
-       TAPI_SIM_UST_GSM_ACCESS,                                        /**< gsm access */
-       TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_PP,  /**< data download via sms-pp */
-       TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_CB,  /**< data download via sms-cb */
-       TAPI_SIM_UST_CALL_CTRL,                                 /**< call control by usim*/
-       TAPI_SIM_UST_MO_SMS_CTRL,                               /**< mobile-originated short message control by usim */
-       TAPI_SIM_UST_RUN_AT_CMD_CMD,                            /**< RUN AT COMMAND command */
-
-       // service 33 ~ 40
-       TAPI_SIM_UST_SHALL_BE_SET_TO_ONE = 32,  /**< shall be set to 1 */
-       TAPI_SIM_UST_ENABLED_SRVC_TABLE,                        /**< enabled service table */
-       TAPI_SIM_UST_ACL,                                               /**< APN control list */
-       TAPI_SIM_UST_DEPERSONALIZATION_CTRL_KEYS,       /**< de-personalization control keys */
-       TAPI_SIM_UST_COOPERATIVE_NETWORK_LIST,          /**< co-operative network list */
-       TAPI_SIM_UST_GSM_SEC_CONTEXT,                           /**< gsm security context */
-       TAPI_SIM_UST_CPBCCH_INFO,                                       /**< CPBCCH information */
-       TAPI_SIM_UST_INVESTIGATION_SCAN,                                /**< investigation scan */
-
-       // service 41 ~ 48
-       TAPI_SIM_UST_MEXE = 40,                                                         /**< MExE */
-       TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT,                /**< operator controlled PLMN selector with Access technology */
-       TAPI_SIM_UST_HPLMN_SELECTOR_WACT,       /**< HPLMN selector with access technology */
-       TAPI_SIM_UST_EXT5,                                      /**< extension 5 */
-       TAPI_SIM_UST_PLMN_NETWORK_NAME,         /*PLMN Network Name*/
-       TAPI_SIM_UST_OPERATOR_PLMN_LIST,                /*Operator PLMN List*/
-       TAPI_SIM_UST_MBDN,                                      /*Mailbox Dialling Numbers*/
-       TAPI_SIM_UST_MWIS,                                      /*Message Waiting Indication Status*/
-
-       // service 49 ~ 56
-       TAPI_SIM_UST_CFIS = 48,                                         /*Call Forwarding Indication Status*/
-       TAPI_SIM_UST_RPLMN_LAST_USED_ACCESS_TECH,       /**< RPLMN last used access technology */
-       TAPI_SIM_UST_SPDI,                                                      /*Service Provider Display Information*/
-       TAPI_SIM_UST_MMS,                                                       /**< multi media messaging service */
-       TAPI_SIM_UST_EXT8,                                                      /**< extension 8 */
-       TAPI_SIM_UST_CALL_CTRL_ON_GPRS,                         /**< call control on gprs by usim */
-       TAPI_SIM_UST_MMS_USER_CONNECTIVITY_PARAMS,      /**< mms user connectivity parameters */
-       TAPI_SIM_UST_NIA,                                                       /**< network's indication of alerting in the MS (NIA) */
-
-       // service 57 ~ 64
-       TAPI_SIM_UST_VGCS_GID_LIST = 56,                /**< vgcs group identifier List (EF-VGCS, EF-VGCSS) */
-       TAPI_SIM_UST_VBS_GID_LIST,                      /**< vbs group identifier List (EF-VBS, EF-VBSS) */
-       TAPI_SIM_UST_PSEUDONYM,
-       TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_IWLAN,                   /**< user controlled PLMN selector for I-WLAN access */
-       TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_IWLAN,               /**< operator controlled PLMN selector for I-WLAN access */
-       TAPI_SIM_UST_USER_CTRLED_WSID_LIST,
-       TAPI_SIM_UST_OPERATOR_CTRLED_WSID_LIST,
-       TAPI_SIM_UST_VGCS_SEC,
-} TelSimUSTService_t;
-
-typedef struct {
-       char service[TAPI_SIM_SST_SERVICE_CNT_MAX];     // should access with 'enum TelSimSSTService_t' as index
-} TelSimSST_t;
-
-typedef struct {
-       char service[TAPI_SIM_UST_SERVICE_CNT_MAX];     // should access with 'enum TelSimUSTService_t' as index
-} TelSimUST_t;
-
-typedef struct {
-       TelSimCardType_t sim_type;
-       union {
-               TelSimSST_t sst;
-               TelSimUST_t ust;
-       } table;
-} TelSimServiceTable_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_MSISDN_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 short apdu_len;
-       unsigned char* apdu;
-} TelSimApdu_t;
-
-/**
- * This data structure defines the data for the Response of sending apdu.
- */
-typedef struct {
-       unsigned short 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 short 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;
-
-/**
- * This data structure gives the phone book status of current SIM.
- */
-typedef struct {
-       int init_completed;
-       TelSimPbList_t pb_list;
-} TelSimPbStatus_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[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];
-       TelSimTextEncrypt_t dcs;
-
-       unsigned char number[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
-       TelSimTypeOfNum_t ton;
-
-       /* following field is valid in only USIM*/
-       unsigned char sne[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];
-       TelSimTextEncrypt_t sne_dcs;
-       unsigned char anr1[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
-       TelSimTypeOfNum_t anr1_ton;
-       unsigned char anr2[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
-       TelSimTypeOfNum_t anr2_ton;
-       unsigned char anr3[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
-       TelSimTypeOfNum_t anr3_ton;
-
-       unsigned char email1[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
-       unsigned char email2[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
-       unsigned char email3[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
-       unsigned char email4[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+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 */
-       unsigned short PbUsedCount; /**< Phone book used record count */
-} 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/src/sat_ui_support/TelSs.h b/src/sat_ui_support/TelSs.h
deleted file mode 100644 (file)
index 5a9a673..0000000
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * tel-plugin-dbus_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=0x0, /**<  SS operation was successful */
-
-       TAPI_SS_UNKNOWNSUBSCRIBER= 0x01, /**< SS error indicating unknown/illegal subscriber.  */
-       TAPI_SS_ILLEGALSUBSCRIBER= 0x09, /**<This error is returned when illegality of the access has been @n
-        established by use of authentication procedure. */
-
-       TAPI_SS_BEARERSERVICENOTPROVISIONED= 0x0a, /**<The network returns this error when it is requested to  @n
-        perform an operation on a supplementary service  */
-       TAPI_SS_TELESERVICENOTPROVISIONED= 0x0b, /**<The network returns this error when it is requested to perform  @n
-        an operation on a supplementary service  */
-       TAPI_SS_ILLEGALEQUIPMENT= 0x0c, /**<This error is returned when the IMEI check procedure has shown that  @n
-        the IMEI is blacklisted or not whitelisted  */
-       TAPI_SS_CALLBARRED= 0x0d, /**< This error is returned by the network to the MS when call independent subscriber control procedures are barred by the operator */
-       TAPI_SS_ILLEGALSSOPERATION=0x10, /**<This error is returned by the network when it is requested to perform an illegal operation @n
-        which is defined as not applicable for the relevant supplementary service */
-       TAPI_SS_ERRORSTATUS= 0x11, /**<This error is returned by the network when it is requested to perform an operation @n
-        which is not compatible with the current status of the relevant supplementary service. */
-       TAPI_SS_NOTAVAILABLE= 0x12, /**< SS not available in network */
-       TAPI_SS_SUBSCRIPTIONVIOLATION= 0x13, /**< SS service subscription violation. */
-       TAPI_SS_INCOMPATIBILITY= 0x14, /**< This error is returned by the network when it is requested for a supplementary service operation incompatible with the @n
-        status of another supplementary service or with the teleservice or bearer service for which the operation is requested */
-       TAPI_SS_FACILITYNOTSUPPORTED= 0x15, /**< SS service facility not supported  */
-       TAPI_SS_ABSENTSUBSCRIBER= 0x1b, /**< This error is returned when the subscriber has activated the detach service or the system detects the absence condition */
-
-       TAPI_SS_SYSTEMFAILURE= 0x22, /**< This error is returned by the network, when it cannot perform an operation because of a failure in the network */
-       TAPI_SS_DATAMISSING= 0x23, /**< This error is returned by the network when an optional parameter is missing in an invoke component @n
-        or an inner data structure, while it is required by the context of the request. */
-       TAPI_SS_UNEXPECTEDDATAVALUE= 0x24, /**< SS error indicating unexpected data value on network side *//**< SS operation barred.  */
-       TAPI_SS_PWREGISTRATIONFAILURE= 0x25, /**< SS error indicating change password failure. */
-       TAPI_SS_NEGATIVEPWCHECK= 0x26, /**< SS error indicating negative password check.  */
-       TAPI_SS_NUMBEROFPWATTEMPTSVIOLATION= 0x2b, /**< SS error indicating barring password attempts violated.  */
-
-       TAPI_SS_UNKNOWNALPHABET= 0x47, /**< SS error indicating unknown SS data coding of alphabet */
-       TAPI_SS_USSDBUSY= 0x48, /**< SS error indicating USSD Busy(Already SS / USSD is ongoing).  */
-
-       TAPI_SS_REJECTEDBYUSER= 0x79, /**< SS operation rejected by user.  */
-       TAPI_SS_REJECTEDBYNETWORK=0x7a, /**< SS operation rejected by network.  */
-       TAPI_SS_DEFLECTIONTOSERVEDSUBSCRIBER= 0x7b, /**< This error is returned if a diversion to the served  @n
-        subscriber's number was requested.  */
-       TAPI_SS_SPECIALSERVICECODE= 0x7c, /**< This error is returned if diversion to a special service code was requested.  */
-       TAPI_SS_INVALIDDEFLECTEDTONUMBER= 0x7d, /**< SS error indicating the invalid deflected to number.  */
-       TAPI_SS_MAXNOMPTYEXCEEDED= 0x7e, /**< SS error indicating Maximum MPTY is reached.  */
-       TAPI_SS_RESOURCESNOTAVAILABLE= 0x7f, /**< SS error indicating resources not available in network.  */
-
-       TAPI_SS_TIMEREXPIRE, /**< SS operation timer expired on 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= 0x01, /**< identify the party calling this phone */
-       TAPI_CALLING_LINE_IDENTITY_RESTRICTION, /**< hide the identity of this phone when calling others */
-       TAPI_CONNECTED_LINE_IDENTITY_PRESENTATION, /**< identify the party to whom the calling party (this phone) is connected */
-       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;
-
-typedef enum {
-       TAPI_SS_TYPE_BARRING = 0x00,
-       TAPI_SS_TYPE_FORWARDING,
-       TAPI_SS_TYPE_WAITING,
-       TAPI_SS_TYPE_CLI,
-       TAPI_SS_TYPE_SEND_USSD,
-       TAPI_SS_TYPE_MAX
-}TelSsInfoType_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 SUPS information message notification type.
- */
-typedef struct {
-       TelSsCause_t Cause; /**< Cause */
-       TelSsInfoType_t SsType; /**< SUPS Information  */
-} TelSsInfo_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_
-/**
- * @}
- */
index 0758b7d..9de75f1 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * tel-plugin-dbus-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 <string.h>
 #include <stdlib.h>
@@ -9,9 +29,10 @@
 #include <appsvc.h>
 #include <bundle_internal.h>
 
-#include "TelSat.h"
 #include "sat_ui_support.h"
 
+#define CISS_APP "org.tizen.ciss"
+
 struct sat_ui_app_launch_data {
        bundle *bundle_data; /**<bundle data*/
        char *slot_info; /**<slot info*/
@@ -112,7 +133,7 @@ static gboolean _sat_ui_support_processing_setup_menu_ind(GVariant *data, char *
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatSetupMenuInfo_t setup_menu;
+       struct tel_sat_setup_menu_info setup_menu;
 
        gchar *title = NULL;
        gint command_id, item_cnt;
@@ -143,7 +164,7 @@ static gboolean _sat_ui_support_processing_setup_menu_ind(GVariant *data, char *
        gchar *item_str;
        gint item_id;
 #endif
-       memset(&setup_menu, 0, sizeof(TelSatSetupMenuInfo_t));
+       memset(&setup_menu, 0, sizeof(struct tel_sat_setup_menu_info));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(ibs@vibb@v@v)", &command_id, &b_present, &title, &items, &item_cnt,
@@ -154,7 +175,7 @@ static gboolean _sat_ui_support_processing_setup_menu_ind(GVariant *data, char *
 #endif
        setup_menu.commandId = command_id;
        setup_menu.bIsMainMenuPresent = (b_present ? 1 : 0);
-       memcpy(setup_menu.satMainTitle, title, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
+       memcpy(setup_menu.satMainTitle, title, SAT_ALPHA_ID_LEN_MAX+1);
        g_free(title);
 
        setup_menu.satMainMenuNum = item_cnt;
@@ -165,7 +186,7 @@ static gboolean _sat_ui_support_processing_setup_menu_ind(GVariant *data, char *
                g_variant_get(unbox, "a(si)", &iter);
                while (g_variant_iter_loop(iter, "(si)", &item_str, &item_id)) {
                        setup_menu.satMainMenuItem[local_index].itemId = item_id;
-                       memcpy(setup_menu.satMainMenuItem[local_index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
+                       memcpy(setup_menu.satMainMenuItem[local_index].itemString, item_str, SAT_DEF_ITEM_STR_LEN_MAX + 6);
                        local_index++;
                }
                g_variant_iter_free(iter);
@@ -228,7 +249,7 @@ static gboolean _sat_ui_support_processing_setup_menu_ind(GVariant *data, char *
        }
 #endif
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_SETUP_MENU);
-       encoded_data = g_base64_encode((const guchar*)&setup_menu, sizeof(TelSatSetupMenuInfo_t));
+       encoded_data = g_base64_encode((const guchar*)&setup_menu, sizeof(struct tel_sat_setup_menu_info));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -249,7 +270,7 @@ static gboolean _sat_ui_support_processing_display_text_ind(GVariant *data, char
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatDisplayTextInd_t display_text;
+       struct tel_sat_display_text_ind display_text;
 
        gchar* text = NULL;
        gint command_id, text_len, duration;
@@ -262,7 +283,7 @@ static gboolean _sat_ui_support_processing_display_text_ind(GVariant *data, char
        gchar *icon_data = NULL;
        GVariantIter *iter;
 #endif
-       memset(&display_text, 0, sizeof(TelSatDisplayTextInd_t));
+       memset(&display_text, 0, sizeof(struct tel_sat_display_text_ind));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(isiibbb@v)", &command_id, &text, &text_len, &duration,
@@ -272,7 +293,7 @@ static gboolean _sat_ui_support_processing_display_text_ind(GVariant *data, char
                &high_priority, &user_rsp_required, &immediately_rsp);
 #endif
        display_text.commandId = command_id;
-       memcpy(display_text.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+       memcpy(display_text.text.string, text, SAT_TEXT_STRING_LEN_MAX+1);
        g_free(text);
 
        display_text.text.stringLen = text_len;
@@ -308,7 +329,7 @@ static gboolean _sat_ui_support_processing_display_text_ind(GVariant *data, char
        dbg("duration(%d) user_rsp(%d) immediately_rsp(%d)", duration, user_rsp_required, immediately_rsp);
 
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_DISPLAY_TEXT);
-       encoded_data = g_base64_encode((const guchar*)&display_text, sizeof(TelSatDisplayTextInd_t));
+       encoded_data = g_base64_encode((const guchar*)&display_text, sizeof(struct tel_sat_display_text_ind));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -329,7 +350,7 @@ static gboolean _sat_ui_support_processing_select_item_ind(GVariant *data, char
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatSelectItemInd_t select_item;
+       struct tel_sat_select_item_ind select_item;
 
        gboolean help_info ;
        gchar *selected_text = NULL;
@@ -360,7 +381,7 @@ static gboolean _sat_ui_support_processing_select_item_ind(GVariant *data, char
        gchar *item_str;
        gint item_id, item_len;
 #endif
-       memset(&select_item, 0, sizeof(TelSatSelectItemInd_t));
+       memset(&select_item, 0, sizeof(struct tel_sat_select_item_ind));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(ibsiii@v@v@v)", &command_id, &help_info, &selected_text,
@@ -371,7 +392,7 @@ static gboolean _sat_ui_support_processing_select_item_ind(GVariant *data, char
 #endif
        select_item.commandId = command_id;
        select_item.bIsHelpInfoAvailable = (help_info ? 1 : 0);
-       memcpy(select_item.text.string, selected_text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+       memcpy(select_item.text.string, selected_text, SAT_TEXT_STRING_LEN_MAX+1);
        g_free(selected_text);
 
        select_item.text.stringLen = text_len;
@@ -385,7 +406,7 @@ static gboolean _sat_ui_support_processing_select_item_ind(GVariant *data, char
                while (g_variant_iter_loop(iter, "(iis)", &item_id, &item_len, &item_str)) {
                        select_item.menuItem[local_index].itemId = item_id;
                        select_item.menuItem[local_index].textLen = item_len;
-                       memcpy(select_item.menuItem[local_index].text, item_str, TAPI_SAT_ITEM_TEXT_LEN_MAX + 1);
+                       memcpy(select_item.menuItem[local_index].text, item_str, SAT_ITEM_TEXT_LEN_MAX + 1);
                        local_index++;
                }
                g_variant_iter_free(iter);
@@ -446,7 +467,7 @@ static gboolean _sat_ui_support_processing_select_item_ind(GVariant *data, char
        }
 #endif
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_SELECT_ITEM);
-       encoded_data = g_base64_encode((const guchar*)&select_item, sizeof(TelSatSelectItemInd_t));
+       encoded_data = g_base64_encode((const guchar*)&select_item, sizeof(struct tel_sat_select_item_ind));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -467,7 +488,7 @@ static gboolean _sat_ui_support_processing_get_inkey_ind(GVariant *data, char *s
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatGetInkeyInd_t get_inkey;
+       struct tel_sat_get_inkey_ind get_inkey;
 
        gint command_id, key_type, input_character_mode;
        gint text_len, duration;
@@ -481,7 +502,7 @@ static gboolean _sat_ui_support_processing_get_inkey_ind(GVariant *data, char *s
        gchar *icon_data = NULL;
        GVariantIter *iter;
 #endif
-       memset(&get_inkey, 0, sizeof(TelSatGetInkeyInd_t));
+       memset(&get_inkey, 0, sizeof(struct tel_sat_get_inkey_ind));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(iiibbsii@v)", &command_id, &key_type, &input_character_mode,
@@ -495,7 +516,7 @@ static gboolean _sat_ui_support_processing_get_inkey_ind(GVariant *data, char *s
        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);
+       memcpy(get_inkey.text.string, text, SAT_TEXT_STRING_LEN_MAX+1);
        g_free(text);
 
        get_inkey.text.stringLen = text_len;
@@ -526,7 +547,7 @@ static gboolean _sat_ui_support_processing_get_inkey_ind(GVariant *data, char *s
        }
 #endif
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_GET_INKEY);
-       encoded_data = g_base64_encode((const guchar*)&get_inkey, sizeof(TelSatGetInkeyInd_t));
+       encoded_data = g_base64_encode((const guchar*)&get_inkey, sizeof(struct tel_sat_get_inkey_ind));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -547,7 +568,7 @@ static gboolean _sat_ui_support_processing_get_input_ind(GVariant *data, char *s
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatGetInputInd_t get_input;
+       struct tel_sat_get_input_ind get_input;
 
        gint command_id, input_character_mode;
        gint text_len, def_text_len, rsp_len_min, rsp_len_max;
@@ -561,7 +582,7 @@ static gboolean _sat_ui_support_processing_get_input_ind(GVariant *data, char *s
        gchar *icon_data = NULL;
        GVariantIter *iter;
 #endif
-       memset(&get_input, 0, sizeof(TelSatGetInputInd_t));
+       memset(&get_input, 0, sizeof(struct tel_sat_get_input_ind));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(iibbbsiiisi@v)", &command_id, &input_character_mode, &b_numeric, &b_help_info, &b_echo_input,
@@ -575,11 +596,11 @@ static gboolean _sat_ui_support_processing_get_input_ind(GVariant *data, char *s
        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);
+       memcpy(get_input.text.string, text, SAT_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);
+       memcpy(get_input.defaultText.string, def_text, SAT_TEXT_STRING_LEN_MAX+1);
        get_input.defaultText.stringLen = def_text_len;
        g_free(text);
        g_free(def_text);
@@ -609,7 +630,7 @@ static gboolean _sat_ui_support_processing_get_input_ind(GVariant *data, char *s
        }
 #endif
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_GET_INPUT);
-       encoded_data = g_base64_encode((const guchar*)&get_input, sizeof(TelSatGetInputInd_t));
+       encoded_data = g_base64_encode((const guchar*)&get_input, sizeof(struct tel_sat_get_input_ind));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -630,13 +651,13 @@ static gboolean _sat_ui_support_processing_refresh_ind(GVariant *data, char *slo
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatRefreshIndUiInfo_t refresh_info;
+       struct tel_sat_refresh_ind_ui_info refresh_info;
 
        gint command_id = 0;
        gint refresh_type = 0;
        GVariant *file_list = NULL;
 
-       memset(&refresh_info, 0, sizeof(TelSatRefreshIndUiInfo_t));
+       memset(&refresh_info, 0, sizeof(struct tel_sat_refresh_ind_ui_info));
 
        dbg("refresh type_format(%s)", g_variant_get_type_string(data));
        g_variant_get(data, "(ii@v)", &command_id, &refresh_type, &file_list);
@@ -652,7 +673,7 @@ static gboolean _sat_ui_support_processing_refresh_ind(GVariant *data, char *slo
        refresh_info.refreshType = refresh_type;
 
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_REFRESH);
-       encoded_data = g_base64_encode((const guchar*)&refresh_info, sizeof(TelSatRefreshIndUiInfo_t));
+       encoded_data = g_base64_encode((const guchar*)&refresh_info, sizeof(struct tel_sat_refresh_ind_ui_info));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -673,7 +694,7 @@ static gboolean _sat_ui_support_processing_play_tone_ind(GVariant *data, char *s
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatPlayToneInd_t play_tone_info;
+       struct tel_sat_play_tone_ind play_tone_info;
 
        gint command_id, tone_type, duration;
        gint text_len;
@@ -686,7 +707,7 @@ static gboolean _sat_ui_support_processing_play_tone_ind(GVariant *data, char *s
        gchar *icon_data = NULL;
        GVariantIter *iter;
 #endif
-       memset(&play_tone_info, 0, sizeof(TelSatPlayToneInd_t));
+       memset(&play_tone_info, 0, sizeof(struct tel_sat_play_tone_ind));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(isi@vii)", &command_id, &text, &text_len, &icon_id, &tone_type, &duration);
@@ -696,10 +717,10 @@ static gboolean _sat_ui_support_processing_play_tone_ind(GVariant *data, char *s
        play_tone_info.commandId = command_id;
        play_tone_info.duration = duration;
        play_tone_info.text.stringLen = text_len;
-       memcpy(play_tone_info.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+       memcpy(play_tone_info.text.string, text, SAT_TEXT_STRING_LEN_MAX+1);
        g_free(text);
 
-       play_tone_info.tone.type = tone_type;
+       play_tone_info.tone.tone_type = tone_type;
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        if (icon_id) {
@@ -726,7 +747,7 @@ static gboolean _sat_ui_support_processing_play_tone_ind(GVariant *data, char *s
        }
 #endif
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_PLAY_TONE);
-       encoded_data = g_base64_encode((const guchar*)&play_tone_info, sizeof(TelSatPlayToneInd_t));
+       encoded_data = g_base64_encode((const guchar*)&play_tone_info, sizeof(struct tel_sat_play_tone_ind));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -747,7 +768,7 @@ static gboolean _sat_ui_support_processing_idle_mode_text_ind(GVariant *data, ch
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatSetupIdleModeTextInd_t idle_mode_text_info;
+       struct tel_sat_setup_idle_mode_text_ind idle_mode_text_info;
 
        gint command_id, text_len;
        gchar* text = NULL;
@@ -759,7 +780,7 @@ static gboolean _sat_ui_support_processing_idle_mode_text_ind(GVariant *data, ch
        gchar *icon_data = NULL;
        GVariantIter *iter;
 #endif
-       memset(&idle_mode_text_info, 0, sizeof(TelSatSetupIdleModeTextInd_t));
+       memset(&idle_mode_text_info, 0, sizeof(struct tel_sat_setup_idle_mode_text_ind));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(isi@v)", &command_id, &text, &text_len, &icon_id);
@@ -768,7 +789,7 @@ static gboolean _sat_ui_support_processing_idle_mode_text_ind(GVariant *data, ch
 #endif
        idle_mode_text_info.commandId = command_id;
        idle_mode_text_info.text.stringLen = text_len;
-       memcpy(idle_mode_text_info.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+       memcpy(idle_mode_text_info.text.string, text, SAT_TEXT_STRING_LEN_MAX+1);
        g_free(text);
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -796,7 +817,7 @@ static gboolean _sat_ui_support_processing_idle_mode_text_ind(GVariant *data, ch
        }
 #endif
        cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT);
-       encoded_data = g_base64_encode((const guchar*)&idle_mode_text_info, sizeof(TelSatSetupIdleModeTextInd_t));
+       encoded_data = g_base64_encode((const guchar*)&idle_mode_text_info, sizeof(struct tel_sat_setup_idle_mode_text_ind));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -823,7 +844,7 @@ static gboolean _sat_ui_support_processing_ui_info_ind(enum tel_sat_proactive_cm
        gboolean rv = FALSE;
        bundle *bundle_data = 0;
        gchar *encoded_data = NULL, *cmd_type = NULL;
-       TelSatSendUiInfo_t ui_info;
+       struct tel_sat_send_ui_info ui_info;
 
        gint command_id, text_len;
        gboolean user_confirm;
@@ -836,7 +857,7 @@ static gboolean _sat_ui_support_processing_ui_info_ind(enum tel_sat_proactive_cm
        GVariant *icon_id = NULL;
        GVariantIter *iter;
 #endif
-       memset(&ui_info, 0, sizeof(TelSatSendUiInfo_t));
+       memset(&ui_info, 0, sizeof(struct tel_sat_send_ui_info));
 
 #if defined(TIZEN_SUPPORT_SAT_ICON)
        g_variant_get(data, "(isib@v)", &command_id, &text, &text_len, &user_confirm, &icon_id);
@@ -846,7 +867,7 @@ static gboolean _sat_ui_support_processing_ui_info_ind(enum tel_sat_proactive_cm
        dbg("command_id(%d) data(%s) len(%d) user_confirm(%d)", command_id, text, text_len, user_confirm);
 
        ui_info.commandId = command_id;
-       memcpy(ui_info.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+       memcpy(ui_info.text.string, text, SAT_TEXT_STRING_LEN_MAX+1);
        g_free(text);
 
        ui_info.text.stringLen = text_len;
@@ -877,7 +898,7 @@ static gboolean _sat_ui_support_processing_ui_info_ind(enum tel_sat_proactive_cm
        }
 #endif
        cmd_type = g_strdup_printf("%d", cmd);
-       encoded_data = g_base64_encode((const guchar*)&ui_info, sizeof(TelSatSendUiInfo_t));
+       encoded_data = g_base64_encode((const guchar*)&ui_info, sizeof(struct tel_sat_send_ui_info));
 
        bundle_data = bundle_create();
        bundle_add(bundle_data, "KEY_EXEC_TYPE", "1");
@@ -971,75 +992,6 @@ gboolean sat_ui_support_launch_sat_ui(enum tel_sat_proactive_cmd_type cmd_type,
        return result;
 }
 
-gboolean sat_ui_support_launch_call_application(enum tel_sat_proactive_cmd_type cmd_type, GVariant *data, enum dbus_tapi_sim_slot_id slot_id)
-{
-       char buffer[300];
-       char slot_info[2] = {0,};
-       bundle *bundle_data = 0;
-
-       dbg("launch call application by aul");
-       bundle_data = bundle_create();
-
-       appsvc_set_operation(bundle_data, APPSVC_OPERATION_CALL);
-       appsvc_set_uri(bundle_data, "tel:MT");
-
-       switch (cmd_type) {
-       case SAT_PROATV_CMD_SETUP_CALL: {
-               gint command_id, call_type, confirm_text_len, text_len, duration;
-               gchar *confirm_text = NULL, *text = NULL, *call_number = NULL;
-#if defined(TIZEN_SUPPORT_SAT_ICON)
-               GVariant *icon_id;
-#endif
-               dbg("setup call type_format(%s)", g_variant_get_type_string(data));
-#if defined(TIZEN_SUPPORT_SAT_ICON)
-               g_variant_get(data, "(isisi@visi)", &command_id, &confirm_text, &confirm_text_len, &text, &text_len, &icon_id, &call_type, &call_number, &duration);
-#else
-               g_variant_get(data, "(isisiisi)", &command_id, &confirm_text, &confirm_text_len, &text, &text_len, &call_type, &call_number, &duration);
-#endif
-               appsvc_add_data(bundle_data, "launch-type", "SATSETUPCALL");
-
-               snprintf(buffer, 300, "%d", command_id);
-               appsvc_add_data(bundle_data, "cmd_id", buffer);
-               dbg("cmd_id(%s)", buffer);
-
-               snprintf(buffer, 300, "%d", call_type);
-               appsvc_add_data(bundle_data, "cmd_qual", buffer);
-               dbg("cmd_qual(%s)", buffer);
-
-               snprintf(buffer, 300, "%s", text);
-               appsvc_add_data(bundle_data, "disp_text", buffer);
-               dbg("disp_text(%s)", buffer);
-
-               snprintf(buffer, 300, "%s", call_number);
-               appsvc_add_data(bundle_data, "call_num", buffer);
-               dbg("call_num(%s)", buffer);
-
-               snprintf(buffer, 300, "%d", duration);
-               appsvc_add_data(bundle_data, "dur", buffer);
-               dbg("dur(%s)", buffer);
-
-               g_free(confirm_text);
-               g_free(text);
-               g_free(call_number);
-       } break;
-
-       default:
-               bundle_free(bundle_data);
-               return FALSE;
-       break;
-       }
-
-       snprintf(slot_info, 2, "%d", slot_id);
-       appsvc_add_data(bundle_data, "slot_id", slot_info);
-       dbg("slot_id : [%s]", slot_info);
-
-       appsvc_run_service(bundle_data, 0, NULL, NULL);
-       dbg("call app is called");
-       bundle_free(bundle_data);
-
-       return TRUE;
-}
-
 gboolean sat_ui_support_launch_browser_application(enum tel_sat_proactive_cmd_type cmd_type, GVariant *data, enum dbus_tapi_sim_slot_id slot_id)
 {
        char buffer[300];
@@ -1117,11 +1069,11 @@ gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type
 
        dbg("launch ciss application by aul");
        bundle_data = bundle_create();
-       appsvc_set_pkgname(bundle_data, "org.tizen.ciss");
+       appsvc_set_pkgname(bundle_data, CISS_APP);
 
        switch (cmd_type) {
        case SAT_PROATV_CMD_SEND_SS: {
-               TelSatSendSsIndSsData_t ss_info;
+               struct tel_sat_send_ss_ind_ss_data ss_info;
                gint command_id, ton, npi;
                gint text_len, ss_str_len;
                gchar* text = NULL, *ss_string = NULL;
@@ -1130,7 +1082,7 @@ gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type
 #endif
                dbg("launch ciss ui for send ss proactive cmd");
 
-               memset(&ss_info, 0, sizeof(TelSatSendSsIndSsData_t));
+               memset(&ss_info, 0, sizeof(struct tel_sat_send_ss_ind_ss_data));
 
                dbg("send ss type_format(%s)", g_variant_get_type_string(data));
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -1141,17 +1093,17 @@ gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type
                ss_info.commandId = command_id;
                ss_info.ton = ton;
                ss_info.npi = npi;
-               memcpy(ss_info.ssString, ss_string, TAPI_SAT_DEF_SS_LEN_MAX+1);
+               memcpy(ss_info.ssString, ss_string, SAT_SS_STRING_LEN_MAX+1);
                ss_info.ssStringLen = ss_str_len;
                g_free(text);
                g_free(ss_string);
 
                cmd = g_strdup_printf("%d", cmd_type);
-               encoded_data = g_base64_encode((const guchar*)&ss_info, sizeof(TelSatSendSsIndSsData_t));
+               encoded_data = g_base64_encode((const guchar*)&ss_info, sizeof(struct tel_sat_send_ss_ind_ss_data));
        } break;
 
        case SAT_PROATV_CMD_SEND_USSD:{
-               TelSatSendUssdIndUssdData_t ussd_info;
+               struct tel_sat_send_ussd_ind_ussd_data ussd_info;
                gint command_id;
                gint text_len, ussd_str_len;
                guchar dcs;
@@ -1161,7 +1113,7 @@ gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type
 #endif
                dbg("launch ciss ui for send ussd proactive cmd");
 
-               memset(&ussd_info, 0, sizeof(TelSatSendUssdIndUssdData_t));
+               memset(&ussd_info, 0, sizeof(struct tel_sat_send_ussd_ind_ussd_data));
 
                dbg("send ussd type_format(%s)", g_variant_get_type_string(data));
 #if defined(TIZEN_SUPPORT_SAT_ICON)
@@ -1171,13 +1123,13 @@ gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type
 #endif
                ussd_info.commandId = command_id;
                ussd_info.rawDcs = dcs;
-               memcpy(ussd_info.ussdString, ussd_string, TAPI_SAT_DEF_USSD_LEN_MAX+1);
+               memcpy(ussd_info.ussdString, ussd_string, SAT_USSD_STRING_LEN_MAX+1);
                ussd_info.ussdStringLen = ussd_str_len;
                g_free(text);
                g_free(ussd_string);
 
                cmd = g_strdup_printf("%d", cmd_type);
-               encoded_data = g_base64_encode((const guchar*)&ussd_info, sizeof(TelSatSendUssdIndUssdData_t));
+               encoded_data = g_base64_encode((const guchar*)&ussd_info, sizeof(struct tel_sat_send_ussd_ind_ussd_data));
        } break;
 
        default:
index e1a06af..54a25f5 100644 (file)
@@ -1,5 +1,25 @@
-#ifndef SAT_UI_SUPPORT_H_
-#define SAT_UI_SUPPORT_H_
+/*
+ * tel-plugin-dbus-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 __SAT_UI_SUPPORT_H__
+#define __SAT_UI_SUPPORT_H__
 
 #include <glib.h>
 #include <gio/gio.h>
@@ -7,8 +27,7 @@
 #include <tcore.h>
 #include <storage.h>
 #include <server.h>
-#include <type/sat.h>
-#include "../common.h"
+#include "../dtapi_common.h"
 
 #define PKG_ID_SAT_UI "org.tizen.sat-ui"
 #define PKG_ID_SAT_UI_2 "org.tizen.sat-ui-2"
 #define RELAUNCH_INTERVAL 50*1000 //100ms
 #define RETRY_MAXCOUNT 3
 
+/**
+ * @brief The structure type defining menu item info for the setup menu.
+ * @since_tizen 2.3
+ */
+struct tel_sat_menu_info {
+       char itemString[SAT_DEF_ITEM_STR_LEN_MAX + 6]; /**< menu item character data */
+       char itemId; /**< identifies the item on the menu that user selected */
+};
+
+/**
+ * @brief The structure type defining the icon data object.
+ * @since_tizen 2.3
+ */
+struct tel_sat_icon_identifier_info {
+       int bIsPresent; /**< Flag for checking whether the icon identifier exists */
+       enum icon_qualifier iconQualifier; /**< Icon qualifier type */
+       unsigned char iconIdentifier; /**< Icon identifier */
+       struct tel_sat_icon iconInfo; /**< Icon info */
+};
+
+/**
+ * @brief The structure type defining the icon identifier data object.
+ * @since_tizen 2.3
+ */
+struct tel_sat_icon_identifier_list_info {
+       int bIsPresent; /**< Flag for checking whether the icon identifier exists */
+       enum icon_qualifier iconListQualifier; /**< Icon list qualifier */
+       unsigned char iconCount; /**< Icon count */
+       unsigned char iconIdentifierList[SAT_ICON_LIST_MAX_COUNT]; /**< Icon identifier list */
+       struct tel_sat_icon iconInfo[SAT_ICON_LIST_MAX_COUNT]; /**< Icon list info */
+};
+
+/**
+ * @brief The structure type defining SAT main menu info.
+ * @since_tizen 2.3
+ */
+struct tel_sat_setup_menu_info {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       int bIsMainMenuPresent;
+       char satMainTitle[SAT_ALPHA_ID_LEN_MAX + 1]; /**< menu title text */
+       struct tel_sat_menu_info satMainMenuItem[SAT_MENU_ITEM_COUNT_MAX]; /**< menu items */
+       unsigned short satMainMenuNum; /**< number of menu items */
+       int bIsSatMainMenuHelpInfo; /**< flag for help information request */
+       int bIsUpdatedSatMainMenu;
+       struct tel_sat_icon_identifier_info iconId; /**< con Identifier */
+       struct tel_sat_icon_identifier_list_info iconIdList; /**< List of Icon Identifiers */
+};
+
+/**
+ * @brief The structure type defining character data for the SAT engine data structure.
+ * @since_tizen 2.3
+ */
+struct tel_sat_text_info {
+       unsigned short stringLen; /**< Character data length */
+       unsigned char string[SAT_TEXT_STRING_LEN_MAX + 1]; /**< Character data */
+};
+
+/**
+ * @brief The structure type defining the display text proactive command for SAT UI.
+ * @since_tizen 2.3
+ */
+struct tel_sat_display_text_ind {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       struct tel_sat_text_info text; /**< Character data to display on screen */
+       unsigned int duration; /**< The duration of the display */
+       int bIsPriorityHigh; /**< Flag that indicates whether text is to be displayed if some other app is using the screen */
+       int bIsUserRespRequired; /**< Flag that indicates whether user response is required */
+       int b_immediately_resp; /**< TBD */
+       struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
+};
+
+/**
+ * @brief The structure type defining the menu item data object.
+ * @since_tizen 2.3
+ */
+struct tel_sat_menu_item_info {
+       unsigned char itemId; /**< Item identifier */
+       unsigned char textLen; /**< Text length */
+       unsigned char text[SAT_ITEM_TEXT_LEN_MAX + 1]; /**< Text information */
+};
+
+/**
+ * @brief The structure type defining select item proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+struct tel_sat_select_item_ind {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       int bIsHelpInfoAvailable; /**< Flag for a help information request */
+       struct tel_sat_text_info text; /**< Menu title text */
+       char defaultItemIndex; /**< Selected default item - default value is @c 0 */
+       char menuItemCount; /**< Number of menu items */
+       struct tel_sat_menu_item_info menuItem[SAT_MENU_ITEM_COUNT_MAX]; /**< Menu items */
+       struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
+       struct tel_sat_icon_identifier_list_info iconIdList; /**< List of Icon Identifiers */
+};
+
+/**
+ * @brief The structure type defining get inkey proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+struct tel_sat_get_inkey_ind {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       enum inkey_type keyType; /**< Input Type: Character Set or Yes/No */
+       enum input_alphabet_type inputCharMode; /**< Input character mode(SMS default, UCS2) */
+       int bIsNumeric; /**< Is input character numeric(0-9, *, # and +) */
+       int bIsHelpInfoAvailable; /**< Help info request flag */
+       struct tel_sat_text_info text; /**< Character data to display on the screen */
+       unsigned int duration; /**< Duration of the display */
+       struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
+};
+
+/**
+ * @brief The structure type defining get input proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+struct tel_sat_get_input_ind {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       enum input_alphabet_type inputCharMode; /**< Input character mode(SMS default, UCS2) */
+       int bIsNumeric; /**< Is input character numeric(0-9, *, # and +) */
+       int bIsHelpInfoAvailable; /**< Help info request flag */
+       int bIsEchoInput; /**< Flag that indicates whether to show input data on the screen */
+       struct tel_sat_text_info text; /**< Character data to display on the screen*/
+       struct tel_sat_response_length respLen; /**< Input data min, max length */
+       struct tel_sat_text_info defaultText; /**< Default input character data */
+       struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
+};
+
+/**
+ * @brief The structure type defining refresh proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+struct tel_sat_refresh_ind_ui_info {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       unsigned int duration; /**< Duration of the display */
+       enum tel_sim_refresh_command refreshType; /**< Refresh mode */
+};
+
+/**
+ * @brief The structure type defining play tone proactive command data for an application.
+ * @since_tizen 2.3
+ */
+struct tel_sat_play_tone_ind {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       struct tel_sat_text_info text; /**< Character data to display on the screen */
+       struct tel_sat_tone tone; /**< Tone info */
+       unsigned int duration; /**< Duration for playing the tone */
+       struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
+};
+
+/**
+ * @brief The structure type defining the setup idle mode text proactive command for the idle application.
+ * @since_tizen 2.3
+ */
+struct tel_sat_setup_idle_mode_text_ind {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       struct tel_sat_text_info text; /**< Character data to display on the screen */
+       struct tel_sat_icon_identifier_info iconId; /**< TBD */
+};
+
+/**
+ * @brief The structure type defining data for SAT UI.
+ * @since_tizen 2.3
+ */
+struct tel_sat_send_ui_info {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       int user_confirm; /**< TBD */
+       struct tel_sat_text_info text; /**< Character data to display on the screen */
+       struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
+};
+
+/**
+ * @brief The structure type defining send SS proactive command data for the SS application.
+ * @since_tizen 2.3
+ */
+struct tel_sat_send_ss_ind_ss_data {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       enum tel_sim_ton ton; /**< Type of number */
+       enum tel_sim_npi npi; /**< Number plan identity */
+       unsigned short ssStringLen; /**< TBD */
+       unsigned char ssString[SAT_SS_STRING_LEN_MAX + 1]; /**< TBD */
+};
+
+/**
+ * @brief The structure type defining send USSD proactive command data for the USSD application.
+ * @since_tizen 2.3
+ */
+struct tel_sat_send_ussd_ind_ussd_data {
+       int commandId; /**< Proactive Command Number sent by USIM */
+       unsigned char rawDcs; /**< Data coding scheme */
+       unsigned short ussdStringLen; /**< TBD */
+       unsigned char ussdString[SAT_USSD_STRING_LEN_MAX + 1]; /**< TBD */
+};
+
 gboolean sat_ui_support_terminate_sat_ui(void);
 gboolean sat_ui_check_app_is_running(const char* app_id);
-gboolean sat_ui_support_launch_call_application(enum tel_sat_proactive_cmd_type cmd_type, GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
-gboolean sat_ui_support_launch_browser_application(enum tel_sat_proactive_cmd_type cmd_type, GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
-gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type cmd_type, GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
-gboolean sat_ui_support_launch_setting_application(enum tel_sat_proactive_cmd_type cmd_type, GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
-gboolean sat_ui_support_launch_sat_ui(enum tel_sat_proactive_cmd_type cmd_type, GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
-gboolean sat_ui_support_exec_bip(GDBusConnection *connection, const gchar *path, enum tel_sat_proactive_cmd_type cmd_type, GVariant *data);
-gboolean sat_ui_support_exec_evtdw(GDBusConnection *connection, const gchar *path, enum tel_sat_proactive_cmd_type cmd_type, GVariant *data);
+gboolean sat_ui_support_launch_browser_application(enum tel_sat_proactive_cmd_type cmd_type,
+       GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
+gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type cmd_type,
+       GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
+gboolean sat_ui_support_launch_setting_application(enum tel_sat_proactive_cmd_type cmd_type,
+       GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
+gboolean sat_ui_support_launch_sat_ui(enum tel_sat_proactive_cmd_type cmd_type,
+       GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
+gboolean sat_ui_support_exec_bip(GDBusConnection *connection,
+       const gchar *path, enum tel_sat_proactive_cmd_type cmd_type, GVariant *data);
+gboolean sat_ui_support_exec_evtdw(GDBusConnection *connection,
+       const gchar *path, enum tel_sat_proactive_cmd_type cmd_type, GVariant *data);
 gboolean sat_ui_support_storage_init(Server *server);
 
-#endif /* SAT_UI_SUPPORT_H_ */
+#endif /* __SAT_UI_SUPPORT_H__ */
diff --git a/src/ss.c b/src/ss.c
deleted file mode 100644 (file)
index e448713..0000000
--- a/src/ss.c
+++ /dev/null
@@ -1,1260 +0,0 @@
-/*
- * tel-plugin-dbus-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 <string.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <time.h>
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <appsvc.h>
-#include <bundle_internal.h>
-
-#include <tcore.h>
-#include <server.h>
-#include <plugin.h>
-#include <hal.h>
-#include <communicator.h>
-#include <storage.h>
-#include <queue.h>
-#include <user_request.h>
-#include <co_ss.h>
-#include <co_sim.h>
-#include <co_ps.h>
-
-#include "generated-code.h"
-#include "common.h"
-
-struct ciss_data_type {
-       int status;
-       int dcs;
-       int length;
-       char data[MAX_SS_USSD_LEN];
-};
-
-struct ciss_information {
-       int err;
-       int ss_type;
-};
-
-static void _launch_ciss_information(const struct tnoti_ss_information *info)
-{
-       gchar *encoded_data;
-       struct ciss_information ciss_inform;
-
-       bundle *kb = NULL;
-
-       memset(&ciss_inform, 0, sizeof(struct ciss_information));
-       ciss_inform.err = info->err;
-       ciss_inform.ss_type = info->ss_type;
-
-       dbg("Explicit launch ciss application by appsvc");
-
-       kb = bundle_create();
-       if (!kb) {
-               warn("bundle_create() failed");
-               return;
-       }
-
-       appsvc_set_pkgname(kb, "org.tizen.ciss");
-
-       encoded_data = g_base64_encode((guchar *)&ciss_inform, sizeof(struct ciss_information));
-
-       appsvc_add_data(kb, "CISS_LAUNCHING_MODE", "RESP");
-       appsvc_add_data(kb, "KEY_EVENT_TYPE", "200");
-       appsvc_add_data(kb, "KEY_ENCODED_DATA", encoded_data);
-
-       dbg("ciss appsvc run");
-       appsvc_run_service(kb, 0, NULL, NULL);
-
-       bundle_free(kb);
-       g_free(encoded_data);
-
-       return;
-}
-
-
-static void _launch_ciss(const struct tnoti_ss_ussd *ussd, enum dbus_tapi_sim_slot_id slot_id)
-{
-       gchar *encoded_data;
-       struct ciss_data_type ciss_data;
-       char slot_info[2] = {0,};
-
-       bundle *kb = NULL;
-
-       memset(&ciss_data, 0, sizeof(struct ciss_data_type));
-       ciss_data.status = ussd->dcs;
-       ciss_data.status = ussd->status;
-       ciss_data.length = ussd->len;
-       memcpy(ciss_data.data, ussd->str, ciss_data.length);
-
-       snprintf(slot_info, 2, "%d", slot_id);
-       dbg("slot_id : [%s]", slot_info);
-
-       dbg("Explicit launch ciss application by appsvc");
-
-       kb = bundle_create();
-       if (!kb) {
-               warn("bundle_create() failed");
-               return;
-       }
-
-
-       appsvc_set_pkgname(kb, "org.tizen.ciss");
-
-       encoded_data = g_base64_encode((guchar *)&ciss_data, sizeof(struct ciss_data_type));
-
-       appsvc_add_data(kb, "CISS_LAUNCHING_MODE", "RESP");
-       appsvc_add_data(kb, "KEY_EVENT_TYPE", "100");
-       appsvc_add_data(kb, "KEY_ENCODED_DATA", encoded_data);
-       appsvc_add_data(kb, "KEY_SLOT_ID", slot_info);
-
-       dbg("ciss appsvc run");
-       appsvc_run_service(kb, 0, NULL, NULL);
-
-       bundle_free(kb);
-       g_free(encoded_data);
-
-       return;
-}
-
-static gboolean
-on_ss_activate_barring(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint barring_mode,
-               const gchar *barring_password,
-               gpointer user_data)
-{
-       char buf[5];
-       struct treq_ss_barring req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_barring));
-
-       req.class = ss_class;
-       req.mode = barring_mode;
-
-       memcpy(req.password, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
-       memcpy(buf, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
-
-       buf[4] = 0;
-       dbg("req.password = [%s]", buf);
-
-       dbg("class = %d, mode = %d", req.class, req.mode);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_barring), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_BARRING_ACTIVATE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_deactivate_barring(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint barring_mode,
-               const gchar *barring_password,
-               gpointer user_data)
-{
-       char buf[5];
-       struct treq_ss_barring req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_barring));
-
-       req.class = ss_class;
-       req.mode = barring_mode;
-
-       memcpy(req.password, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
-       memcpy(buf, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
-
-       buf[4] = 0;
-       dbg("req.password = [%s]", buf);
-       dbg("class = %d, mode = %d", req.class, req.mode);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_barring), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_BARRING_DEACTIVATE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_change_barring_password(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               const gchar *barring_password,
-               const gchar *barring_password_new,
-               const gchar *barring_password_confirm,
-               gpointer user_data)
-{
-       char buf[5];
-       struct treq_ss_barring_change_password req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_barring_change_password));
-
-       memcpy(req.password_old, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
-       memcpy(req.password_new, barring_password_new, MAX_SS_BARRING_PASSWORD_LEN);
-       memcpy(req.password_confirm, barring_password_confirm, MAX_SS_BARRING_PASSWORD_LEN);
-
-       memcpy(buf, barring_password, MAX_SS_BARRING_PASSWORD_LEN);
-       buf[4] = 0;
-
-       memcpy(buf, barring_password_new, MAX_SS_BARRING_PASSWORD_LEN);
-
-       memcpy(buf, barring_password_confirm, MAX_SS_BARRING_PASSWORD_LEN);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_barring_change_password), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_BARRING_CHANGE_PASSWORD);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_get_barring_status(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint barring_mode,
-               gpointer user_data)
-{
-       struct treq_ss_barring req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_barring));
-
-       req.class = ss_class;
-       req.mode = barring_mode;
-
-       dbg("class = %d, mode = %d", req.class, req.mode);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_barring), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_BARRING_GET_STATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_register_forwarding(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint forward_mode,
-               gint forward_no_reply_time,
-               gint forward_ton,
-               gint forward_npi,
-               const gchar *forward_number,
-               gpointer user_data)
-{
-       struct treq_ss_forwarding req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_forwarding));
-
-       req.class = ss_class;
-       req.mode = forward_mode;
-       req.time = forward_no_reply_time;
-       req.ton  = forward_ton;
-       req.npi  = forward_npi;
-       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
-
-       dbg("class = %d, mode = %d, time = %d, number = %s",
-                       req.class, req.mode, req.time, req.number);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_forwarding), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_FORWARDING_REGISTER);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_deregister_forwarding(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint forward_mode,
-               gint forward_no_reply_time,
-               gint forward_ton,
-               gint forward_npi,
-               const gchar *forward_number,
-               gpointer user_data)
-{
-       struct treq_ss_forwarding req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_forwarding));
-
-       req.class = ss_class;
-       req.mode = forward_mode;
-       req.time = forward_no_reply_time;
-       req.ton = forward_ton;
-       req.npi = forward_npi;
-       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
-
-       dbg("class = %d, mode = %d, time = %d, number = %s",
-                       req.class, req.mode, req.time, req.number);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_forwarding), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_FORWARDING_DEREGISTER);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_activate_forwarding(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint forward_mode,
-               gint forward_no_reply_time,
-               gint forward_ton,
-               gint forward_npi,
-               const gchar *forward_number,
-               gpointer user_data)
-{
-       struct treq_ss_forwarding req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_forwarding));
-
-       req.class = ss_class;
-       req.mode = forward_mode;
-       req.time = forward_no_reply_time;
-       req.ton = forward_ton;
-       req.npi = forward_npi;
-       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
-
-       dbg("class = %d, mode = %d, time = %d, number = %s",
-                       req.class, req.mode, req.time, req.number);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_forwarding), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_FORWARDING_ACTIVATE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_deactivate_forwarding(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint forward_mode,
-               gint forward_no_reply_time,
-               gint forward_ton,
-               gint forward_npi,
-               const gchar *forward_number,
-               gpointer user_data)
-{
-       struct treq_ss_forwarding req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_forwarding));
-
-       req.class = ss_class;
-       req.mode = forward_mode;
-       req.time = forward_no_reply_time;
-       req.ton = forward_ton;
-       req.npi = forward_npi;
-       snprintf(req.number, MAX_SS_FORWARDING_NUMBER_LEN, "%s", forward_number);
-
-       dbg("class = %d, mode = %d, time = %d, number = %s",
-                       req.class, req.mode, req.time, req.number);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_forwarding), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_FORWARDING_DEACTIVATE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_get_forwarding_status(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gint forward_mode,
-               gpointer user_data)
-{
-       struct treq_ss_forwarding req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_forwarding));
-
-       req.class = ss_class;
-       req.mode = forward_mode;
-
-       dbg("class = %d, mode = %d, time = %d, number = %s",
-                       req.class, req.mode, req.time, req.number);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_forwarding), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_FORWARDING_GET_STATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_activate_waiting(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gpointer user_data)
-{
-       struct treq_ss_waiting req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_waiting));
-
-       req.class = ss_class;
-
-       dbg("class = %d", req.class);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_waiting), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_WAITING_ACTIVATE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_deactivate_waiting(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gpointer user_data)
-{
-       struct treq_ss_waiting req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
-               return TRUE;
-       memset(&req, 0, sizeof(struct treq_ss_waiting));
-
-       req.class = ss_class;
-
-       dbg("class = %d", req.class);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_waiting), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_WAITING_DEACTIVATE);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_get_waiting_status(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ss_class,
-               gpointer user_data)
-{
-       struct treq_ss_waiting req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_waiting));
-
-       req.class = ss_class;
-
-       dbg("class = %d", req.class);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_waiting), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_WAITING_GET_STATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_set_cli_status(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint cli_type,
-               gint cli_status,
-               gpointer user_data)
-{
-       struct treq_ss_set_cli req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "w"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_set_cli));
-
-       req.type = cli_type;
-       req.status = cli_status;
-
-       dbg("type = %d, status = %d", req.type, req.status);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_set_cli), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_CLI_SET_STATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-
-static gboolean
-on_ss_get_cli_status(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint cli_type,
-               gpointer user_data)
-{
-       struct treq_ss_cli req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "r"))
-               return TRUE;
-
-       memset(&req, 0, sizeof(struct treq_ss_cli));
-
-       req.type = cli_type;
-
-       dbg("type = %d", req.type);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_cli), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_CLI_GET_STATUS);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-static gboolean
-on_ss_send_ussd(TelephonySs *ss,
-               GDBusMethodInvocation *invocation,
-               gint ussd_type,
-               gint ussd_dcs,
-               gint ussd_len,
-               const gchar *ussd_string,
-               gpointer user_data)
-{
-       struct treq_ss_ussd req;
-       struct custom_data *ctx = user_data;
-       UserRequest *ur = NULL;
-       int ret = 0;
-       cynara *p_cynara = (ctx) ? ctx->p_cynara : NULL;
-
-       if (!check_access_control(p_cynara, invocation, AC_SS, "x"))
-               return TRUE;
-       memset(&req, 0, sizeof(struct treq_ss_ussd));
-
-       req.type = ussd_type;
-       req.dcs = (unsigned char)ussd_dcs;
-       req.len = (unsigned short)ussd_len;
-
-       snprintf((char*)req.str, MAX_SS_USSD_LEN, "%s", ussd_string);
-
-       dbg("[ check ] type = %d, dcs = %d, len = %d, string = %s", req.type, req.dcs, req.len, req.str);
-
-       ur = MAKE_UR(ctx, ss, invocation);
-
-       tcore_user_request_set_data(ur, sizeof(struct treq_ss_ussd), &req);
-       tcore_user_request_set_command(ur, TREQ_SS_SEND_USSD);
-       ret = tcore_communicator_dispatch_request(ctx->comm, ur);
-       if (ret != TCORE_RETURN_SUCCESS) {
-               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
-               dbg("[ error ] tcore_communicator_dispatch_request() : (0x%x)", ret);
-               tcore_user_request_unref(ur);
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_setup_ss_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
-{
-       TelephonySs *ss;
-
-       ss = telephony_ss_skeleton_new();
-       telephony_object_skeleton_set_ss(object, ss);
-       g_object_unref(ss);
-
-       g_signal_connect(ss,
-               "handle-activate-barring",
-               G_CALLBACK(on_ss_activate_barring), ctx);
-
-       g_signal_connect(ss,
-               "handle-deactivate-barring",
-               G_CALLBACK(on_ss_deactivate_barring), ctx);
-
-       g_signal_connect(ss,
-               "handle-change-barring-password",
-               G_CALLBACK(on_ss_change_barring_password), ctx);
-
-       g_signal_connect(ss,
-               "handle-get-barring-status",
-               G_CALLBACK(on_ss_get_barring_status), ctx);
-
-       g_signal_connect(ss,
-               "handle-register-forwarding",
-               G_CALLBACK(on_ss_register_forwarding), ctx);
-
-       g_signal_connect(ss,
-               "handle-deregister-forwarding",
-               G_CALLBACK(on_ss_deregister_forwarding), ctx);
-
-       g_signal_connect(ss,
-               "handle-activate-forwarding",
-               G_CALLBACK(on_ss_activate_forwarding), ctx);
-
-       g_signal_connect(ss,
-               "handle-deactivate-forwarding",
-               G_CALLBACK(on_ss_deactivate_forwarding), ctx);
-
-       g_signal_connect(ss,
-               "handle-get-forwarding-status",
-               G_CALLBACK(on_ss_get_forwarding_status), ctx);
-
-       g_signal_connect(ss,
-               "handle-activate-waiting",
-               G_CALLBACK(on_ss_activate_waiting), ctx);
-
-       g_signal_connect(ss,
-               "handle-deactivate-waiting",
-               G_CALLBACK(on_ss_deactivate_waiting), ctx);
-
-       g_signal_connect(ss,
-               "handle-get-waiting-status",
-               G_CALLBACK(on_ss_get_waiting_status), ctx);
-
-       g_signal_connect(ss,
-               "handle-set-clistatus",
-               G_CALLBACK(on_ss_set_cli_status), ctx);
-
-       g_signal_connect(ss,
-               "handle-get-clistatus",
-               G_CALLBACK(on_ss_get_cli_status), ctx);
-
-       g_signal_connect(ss,
-               "handle-send-ussd",
-               G_CALLBACK(on_ss_send_ussd), ctx);
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_ss_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data)
-{
-       GVariant *result = 0;
-       GVariantBuilder b;
-       int i = 0;
-
-       if (!data) {
-               err("response data : 0");
-               return FALSE;
-       }
-
-       switch (command) {
-       case TRESP_SS_BARRING_ACTIVATE: {
-               const struct tresp_ss_barring *resp = data;
-
-               dbg("receive TRESP_SS_BARRING_ACTIVATE (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "barring_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_activate_barring(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_BARRING_DEACTIVATE: {
-               const struct tresp_ss_barring *resp = data;
-
-               dbg("receive TRESP_SS_BARRING_DEACTIVATE (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "barring_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_deactivate_barring(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_BARRING_CHANGE_PASSWORD: {
-               const struct tresp_ss_general *resp = data;
-
-               dbg("receive TRESP_SS_BARRING_CHANGE_PASSWORD (err[%d])", resp->err);
-
-               telephony_ss_complete_change_barring_password(dbus_info->interface_object, dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_SS_BARRING_GET_STATUS: {
-               const struct tresp_ss_barring *resp = data;
-
-               dbg("receive TRESP_SS_BARRING_GET_STATUS (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "barring_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_get_barring_status(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_FORWARDING_ACTIVATE: {
-               const struct tresp_ss_forwarding *resp = data;
-
-               dbg("receive TRESP_SS_FORWARDING_ACTIVATE (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_add(&b, "{sv}", "number_present", g_variant_new_int32(resp->record[i].number_present));
-                       g_variant_builder_add(&b, "{sv}", "no_reply_time", g_variant_new_int32(resp->record[i].time));
-                       g_variant_builder_add(&b, "{sv}", "type_of_number", g_variant_new_int32(resp->record[i].ton));
-                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity", g_variant_new_int32(resp->record[i].npi));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_number", g_variant_new_string(resp->record[i].number));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_activate_forwarding(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_FORWARDING_DEACTIVATE: {
-               const struct tresp_ss_forwarding *resp = data;
-
-               dbg("receive TRESP_SS_FORWARDING_DEACTIVATE (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_add(&b, "{sv}", "number_present", g_variant_new_int32(resp->record[i].number_present));
-                       g_variant_builder_add(&b, "{sv}", "no_reply_time", g_variant_new_int32(resp->record[i].time));
-                       g_variant_builder_add(&b, "{sv}", "type_of_number", g_variant_new_int32(resp->record[i].ton));
-                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity", g_variant_new_int32(resp->record[i].npi));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_number", g_variant_new_string(resp->record[i].number));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_deactivate_forwarding(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_FORWARDING_REGISTER: {
-               const struct tresp_ss_forwarding *resp = data;
-
-               dbg("receive TRESP_SS_FORWARDING_REGISTER (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_add(&b, "{sv}", "number_present", g_variant_new_int32(resp->record[i].number_present));
-                       g_variant_builder_add(&b, "{sv}", "no_reply_time", g_variant_new_int32(resp->record[i].time));
-                       g_variant_builder_add(&b, "{sv}", "type_of_number", g_variant_new_int32(resp->record[i].ton));
-                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity", g_variant_new_int32(resp->record[i].npi));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_number", g_variant_new_string(resp->record[i].number));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_register_forwarding(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_FORWARDING_DEREGISTER: {
-               const struct tresp_ss_forwarding *resp = data;
-
-               dbg("receive TRESP_SS_FORWARDING_DEREGISTER (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_add(&b, "{sv}", "number_present", g_variant_new_int32(resp->record[i].number_present));
-                       g_variant_builder_add(&b, "{sv}", "no_reply_time", g_variant_new_int32(resp->record[i].time));
-                       g_variant_builder_add(&b, "{sv}", "type_of_number", g_variant_new_int32(resp->record[i].ton));
-                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity", g_variant_new_int32(resp->record[i].npi));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_number", g_variant_new_string(resp->record[i].number));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_deregister_forwarding(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_FORWARDING_GET_STATUS: {
-               const struct tresp_ss_forwarding *resp = data;
-
-               dbg("receive TRESP_SS_FORWARDING_GET_STATUS (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_mode", g_variant_new_int32(resp->record[i].mode));
-                       g_variant_builder_add(&b, "{sv}", "number_present", g_variant_new_int32(resp->record[i].number_present));
-                       g_variant_builder_add(&b, "{sv}", "no_reply_time", g_variant_new_int32(resp->record[i].time));
-                       g_variant_builder_add(&b, "{sv}", "type_of_number", g_variant_new_int32(resp->record[i].ton));
-                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity", g_variant_new_int32(resp->record[i].npi));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_number", g_variant_new_string(resp->record[i].number));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_get_forwarding_status(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_WAITING_ACTIVATE: {
-               const struct tresp_ss_waiting *resp = data;
-
-               dbg("receive TRESP_SS_WAITING_ACTIVATE (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_activate_waiting(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_WAITING_DEACTIVATE: {
-               const struct tresp_ss_waiting *resp = data;
-
-               dbg("receive TRESP_SS_WAITING_DEACTIVATE (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_deactivate_waiting(dbus_info->interface_object, dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_WAITING_GET_STATUS: {
-               const struct tresp_ss_waiting *resp = data;
-
-               dbg("receive TRESP_SS_WAITING_GET_STATUS (err[%d])", resp->err);
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < resp->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(resp->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(resp->record[i].status));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-
-               telephony_ss_complete_get_waiting_status(dbus_info->interface_object,
-                       dbus_info->invocation, result, resp->err);
-       } break;
-
-       case TRESP_SS_CLI_SET_STATUS: {
-               const struct tresp_ss_set_cli *resp = data;
-
-               dbg("receive TRESP_SS_CLI_SET_STATUS (err[%d])", resp->err);
-
-               telephony_ss_complete_set_clistatus(dbus_info->interface_object,
-                       dbus_info->invocation, resp->err);
-       } break;
-
-       case TRESP_SS_CLI_GET_STATUS: {
-               const struct tresp_ss_cli *resp = data;
-
-               dbg("receive TRESP_SS_CLI_GET_STATUS (err[%d])", resp->err);
-
-               telephony_ss_complete_get_clistatus(dbus_info->interface_object,
-                       dbus_info->invocation, resp->err, resp->type, resp->status);
-       } break;
-
-       case TRESP_SS_SEND_USSD: {
-               const struct tresp_ss_ussd *resp = data;
-
-               dbg("receive TRESP_SS_SEND_USSD (err[%d])", resp->err);
-               dbg("USSD : %s (len : %d, type : 0x%x, status : 0x%x, dcs : 0x%x)", resp->str, resp->len, resp->type, resp->status, resp->dcs);
-               telephony_ss_complete_send_ussd(dbus_info->interface_object,
-                       dbus_info->invocation, resp->err, resp->type,
-                       resp->status, resp->dcs, resp->len, (char*)resp->str);
-       } break;
-
-       default:
-               dbg("not handled command[%d]", command);
-               break;
-       }
-
-       return TRUE;
-}
-
-gboolean dbus_plugin_ss_notification(struct custom_data *ctx, CoreObject *source, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data)
-{
-       TelephonySs *ss = 0;
-       GVariant *result = 0;
-       GVariantBuilder b;
-       int i = 0;
-       char *cp_name = NULL;
-
-       if (!object) {
-               dbg("object is NULL");
-               return FALSE;
-       }
-
-       if (!data) {
-               err("data is NULL");
-               return FALSE;
-       }
-
-       cp_name =  (char*)tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
-       ss = telephony_object_peek_ss(TELEPHONY_OBJECT(object));
-       if (ss == NULL) {
-               err("ss object is NULL!!!");
-               return FALSE;
-       }
-
-       switch (command) {
-       case TNOTI_SS_USSD: {
-               const struct tnoti_ss_ussd *ussd = data;
-               enum dbus_tapi_sim_slot_id slot_id;
-
-               slot_id = get_sim_slot_id_by_cp_name(cp_name);
-               dbg("slot_id: [%d]", slot_id);
-
-               telephony_ss_emit_notify_ussd(ss,
-                               ussd->status,
-                               ussd->dcs,
-                               ussd->len,
-                               (char*)ussd->str);
-               _launch_ciss(ussd, slot_id);
-       } break;
-
-       case TNOTI_SS_FORWARDING_STATUS: {
-               const struct tnoti_ss_forwarding_status *fwrd = data;
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < fwrd->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(fwrd->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(fwrd->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_mode", g_variant_new_int32(fwrd->record[i].mode));
-                       g_variant_builder_add(&b, "{sv}", "number_present", g_variant_new_int32(fwrd->record[i].number_present));
-                       g_variant_builder_add(&b, "{sv}", "no_reply_time", g_variant_new_int32(fwrd->record[i].time));
-                       g_variant_builder_add(&b, "{sv}", "type_of_number", g_variant_new_int32(fwrd->record[i].ton));
-                       g_variant_builder_add(&b, "{sv}", "numbering_plan_identity", g_variant_new_int32(fwrd->record[i].npi));
-                       g_variant_builder_add(&b, "{sv}", "forwarding_number", g_variant_new_string(fwrd->record[i].number));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-               telephony_ss_emit_notify_forwarding(ss, result);
-       } break;
-
-       case TNOTI_SS_BARRING_STATUS: {
-               const struct tnoti_ss_barring_status *barr = data;
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < barr->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(barr->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(barr->record[i].status));
-                       g_variant_builder_add(&b, "{sv}", "barring_mode", g_variant_new_int32(barr->record[i].mode));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-               telephony_ss_emit_notify_barring(ss, result);
-       } break;
-
-       case TNOTI_SS_WAITING_STATUS: {
-               const struct tnoti_ss_waiting_status *wait = data;
-
-               g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
-               for (i = 0; i < wait->record_num; i++) {
-                       g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
-                       g_variant_builder_add(&b, "{sv}", "ss_class", g_variant_new_int32(wait->record[i].class));
-                       g_variant_builder_add(&b, "{sv}", "ss_status", g_variant_new_int32(wait->record[i].status));
-                       g_variant_builder_close(&b);
-               }
-
-               result = g_variant_builder_end(&b);
-               telephony_ss_emit_notify_waiting(ss, result);
-       } break;
-
-       case TNOTI_SS_RELEASE_COMPLETE: {
-               int i = 0;
-               GVariantBuilder builder;
-               GVariant *msg_data = 0, *packet = NULL;
-               const struct tnoti_ss_release_complete *msg = data;
-               if (msg) {
-                       g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
-                       for (i = 0; i < msg->data_len; i++)
-                               g_variant_builder_add(&builder, "y", msg->data[i]);
-                       msg_data = g_variant_builder_end(&builder);
-                       packet = g_variant_new("v", msg_data);
-
-                       dbg("type_format(%s)", g_variant_get_type_string(packet));
-                       telephony_ss_emit_release_complete(ss, msg->data_len, packet);
-               } else {
-                       dbg("No data is passed in USSD release notification");
-                       g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
-                       g_variant_builder_add(&builder, "y", '\0');
-                       msg_data = g_variant_builder_end(&builder);
-                       packet = g_variant_new("v", msg_data);
-                       dbg("type_format(%s)", g_variant_get_type_string(packet));
-                       telephony_ss_emit_release_complete(ss, 1, packet);
-               }
-       } break;
-
-       case TNOTI_SS_INFO: {
-               const struct tnoti_ss_information *ss_info = data;
-               telephony_ss_emit_notify_ss_info(ss,
-                               ss_info->err,
-                               ss_info->ss_type);
-               _launch_ciss_information(ss_info);
-               /* Launch CISS application
-               _launch_ciss(ss_info);
-               */
-       } break;
-       default:
-               dbg("not handled command[%d]", command);
-               break;
-       }
-
-       return TRUE;
-}
-