Initial refactoring merge 78/19078/2 accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi accepted/tizen_generic accepted/tizen_ivi_panda tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.m14.2_ivi tizen_3.0.m14.3_ivi tizen_3.0_ivi accepted/tizen/generic/20140408.095200 accepted/tizen/ivi/20140409.182317 accepted/tizen/ivi/panda/20140408.203229 accepted/tizen/mobile/20140409.082649 submit/tizen/20140408.080112 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.2_ivi_release tizen_3.0.m14.3_ivi_release tizen_3.0_ivi_release
authorDongchul Lim <dc7.lim@samsung.com>
Mon, 7 Apr 2014 09:00:58 +0000 (18:00 +0900)
committerDongchul Lim <dc7.lim@samsung.com>
Mon, 7 Apr 2014 10:11:53 +0000 (19:11 +0900)
Change-Id: I4f37508dc947ec11978648d2b767466c7b8646c0

112 files changed:
AUTHORS
CMakeLists.txt
LICENSE
doc/README.txt [new file with mode: 0644]
include/ITapiCall.h [deleted file]
include/ITapiGps.h [deleted file]
include/ITapiModem.h [deleted file]
include/ITapiNetText.h [deleted file]
include/ITapiNetwork.h [deleted file]
include/ITapiPS.h [deleted file]
include/ITapiPhonebook.h [deleted file]
include/ITapiSap.h [deleted file]
include/ITapiSat.h [deleted file]
include/ITapiSim.h [deleted file]
include/ITapiSs.h [deleted file]
include/TapiUtility.h [deleted file]
include/TelCall.h [deleted file]
include/TelDefines.h [deleted file]
include/TelDisplay.h [deleted file]
include/TelErr.h [deleted file]
include/TelMisc.h [deleted file]
include/TelNetwork.h [deleted file]
include/TelPower.h [deleted file]
include/TelSat.h [deleted file]
include/TelSatEnvelope.h [deleted file]
include/TelSatObj.h [deleted file]
include/TelSatProactvCmd.h [deleted file]
include/TelSim.h [deleted file]
include/TelSms.h [deleted file]
include/TelSs.h [deleted file]
include/common/tel_call.h [new file with mode: 0644]
include/common/tel_gps.h [new file with mode: 0644]
include/common/tel_if.h [new file with mode: 0644]
include/common/tel_modem.h [new file with mode: 0644]
include/common/tel_network.h [new file with mode: 0644]
include/common/tel_phonebook.h [new file with mode: 0644]
include/common/tel_return.h [new file with mode: 0644]
include/common/tel_sap.h [new file with mode: 0644]
include/common/tel_sat.h [new file with mode: 0644]
include/common/tel_sim.h [new file with mode: 0644]
include/common/tel_sms.h [new file with mode: 0644]
include/common/tel_ss.h [new file with mode: 0644]
include/private/tapi_log.h [moved from src/tapi_log.h with 55% similarity]
include/private/tapi_private.h [new file with mode: 0644]
include/tapi.h [new file with mode: 0644]
include/tapi_call.h [new file with mode: 0644]
include/tapi_common.h [deleted file]
include/tapi_event.h [deleted file]
include/tapi_events.h [new file with mode: 0644]
include/tapi_gps.h [new file with mode: 0644]
include/tapi_modem.h [new file with mode: 0644]
include/tapi_network.h [new file with mode: 0644]
include/tapi_phonebook.h [new file with mode: 0644]
include/tapi_sap.h [new file with mode: 0644]
include/tapi_sat.h
include/tapi_sim.h [new file with mode: 0644]
include/tapi_sms.h [new file with mode: 0644]
include/tapi_ss.h [new file with mode: 0644]
include/tapi_type.h [deleted file]
introspection/call.xml [new file with mode: 0644]
introspection/gps.xml [new file with mode: 0644]
introspection/modem.xml [new file with mode: 0644]
introspection/network.xml [new file with mode: 0644]
introspection/phonebook.xml [new file with mode: 0644]
introspection/sap.xml [new file with mode: 0644]
introspection/sat.xml [new file with mode: 0644]
introspection/sim.xml [new file with mode: 0644]
introspection/sms.xml [new file with mode: 0644]
introspection/ss.xml [new file with mode: 0644]
packaging/libtapi.changes [deleted file]
packaging/libtapi.manifest
packaging/libtapi.spec [deleted file]
packaging/libtapi3.spec [new file with mode: 0644]
src/common.h [deleted file]
src/tapi_call.c
src/tapi_common.c
src/tapi_event.c [new file with mode: 0644]
src/tapi_gps.c
src/tapi_modem.c
src/tapi_network.c
src/tapi_phonebook.c
src/tapi_sap.c
src/tapi_sat.c
src/tapi_sim.c
src/tapi_sms.c
src/tapi_ss.c
tapi-3.0.pc.in [new file with mode: 0644]
tapi.pc.in [deleted file]
test_src/CMakeLists.txt [new file with mode: 0644]
test_src/call.c [new file with mode: 0644]
test_src/call.h [new file with mode: 0644]
test_src/gps.c [new file with mode: 0644]
test_src/gps.h [new file with mode: 0644]
test_src/main.c [new file with mode: 0644]
test_src/menu.c [new file with mode: 0644]
test_src/menu.h [new file with mode: 0644]
test_src/modem.c [new file with mode: 0644]
test_src/modem.h [new file with mode: 0644]
test_src/network.c [new file with mode: 0644]
test_src/network.h [new file with mode: 0644]
test_src/phonebook.c [new file with mode: 0644]
test_src/phonebook.h [new file with mode: 0644]
test_src/sat.c [new file with mode: 0644]
test_src/sat.h [new file with mode: 0644]
test_src/sim.c [new file with mode: 0644]
test_src/sim.h [new file with mode: 0644]
test_src/sms.c [new file with mode: 0644]
test_src/sms.h [new file with mode: 0644]
test_src/sms_util.c [new file with mode: 0644]
test_src/sms_util.h [new file with mode: 0644]
test_src/ss.c [new file with mode: 0644]
test_src/ss.h [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index b9eed62..e69de29 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +0,0 @@
-Jongman Park <jman.park@samsung.com>
-Danny Jeongseok Seo <s.seo@samsung.com>
-Kyeongchul Kim <kyeongchul.kim@samsung.com>
-Youngman Park <youngman.park@samsung.com>
-Inho Oh <inho48.oh@samsung.com>
index 71a7bb9..53926dc 100644 (file)
@@ -1,56 +1,86 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(tapi C)
+PROJECT(tapi-3.0 C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(EXEC_PREFIX "\${prefix}")
-SET(INCLUDEDIR "\${prefix}/include")
+SET(EXEC_PREFIX ${CMAKE_INSTALL_BINDIR})
+SET(LIBDIR ${CMAKE_INSTALL_LIBDIR})
+SET(INCLUDEDIR ${INCLUDE_INSTALL_DIR})
+SET(TAPI_VERSION ${TAPI_VERSION})
 
 # Set required packages
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED glib-2.0 gio-2.0 gthread-2.0 dlog security-server)
+pkg_check_modules(pkgs REQUIRED glib-2.0 gio-unix-2.0 dlog security-server)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS}  -Wl,-zdefs -fvisibility=hidden ")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}  -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -Wredundant-decls -Wcast-align")
-#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wextra -Wall -Wno-unused-parameter -Wno-missing-field-initializers")
 
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
+#Garbage collection - Unused code
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections")
+
+INCLUDE_DIRECTORIES(
+       ${CMAKE_BINARY_DIR}
+       ${CMAKE_SOURCE_DIR}/include
+       ${CMAKE_SOURCE_DIR}/include/common
+       ${CMAKE_SOURCE_DIR}/include/private
+)
 
 ADD_DEFINITIONS("-DFEATURE_DLOG_DEBUG")
-ADD_DEFINITIONS("-DTAPI_LOG_TAG=\"TAPI\"")
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS(" -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" ")
+ADD_DEFINITIONS("-DTAPI_LOG_TAG=\"LIBTAPI\"")
+ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")
 
 MESSAGE(${CMAKE_C_FLAGS})
 MESSAGE(${CMAKE_EXE_LINKER_FLAGS})
 
 ### Build ###
 SET(SRCS
-               src/tapi_common.c
-               src/tapi_network.c
-               src/tapi_sim.c
-               src/tapi_phonebook.c
-               src/tapi_sap.c
-               src/tapi_call.c
-               src/tapi_ss.c
-               src/tapi_sms.c
-               src/tapi_sat.c
-               src/tapi_modem.c
-               src/tapi_gps.c
-   )
-
-ADD_LIBRARY(tapi SHARED ${SRCS})
-TARGET_LINK_LIBRARIES(tapi ${pkgs_LDFLAGS})
-SET_TARGET_PROPERTIES(tapi PROPERTIES VERSION 0.0.0 SOVERSION 0 OUTPUT_NAME tapi)
+       src/tapi_common.c
+       src/tapi_event.c
+       src/tapi_modem.c
+       src/tapi_call.c
+       src/tapi_network.c
+       src/tapi_sim.c
+       src/tapi_phonebook.c
+       src/tapi_sap.c
+       src/tapi_ss.c
+       src/tapi_sms.c
+       src/tapi_sat.c
+       src/tapi_gps.c
+)
+
+SET(INTROSPECTION_PATH ${CMAKE_SOURCE_DIR}/introspection)
+
+ADD_CUSTOM_COMMAND(
+       OUTPUT ${CMAKE_BINARY_DIR}/generated-code.c
+       COMMAND gdbus-codegen --interface-prefix org.tizen.telephony.
+       --generate-c-code generated-code
+       --c-namespace Telephony
+       --c-generate-object-manager
+       --generate-docbook generated-docs
+       ${INTROSPECTION_PATH}/network.xml
+       ${INTROSPECTION_PATH}/sim.xml
+       ${INTROSPECTION_PATH}/phonebook.xml
+       ${INTROSPECTION_PATH}/sap.xml
+       ${INTROSPECTION_PATH}/sat.xml
+       ${INTROSPECTION_PATH}/sms.xml
+       ${INTROSPECTION_PATH}/call.xml
+       ${INTROSPECTION_PATH}/ss.xml
+       ${INTROSPECTION_PATH}/modem.xml
+       ${INTROSPECTION_PATH}/gps.xml
+       COMMENT "Generating GDBus .c/.h"
+)
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS} ${CMAKE_BINARY_DIR}/generated-code.c)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION 0.0.0 SOVERSION 0 OUTPUT_NAME ${PROJECT_NAME})
 
 # pkgconfig file
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-CONFIGURE_FILE(tapi.pc.in tapi.pc @ONLY)
+CONFIGURE_FILE(tapi-3.0.pc.in tapi-3.0.pc @ONLY)
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include/tapi-3.0)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tapi-3.0.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT Runtime)
 
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include/telephony-client)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tapi.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-INSTALL(TARGETS tapi DESTINATION ${LIB_INSTALL_DIR} COMPONENT Runtime)
+ADD_SUBDIRECTORY(test_src)
diff --git a/LICENSE b/LICENSE
index a06208b..d9a10c0 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,3 @@
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-
                                  Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
@@ -176,29 +174,3 @@ Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
       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.
-
diff --git a/doc/README.txt b/doc/README.txt
new file mode 100644 (file)
index 0000000..ccbc22e
--- /dev/null
@@ -0,0 +1,155 @@
+LIBTAPI documentation:
+======================
+
+AD stands for Application Developper.
+
+*-------------*
+|A- TelHandle|
+*-------------*
+
+1- AD must create TelHandle to be able to use libtapi:
+
+       TelHandle *handle;
+
+       handle = tapi_init(NULL);
+
+[refer to tapi.h for more info on tapi_init]
+
+
+2- AD can also precise the CP he wants to work with:
+
+       char **cp_list;
+       TelReturn ret;
+
+       ret = tapi_get_cp_list(&cp_list);
+
+       if (ret != TEL_RETURN_SUCCESS)
+               return;
+
+       /* Use first CP from the list */
+       if (cp_list[0])
+               handle = tapi_init(cp_list[0]);
+
+       g_strfreev(cp_list);
+
+[refer to tapi.h for more info on tapi_get_cp_list]
+
+3- AD must destroy TelHandle when closing application.
+
+       tapi_deinit(handle);
+
+
+*---------------------*
+|B- Event registration|
+*---------------------*
+
+1- AD can register callback by evt_id:
+
+void on_modem_power(TelHandle *handle, const char *evt_id,
+                                       void *data, void *user_data)
+{
+       gboolean *enable = data;
+
+       printf("modem power state %d", *enable);
+}
+
+int main(void)
+{
+       TelReturn ret;
+       TelHandle *handle;
+
+       handle = tapi_init(NULL);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_MODEM_POWER,
+                                       on_modem_power, NULL);
+
+       /* Fail to register on event_id */
+       if (ret != TEL_RETURN_SUCCESS) {
+               tapi_deinit(handle);
+               return -1;
+       }
+
+       ...
+}
+
+[refer to tapi.h for TapiEvtCb prototype and for more info on
+tapi_register_event_id()]
+
+[refer to tapi_events.h to see possible event per modules and data structure
+associated to event]
+
+/* TapiEvtCb data: 'gooblean *' */
+#define TAPI_PROP_MODEM_POWER                          ...
+/* TapiEvtCb data: 'gooblean *' */
+#define TAPI_PROP_MODEM_FLIGHT_MODE_STATUS             ...
+/* TapiEvtCb data: 'char *' */
+#define TAPI_PROP_MODEM_IMEI                           ...
+/* TapiEvtCb data: 'TelModemVersion *' */
+#define TAPI_PROP_MODEM_VERSION                                ...
+
+2- AD can unregister callback by evt_id:
+
+       ret = tapi_deregister_event_id(handle, TEL_NOTI_MODEM_POWER);
+       /* Fail to unregister event_id */
+       if (ret != TEL_RETURN_SUCCESS)
+               return -1;
+
+
+*--------------*
+|C- Module APIs|
+*--------------*
+
+libtapi is exposing APIs for following modules:
+       - modem
+       - sim
+       - network
+       - call
+       - sms
+       - phonebook
+       - SS (Supplementary Services)
+       - sat
+       - sap
+       - gps
+
+Each module are exposing synchronous and Asynchronous APIs.
+
+1- Synchronous APIs can only return TelReturn values, they are system results.
+output argument for synchronous APIs has to be freed when it is specified in
+header of API protoype.
+
+[refer to tel_return.h for more details]
+
+2- Asynchronous APIs have necessarily one input 'TapiResponseCb *cb', if not
+it is a synchronous APIs.
+
+Asynchronous APIs call can fail. In this case it will immediately return a
+system error 'TelReturn' listed in tel_return.h, callback will never be called.
+
+If API call doesn't fail, result will be sent through the response callback
+within the result parameter.
+
+typedef void (*TapiResponseCb)(TelHandle *handle, int result, void *data,
+                                       void *user_data);
+
+--> int result: it is specific for each module:
+       * modem: TelReturn              [refer to tel_return.h]
+       * sim: TelSimResult             [refer to tel_sim.h]
+       * network: TelNetworkResult     [refer to tel_network.h]
+       * call: TelCallResult           [refer to tel_call.h]
+       * ...
+
+--> void *data: it is specific for each callback, it is specified in header of
+API prototype:
+       * tapi_modem.h
+       * tapi_sim.h
+       * tapi_network.h
+       * tapi_call.h
+       * ...
+
+See tapi_modem.h:
+/* TapiResponseCb data: NULL pointer */
+TelReturn tapi_modem_set_power_status(TelHandle *handle, TelModemPowerStatus status,
+                               TapiResponseCb callback, void *user_data);
+/* TapiResponseCb data: NULL pointer */
+TelReturn tapi_modem_set_flight_mode(TelHandle *handle, gboolean enable,
+                               TapiResponseCb callback, void *user_data);
diff --git a/include/ITapiCall.h b/include/ITapiCall.h
deleted file mode 100644 (file)
index 701e4cb..0000000
+++ /dev/null
@@ -1,2256 +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 TAPI_CALL       CALL
- * @{
- *
- * @file ITapiCall.h
- *
- * Call APIs allow an application to accomplish the following services: @n
- * - Make a mobile originated Emergency call, Voice call, or Video call. @n
- * - Accept or Reject incoming calls. @n
- * - Release Calls. @n
- * - Call dependent supplementary services such as call hold, retrieve, DTMF. @n
- * - Multi -party call management, setup conference call, split conference call. @n
- * - Call information such as get call information, get line identification number. @n
- * - To verify whether a call (TapiHandle *handle, voice / video ) is possible at any given time. @n
- */
-
-#ifndef _ITAPI_CALL_H_
-#define _ITAPI_CALL_H_
-
-#include <tapi_common.h>
-#include <TelCall.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /**
- * @brief This function originates MO call setup. This is an asynchronous function. The function completes immediately and
- * call setup proceeds in background.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - If call to tel_exe_call_mo(TapiHandle *handle, ) is successful, call handle and request ID are assigned by Telephony Server
- *   and returned to client by given Call Handle and Request Id parameters. MO call setup continues in
- *   background. There are multiple states involved in the call setup procedure. Upon request completion
- *   successful or not, various event notifications are sent to client along with data associated with event
- *   (TapiHandle *handle, Successful data or error information) based on the indication or response received at the Telephony Server.
- * - Setting up Emergency call
- *   - when #TelCallType_t is voice_call, voice call is setup unless dial_number parameter is an
- *   emergency number known to telephony FW (TapiHandle *handle, like 112 for all 2G and above, other numbers may operator
- *   specific or device configuration specific, so Telephony FW will read relevant SIM files and refer to internal
- *   configuration records). If an emergency number is passed and #TelCallType_t is voice_call, Telephony
- *   FW shall setup emergency phone call.
- *   - When #TelCallType_t is emergency call, emergency call is always set up.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] pParams
- * - #TelCallSetupParams_t contains the CallType(TapiHandle *handle, whether it is a voice call or data call etc) and number.
- *
- * @param[out] pCallHandle
- * - Unique handle for referring the call
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * TAPI_EVENT_CALL_SETUP_CNF is sent to the application when the lower layers get the call originate response.
- * Asynchronous return status is indicated by #TelCallCause_t and call handle is sent in the event data.
- * Various asynchronous indications are described in the unsolicited notifications section . [Refer, \ref page8]
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_exe_call_mo tel_answer_call tel_release_call
- * \image html CallSetup.jpg
- * \image latex CallSetup.jpg
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status =0;
- * unsigned int pCallHandle;
- * int pRequestID=0;
- * TelCallSetupParams_t pParams;
- *
- * char normal[16] = "1234";//Called party number
- * memset(TapiHandle *handle, &pParams, 0, sizeof(TapiHandle *handle, TelCallSetupParams_t), tapi_response_cb callback, void *user_data);
- * pParams.CallType = TAPI_CALL_TYPE_VOICE;
- * strcpy(TapiHandle *handle, pParams.szNumber,normal, tapi_response_cb callback, void *user_data);
- *
- * ret_status = tel_exe_call_mo (TapiHandle *handle, &pParams,&pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // outgoing call
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
-int tel_dial_call(TapiHandle *handle, const TelCallDial_t *pParams, tapi_response_cb callback, void *user_data);
-
- /**
- * @brief This function is used to answer the incoming call by accepting or rejecting the call.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - This is the unique handle for referring the call. This call handle is available to Application through incoming call
- *  (TapiHandle *handle, TAPI_EVENT_CALL_INCOM_IND) event.
- *
- * @param[in] AnsType
- * - Answer type - accept / reject / replace / hold and accept. but, for CDMA, only accept is allowed.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_ANSWER_CNF. Asynchronous return status is
- *  indicated by #TelCallCause_t and call handle is sent in the event data.
- * - TAPI_EVENT_CALL_CONNECTED_IND / TAPI_EVENT_CALL_END_IND event will be notified in case of call is accepted/rejected.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - Call associated with call handle should be TAPI_CALL_STATE_INCOM state otherwise the API fails and there can be a
- *   maximum of 1 existing call.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_exe_call_mo tel_release_call
- *
- * \image html CallIncoming.jpg
- * \image latex CallIncoming.jpg
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle;
- * int pRequestID=0;
- *
- * ret_status = tel_answer_call (TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // call answer
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- * @remarks
- * - None
- *
- *
- */
-int tel_answer_call(TapiHandle *handle, unsigned int CallHandle, TelCallAnswerType_t AnsType, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function releases the call identified by Call Handle irrespective of call is hold or active state.
- * It is used when releasing specific active call in multiparty call.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - In case of MPTY Call handle, Call end event is returned for each call in MPTY.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Unique handle for referring the call.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_RELEASE_CNF and Asynchronous return status
- *  is indicated by #TelCallCause_t and call handle for the released call is sent in the event data..
- *
- * - The event TAPI_EVENT_CALL_END_IND_IND is received as final asynchronous response and the associated data is #TelCallEndInfo_t.
- *  Asynchronous return status is indicated by #TelCallCause_t.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - Call handle should be valid and there should be an existing call in Active/hold state.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_exe_call_mo tel_answer_call tel_release_call_all tel_release_call_all_active
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle;
- * int pRequestID=0;
- *
- * ret_status = tel_release_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // call release
- * @endcode
- *
- *
- * @remarks
- * - None
- *
- *
- */
-int tel_end_call(TapiHandle *handle, unsigned int CallHandle, TelCallEndType_t EndType, tapi_response_cb callback, void *user_data);
-
-
- /**
- *
- * @brief This function puts the given call on hold. The call identified by Call Handle should be in active state.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - Call duration for the call will be calculated from the time call has been connected until call is released,
- *  i.e. Time duration during the call on hold will also be counted.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Unique handle for referring the call.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_HOLD_CNF. Asynchronous return status is
- *  indicated by #TelCallCause_t and call handle is sent in the event data.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - The call identified by the Call Handle should be in active state.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle;//HANDLE OF AN ACTIVE CALL
- * int pRequestID=0;
- *
- * ret_status = tel_hold_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // hold call
- * @endcode
- *
- *
- * @see tel_retrieve_call
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_hold_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function retrieves the held call. The call identified by Call Handle must be in held state.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - Call duration for the call will be calculated from the moment call has been connected until call is released.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Unique handle for referring the call.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_RETRIEVE_CNF. Asynchronous return status is indicated
- *  by #TelCallCause_t and call handle is sent in the event data.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - Call should be in held state in order to retrieve into active state and no active call present.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_retrieve_call
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle;//held call handle
- * int pRequestID=0;
- *
- * ret_status = tel_retrieve_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // retrieve call
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
-int tel_active_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief Swap calls. This is only for calls you dialed or answered with Telephony.
- * Swap is only available for the voice calls.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Notes:
- * During a call, user can place all active calls and accepts the other held call with this function.
- * If the terminal is not within a call, it will fail.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle1
- * - This is active call
- *
- * @param[in] CallHandle2
- * - This is Held call
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * -
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle1;
- * unsigned int pCallHandle2;
- * int pRequestID=0;
- *
- * ret_status = tel_swap_call(TapiHandle *handle, pCallHandle1, pCallHandle2,&pRequestID, tapi_response_cb callback, void *user_data); // swap call
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_swap_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function sends one or more DTMF digits during the call.
- *
- * @par Notes:
- * DTMF is abbreviation of Dual-tone-multi-frequency. It is used for telecommunication signaling
- * over telephone lines in the voice-frequency band between UE and other communications devices.
- * For example UE send DTMF tone to a server to choose options which the server provides.
- * If the UE is not within a call, this function will fail with error code. *
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -There will be a single asynchronous notification for all the DTMF digits sent. If the users of this API need an asynchronous
- *  response for each DTMF digit then User has to call this API multiple times passing each single DTMF digit in pDtmfString.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] pDtmfString
- * - A Null terminated DTMF string to be sent from MS.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_SEND_DTMF_CNF. Asynchronous return status
- *  is indicated by #TelCallCause_t and call handle is sent in the event data.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - Active call should be present.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- *
- * \image html CallDtmf.jpg
- * \image latex CallDtmf.jpg
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle;
- * int pRequestID=0;
- * char DtmfString[10] = {0, };
- * strcpy(TapiHandle *handle, DtmfString, "123456789", tapi_response_cb callback, void *user_data);//Sample DTMF digits that need to be sent
- * ret_status= tel_send_call_dtmf(TapiHandle *handle, DtmfString,&pRequestID, tapi_response_cb callback, void *user_data);
- * @endcode
- *
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_call_dtmf(TapiHandle *handle, const char *pDtmfString, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function joins the given two calls (TapiHandle *handle, one call in active conversation state and other call in held state) into conference.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - Call handle of an active call or held call will be made as MPTY-id, and the other call handle will join in a conference).
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle1
- * - The unique handle can be either an active call or held call.
- *
- * @param[in] CallHandle2
- * - Unique call handle.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_SETUPCONFERENCE_CNF. Asynchronous return
- *  status is indicated by #TelCallCause_t and call handle of the MPTY call is sent in the event data.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - For a Multiparty call or for joining two calls into conference, there should be one call in active state and another call
- *  in held state.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_split_call
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle1;
- * unsigned int pCallHandle2;
- * int pRequestID=0;
- *
- * ret_status= tel_join_call(TapiHandle *handle, pCallHandle1, pCallHandle2,&pRequestID, tapi_response_cb callback, void *user_data); // call join
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- *
- *
- */
- int tel_join_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function triggers to splits a private call from multiparty call. This API allows creating a private communication
- *     with one of remote parties in a multiparty session. TAPI client application has to pass the call handle which needs
- *     to split from the multiparty call.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - The list of call handles present in the conference call is retrieved using #tel_get_call_conf_list API
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Handle of call to be made private. Call handle referring to the call that is to be split from the conference
- *   (TapiHandle *handle, call to be made private).
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_SPLITCONFERENCE_CNF. Asynchronous return status
- *  is indicated by #TelCallCause_t and call handle for the split call is sent in the event data.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- * - Call should be in multiparty conference call.
- *
- * @post
- * - Split call will be the active call and the conference will be held call.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_join _call
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle;
- * int pRequestID=0;
- *
- * ret_status= tel_split_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // call split
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- *
- *
- */
- int tel_split_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief Get the current calling line identification number.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Notes:
- * If the USIM card has multiple number, an user can choose which number he use.
- * For example, a line is for private, the other line is for business.
- * Using this function, user can get information about which line is currently active.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * NONE
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- * @param [out] ptr_active_line
- *  current active line id.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_set_call_act_line
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int pRequestID=0;
- * ret_status= tel_get_call_act_line(TapiHandle *handle, &pRequestID, tapi_response_cb callback, void *user_data); // get call active line
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_get_call_act_line(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief Set the current calling line identification number.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * NONE
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] active_line
- * - calling line identification
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see tel_get_call_act_line
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * TelCallActiveLine_t g_curLine =TAPI_CALL_ACTIVE_LINE1;
- * TelCallActiveLine_t active_line ;
- * int pRequestID=0;
- *
- * ret_status = tel_set_call_act_line (TapiHandle *handle, g_curLine,&pRequestID, tapi_response_cb callback, void *user_data); // set call active line
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_set_call_act_line(TapiHandle *handle, TelCallActiveLine_t active_line, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function triggers to do an explicit call transfer by connecting the two parties where in one party being
- *     active (TapiHandle *handle, active state) and another party being held (TapiHandle *handle, held state).
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Notes:
- * The ECT supplementary service enables the served mobile subscriber (TapiHandle *handle, subscriber A) who has two calls,
- * each of which can be an incoming or outgoing call, to connect the other parties in the two calls
- * and release the served mobile subscribers own connection.
- * Prior to transfer, the connection shall have been established on the call
- * between subscriber A and subscriber B. On the call between subscriber A and subscriber C,
- * either the connection shall have been established prior to transfer, or, as a network option,
- * transfer can occur while subscriber C is being informed of the call
- * (TapiHandle *handle, i.e. the connection has not yet been established.)
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Call handle of an active call.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_TRANSFER_CNF. Asynchronous return status is
- *  indicated by #TelCallCause_t and call handle is sent in the event data. Call handle in event data is active
- *  call handle which is used in the #tel_exe_call_explicit_transfer request.
- *
- * @pre
- * - In order to call transfer, Served mobile subscriber should have 2 calls in one in active state and another one Call
- *  in Held state.
- *
- * @post
- * - When the request has been completed successfully, Call end indication will be sent to both the calls (TapiHandle *handle, active and held).
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int pCallHandle;//active call
- * int pRequestID=0;
- *
- * ret_status= tel_exe_call_explicit_transfer (TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // explicit transfer
- * @endcode
- *
- * @remarks
- * -None
- *
- *
- */
- int tel_transfer_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
-
-
-/**
- *
- * @brief This function gets status for the current call identified by Call Handle whenever application wants the call status. Call handle must be valid.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Unique handle for referring the call.
- *
- * @param [out] pCallStatus
- *  - Call status information like destination number, call direction (TapiHandle *handle, MO or MT), call type (TapiHandle *handle, voice or data etc), whether
- *   the call is in conference state or not, present call state etc are returned through this parameter.
- *
- * @par Async Response Message:
- *  - None.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- *
- *
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int CallHandle;
- * TelCallStatus_t     callStatus;
- *
- * ret_status= tel_get_call_status(TapiHandle *handle, CallHandle,&callStatus, tapi_response_cb callback, void *user_data); // get call status info
- * @endcode
- *
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-int tel_get_call_status(TapiHandle *handle, int call_id, TelCallStatus_t *out );
-
-
-int tel_get_call_status_all(TapiHandle *handle, TelCallStatusCallback cb, void *user_data) ;
-
-
- /**
- *
- * @brief This function gets duration of the given call. This is a synchronous function. Duration is accounted from the moment
- *     the connection is established, i.e. call goes into active state for first time.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Unique handle for referring the call.
- *
- * @param [out] pDurationInSecs
- *  - The total call duration in seconds from the call connecting time to the present time is returned through this parameter.
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int CallHandle;
- * unsigned int duration;
- *
- * ret_status= tel_get_call_duration(TapiHandle *handle, CallHandle,&duration, tapi_response_cb callback, void *user_data); // get call duration
- * @endcode
- *
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_get_call_duration(TapiHandle *handle, unsigned int CallHandle, unsigned int * pDurationInSecs) ;
-
- /**
- *@brief Deflect the incoming call to other subscriber
- *
- * If informed about an incoming call this call may be redirected to an another destination by
- * entering the destination Number. The cleint spcifies the dstiantion number to which the current
- * incoming call needs to be redirected is specifed via info argument.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - This is incoming call handle
- *
- * @param[out] deflect_info
- * - Destination Number
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * -
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @remarks
- * - None
- *
- * @code
- * #include <ITapiCall.h>
- * #include <TelCall.h>
- *
- * unsigned int call_handle;
- * TelCallDeflectDstInfo_t deflect_info;
- * int req_id;
- *
- * tel_deflect_call(TapiHandle *handle, call_handel, &deflect_info, req_id, tapi_response_cb callback, void *user_data); // call deflect
- *
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- */
- int tel_deflect_call(TapiHandle *handle, unsigned int CallHandle, const TelCallDeflectDstInfo_t *deflect_info, tapi_response_cb callback, void *user_data);
-
-
- /**
- *
- * @brief Activate Call Completion to a Busy Subscriber.
- *
- * @par Notes:
- * When subscriber A encounters a Network Determined User Busy (TapiHandle *handle, NDUB) destination B,
- * subscriber A can request the CCBS supplementary service (TapiHandle *handle, i.e. activate a CCBS Request against destination B).
- * The network will then monitor the wanted destination B for becoming idle.
- * When the wanted destination B becomes idle, then the network will wait a short time
- * in order to allow destination B to make an outgoing call.
- * If destination B does not make any outgoing call within this time,
- * then the network shall automatically recall subscriber A.
- * When subscriber A accepts the CCBS recall, within a defined time, then the network will automatically
- * generate a CCBS call to destination B.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] CallHandle
- * - Handle of the call.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * -
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret;
- * unsigned int call_handle;
- * int req_id;
- *
- * ret = tel_activate_call_ccbs(TapiHandle *handle, call_handle, &req_id, tapi_response_cb callback, void *user_data); // ccbs activate
- * @endcode
- *
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- */
- int tel_activate_call_ccbs(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
-
-
- /**
- * @brief This is a synchronous function returns all call handles within the given conference call.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- * - Call should be a Multi-party conference call in order to return actual no of calls and call handles in the conference calls.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] CallHandle
- * - Handle of call which is associated with the conference.
- *
- * @param [out] pCallList
- *  - list of call joined in the conference call. In case there is no active conference. The list will be zero and
- *   number of calls parameter value will also be zero. Maximum number of calls in a conference can be up to 5
- *   (TapiHandle *handle, Based on 3GPP TS 22.084). Memory allocation for call list is integer array of size 5.
- *
- * @param [out] pNoOfCalls
- *  - Number of the calls present in conference.
- *
- * @par Async Response Message:
- * -None.
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * -None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status ;
- * unsigned int CallHandle;
- * unsigned int callList[5];
- * int noOfCalls;
- *
- * ret_status= tel_get_call_conf_list(TapiHandle *handle, CallHandle, callList, &noOfCalls, tapi_response_cb callback, void *user_data); // get conference call list
- * @endcode
- *
- * @see tel_join_call
- *
- * @remarks
- * - None
- *
- *
- */
-int tel_get_call_conf_list(TapiHandle *handle, unsigned int CallHandle, unsigned int *pCallList, int *pNoOfCalls);
-
-
- /**
- *
- * @brief This function gets voice privacy option mode in phone(TapiHandle *handle, CDMA only).
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] PrivacyType
- * - Privacy Type.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF. Asynchronous return status
- *  is indicated by #TelCallCause_t. #TelCallPrivacyMode_t is included in this event.
- *
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- *
- *
- * @code
- * #include <ITapiCall.h>
- *
- * Int ReqId=-1;
- * int ret_status = -1;
- * int api_err;
- * TelCallPrivacyType_t privacyType;
- * privacyType=TAPI_CALL_PRIVACY_TYPE_MS;
- * ret_status =tel_get_call_privacy_mode (TapiHandle *handle, privacyType,&req_id, tapi_response_cb callback, void *user_data); // get call privacy_mode
- * @endcode
- *
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_get_call_privacy_mode(TapiHandle *handle, TelCallPrivacyType_t PrivacyType, tapi_response_cb callback, void *user_data);
-
-
- /**
- *
- * @brief This function sets voice privacy option mode in phone. It is available only where call exists(TapiHandle *handle, CDMA only).
- *
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] PrivacyInfo
- * - voice privacy option mode(TapiHandle *handle, ENHANCED or STANDARD)
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF. Asynchronous return status
- *  is indicated by #TelCallCause_t.
- *
- *
- * @pre
- * - Initialize Dbus connection with #tel_init
- * - Register caller's application name with #tel_register_app_name
- * - Register telephony events to listen
- * - A event loop is running to listen events
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- *
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ReqId=-1;
- * int ret_status = -1;
- * int api_err;
- * TelCallPrivacyMode_t pPrivacyMode_info={0,};
- * pPrivacyMode_info = TAPI_CALL_PRIVACY_MODE_STANDARD;
- *
- * ret_status = tel_set_call_privacy_mode (TapiHandle *handle, pPrivacyMode_info,&reqId, tapi_response_cb callback, void *user_data); // set call privacy mode
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_set_call_privacy_mode(TapiHandle *handle, TelCallVoicePrivacyInfo_t PrivacyInfo, tapi_response_cb callback, void *user_data);
-
-
-/**
- *
- * @brief This function requests to send a Flash with Information Message(TapiHandle *handle, CDMA only).
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] pDialNumber
- * - this is the calling number for 3 way call. But in the call waiting, this param should be NULL.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_FLASHINFO_CNF. Asynchronous return status
- *  is indicated by #TelCallCause_t.
- *
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status = -1;
- * int api_err;
- * char const * const pDialNumber = "9999900000";
- * ret_status = tel_exe_call_flash_info(TapiHandle *handle, pDialNumber,&reqId, tapi_response_cb callback, void *user_data); // call flash info
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_exe_call_flash_info(TapiHandle *handle, const char *pDialNumber, tapi_response_cb callback, void *user_data);
-
-
-/**
- *
- * @brief This function requests to exit emergency call mode(TapiHandle *handle, CDMA only).
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF. Asynchronous return status
- *  is indicated by #TelCallCause_t.
- *
- * @pre
- * - current state is emergency callback mode.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int req_id;
- * int ret;
- *
- * ret = tel_exit_call_emergency_mode (TapiHandle *handle, &req_id, tapi_response_cb callback, void *user_data); // emergency call
- *
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_exit_call_emergency_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-
-/**
- *
- * @brief This function is used for querying the information about a call time and call count.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * Do not use this function. This function is dedicated to the embedded call application only.
- * Please use its AUL interface instead of this.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param[in] req_mask
- * - call time request type mask.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- *
- * @par Async Response Message:
- * - The event associated with this request is TAPI_EVENT_CALL_GET_CALL_TIME_CNF. Asynchronous return status
- *  is indicated by #TelCallCause_t.
- *
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- * #include <ITapiCall.h>
- *
- * int ret_status = -1;
- * int api_err;
- * TelCallTimeMaskType_t mask_byte1 = {0,};
- * TelCallTimeMaskType_t mask_byte2 = {0,};
- * unsigned short mask_type;
- * mask_byte1 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT; //masking call type
- * mask_byte2 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME;
- *
- * mask_type = mask_byte1;
- * mask_type << 8;
- * mask_type = mask_byte2;
- *
- * ret_status = tel_get_call_time(TapiHandle *handle, mask_type,&reqId, tapi_response_cb callback, void *user_data);
- *
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_get_call_time(TapiHandle *handle, unsigned short req_mask, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function is to get call volume.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] device
- * - sound device
- *
- * @param [in] type
- * - sound type
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - TelCallGetVolumeInfoResp_t
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
- int tel_get_call_volume_info(TapiHandle *handle, TelSoundDevice_t device, TelSoundType_t type, tapi_response_cb callback, void *user_data );
-
-/**
- *
- * @brief This function is to set call volume.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] path
- * - call volume information
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_set_call_volume_info(TapiHandle *handle, TelCallVolumeInfo_t *info, tapi_response_cb callback, void *user_data );
-
-/**
- *
- * @brief This function is to set call sound path.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] path
- * - call sound path information
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_set_call_sound_path(TapiHandle *handle, TelCallSoundPathInfo_t *path, tapi_response_cb callback, void *user_data );
-
-/**
- *
- * @brief This function is to set call mute state
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] mute
- * - Sound Mute Status
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_set_call_mute_status(TapiHandle *handle, TelSoundMuteStatus_t mute, tapi_response_cb callback, void *user_data );
-
-/**
- *
- * @brief This function is to get call mute state
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - TelCallGetMuteStatusResp_t
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_get_call_mute_status(TapiHandle *handle, tapi_response_cb callback, void *user_data );
-
-/**
- *
- * @brief This function is to set call sound recording
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] on
- * - Sound recording on / off
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_set_call_sound_recording(TapiHandle *handle, TelSoundRecording_t *on, tapi_response_cb callback, void *user_data);
-
-/**
- *
- * @brief This function is to set call sound equalization.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] eq
- * - call sound equalization information
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_set_call_sound_equalization(TapiHandle *handle, TelCallSoundEqualization_t *eq, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function is used for querying the set call sound reduction.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] noise
- * - 
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- *
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
- int tel_set_call_sound_noise_reduction(TapiHandle *handle, TelSoundNoiseReduction_t noise, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief This function is used to set call sound clock status
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] enable
- * - sound clock status ( TRUE : enable, FALSE : disable )
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @code
- *
- * @endcode
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
- int tel_set_call_sound_clock_status(TapiHandle *handle, gboolean status, tapi_response_cb callback, void *user_data );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_CALL_H_ */
-
- /**
-* @}
-*/
diff --git a/include/ITapiGps.h b/include/ITapiGps.h
deleted file mode 100644 (file)
index f78f228..0000000
+++ /dev/null
@@ -1,170 +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 GPS_TAPI                GPS
- * @{
- *
- * @file ITapiGps.h
-
- @brief This file serves as a "C" header file defines functions for Tapi GPS\n
- It contains a sample set of function prototypes that would be required by applications.
- * GPS APIs allow an application to accomplish the following services: @n
- * - Confirm gps measure position information. @n
- */
-
-
-#ifndef _ITAPI_GPS_H_
-#define _ITAPI_GPS_H_
-
-#include <tapi_common.h>
-#include <TelErr.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- * @brief  This function sends the confirmation data for measure position message.
- *
- * @par Sync (or) Async:
- * This is an Synchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] data
- * -#user confirmation data for each vender.
- *
- * @param [in] data_len
- * - data length
- *
- * @pre
- * - TAPI_EVENT_GPS_MEASURE_POSITION_IND should be sent to application by Telephony Server.
- *
- * @post
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * GPS Deamon
- *
- *
- * @code
- *
- *     int result;
- *     gps_measure_position_confirm_t data;
- *     result = tel_confirm_gps_measure_pos(handle, (unsigned char *)&data, sizeof(gps_measure_position_confirm_t));
- *
- *
- */
-/*================================================================================================*/
-int tel_confirm_gps_measure_pos(TapiHandle *handle, unsigned char *data, unsigned int data_len);
-
-/**
- * @brief  This function is invoked to set the gps frequency aiding and allows the underlying OEM provider to scan the set band.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] state
- * - enable / disable state.
- *
- * @param [in] data_len
- * - data length
-
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_GPS_FREQ_AIDING_SET_RESP and there is no event data associated with this event and asynchronous.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * GPS daemon.
- *
- * @code
- *
- *     unsigned char state = true;
- *
- *     result = tel_set_gps_frequency_aiding(handle, state, on_gps_set_frequency_aiding, NULL);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- *
- */
-/*================================================================================================*/
-
-int tel_set_gps_frequency_aiding(TapiHandle *handle, unsigned char state, tapi_response_cb callback, void *user_data);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_GPS_H_ */
-
-/**
- * @}
- */
diff --git a/include/ITapiModem.h b/include/ITapiModem.h
deleted file mode 100644 (file)
index 226b6c3..0000000
+++ /dev/null
@@ -1,500 +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.
- */
-
-/**
- * @internal
- * @ingroup            TelephonyAPI
- * @addtogroup MODEM_TAPI      POWER
- * @{
- *
- * These APIs allow an application to accomplish the following services: @n
- * - Process power command @n
- * - Reset the phone power (on / off), @n
- * - Process airplane mode @n
- */
-
-#ifndef _ITAPI_MODEM_H_
-#define _ITAPI_MODEM_H_
-
-#include <tapi_common.h>
-#include <TelDefines.h>
-#include <TelPower.h>
-#include <TelMisc.h>
-#include "ITapiPS.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *
- * @brief  This API is used to turn power off or on the modem.
- *
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] cmd
- * - This index value is the power command as #tapi_power_phone_cmd_t.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - None
- *
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Otherwise it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- *
- */
-int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data);
-
-/**
- *
- * @brief  This API is used to enter or leave airplane mode
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] mode
- * - This mode value is the flight flag #tapi_power_flight_mode_type_t.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_MODEM_FLIGHT_MODE_RESP  and the event data is #tapi_power_flight_mode_resp_type_t.
- * Asynchronous return status is always TAPI_API_SUCCESS.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Otherwise it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- *
- */
-int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data);
-
-int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- *
- * @brief  This function is invoked to Get ME version information.
- *
- * @par Sync (or) Async:
- * This is a synchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - NA
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- *
- * @brief This function is to get misc me version
- *
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @par Async Response Message:
- * - Na
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type ( TelMiscVersionInformation * ) \n
- * - Misc Version Information
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-
-
-TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle);
-
-
-/**
- *
- * @brief  This function is invoked to Get ME IMEI/ESN/MEID for each phone type.
- *
- * @par Sync (or) Async:
- * This is a synchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - NA
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- *
- * @brief This function is to get misc me Sereal Number
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (char*) \n
- * - Sereal Number string
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-char *tel_get_misc_me_sn_sync(TapiHandle *handle);
-
-/**
- *
- * @brief This function is to get misc me imei
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * - IMEI
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-
-int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- *
- * @brief This function is to get misc me imei
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- * 
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (char*) \n
- * - IMEI string
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-char *tel_get_misc_me_imei_sync(TapiHandle *handle);
-
-/**
- *
- * @brief This function is to check modem power status
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [out] result
- * - result of checking modem power status.
- *
- * @par Async Response Message:
- * - 
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_check_modem_power_status(TapiHandle *handle, int *result);
-
-/**
- *
- * @brief This function is to control modem dun pin
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (TapiHandle *handle, or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- *  - None.
- *
- * @warning
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] pincontrol
- * - pin control inforamation
- *
- * @param [in] callback
- * - To register callback function for result of this function.
- *
- * @param [in] user_data
- * - user data for user specification
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- * - None.
- *
- * @post
- * - None.
- *
- * @return Return Type (TapiHandle *handle, int) \n
- * - 0 - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embedded call application
- *
- * @see None.
- *
- * @remarks
- * - None
- *
- *
- */
-
-int tel_control_modem_dun_pin_ctrl(TapiHandle *handle, tapi_ps_btdun_pincontrol *pincontrol, tapi_response_cb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_MODEM_H_ */
-
-/**
- * @}
- */
diff --git a/include/ITapiNetText.h b/include/ITapiNetText.h
deleted file mode 100644 (file)
index 059454c..0000000
+++ /dev/null
@@ -1,1360 +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  NetText_TAPI    NetText(SMS)
-* @{
- *
-* @file ITapiNettext.h
-
-     @brief This file serves as a "C" header file defines functions for Tapi Nettext\n
-      It contains a sample set of function prototypes that would be required by applications.
-
- */
-
-#ifndef _ITAPI_NETTEXT_H_
-#define _ITAPI_NETTEXT_H_
-
-#include <tapi_common.h>
-#include <TelSms.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /**
- * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
- *             3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to lower layers. This API allows keeping the dedicated link at lower layers
- *             by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
- *             used for transmission. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] pDataPackage
- *   - Contains SMS-SUBMIT TPDU
- *
- * @param [in] bMoreMsgToSend
- *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
- *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_CNF and the event data associated with this event
- *  is #TelSmsDatapackageInfo_t that has SMS PDU as defined by 3GPP TS 23.040(SMS-SUBMIT-REPORT). Asynchronous return status is indicated by #TelSmsResponse_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * TelSmsDatapackageInfo_t *pDataPackage;
- * int ret_status;
- * int RequestId = 0;
- *
- * pDataPackage = (TelSmsDatapackageInfo_t*) malloc(sizeof(TelSmsDatapackageInfo_t));
- * // fill the structure appropriately
- * // Sca parameter is optional. If you don't provide Service center address, you should fill "00" in sca array.
- * //  MsgLength is length of szData//fill the szData in TelSmsDatapackageInfo_t with SMS-SUBMIT or SMS-COMMAND TPDU.
- * ret_status = tel_send_sms (pDataPackage, 0, &RequestId);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_send_sms(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
- *             3GPP2 C.S0015 (SMS-SUBMIT, SMS-ACK, SMS-CANCEL) to lower layers. This API allows keeping the dedicated link at lower layers
- *             by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
- *             used for transmission. Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] pSmsMsgInfo
- *   - Contains parameter mask, message type and data.
- *
- * @param [in] MoreMsgToSend
- *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
- *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
- *
- * @param [out] pRequestId
- * - Unique identifier for a particular request.
- * - pRequestId value can be any value from 0 to 255 if the API is returned successfully
- * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
- *
- *
- * @par Async Response Message:
- *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF and the event data associated with this event
- *  is #TelSmsIs637CauseCode_t. Asynchronous return status is indicated by #TelSmsResponse_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- * int ret_status = TAPI_API_SUCCESS;
- * int requestId = 0;
- * TelSmsMsgInfo_t pMsgInfo={0,};
- * char* diallingNum;
- * int dialNumLen;
- * TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
- *
- * memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
- * pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT; //fill structure appropriately
- * pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
- *
- * ret_status = tel_send_sms_msg(pDataPackage, 0 ,&requestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-//int tel_send_sms_msg(const TelSmsMsgInfo_t *pSmsMsgInfo, int MoreMsgToSend, int *pRequestId);
-
- /**
- * @brief  This function reads a message from SIM card storage. SIM index (index used when storing the SMS) number to be passed to in order
- *             to read particular SMS message. Total number of messages can be retrieved by #TelTapiSmsGetCount function.
-  *            Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] index
- *  -  Index number of the message to be read
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_NETTEXT_READ_SMS_CNF and the event data is #TelSmsData_t. Asynchronous return status is indicated
- *  by #TelSmsCause_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_read_sms_in_sim(0, &RequestId); //index value which is located in SIM
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
- int tel_read_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function writes a message to SIM storage area.
- *           Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] pWriteData
- *  - SMS message structure.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- *  TAPI library will send TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF asynchronous event for this request when received from TS.
- *  The associated data is SIM Index in which the message stored. Asynchronous return status is indicated by #TelSmsCause_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- * TelSmsData_t *pWriteData;
- * char *msg = "This is an Test SMS";
- * char *SCA = "821091";
- *
- * pWriteData = malloc(sizeof(TelSmsData_t));
- *
- * conv_service_center_address(pWriteData->SmsData.Sca, SCA); //convert service center address
- * conv_msg_into_tpdu(pWriteData->SmsData.szData, pWriteData->SmsData.MsgLength, msg); // convert message into TPDU
- * pWrite->MsgStatus = TAPI_NETTEXT_STATUS_READ;
- * pWrite->SimIndex = -1;
- *
- * ret_status = tel_write_sms_in_sim (pWriteData, &RequestId);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_write_sms_in_sim(TapiHandle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function deletes a message specified by index (SIM index used when storing the SMS)
- *           number from the SIM storage area. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] Index
- *  - Message index to delete.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The asynchronous event associated is TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF and the event data is SIM index from which
- * the message has been deleted. Asynchronous return status is indicated by #TelSmsCause_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t).\n
- * @par Prospective Clients:
- *  External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_delete_sms_in_sim(1, &RequestId); //index which is located in SIM
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_delete_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function is used to retrieve message count information like Total record count,
- *  used record count and the indices list for SIM Storage. This is an asynchronous function and
- *  the response will be sent back by event notification. Access to this API is limited, we recommend you use Message Framework API(MAPI) besides.
- *  Access to this API is limited to in-house application.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
-
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_GET_COUNT_CNF and the event data is #TelSmsStoredMsgCountInfo_t.
- * Asynchronous return status is indicated by #TelSmsCause_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * - External Apps.\n
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_get_sms_count (&RequestId); //get sms count in SIM
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_get_sms_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function is used to set SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
- *             This function also indicates underlying provider to enable or disable CB Channel on which CB messages are received.
- *             Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI) besides.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] pCBConfig
- *  - This structure contains parameters to set SMS CB configuration \n
- *      (i)  Cell broadcast service state. (Enabled/disabled.) \n
- *      (ii) Cell broadcast message identifier, which denotes whether all cell broadcast message identifiers are selected or only
- *           some of those.\n
- *       (iii) The list count of message identifiers to be set.\n
- *       (iv) The actual list of message identifiers to be set. Each identifier occupies 2 bytes. And the list ranges from 0x00 to 0xff. \n
- *    These message identifiers denote the source and type of the CB message. Based on the message identifiers set in the SIM,
- *    the ME receives CB messages with selected message identifiers.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
- * Asynchronous return status is indicated by #TelSmsCause_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.\n
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- * TelSmsCbConfig_t *pCBConfig = NULL;
- *
- * pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
- * pCBConfig->bCBEnabled = 1; //fill structure appropriately
- * pCBConfig->SelectedId = 0x01;
- * pCBConfig->MsgIdCount = 0x02;
- *
- * pCBConfig->MsgIDs[0] = 0x0c;
- * pCBConfig->MsgIDs[1] = 0x0c;
- * pCBConfig->MsgIDs[2] = 0xdf;
- * pCBConfig->MsgIDs[3] = 0x00;
- *
- * ret_status = tel_set_sms_cb_config(pCBConfig, &RequestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_set_sms_cb_config(TapiHandle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data); 
-
- /**
- * @brief  This function is used to retrieve SMS CB configuration options from EFcbmi file in the SIM.
- *             Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF and the event data is #TelSmsCbConfig_t.
- * Asynchronous return status is indicated by #TelSmsCause_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * - External Apps.\n
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_get_sms_cb_config (&RequestId); //result will come with async response
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_get_sms_cb_config(TapiHandle *handle, tapi_response_cb callback, void* user_data);
-
-
- /**
- * @brief This function is used to set SMS preferred bearer on which SMS has to be transmitted.
- *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] BearerType
- *  - Specifies the bearer type.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
- * Asynchronous return status is indicated by #TelSmsCause_t
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- * TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
- *
- * ret_status = tel_set_sms_preferred_bearer(BearerType, &RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_set_sms_preferred_bearer(TapiHandle *handle, TelSmsBearerType_t BearerType, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function is used to get SMS preferred bearer on which SMS has to be transmitted.
- *  This is an asynchronous function. Access to this API is limited to in-house application and , we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF and the associated event data is #TelSmsBearerType_t.
- * Asynchronous return status is indicated by #TelSmsCause_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_get_sms_preferred_bearer(&RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_get_sms_preferred_bearer(TapiHandle *handle, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief This function is used to get the SMS parameters for a particular SMS (sent/received)
- *  based on the SIM index where it is stored. This is an asynchronous function. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] index
- *  - SIM index where the SMS is stored
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_GET_PARAM_CNF and the event data is #TelSmsParams_t. Asynchronous return status
- * is indicated by #TelSmsCause_t
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_get_sms_parameters(1, &RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_get_sms_parameters(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function is used to set the short message service header parameters which are
- *  used in the origination of MO messages. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - This API updates/sets SMS Parameters in EFsmsp file in the SIM storage
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] pSmsSetParameters
- *  - Contains SMS header Parameter information like service center address, destination address, validity period, protocol identifier,
- *     data coding scheme.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event. Asynchronous
- * return status is indicated by #TelSmsCause_t
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- * TelSmsParams_t SmsSetParameters = {0,};
- *
- * SmsSetParameters.RecordIndex = 0x01;
- * SmsSetParameters.RecordLen = 28;
- * memcpy(SmsSetParameters.TpDestAddr.szDiallingNum, "9986529874", 10);
- * printf("\ndial no is %s\n", SmsSetParameters.TpDestAddr.szDiallingNum);
- * SmsSetParameters.TpDestAddr.DialNumLen = 10;
- * SmsSetParameters.TpDestAddr.Ton = TAPI_SIM_TON_NATIONAL;//national no
- * SmsSetParameters.TpDestAddr.Npi = TAPI_SIM_NPI_NATIONAL;
- *
- * ret_status = tel_set_sms_parameters(SmsSetParameters, &RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_set_sms_parameters(TapiHandle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief This function is used to send a delivery report for the received incoming SMS to the network.
- *          Access to this API is limited to in-house application.
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] pDataPackage
- *  - Contains SMS Data package..
- *
- * @param [in] RPCause
- *  - Indicates the reason for SMS-DELIVER failure
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF and there is no associated event data. Asynchronous return status
- * is indicated by #TelSmsResponse_t
- *
- * @pre
- *  - SMS-DELIVER-REPORT message structure should be in TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = 0;
- * Int requestId = -1;
- * TelSmsResponse_t RPCause;
- * TelSmsDatapackageInfo_t *del_report = NULL;
- *
- * del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
- * memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
- * //Encode Send Delivery Report here
- * //EncodeSmsDeliveryReportTpdu();
- *
- * RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
- * printf("***receive message (Api:SendDeliverreport)****\n");
- *
- * ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_send_sms_deliver_report(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function is used to set SMS Service Centre Address information in order to send the SMS.
- *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - This API updates/sets service center address in EFsmsp file in the SIM storage.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] pSCA
- * - Contains the service centre address informations.
- *
- * @param [in] Index
- * - Contains the record index of the Service center address information in the EF.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
- * Asynchronous return status is indicated by #TelSmsResponse_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t).
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status;
- * int RequestId = 0;
- * BYTE        scabuf[512];
- * char        scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
- * BYTE        scaNum_len =0;
- * TelSmsAddressInfo_t *sc_addr = NULL;
- * BYTE        packet[500];
- * int idx = 0;
- * int i;
- *
- * printf("***Setting the SCA(Api:SetSCA)****\n");
- * sc_addr = (TelSmsAddressInfo_t *)malloc(sizeof(TelSmsAddressInfo_t));
- * memset(sc_addr, 0, sizeof(sc_addr));
- * memset(scaNum, 0, sizeof(scaNum));
- * memset(scabuf, 0, sizeof(scabuf));
- * sprintf(scaNum, "821091");
- * scaNum_len = strlen(scaNum);
- * scaNum_len = strlen(scaNum);
- * scaNum[scaNum_len] = 0;
- * scaNum_len = scaNum_len - 1;
- *
- * //idx = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
- * //get idx
- * sc_addr->DialNumLen = idx ;
- * memcpy(sc_addr->szDiallingNum, packet, (unsigned int)idx);
- * ret_status = tel_set_sms_sca(sc_addr, 0, &RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_set_sms_sca(TapiHandle *handle, const TelSmsAddressInfo_t *pSCA, int index, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function is used to get current SMS Service Centre Address information.
- *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] Index
- * - Contains the record index of the Service center address information in the EF.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETTEXT_GET_SCA_CNF and there is no data associated with this event.
- * Asynchronous return status is indicated by #TelSmsResponse_t.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_get_sms_sca(0, &RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_get_sms_sca(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief This function is used by the applications to inform modem about  the memory status of PDA (whether FULL or AVAILABLE) so that modem can inform network .
- *           Access to this API is limited to in-house application.
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] memoryStatus
- *  - Contains Memory Status
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
- *  is indicated by #TelSmsResponse_t
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
- *
- * ret_status = tel_set_sms_memory_status(MemoryStatus, &RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_set_sms_memory_status(TapiHandle *handle, int memoryStatus, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief  This function is used by the applications to set the message status in the SIM EF.
- *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * 
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] Index
- *  - Index of the message whose status has to be set.
- *
- * @param [in] msgStatus
- *  - Status of the message to be set.
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
- *  is indicated by #TelSmsResponse_t
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- * int index = 1;
- * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
- *
- * ret_status = tel_set_sms_memory_status(index, MemoryStatus, &RequestId); //result will come with async response
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_set_sms_message_status(TapiHandle *handle, int index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data);
-
- /**
- * @brief This function is used by the applications to get the count of SMS parameter records stored in SIM EF.
- *           Access to this API is limited to in-house application.
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * 
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [in] callback
- *   - To register callback function for result of this function.
- *
- * @param [in] user_data
- *   - user data for user specification
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_NETTEXT_PARAM_COUNT_IND and there is no associated event data. Asynchronous return status
- *  is indicated by #TelSmsResponse_t
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetText.h>
- *
- * int ret_status = TAPI_API_SUCCESS;
- * int RequestId = 0;
- *
- * ret_status = tel_get_sms_parameter_count (&RequestId); //result will come with async response
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_get_sms_parameter_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
-
-
-/**
- * @brief This function is used by the applications check the sms ready status (whether ready or not) .
- *
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * 
- * @param [in] handle
- * - handle from tel_init()
- *
- * @param [out] pReadyStatus
- * - Contains Ready Status
- *
- * @par Async Response Message:
- *  None.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- */
-int tel_check_sms_device_status(TapiHandle *handle, int *pReadyStatus);
-
-/**
- * @brief This function is used by the applications to inform modem about the PDA status(whether PDA is ready to
- * recieve messages from network or not).
- *
- *
- * @par Sync (or) Async:
- * This is a Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in]
- *  - None
- *
- * @param [out]
- *  - None
- *
- * @par Async Response Message:
- *  None.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- * @par Prospective Clients:
- * External Apps.
- *
- */
-int tel_set_sms_device_status(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_NETTEXT_H_ */
-
-/**
-* @}
-*/
diff --git a/include/ITapiNetwork.h b/include/ITapiNetwork.h
deleted file mode 100644 (file)
index 4fad975..0000000
+++ /dev/null
@@ -1,973 +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 Network_TAPI    NETWORK
- * @{
- *
- * @file ITapiNetwork.h
-
- @brief This file serves as a "C" header file defines functions for Tapi Network\n
- It contains a sample set of function prototypes that would be required by applications.
- */
-
-#ifndef _ITAPI_NETWORK_H_
-#define _ITAPI_NETWORK_H_
-
-#include <tapi_common.h>
-#include <TelErr.h>
-#include <TelDefines.h>
-#include <TelNetwork.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- * @brief  This function requests the lower layers to select the network automatically
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Important Notes:
- * - This function passes the
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_SELECT_CNF and there is no data associated with this event. Asynchronous return status
- * is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestID;
- *
- * // AUTOMATIC MODE
- * ret_status = tel_select_network_automatic(&RequestId);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_select_network_automatic(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function requests the lower layers to select the network (PLMN) which has been selected by the user from the Network List
- *           displayed to the User.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Important Notes:
- * - This function passes the .
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] plmn
- *
- * @param [in] act
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_SELECT_CNF and there is no data associated with this event. Asynchronous return status
- * is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestID;
- * unsigned int plmn = 0;
- *
- * // MANUAL MODE
- * plmn = 45454;
- * ret_status = tel_select_network_manual(Plmn, &RequestId);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_select_network_manual(TapiHandle *handle, const char *plmn, int act, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function sends a request to do manual network selection to search for the available networks and provide the
- *           Network List to the User/Application.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_SEARCH_CNF and the event data is #TelNetworkPlmnList_t.
- * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - In the available network list, user can select one of the networks successfully.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestID;
- *
- * // NETWORK SEARCH
- * ret_status = tel_search_network(&RequestId);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_search_network(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function requests for the present network selection mode i.e. automatic or manual.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF and the event data is #TelNetworkSelectionMode_t.
- * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestId;
- *
- * // GET THE SELECTION MODE
- * ret_status = tel_get_network_selection_mode (&RequestId);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- *
- */
-/*================================================================================================*/
-int tel_get_network_selection_mode(struct tapi_handle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function is called when User/application wants to configure the service domain to only CS or Only PS or Both.
- * This API triggers the underlying protocol stack to do register with Network for only CS services or only PS services
- * or both based on the option set using this API.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] ServiceDomain
- * - Specifies the type of Service domain (Packet switch, circuit switch,etc)
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_SET_SVC_DOMAIN_CNF and there is no event data associated with this event
- * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestId;
- *
- * // SET NETWORK SERVICE DOMAIN
- * TelNetworkServiceDomain_t ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC;
- *
- * ret_status = tel_set_network_service_domain (ServiceDomain, &RequestId);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_set_network_service_domain(TapiHandle *handle, TelNetworkServiceDomain_t domain,
-               tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function requests for the present network service domain i.e. CS or PS or both or automatic.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_GET_SVC_DOMAIN_CNF and the event data is #TelNetworkServiceDomain_t.
- * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestId;
- *
- * // GET NETWORK SERVICE DOMAIN
- * ret_status = tel_get_network_service_domain (&RequestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- */
-/*================================================================================================*/
-int tel_get_network_service_domain(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This function is invoked to set the network band and allows the underlying OEM provider to scan the set band.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in]  mode
- * - Band preference indicates the band provide to be preferred or select the band.
- *
- * @param[in]  band
- * - This enumeration defines different network Bands that user can choose.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_SETNWBAND_CNF and there is no event data associated with this event and asynchronous
- * return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestId;
- *
- * TelNetworkBandPreferred_t BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
- * TelNetworkBand_t Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
- *
- * // SET NETWORK BAND
- * ret_status = tel_set_network_band (BandMode, Band, &RequestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- *
- */
-/*================================================================================================*/
-int tel_set_network_band(TapiHandle *handle, TelNetworkBandPreferred_t mode,
-               TelNetworkBand_t band, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function requests for the present network band.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_GETNWBAND_CNF and the event data is #TelNetworkBand_t.
- * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestId;
- *
- * // GET NETWORK BAND
- * ret_status = tel_get_network_band(&RequestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- *
- */
-/*================================================================================================*/
-int tel_get_network_band(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function is invoked to set the network preferred plmn
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in]  operation
- * - Operation indicates the operation to be done on preferred plmn .
- *
- * @param[in]  info
- * - This gives the plmn Info.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_SETPREFFPLMN_CNF and there is no event data associated with this event and asynchronous
- * return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestId;
- *
- * TelNetworkPreferredPlmnOp_t Operation = TAPI_NETWORK_PREF_PLMN_ADD;
- * TelNetworkPreferredPlmnInfo_t PrefPlmnInfo;
- *
- * memset(&PrefPlmnInfo, 0, sizeof(TelNetworkPreferredPlmnInfo_t));
- * PrefPlmnInfo.Index = 0;
- * PrefPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
- * unsigned char *plmn = "45454";
- * memcpy(PrefPlmnInfo.Plmn, plmn, strlen(plmn));
- *
- * // SET PREFERRED PLMN
- * ret_status = tel_set_network_preferred_plmn(Operation, PrefPlmnInfo, &RequestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- *
- */
-/*================================================================================================*/
-int tel_set_network_preferred_plmn(TapiHandle *handle, TelNetworkPreferredPlmnOp_t operation,
-               TelNetworkPreferredPlmnInfo_t *info, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function is invoked to get the preferred plmn list
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF and event data associated with this event  is #TelNetworkPreferredPlmnList_t
- * and asynchronous  return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiNetwork.h>
- *
- * int ret_status;
- * int RequestId;
- *
- * // GET NETWORK PREFERRED PLMN
- * ret_status = tel_get_network_preferred_plmn(&RequestId);
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- *
- *
- *
- */
-/*================================================================================================*/
-int tel_get_network_preferred_plmn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This function is called to cancel the triggered manual network search.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
- * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *  - Manual network search is already triggered.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- *
- */
-/*================================================================================================*/
-int tel_cancel_network_manual_search(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function is called to get network serving.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
- * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-/*================================================================================================*/
-int tel_get_network_serving(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function is called to set network mode.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] mode
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
- * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-/*================================================================================================*/
-int tel_set_network_mode(TapiHandle *handle, int mode, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function is called to get network mode.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
- * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
- *
- * @pre
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-/*================================================================================================*/
-int tel_get_network_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This function is called to get neighboring cell info.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - The event data is #TelNetworkNeighboringCellInfo_t.
- *
- * @pre
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- */
-/*================================================================================================*/
-int tel_get_network_neighboring_cell_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_NETWORK_H_ */
-
-/**
- * @}
- */
diff --git a/include/ITapiPS.h b/include/ITapiPS.h
deleted file mode 100644 (file)
index 4edae8c..0000000
+++ /dev/null
@@ -1,764 +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 GPRS_TAPI       GPRS
- * @{
- *
- * GPRS APIs allow an application to accomplish the following services: @n
- * - activate , deactivate PDP service @n
- *
- */
-
-#ifndef        _ITAPI_PS_H_
-#define _ITAPI_PS_H_
-
-#include <tapi_common.h>
-#include <TelDefines.h>
-#include <TelErr.h>
-#include <TapiUtility.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Defining macros for PSMAN profiles */
-#define TAPI_PDP_ADDR_LEN_MAX          20
-#define TAPI_PDP_APN_LEN_MAX           101
-#define TAPI_PDP_NAME_LEN_MAX          16
-#define TAPI_PDP_MAX_USERNAME_LEN      32
-#define TAPI_PDP_MAX_PASSWORD_LEN      32
-#define TAPI_PDP_MAX_DNS_LEN           16
-#define MAX_PDP_CONTEXTS_ALLOWED       3
-#define MAX_GPRS_PORT_LIST                     200
-
-typedef enum {
-     TAPI_GPRS_DEFINE_PDP_CONTEXT=0x01,                /* 0x01 : Define PDP Context */
-     TAPI_GSM_GPRS_QOS,                                                /* 0x02 : Quality of Service Profile */
-     TAPI_GSM_GPRS_PS,                                         /* 0x03 : PS attach or detach */
-     TAPI_GSM_GPRS_PDP_CONTEXT,                                /* 0x04 : PDP context activate or deactivate */
-     TAPI_GSM_GPRS_ENTER_DATA,                         /* 0x05 : Enter data */
-     TAPI_GSM_GPRS_SHOW_PDP_ADDR,                      /* 0x06 : Show PDP address*/
-     TAPI_GSM_GPRS_MS_CLASS,                                   /* 0x07 : GPRS mobile station class*/
-     TAPI_GSM_GPRS_3G_QUAL_SRVC_PROFILE,               /* 0x08 : 3G Quality of service profile */
-     TAPI_GSM_GPRS_IP_CONFIGURATION,                   /* 0x09 : Multiple PDP context IP configuration */
-     TAPI_GSM_GPRS_DEFINE_SEC_PDP_CONTEXT,             /* 0X0A : AT+CGDSCONT   05.10.07 ky.doo EDIT */
-     TAPI_GSM_GPRS_TFT,                                                        /* 0X0B : AT+CGTFT      05.10.07 ky.doo EDIT */
-     TAPI_GSM_GPRS_HSDPA_STATUS,                               /* 0x0C : HSDPA status */
-     TAPI_GSM_GPRS_CURRENT_SESSION_DATA_COUNTER,/* 0x0D : Current data session tx/rx total bytes */
-     TAPI_GSM_GPRS_DATA_DORMANT,                /* 0x0E : Force to set Dormant */
-     TAPI_GSM_GPRS_DUN_PIN_CTRL ,               /* 0x0F : Dial up Networking Pin Control Message */
-     TAPI_GSM_GPRS_CALL_STATUS,                            /* 0x10 : DS TE2 Data Call result(Multiple PDP) */
-     TAPI_GSM_GPRS_PORT_SEL,                           /* 0x11 : PORT SEL */
-     TAPI_GSM_GPRS_MAX
-} tapi_gprs_type_t;
-
-typedef enum{
-       TAPI_PDP_MODE_ADD = 0x01,                               /*ADD*/
-       TAPI_PDP_MODE_DEL = 0x02                                        /*Delete*/
-} tapi_pdp_mode_type_t;
-
-typedef enum{
-       TAPI_PDP_AUTH_NONE = 0x0,               /* No authentication           */
-       TAPI_PDP_AUTH_PAP  = 0x1,               /* PAP authentication          */
-       TAPI_PDP_AUTH_CHAP = 0x2,               /* CHAP authentication       */
-       TAPI_PDP_AUTH_MAX  = 0xff
-
-} tapi_pdp_auth_type_t;
-
-typedef enum {
-       GPRS_PDP_TYPE_UNKNOWN   = 0x00,
-       GPRS_PDP_TYPE_X25               = 0x01,
-       GPRS_PDP_TYPE_IP                = 0x02,
-       GPRS_PDP_TYPE_IHOSP     = 0x03,
-       GPRS_PDP_TYPE_PPP               = 0x04,
-       GPRS_PDP_TYPE_IPV6              = 0x05,
-} tapi_pdp_type_t;
-
-/* HSDPA Status Variable */
-typedef enum {
-  HSDPA_INACTIVE,
-  HSDPA_ACTIVE
-} tapi_hspda_status_type;
-
-typedef enum {
-       GPRS_SIGNAL_DCD         = 0x01,
-       GPRS_DATA_SIGNAL_DTR    = 0x04,
-       GPRS_DATA_SIGNAL_DSR    = 0x06,
-       GPRS_DATA_SIGNAL_RTS    = 0x07,
-       GPRS_DATA_SIGNAL_CTS    = 0x08,
-       GPRS_DATA_SIGNAL_RI     = 0x09,
-} tapi_ps_btdun_pincontrol_signal;
-
-typedef enum {
-       GPRS_SIGNAL_STATUS_OFF  = 0x00,
-       GPRS_SIGNAL_STATUS_ON   = 0x01,
-} tapi_ps_btdun_pincontrol_status;
-
-typedef enum {
-       TAPI_GPRS_PS_STATUS_DETACH = 0x00,
-       TAPI_GPRS_PS_STATUS_ATTACH = 0x01,
-       TAPI_GPRS_PS_STATUS_MAX
-} tapi_gprs_pdp_status;
-
-typedef enum {
-       TAPI_GPRS_MO_SMS_SVC_CIRCUIT                    = 0x00,
-       TAPI_GPRS_MO_SMS_SVC_GPRS                               = 0x01,
-       TAPI_GPRS_MO_SMS_SVC_CIRCUITPREFERRED   = 0x02,
-       TAPI_GPRS_MO_SMS_SVC_GPRSPREFERRED              = 0x03,
-} tapi_gprs_pdp_mo_sms_service;
-
-typedef enum {
-       TAPI_GPRS_3G_QOS_TYPE_REQUEST                   = 0x01,
-       TAPI_GPRS_3G_QOS_TYPE_MIN_ACCEPT                = 0x02,
-       TAPI_GPRS_3G_QOS_TYPE_NEGOTIATE         = 0x03,
-} tapi_gprs_pdp_3g_qos_type;
-
-typedef enum {
-       TAPI_GPRS_3G_QOS_DELI_ORDER_NO                  = 0x00,
-       TAPI_GPRS_3G_QOS_DELI_ORDER_YES                 = 0x01,
-       TAPI_GPRS_3G_QOS_DELI_ORDER_SUBSCRIBE   = 0x02,
-} tapi_gprs_pdp_3g_qos_deli_order;
-
-typedef enum {
-       DSTATE_OK                       = 0x00,
-       DSTATE_CONNECT,
-       DSTATE_RING,
-       DSTATE_NO_CARRIER,
-       DSTATE_ERROR,
-       DSTATE_NO_DIALTONE,
-       DSTATE_BUSY,
-       DSTATE_NO_ANSWER,
-       DSTATE_RESULT_FDN,
-       DSTATE_MAX,
-} tapi_gprs_data_status;
-
-typedef enum {
-       PDP_ACT_FAILURE_CAUSE_NORMAL                                    = 0x00,                 // 0x00 : Normal Process ( no problem )
-       PDP_ACT_FAILURE_CAUSE_REL_BY_USER                               = 0x01,                 // Call Released by User
-       PDP_ACT_FAILURE_CAUSE_REGULAR_DEACTIVATION              = 0x02,                 // Regular deactivation
-       PDP_ACT_FAILURE_CAUSE_LLC_SNDCP                         = 0x03,                 // LLC SNDCP failure
-       PDP_ACT_FAILURE_CAUSE_INSUFFICIENT_RESOURCE     = 0x04,                 // Insufficient resources
-       PDP_ACT_FAILURE_CAUSE_UNKNOWN_APN                               = 0x05,                 // Missing or unknown apn
-       PDP_ACT_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS               = 0x06,         // Unknown PDP address or type
-       PDP_ACT_FAILURE_CAUSE_USER_AUTH_FAILED                  = 0x07,         // Unknown PDP address or type
-       PDP_ACT_FAILURE_CAUSE_ACT_REJ_GGSN                              = 0x08,                 // Unknown PDP address or type
-       PDP_ACT_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED               = 0x09,                 // Unknown PDP address or type
-       PDP_ACT_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED  = 0x0A,         // Service option not supported
-       PDP_ACT_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                = 0x0B,         // Requested service option not subscribed
-       PDP_ACT_FAILURE_CAUSE_SVC_OPT_OUT_ORDER         = 0x0C,                 // Service out of order
-    PDP_ACT_FAILURE_CAUSE_NSAPI_USED                           = 0x0D,         // NSAPI already used
-       PDP_ACT_FAILURE_CAUSE_QOS_NOT_ACCEPTED                  = 0x0E,         // QoS not accepted
-       PDP_ACT_FAILURE_CAUSE_NETWORK_FAILURE                   = 0x0F,         // Network Failure
-    PDP_ACT_FAILURE_CAUSE_REACT_REQUIRED                       = 0x10,         // Reactivation Required
-       PDP_ACT_FAILURE_CAUSE_REATURE_NOT_SUPPORTED             = 0x11,         // Feature not supported
-       PDP_ACT_FAILURE_CAUSE_TFT_FILTER_ERROR                  = 0x12,         // TFT or filter error
-       PDP_ACT_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                = 0x13,         // Unknown PDP context
-       PDP_ACT_FAILURE_CAUSE_INVALID_MSG                               = 0x14,         // Invalid MSG
-       PDP_ACT_FAILURE_CAUSE_PROTOCOL_ERROR                    = 0x15,         // Protocol error
-       PDP_ACT_FAILURE_CAUSE_MOBILE_FAILURE_ERROR              = 0x16,         // Mobile failure error
-       PDP_ACT_FAILURE_CAUSE_TIMEOUT_ERROR                             = 0x17,         // Timeout error
-       PDP_ACT_FAILURE_CAUSE_UNKNOWN_ERROR                             = 0x18,         // Unknown error
-       PDP_ACT_FAILURE_CAUSE_MAX ,
-} tapi_gprs_ds_status_reason;
-
-typedef enum {
-       INTERNAL_PS_CALL = 0x00,
-       EXTERNAL_PS_CALL = 0x01
-} tapi_gprs_external_status;
-
-typedef enum {
-       PDP_DEVICE_INFO_GET = 0x00,
-       PDP_DEVICE_INFO_SET = 0x01
-} tapi_gprs_device_info;
-
-typedef enum{
-    TAPI_GPRS_PORT_LIST_NOT_USE,    // 0x00
-       TAPI_GPRS_PORT_LIST_WHITE,      // 0x01
-       TAPI_GPRS_PORT_LIST_BLACK,      // 0x02
-} tapi_gprs_port_list_type;
-
-typedef enum {
-       TAPI_PDP_STATE_NONE,             /* 0x00 Default state for a given PDP context*/
-    TAPI_PDP_STATE_ACTIVATING,          /* 0x01 TS will be in this state when there is a START PDP Request until it is  activated by modem - This state PDP is not yet UP*/
-    TAPI_PDP_STATE_ACTIVE,           /* 0x02 After PDP activation is completed by modem and sent to PDA - This state PDP is fully UP*/
-    TAPI_PDP_STATE_MODIFYING,        /* 0x03 This state is reserved for future use - When TS support modifying existing PDP*/
-    TAPI_PDP_STATE_DEACTIVATING,     /* 0x04 TS will be in this state when there is STOP PDP request from App until it is deactivated by modem */
-} tapi_gprs_state;
-
-typedef enum {
-       TAPI_PDP_DATA_DORMANCY_SUCCESS,
-       TAPI_PDP_DATA_DORMANCY_FAILED
-} TelTapiGprsDataDormancy_t;
-
-/* Suspend Reason Type */
-typedef enum {
-  TAPI_PDP_SUSPEND_NO_SVC                      = 0x01,
-  TAPI_PDP_SUSPEND_RAT_CHANGE          = 0x02,
-  TAPI_PDP_SUSPEND_GPRS_HOLD           = 0x03,
-  TAPI_PDP_SUSPEND_FLOW_CONTROL        = 0x04,
-  TAPI_PDP_SUSPEND_GPRS_SUSPEND        = 0x05,
-  TAPI_PDP_SUSPEND_RAU                 = 0x06,
-  TAPI_PDP_SUSPEND_LU                      = 0x07,
-  TAPI_PDP_TRANSFER_STATUS_MAX
-} tapi_gprs_suspend_type;
-
-typedef struct {
-       tapi_gprs_type_t type;
-       tapi_phone_err_t cause;
-} tapi_gprs_error_info_t;
-
-typedef struct {
-       int cont_id;
-       tapi_pdp_err_t err;
-} tapi_ps_pdp_info_t;
-
-typedef struct {
-       int cont_id;
-       tapi_pdp_err_t err;
-} tapi_ps_net_stop_rsp_t;
-
-typedef struct {
-       int cont_id;
-       tapi_pdp_err_t err;
-} tapi_ps_net_activation_rsp_t;
-
-typedef struct {
-       int cont_id;
-       tapi_pdp_err_t err;
-} tapi_ps_net_stop_ind_t;
-
-/*     ps attach response      */
-typedef struct {
-       int     state;
-       int     transfer_status;
-} tapi_ps_attach_response_t;
-
-/*     ps call statistics      */
-typedef struct {
-       unsigned char       cid;        //      call id . for proper bit alignment prefer int than short
-       unsigned long int       rx;     //      total number of bytes received for this cid
-       unsigned long int       tx;             //      total number of bytes transmitted for this cid
-} tapi_ps_call_statistics_t;
-
-typedef struct {
-       tapi_ps_btdun_pincontrol_signal signal;
-       tapi_ps_btdun_pincontrol_status status;
-} tapi_ps_btdun_pincontrol;
-
-/**
- * This structure defines PDP information.
- * @see        ps_net_info_t
- */
-typedef struct {
-   unsigned short      is_primary_cont;                /*Primary or secondary*/
-   int                         primary_cont;                   /*Primary context id, if the is the context is secondary*/
-   char                        apn[TAPI_PDP_APN_LEN_MAX];
-   unsigned char       pdp_address[TAPI_PDP_ADDR_LEN_MAX];
-   unsigned char       username[TAPI_PDP_MAX_USERNAME_LEN ];
-   unsigned char       password[TAPI_PDP_MAX_PASSWORD_LEN ];
-   unsigned char       dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
-   unsigned char       dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
-   tapi_pdp_auth_type_t auth_type;
-   tapi_pdp_type_t             pdp_type;
-} tapi_pdp_info_t;
-
-typedef struct {
-       int cont_id;
-       tapi_pdp_info_t pdp_info;
-} tapi_ps_net_start_req_t;
-
-typedef struct {
-       unsigned short  is_primary_cont;  /*Primary or secondary*/
-       unsigned char           username[TAPI_PDP_MAX_USERNAME_LEN ];
-       unsigned char   password[TAPI_PDP_MAX_PASSWORD_LEN ];
-       unsigned char   dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
-       unsigned char   dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
-    tapi_pdp_auth_type_t auth_type;
-} tapi_pdpdeact_info_t;
-
-typedef struct {
-       int cont_id;
-       tapi_pdpdeact_info_t pdp_info;
-} tapi_ps_net_stop_req_t;
-
-typedef struct {
-       unsigned char field_flag;
-       unsigned char ip_address[4];
-       unsigned char primary_dns[4];
-       unsigned char secondary_dns[4];
-       unsigned char gateway[4];
-       unsigned char subnet_mask[4];
-} tapi_pdp_resp_info_t;
-
-typedef struct {
-       int cont_id;
-       tapi_pdp_err_t err;
-       tapi_pdp_resp_info_t pdp_info;
-       char devname[TAPI_PDP_NAME_LEN_MAX];
-} tapi_ps_net_start_rsp_t;
-
-typedef struct tagSetPDPActDeact {
-       int cid;
-       unsigned char username[TAPI_PDP_MAX_USERNAME_LEN ];     // @field Context activation user name
-       unsigned char passwd[TAPI_PDP_MAX_PASSWORD_LEN ];               // @field Context activation password
-       unsigned char dns1[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS1
-       unsigned char dns2[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS2
-       tapi_pdp_auth_type_t    auth;
-} tapi_gprs_pdp_act_deact_set;
-
-typedef struct {
-       char cid;
-       tapi_gprs_pdp_status state;
-} tapi_gprs_pdp_status_info;
-
-typedef struct {
-       char num_act;
-       tapi_gprs_pdp_status_info info[3];
-} tapi_gprs_pdp_status_res;
-
-typedef struct {
-       char cid;
-       char address[20];
-} tapi_gprs_pdp_address_res;
-
-typedef struct {
-       unsigned char                           cid;
-       tapi_gprs_data_status           status;
-       tapi_gprs_ds_status_reason      reason;
-       unsigned char                           external;
-} tapi_gprs_pdp_status_reason_info;
-
-typedef struct {
-    tapi_gprs_port_list_type type;
-    unsigned char len;
-    unsigned short list[MAX_GPRS_PORT_LIST];
-} tapi_gprs_port_list;
-
-typedef struct {
-    tapi_gprs_port_list tcp_list;
-    tapi_gprs_port_list udp_list;
-} tapi_gprs_pdp_port_list_setting_info_t;
-
-/**
- * @brief  This API is used to request to Telephony Server to set PDP context define info, PDP activation.
- *  Access to this API is limited, we recommend you use Data Network API
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- * @param[in] pNet_start_req_info
- * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
- *
- * @param [out] pRequestID
- *   - Unique identifier for a particular request.
- *   - request_id value can be any value from 0 to 255 if the API is returned successfully
- *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
- *
- * @par Async Response Message:
- * -The event associated is TAPI_EVENT_PS_PDP_ACT_RSP  and the event data is #tapi_ps_pdp_info_t.
- *
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiPS.h>
- *
- * int ret_status;
- * int request_id = 0;
- * tapi_ps_net_start_req_t start_req;
- *
- * start_req.cont_id = CONTEXT_ID; //use proper id regarding upper layer usage
- * strcpy(start_req.pdp_info.apn, APN_ADDRESS);
- *
- * ret_status = tel_activate_gprs_pdp (&start_req, &request_id);
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- */
-/*================================================================================================*/
-int    tel_activate_gprs_pdp(const tapi_ps_net_start_req_t *pNet_start_req_info, int *pRequestID);
-
-/**
- * @brief  This API is used to request to Telephony Server to deactivate PDP service
- *  Access to this API is limited, we recommend you use Data Network API
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- * @param[in] net_stop_req_info
- * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
- *
- * @param [out] pRequestID
- *   - Unique identifier for a particular request.
- *   - request_id value can be any value from 0 to 255 if the API is returned successfully
- *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
- *
- * @par Async Response Message:
- * -The event associated is TAPI_EVENT_PS_PDP_DEACT_RSP  and the event data is #tapi_ps_pdp_info_t.
- *
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiPS.h>
- *
- * int ret_status;
- * int request_id = 0;
- * tapi_ps_net_stop_req_t end_req;
- *
- * memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
- *
- * end_req.cont_id = CONTEXT_ID;
- *
- * ret_status = tel_deactivate_gprs_pdp (&end_req, &request_id); //use context id which is used in activate time
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- */
-/*================================================================================================*/
-int    tel_deactivate_gprs_pdp(const tapi_ps_net_stop_req_t *net_stop_req_info, int *pRequestID);
-
-/**
- * @brief  This API is used to send modem data channels to dormant state for power saving when there is no data flowing for certain time
- *         Access to this API is limited, we recommend you use Data Network API
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- * @param [out] pRequestID
- *   - Unique identifier for a particular request.
- *   - request_id value can be any value from 0 to 255 if the API is returned successfully
- *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
- *
- * @par Async Response Message:
- *  -The event associated is TAPI_EVENT_PS_DATA_DORMANT_RESP  and the event data is #TelTapiGprsDataDormancy_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiPS.h>
- *
- * int ret_status;
- * int request_id = 0;
- *
- * ret_status = tel_set_gprs_dormant(&request_id); //if user want to dormant state
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- */
-/*================================================================================================*/
-int    tel_set_gprs_dormant(int *pRequestID);
-
-/**
- * @brief  This API is used to get port list
- *         Access to this API is limited, we recommend you use Data Network API
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- * @param [out] pRequestID
- *   - Unique identifier for a particular request.
- *   - request_id value can be any value from 0 to 255 if the API is returned successfully
- *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
- *
- * @par Async Response Message:
- *  -The event associated is TAPI_EVENT_PS_PDP_GET_PORTLIST_RSP  and the event data is #tapi_gprs_pdp_port_list_setting_info_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiPS.h>
- *
- * int ret_val;
- * int requestId = 0;
- *
- * ret_val = tel_get_gprs_port_list(&requestId); //get port list with async response. current return value means whether request send low layer properly or not
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- */
-/*================================================================================================*/
-int    tel_get_gprs_port_list(int *pRequestID);
-
-/**
- * @brief  This API is used to set port list
- *         Access to this API is limited, we recommend you use Data Network API
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- * @param[in] info
- * - This input has the TCP/UDP port list information info #tapi_gprs_pdp_port_list_setting_info_t
- *
- * @param [out] pRequestID
- *   - Unique identifier for a particular request.
- *   - request_id value can be any value from 0 to 255 if the API is returned successfully
- *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
- *
- * @par Async Response Message:
- *  -None
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiPS.h>
- *
- * int ret_val;
- * int requestId = 0;
- * tapi_gprs_pdp_port_list_setting_info_t test;
- *
- * memset(&test, 0, sizeof(tapi_gprs_pdp_port_list_setting_info_t));
- * test.tcp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
- * test.tcp_list.len = 1;
- * test.tcp_list.list[0] = 1004;
- * test.udp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
- * test.udp_list.len = 1;
- * test.udp_list.list[i] = 1111;
- *
- * ret_val = tel_set_gprs_port_list(&test, &requestId); //get operation result with async response. current return value means whether request send low layer properly or not
- *
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- */
-/*================================================================================================*/
-int    tel_set_gprs_port_list(tapi_gprs_pdp_port_list_setting_info_t *info, int *pRequestID);
-
-
-/**
- * @brief  This API is used to request BT Dun enable or disable
- *         Access to this API is limited, we recommend you use Data Network API
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- * @param[in] pincontrol
- * - This input has the BT Dun pin control information #tapi_ps_btdun_pincontrol
- *
- * @param [out] pRequestID
- *   - Unique identifier for a particular request.
- *   - request_id value can be any value from 0 to 255 if the API is returned successfully
- *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
- *
- * @par Async Response Message:
- * -The event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI or TAPI_EVENT_PS_ERROR_IND.
- * -In success, the event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI  and the event data is #tapi_ps_btdun_pincontrol.
- *   In fail, the event associated is TAPI_EVENT_PS_ERROR_IND  and the event data is #tapi_gprs_error_info_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include <ITapiPS.h>
- *
- * int ret_status;
- * int request_id = 0;
- * tapi_ps_btdun_pincontrol bt_control;
- *
- * bt_control.signal = GPRS_SIGNAL_DCD;
- * bt_control.status = GPRS_SIGNAL_STATUS_OFF;
- *
- * ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id); //get control result with async response. current return value means whether request send low layer properly or not
- * @endcode
- *
- * @see
- *  - None.
- *
- * @remarks
- *  - None.
- */
-/*================================================================================================*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  //_ITAPI_PS_H_
-
-/**
-   *  @}
-   */
diff --git a/include/ITapiPhonebook.h b/include/ITapiPhonebook.h
deleted file mode 100644 (file)
index 935971a..0000000
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- * libslp-tapi
- *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
-* @open
-* @ingroup             TelephonyAPI
-* @addtogroup  PHONEBOOK_TAPI  PHONEBOOK
-* @{
-*
-* @file ITapiPhonebook.h
-
-     @brief This file serves as a "C" header file defines functions for Tapi SIM phonebook Services.\n
-      It contains a sample set of function prototypes that would be required by applications.
-
-*/
-
-#ifndef _ITAPI_PHONEBOOK_H_
-#define _ITAPI_PHONEBOOK_H_
-
-#include <tapi_common.h>
-#include <TelErr.h>
-#include <TelSim.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- * @brief  This function is used to get current inserted SIM phonebook init status, available phonebook list and first valid index in case of FDN, ADN, 3G phonebook.
- *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
- *
- * @par Sync (or) Async:
- * This is an synchronous API.
- *
- * @par Important Notes:
- * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
- * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
- * pb_list and first_index value are available at init_completed status is '1' only.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [out] init_completed
- *   - phonebook init status. '0' is not init, '1' is init complete to use.
- *
- * @param [out] pb_list
- *   - available SIM phonebook list. This value is valid in phonebook init complete case.
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int valid_index = 0; // usim or sim adn first valid index
- * TelSimPbList_t pb_list = {0,};
- * int pPbInitCompleted = 0; // init or not
- *
- * // GET SIM PHONEBOOK INIT INFORMATION
- * err_code = tel_get_sim_pb_init_info(&pPbInitCompleted, &pb_list, &valid_index);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_pb_init_info(TapiHandle *handle, int *init_completed, TelSimPbList_t *pb_list);
-
-
-/**
- * @brief  This API is used to get number of used records and total records in specific SIM phonebook type.
- *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
- * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] pb_type
- * -Different storage types to be selected in SIM. #TelSimPbType_t
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF  and the event data is #TelSimPbStorageInfo_t.
- * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * TelSimPbType_t storage_type = 0x00;
- * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
- * err_code = tel_get_sim_pb_count(storage_type, &request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_pb_count(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This API is used to get max text length and max number length supported by SIM phone book elementary file.
- *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - The max number length includes the storage space provided by the corresponding EXT file for a given Dialling Number file.
- * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
- * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] pb_type
- * -Different storage types to be selected in SIM. #TelSimPbType_t
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF  and the event data is #TelSimPbEntryInfo_t.
- * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * TelSimPbType_t storage_type = 0x00;
- * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
- * err_code = tel_get_sim_pb_meta_info(storage_type, &request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_pb_meta_info(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This API is used to get SIM 3G phonebook supported EFs like ANR, SNE, GRP, EMAIL etc and corresponding EFs max text length, number length and size.
- *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
- * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - The event associated is TAPI_SIM_EVENT_PB_3G_CAPABILITY_INFO_CNF  and the event data is #TelSimPbCapabilityInfo_t.
- * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * err_code = tel_get_sim_pb_3g_meta_info(&request_id); // you can find result by receiving asynch event response
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_pb_usim_meta_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This API is used to read SIM phone book entry information from given storage type.
- *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
- * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
- * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] pb_type
- * -Different storage types to be selected in SIM. #TelSimPbType_t
- *
- * @param[in] index
- * -Index for accessing the SIM data.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_PB_ACCESS_READ_CNF  and the event data is #TelSimPbRecordData_t.
- * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * unsigned short index = 1;
- * TelSimPbType_t storage_type = 0x00;
- * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
- * err_code = tel_read_sim_pb_record(storage_type, index, &request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_read_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short index, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This API is used to add or edit SIM phone book record entry information.
- *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
- * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] req_data
- * -phonebook data which will be updated or added. #TelSimPbRecordData_t
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_PB_UPDATE_CNF  and the event data is #TelSimPbUpdateResp_t.
- * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * unsigned short index = 1;
- * TelSimPbRecordData_t data;
- * data.StorageFileType  = TAPI_SIM_PB_3GSIM; // usim phonebook
- * data.Index  = 1; // index which will be updated
- * data.NextIndex  = 0;
- * //data.ContactInfo will be added
- * err_code = tel_update_sim_pb_record(&data, &request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_update_sim_pb_record(TapiHandle *handle, const TelSimPbRecord_t *req_data, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This API is used to delete a SIM phonebook record.
- *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
- * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
- * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] pb_type
- * -Different storage types to be selected in SIM. #TelSimPbType_t
- *
- * @param[in] index
- * -Index of the record to be deleted.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_PB_DELETE_CNF  and the event data is #TelSimPbUpdateResp_t.
- * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * unsigned short index = 1;
- * TelSimPbType_t storage_type = 0x00;
- * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
- * err_code = tel_delete_sim_pb_record(storage_type, index, &request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_delete_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short index, tapi_response_cb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_PHONEBOOK_H_ */
-
-/**
-* @}
-*/
diff --git a/include/ITapiSap.h b/include/ITapiSap.h
deleted file mode 100644 (file)
index c23bd37..0000000
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * libslp-tapi
- *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
-* @open
-* @ingroup             TelephonyAPI
-* @addtogroup  SAP_TAPI        SAP
-* @{
-*
-* @file ITapiSap.h
-
-     @brief This file serves as a "C" header file defines functions for Tapi SAP Services.\n
-      It contains a sample set of function prototypes that would be required by applications.
-
-*/
-
-#ifndef _ITAPI_SAP_H_
-#define _ITAPI_SAP_H_
-
-#include <tapi_common.h>
-#include <TelErr.h>
-#include <TelSim.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- * @brief  This API is used to request to connect sap.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] max_msg_size
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to request sap to disconnect sap.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to request sap connection status.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to request to get atr.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_transfer_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to request to transfer apdu.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] apdu_data
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to request to transport protocol.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] protocol
- * - SAP transport protocol type
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to request to control power_mode.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] power_mode
- * - enum data for controlling power mode of client
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_power_operation(TapiHandle *handle, TelSimSapPowerMode_t power_mode, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to request to get card_reader_status.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_SAP_H_ */
-
-/**
-* @}
-*/
diff --git a/include/ITapiSat.h b/include/ITapiSat.h
deleted file mode 100644 (file)
index 2c03a30..0000000
+++ /dev/null
@@ -1,411 +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  SAT_TAPI        SAT
-* @{
-*
-* @file ITapiSat.h
-
-     @brief This file serves as a "C" header file defines functions for Tapi Sat Services.\n
-      It contains a sample set of function prototypes that would be required by applications.
-
-      Note: Telephony SAT functionality is message relaying from USIM application to SAT related applications.
- */
-
-#ifndef _ITAPI_SAT_H_
-#define _ITAPI_SAT_H_
-
-#include <tapi_common.h>
-#include <TelSat.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /**
- * @brief Sends the user choice of the main menu options to the USIM.
- *
- * @par Notes:
- * A set of possible menu options is supplied by the USIM
- * using the proactive command SET UP MENU. Telephony server receives the command
- * and publishes this information.SAT UI application should list the menu when it initially launched.
- * If the user subsequently chooses an option, then SAT UI application replies
- * the command with user's choice using this API.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] pMenuSelect
- * - #TelSatMenuSelectionReqInfo_t contains information like which SAT menu item has been selected or whether Help is required.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - The event associated is TAPI_EVENT_SAT_MENU_SELECTION_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp_t.
- *
- * @pre
- *  - This function supposed to be called after getting TAPI_EVENT_SAT_SETUP_MENU_IND event from telephony server\n
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see tel_get_sat_main_menu_info
- *
- * @code
- * #include <ITapiSat.h>
- * int ret_status =0;
- * int pRequestID=0;
- * TelSatMenuSelectionReqInfo_t selected_menu;
- * selected_menu.itemIdentifier = '1'; //selected menu num
- * selected_menu.bIsHelpRequested = 0;
- * ret_status = tel_select_sat_menu(&selected_menu, &pRequestId);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelectionReqInfo_t* pMenuSelect, tapi_response_cb callback, void *user_data);
-
- /**
- * @brief  Download SAT events to USIM
- *
- * @par Notes:
- * A set of events for the terminal to monitor can be supplied by the USIM using the proactive command SET UP EVENT
- * LIST. If the USIM has sent this command, and an event which is part of the list subsequently occurs, the terminal
- * informs the USIM using this function, relevant for that event.
- * If USIM commands to monitor a browser termination event, the SAT-UI application has to call this function.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] pEventData
- * - #TelSatEventDownloadReqInfo_t contains the necessary parameters like event type and information associated with it.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - The event associated is TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp_t.
- *
- * @pre
- *  - A SET UP EVENT LIST proactive command supplies a set of event to monitor.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see None
- *
- * @code
- * #include <ITapiSat.h>
- * int ret_status =0;
- * int pRequestID=0;
- * TelSatEventDownloadReqInfo_t pEventData;
- * pEventData.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE;
- * pEventData.u.bIdleScreenAvailable = 1; //event occur or not
- * ret_status = tel_download_sat_event(&pEventData, &pRequestId);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t*  pEventData, tapi_response_cb callback, void *user_data);
-
- /**
- * @brief  Send the UI display status of the alpha identifier of a specific proactive command to Telephony Server.
- *
- * When SAT-UI receives a proactive command, SAT-UI should draw a UI for relevant command.
- * As it completes , SAT-UI inform USIM with this function. Afterwards, USIM is getting ready to send another commands.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] commandId
- * - Specific proactive command id from the Application
- *
- * @param [in] status
- * - #TelSatUiDisplayStatusType_t contain display status(SUCCESS/FAIL).
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- *  - Display request for the alpha identifier of a Proactive Command should be sent by Telephony Server.
- *
- * @post
- *  - If the display status is SUCCESS Telephony Server sends a request to application for Proactive Command Execution.
- *  - If the display status is FAIL Telephony Server sends Terminal Response for the Proactive Command.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see None
- *
- * @code
- * #include <ITapiSat.h>
- * int commandId = 1; //this value should be server given value
- * ret_status = 0;
- * ret_status = tel_send_ui_display_status(1, TAPI_SAT_DISPLAY_SUCCESS);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, TelSatUiDisplayStatusType_t status);
-
- /**
- * @brief  This function sends the UI User confirmation data for a specific Proactive Command to the Telephony Server.
- *
- * In case that the proactive commands need user response, SAT-UI can send it using this function.
- * The response can be 'OK', 'Cancel', 'Move Back' and 'End Session'. Upon this response, USIM can send
- * a proactive command subsequently to indicate next UI action.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is a synchronous API.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- *@param [in] pUserConfirmData
- * -#TelSatUiUserConfirmInfo_t contains Specific user confirmation data.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User Confirmation request for a specific Proactive Command should be sent to application by Telephony Server.
- *
- * @post
- *  - If the User Confirmation is positive Telephony Server sends a request to application for Proactive Command Execution.
- *  - If the User Confirmation is negative Telephony Server sends Terminal Response for the Proactive Command.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see None
- *
- * @code
- * #include <ITapiSat.h>
- * int ret_status =0;
- * TelSatUiUserConfirmInfo_t cfm_data;
- * cfm_data.commandId = '1'; //this value should be server given value
- * cfm_data.commandType = TAPI_SAT_CMD_TYPE_SETUP_CALL;
- * cfm_data.keyType = TAPI_SAT_USER_CONFIRM_YES;
- * ret_status = tel_send_sat_ui_user_confirm(&cfm_data);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t *pUserConfirmData);
-
- /**
- * @brief  This function provides SAT(Sim Application toolkit) Main Menu information for SAT-UI.
- *
- * Once the USIM supplies the SET UP MENU proactivae command, telephony server not only publish
- * TAPI_EVENT_SAT_SETUP_MENU_IND event but also caches the menu information.
- * The SAT-UI applicatoin can get the menu list using this function.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [out] pMainMenu
- * - #TelSatSetupMenuInfo_t contain all menu related information which are required like menu title, icon, item count, etc.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - When SAT SIM is inserted. we can get meaningful data. without SAT SIM, Null is returned
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see tel_select_sat_menu
- *
- * @code
- * #include <ITapiSat.h>
- * int ret_status =0;
- * TelSatSetupMenuInfo_t menu; //this struct will be pull up with SIM menu info
- * ret_status = tel_get_sat_main_menu_info(&menu);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t *pMainMenu);
-
- /**
- * @brief  This API provides the Operation result(s) for the Proactive Command execution by the Application(s) to the Telephony Server.
- *
- * The USIM commands the terminal to do some predefined action, such as sending short message,
- * making a voice call, launching an Internet browser and so on. Those actions are defined by 3GPP TS31.111.
- * Once a application executes the requested action by USIM, it reports the operation result to USIM using this function.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- **
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [out] pAppRetInfo
- * - #TelSatAppsRetInfo_t contains execution result of a specific proactive command by application.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - Proactive Command execution request should be sent by Telephony Server to SAT related applications.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Else it will return failure and error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * Embeded applications which are predefined by 3GPP TS31.111
- *
- * @see None
- *
- * @code
- * #include <ITapiSat.h>
- * int ret_status =0;
- * TelSatAppsRetInfo_t app_ret;
- * app_ret.commandType = TAPI_SAT_CMD_TYPE_SETUP_CALL;
- * app_ret.commandId = 1; //this value should be server given value
- * app_ret.appsRet.setupCall.resp = TAPI_SAT_R_SUCCESS;
- * ret_status = tel_send_sat_app_exec_result(&app_ret);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInfo_t *pAppRetInfo);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_SAT_H_ */
-
-/**
- * @}
- */
diff --git a/include/ITapiSim.h b/include/ITapiSim.h
deleted file mode 100644 (file)
index 95cb200..0000000
+++ /dev/null
@@ -1,1611 +0,0 @@
-/*
- * libslp-tapi
- *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
-* @open
-* @ingroup             TelephonyAPI
-* @addtogroup  SIM_TAPI        SIM
-* @{
-*
-* @file ITapiSim.h
-
-     @brief This file serves as a "C" header file defines functions for Tapi SIM Services.\n
-      It contains a sample set of function prototypes that would be required by applications.
-
-*/
-
-#ifndef _ITAPI_SIM_H_
-#define _ITAPI_SIM_H_
-
-#include <tapi_common.h>
-#include <TelErr.h>
-#include <TelSim.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
-* @brief  This API is used to get SIM Card Initialization status and SIM Card Identification.
-* Most of modules which require SIM data should check SIM status before using it definitely.
- *
-* @par Sync (or) Async:
-* This is a Synchronous API.
-*
-* @par Important Notes:
-* - Card Identification value is available in TAPI_SIM_STATUS_SIM_INIT_COMPLETED case only.
-*
-* @warning
-* - None.
-*
- * @param [in] handle
- * - handle from tel_init().
- *
-* @param [out] sim_status
-* - This parameter returns SIM initialization status from Telephony server boot up time.
-* First, You can find sim existance if returned value are not in TAPI_SIM_STATUS_CARD_NOT_PRESENT and TAPI_SIM_STATUS_CARD_REMOVED.
-*
-* @param [out] card_changed
-* - This parameter returns sim card identification value when sim_status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED.
-* - card_changed value just present whether current inserted SIM card differs with previous SIM or not.
-*
-* @par Async Response Message:
-* - None
-*
-* @pre
-*  - None.
-*
-* @post
-*  - None.
-*
-* @return Return Type (int)
-* - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
-* - Negative integer : it provides an error code (Refer #TapiResult_t)
-*
-* @par Prospective Clients:
-* External Apps.
-*
-* @see None
-*
-* @code
-* #include <ITapiSim.h>
-*
-* int err_code = TAPI_API_SUCCESS;
-* TelSimCardStatus_t status = 0x00;
-* int b_card_changed = 0;
-*
-* // GET SIM INIT INFORMATION
-* err_code = tel_get_sim_init_info(&status, &b_card_changed);
-*
-* @endcode
-*
-* @remarks None
-*
-*/
-/*================================================================================================*/
-int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status, int *card_changed);
-
-/**
- * @brief  This function is a synchronous API which gets the Card Type whether Card is a SIM or a USIM.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [out] card_type
- * This parameter returns the SIM card type information like whether it is GSM SIM card or USIM or it is of unknown type.
- *
- *  - TAPI_SIM_CARD_TYPE_UNKNOWN
- *  - TAPI_SIM_CARD_TYPE_GSM
- *  - TAPI_SIM_CARD_TYPE_USIM
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * TelSimCardType_t cardInfo; //unkwon, sim(normally gsm), usim(normally umts)
- * err_code = tel_get_sim_type(&cardInfo);
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type);
-
-/**
- * @brief  This function is a synchronous API gets the IMSI information.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - IMSI value is the value that security needs.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [out] imsi
- * This parameter returns the IMSI information. Refer #TelSimImsiInfo_t
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * TelSimImsiInfo_t sim_imsi_info; // mcc, mnc, msisdn
- * err_code = tel_get_sim_imsi(&sim_imsi_info);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi);
-
-/**
- * @brief  This function is a synchronous API used to get ECC(SIM) or UECC(USIM) data.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [out] ecc
- * - This parameter returns
- *             the SIM emergency call code information like ecc length, service type etc
- *             and number of ECC records.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int ecc_rec_count = 0; // count in sim card
- * int err_code = 0;
- * TelSimEccData_t ecc_info = {{{0,}}};
- * err_code = tel_get_sim_ecc(&ecc_info, &ecc_rec_count);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc);
-
-/**
- * @brief  This function is a synchronous API gets a Unique identification number of the (U)ICC.
- * ICC means Integrated Circuit Card.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - IC Card number value is the value that security needs.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * TelSimIccIdInfo_t icc_data; // this struct consists of number length and number.
- * err_code = tel_get_sim_iccid(&icc_data);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the language preference(indication) information.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * TelSimLanguageInfo_t li_info = {0,};
- * err_code = tel_get_sim_language(&li_info); // you can find language info with li_info variable
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This API is used to update the language preference information to SIM card.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is a Asynchronous function.
- *
- * @par Important Notes:
- * - This function update SIM Language information directly and can effect device language setting. Use carefully.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] language
- * This parameter returns the language preference information.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_SET_LANGUAGE_CNF.
- * Asynchronous return status is indicated by #TelSimAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * TelSimLanguagePreferenceCode_t language = 0x00; //init
- * language = TAPI_SIM_LP_ENGLISH; //language value
- * err_code = tel_set_sim_language(language, &request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_set_sim_language(TapiHandle *handle, TelSimLanguagePreferenceCode_t language, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM Call forwarding indication related data(EF-CFIS and CPHS case).
- * this data is required for Call forwarding related functionality in handset.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * TelSimCallForwarding_s cf_data;
- * TapiResult_t err_code = 0;
- * err_code = tel_get_sim_callforwarding_info(&cf_data);
- * if(err_code == TAPI_API_SUCCESS) {
- *   if(cf_data.b_cphs) { //b_cphs means current SIM is for CPHS or not.
- *     printf("Current SIM is CPHS");
- *   } else {
- *     printf("Current SIM is not CPHS but 3GPP");
- *   }
- * } else {
- *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
- * }
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_callforwarding_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-int tel_set_sim_callforwarding_info(TapiHandle *handle, TelSimCallForwardingReq_t *req_cf, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM message waiting indication related data(EF-MWIS and CPHS case).
- * this data is required for Message waiting related functionality in handset.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * TelSimMessageWaiting_s mw_data;
- * TapiResult_t err_code = 0;
- * err_code = tel_get_sim_messagewaiting_info(&mw_data);
- * if(err_code == TAPI_API_SUCCESS) {
- *   if(mw_data.b_cphs) { //b_cphs means current SIM is for CPHS or not.
- *     printf("Current SIM is CPHS");
- *   } else {
- *     printf("Current SIM is not CPHS but 3GPP");
- *   }
- * } else {
- *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
- * }
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-int tel_set_sim_messagewaiting_info(TapiHandle *handle, TelSimMessageWaitingReq_t *req_mw, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM mailbox related data(EF-MBDN, MBDI and CPHS case).
- * this data is required for Mailbox related functionality in handset.
- *
- * @par Sync (or) Async:
- * This is a synchronous function.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * TelSimMailboxNumbers_s mbox;
- * TapiResult_t err_code = 0;
- * err_code = tel_get_sim_mailbox_info(&mbox);
- * if(err_code == TAPI_API_SUCCESS) {
- *   if(mbox.b_cphs) { //b_cphs means current SIM is for CPHS or not.
- *     printf("Current SIM is CPHS");
- *   } else {
- *     printf("Current SIM is not CPHS but 3GPP");
- *   }
- * } else {
- *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
- * }
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_mailbox_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM CPHS specific data.
- * this data is required for CPHS related functionality in handset.
- *
- * @par Sync (or) Async:
- * This is an Synchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * TelSimCphsLocalInfo_t cphs_data;
- * TapiResult_t err_code = 0;
- * err_code = tel_get_sim_cphs_info(&cphs_data);
- * if(err_code == TAPI_API_SUCCESS) {
- *   if(cphs_data.b_used) { //b_used means current SIM is for CPHS or not.
- *     printf("Current SIM is CPHS");
- *   } else {
- *     printf("Current SIM is not CPHS but 3GPP");
- *   }
- * } else {
- *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
- * }
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_cphs_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM MSISDN data. Regarding 3GPP specification, Current value is optional.
- *
- * @par Sync (or) Async:
- * This is an Synchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * TelSimSubscriberInfo_t msisdn;
- * TapiResult_t err_code = 0;
- * err_code = tel_get_sim_msisdn(&msisdn);
- * if(err_code == TAPI_API_SUCCESS)
- * {
- *      printf(" ============================================");
- *      printf("name[%s]",msisdn.name);
- *      printf("num[%s]",msisdn.num);
- *      if(msisdn.name == '\0';) //If current SIM does not have, Null string will be returned.
- *              printf("name is null string");
- *
- *      if(msisdn.num == '\0';) //If current SIM does not have, Null string will be returned.
- *              printf("number is null string");
- * }
- * else
- * {
- *      printf("TAPI API FAIL: Error Code [0x%x]",err_code);
- * }
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM OPLMNWACT(Operator controlled PLMN Selector with Access Technology) data. Regarding 3GPP specification, Current value is optional.
- *
- * @par Sync (or) Async:
- * This is an Synchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM SPN data. Regarding 3GPP specification, Current value is optional.
- *
- * @par Sync (or) Async:
- * This is an Synchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback,     void *user_data);
-
-/**
- * @brief  This API is used to get the SIM CPHS NETNAME data.
- *
- * @par Sync (or) Async:
- * This is an Synchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *
- * @post
- *  - None
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback,    void *user_data);
-
-/**
- * @brief  This API is used to execute the authentication procedure by using SIM.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- * This function supports IMS, 3G and GSM authentication.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * -NONE
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] authentication_data
- * - This input has the authentication code to be validated by ISIM,3G and GSM application in the SIM card. #TelSimAuthenticationData_t
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * -The event associated is TAPI_SIM_EVENT_AUTHENTICATION_CNF  and the event data is #TelSimAuthenticationResponse_t.
- * Asynchronous return status is indicated by #TelSimAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code = 0;
- * int request_id = 0;
- * TelSimAuthenticationData_t pAuthenticationData;
- * strcpy((char*)pAuthenticationData.rand_data, "username@operator.com"); //access data
- * pAuthenticationData.rand_length= strlen("username@operator.com");
- * strcpy((char*)pAuthenticationData.autn_data,  "+1-212-555-12345"); // auth data
- * pAuthenticationData.autn_length = strlen("+1-212-555-12345");
- * err_code = tel_req_sim_authentication(&pAuthenticationData,&request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sim_authentication(TapiHandle *handle, TelSimAuthenticationData_t *authentication_data, tapi_response_cb callback, void *user_data);
-
-
-
-/**
- * @brief  This function performs PIN1/PIN2/SIM LOCK verification. This function performs PIN verification based on the pin type passed along with pin data.
- * PIN1 code : The SIM card has its own password is to check access permissions
- * SIM Lock code : Between Device and the SIM card using a SIM password is only available on certain handsets to be used to authorize.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - Based on Pin status (PIN/PUK/SIM LOCK) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND is published to Applications on Device boot time.
- * - if pin status is PUK, you should use #tel_verify_sim_puks instead of this API.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] pin_data
- * -PIN code, entered by the user. you should make all parameters.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_VERIFY_SEC_CNF  and the event data is #TelSimSecResult_t.
- * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
- * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Verification successes.
- * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, Verification fails and you can check retry count by using event data  #TelSimSecResult_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- * - This API is used when #TelSimCardStatus_t is TAPI_SIM_STATUS_SIM_PIN_REQUIRED or TAPI_SIM_STATUS_SIM_LOCK_REQUIRED on boot time.
- * - Currently there`s no proper scenario for PIN2 verification by using this API.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- *
- * int request_id = 0;
- * err_code = TAPI_API_SUCCESS; // 0
- * int length = TAPI_SIM_PIN_LENGTH+1;
- * char init_pin_val[length] ;
- *
- * strcpy(init_pin_val, PIN1_NORMAL);
- *
- * TelSimSecPw_t pin_data = {0,};
- *
- * pin_data.type = TAPI_SIM_PTYPE_PIN1;
- * pin_data.pw_len = strlen(init_pin_val);
- *
- * printf("pw_len[%d]", pin_data.pw_len);
- *
- * pin_data.pw = (char*)malloc(length);
- * memcpy(pin_data.pw,init_pin_val,length);
- *
- * err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This function performs unblock PIN1/PIN2 operation based on PUK information passed along with
- * unblock information entered by the user.
- * If you get sim card status(TAPI_SIM_STATUS_SIM_PUK_REQUIRED) by using #tel_get_sim_init_info on boot time
- * or (TAPI_SIM_PIN_STATUS_BLOCKED) by using #tel_get_sim_security_status after normal initialization for specific operation,
- * you may unblock PIN1/PIN2.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - Based on Pin status (PIN1/PIN2) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND
- * is published to Applications on boot time also.
- *
- * @warning
- * - If you fail to unblock PIN til given retry count, Your SIM card be permanent block status.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] puk_data
- * -Specifies unblocking PIN password #TelSimSecPw_t
- *
- * @param[in] new_pin_data
- * -Specifies PIN password which you want to use after unblocking operation #TelSimSecPw_t
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_VERIFY_PUK_CNF  and the event data is #TelSimSecResult_t.
- * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
- * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Verification successes.
- * If returned status is TAPI_SIM_PUK_INCORRECT_PASSWORD, Verification fails and you can check retry count by using event data  #TelSimSecResult_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *  - PIN1 or PIN2 status should be TAPI_SIM_PIN_STATUS_BLOCKED and Card status should be TAPI_SIM_STATUS_SIM_PUK_REQUIRED on boot time.
- *
- * @post
- *  - After Success on unblocking for PIN1 or PIN2, each pin check facility is enabled even if previous facility is disabled.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- *
- * int request_id = 0;
- * err_code = TAPI_API_SUCCESS; // 0
- * int length = TAPI_SIM_PIN_LENGTH+1;
- *
- * char init_pin_val[length];
- * char init_puk_val[length];
- *
- * strcpy(init_pin_val, PIN1_NORMAL);
- * strcpy(init_puk_val, PUK1_NORMAL);
- *
- * TelSimSecPw_t puk_data = {0,};
- * TelSimSecPw_t new_pin_data = {0,};
- *
- * puk_data.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
- * puk_data.pw_len = length;
- * puk_data.pw_len = strlen(init_puk_val);
- * printf("pw_len[%d]", puk_data.pw_len);
- * memcpy(puk_data.pw,init_pin_val,length);
- *
- * new_pin_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
- * new_pin_data.pw_len = strlen(init_pin_val);
- * printf("pw_len[%d]", new_pin_data.pw_len);
- * new_pin_data.pw = (char*)malloc(length);
- * memcpy(new_pin_data.pw,init_pin_val,length);
- *
- * err_code = tel_verify_sim_puks(&puk_data, &new_pin_data, &request_id);
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_data, const TelSimSecPw_t *new_pin_data, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This function changes PIN1/PIN2 code based on the pin type passed along with old pin data and new pin data.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - User should fill up pin type equally both old_pin and new_pin.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] old_pin
- * -Old pin code, entered by the user. #TelSimSecPw_t
- *
- * @param[in] new_pin
- * -New pin code, entered by the user. #TelSimSecPw_t
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_CHANGE_PINS_CNF  and the event data is #TelSimSecResult_t.
- * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
- * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Change operation finish successfully.
- * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, Change operation fails and you can check retry count by using event data  #TelSimSecResult_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - PIN which user want to change check facility should be enabled.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- *
- * int request_id = 0;
- * err_code = TAPI_API_SUCCESS; // 0
- * int length = TAPI_SIM_PIN_LENGTH+1;
- * char init_old_pin_val[length] ;
- * char init_new_pin_val[length];
- *
- * memset(&init_old_pin_val, 0 , length);
- * memset(&init_new_pin_val, 0 , length);
- *
- * TelSimSecPw_t old_pin = {0,};
- * TelSimSecPw_t new_pin = {0,};
- *
- * strcpy(init_old_pin_val, PIN1_ORG);
- *
- * old_pin.type = TAPI_SIM_PTYPE_PIN1;
- * old_pin.pw_len = strlen(init_old_pin_val);
- * printf("pw_len[%d]", old_pin.pw_len);
- * old_pin.pw = (char*)malloc(length);
- * memcpy(old_pin.pw,init_old_pin_val,length);
- *
- * strcpy(init_new_pin_val, PIN1_NEW);
- *
- * new_pin.type = TAPI_SIM_PTYPE_PIN1;
- * new_pin.pw_len = strlen(init_new_pin_val);
- * printf("pw_len[%d]", new_pin.pw_len);
- * new_pin.pw = (char*)malloc(length);
- * memcpy(new_pin.pw,init_new_pin_val,length);
- *
- * err_code = tel_change_sim_pins(&old_pin, &new_pin, &request_id);
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_pin, const TelSimSecPw_t *new_pin, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to disable the SIM facility.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] pw
- *  - a structure which contains facility type and password.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to enable the SIM facility.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] pw
- *  - a structure which contains facility type and password.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This API is used to get the SIM facility.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] type
- *  - type of security lock type enum values.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
-
-/**
- * @brief  This API is used to get the SIM LOCK TYPE info.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] type
- *  - type of security lock type enum values.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par
- *
- * @pre
- *
- * @post
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- *
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_get_sim_lock_info(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This function provides common interface for accessing SIM data based on USIM generic command in ETSI TS 102 221
- * and 3GPP TS 31.102 Characteristics of the Universal Subscriber Identity Module (USIM) application.
- * This API provides only interface to send APDU. User should know well APDU usage.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param[in] apdu_data
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_APDU_CNF  and the event data is #TelSimApduResp_t.
- * Asynchronous return status is indicated by #TelSimAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code =0;
- * int request_id = 0;
- * TelSimApdu_t apdu = {0,};
- * int tmp_apdu[5] = {0xa,5,6,7,8};
- * apdu.apdu_len = 5; //user should check
- * apdu.apdu = apdu;
- *
- * // REQUEST SIM ACCESS
- * err_code = tel_req_sim_apdu((const TelSimRSimReq_t*)&rsim, &request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sim_apdu(TapiHandle *handle, TelSimApdu_t* apdu_data, tapi_response_cb callback, void *user_data);
-
-
-/**
- * @brief  This function provides common interface to get SIM ATR(Answer To Reset) value.
- *
- * This function makes Dbus method call to Telephony Sever and returns immediate value.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered in the corresponding event asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- * The event associated is TAPI_EVENT_SIM_ATR_CNF  and the event data is #TelSimAtrResp_t.
- * Asynchronous return status is indicated by #TelSimAccessResult_t.
- *
- * @pre
- *  - A dbus connection is established with #tel_init
- *  - The application name is registered with #tel_register_app_name
- *  - The application is registered events to listen asynchronous response with #tel_register_event
- *  - A event loop is running to listen events
- *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
- *  - None.
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
- * - Negative integer : it provides an error code (Refer #TapiResult_t)
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @see None
- *
- * @code
- * #include <ITapiSim.h>
- * int err_code =0;
- * int request_id = 0;
- *
- * // REQUEST SIM ATR
- * err_code = tel_req_sim_atr(&request_id);
- * @endcode
- *
- * @remarks None
- *
- */
-/*================================================================================================*/
-int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_SIM_H_ */
-
-/**
-* @}
-*/
diff --git a/include/ITapiSs.h b/include/ITapiSs.h
deleted file mode 100644 (file)
index bcd00c6..0000000
+++ /dev/null
@@ -1,1002 +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  SS_TAPI         SS(Supplementary services)
-* @{
-*
-* @file ITapiSs.h
-
-     @brief This file serves as a "C" header file defines functions for Tapi Supplementary services\n
-      It contains a sample set of function prototypes that would be required by applications.
- */
-
-#ifndef _ITAPI_SS_H_
-#define _ITAPI_SS_H_
-
-#include <tapi_common.h>
-#include <TelSs.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /**
- * @brief  This function sends a request to activate/deactivate call barring.
- *
- *  This service makes it possible for a mobile subscriber
- *  to activate barring of certain categories of outgoing or incoming calls according to a barring program which is selected from a set
- *  of one or more barring programs chosen at provision time and is valid for all outgoing or incoming calls, or just those associated
- *   with a specific basic service group. Also this API allows deactivating call barring based on categories set.
- * If the user call this function with wrong password 3 times subsequently, the barring service can be blocked.
- * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
- * the service request has been granted or not.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
-  *
- * @param [in] info
- *   - Contains the information about call barring
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  An asynchronous notification event is returned as a confirmation
- *  The event associated is TAPI_EVENT_SS_BARRING_CNF and asynchronous return status is indicated by #TelSsCause_t.
- *  The event data is #TelSsBarringStatusInfo_t. \n
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * \see tel_get_ss_barring_status, tel_change_ss_barring_password
- *
- * @code
- * #include<ITapiSS.h>
- *
- * int ret_status = -1;
- * TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
- * int pRequestId=0;
- * char bar_pwd[5]="0000";
- *
- * pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
- * pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
- * pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
- * strcpy(pBarringInfo.szPassword,bar_pwd);
- * ret_status = tel_set_ss_barring (&pBarringInfo,&pRequestId);
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
- /*================================================================================================*/
-int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data);
-
-/**
- *
- * @brief  This function gets call barring status.
- *
- * The mobile subscriber may determine by subscription of a set of one or more unique barring
- * programs what kind of outgoing or incoming calls should be barred.
- * If this function is called normally, the asynchronous response comes in a few second from network.
- * The response indicates the service status.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] ss_class
- *   - Specifies the type of call i.e. Voice call, Video Call etc.
- *
- * @param [in] type
- *   - Specifies barring type i.e. Outgoing international, outgoing all, Incoming all etc.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
- *  The event data is #TelSsBarringStatusInfo_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (#TapiResult_t) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * \see tel_set_ss_barring, tel_change_ss_barring_password
- *
- * @code
- * #include<ITapiSS.h>
- *
- * int ret_status;
- * TelSsCallBarType_t BarType =TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
- * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
- * int pRequestId=0;
- *
- * ret_status = tel_get_ss_barring_status(BarType,CallType,&pRequestId); // get barring status
- * printf ("The return value is %d\n", ret_status);
- *
- * @endcode
- *
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function allows changing of the barring password in Network.
- *
- * User can request network to change his own barring password. If the old password is not same with
- * what network knows, it will be rejected by network. Also new password should be same with another new password
- * which is to confirm user input. Otherwise the request must be rejected by Telephony Sever.
- * If the user call this function with wrong old password 3 times subsequently, the barring service can be blocked.
- * If this function is called normally, the asynchronous response comes in a few second from network.
- * The response indicates the service request has been granted or not.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - Based on 3GPP TS 22.030 section 6.5.4 Registration of New Password. Only one Change Barring Password request is allowed
- *   at a time and TS might return TAPI_API_REQUEST_MAX_IN_PROGRESS if another request is received.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] old_password
- *   - Old password set for Barring in Network. This is Null terminated string
- *
- * @param [in] new_password
- *   - New password for Barring to be set in Network. This is Null terminated string.
- *
- * @param [in] new_password_again
- *   - New password again. This is Null terminated string.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF and asynchronous return status is indicated by #TelSsCause_t.
- *  There is no event data with this event.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * @see
- * - None
- *
- * @code
- * #include<ITapiSS.h>
- *
- * int ret_status;
- * int pRequestId=0;
- *
- * ret_status = tel_change_ss_barring_password ("0000","0000","0000",&pRequestId); // change barring password
- *
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_change_ss_barring_password(TapiHandle *handle,
-               const char *old_password,
-               const char *new_password,
-               const char *new_password_again,
-               tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function allows to set (register/erase/activate/deactivate) call forwarding option at the Network.
- *
- * This enables to forward the calls to another party. This service permits a called mobile subscriber
- * to have the network send all incoming calls, or just those associated with a specific Basic service group,
- * addressed to the called mobile subscriber's directory number and which meet
- * various call FORWARD condition to another directory number.
- * The ability of the served mobile subscriber to originate calls is unaffected.
- * If the service is activated, a call is forwarded only if under this call forward condition.
- * Application has to call this API in order to explicitly register/erase/activate/deactivate
- * the call forwarding. Request will be passed irrespective of whether already
- * another SS call forward is ongoing.
- *
- * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
- * the service request has been granted or not.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] info
- *   - Contains the Call forward information like forward mode, forward type, etc.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_FORWARD_CNF and asynchronous return status is indicated by #TelSsCause_t.
- *  The event data will be #TelSsForwardingStatusInfo_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- *
- * \image html CallForward.jpg
- * \image latex CallForward.jpg
- *
- * \see tel_get_ss_forward_status
- *
- * @code
- * #include<ITapiSS.h>
- *
- * int ret_status =0;
- * int pRequestId=0;
- * TelSsForwardInfo_t pForwardInfo;
- * pForwardInfo.Mode =TAPI_CALL_FORWARD_MODE_ENABLE_EV;
- * pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
- * pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
- * pForwardInfo.NoReplyConditionTimer = 10;
- * int len;
- * char cf_number[20]= {"9986529874"};//number to which calles need to be forwarded.
- *
- * len = strlen(cf_number);
- * printf("Length of CF number :%d \n",len);
- * memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
- *
- * ret_status = tel_set_ss_forward (&pForwardInfo,&pRequestId);
- *
- * @endcode
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function provides option to get the call forwarding status of different calls from Network.
- *
- * The data request procedure enables the mobile subscriber to obtain information about the data stored in the PLMN.
- * After having requested this procedure the network shall return the following information:
- * -   in response to a general data request the served mobile subscriber should be given a list of all Basic service groups
- *     to which call forwarding unconditional is registered, including information whether or not it is active and operative,
- *     and the associated forwarded-to numbers
- * -   in response to a specific request concerning one particular Basic service group,
- *     the served mobile subscriber should be informed whether or not call forwarding unconditional is registered,
- *     including information whether or not it is active and operative for that Basic service group.
- *     If CFU is registered, the associated forwarded-to number shall be given.
- *
- * If this function is called normally, the asynchronous response comes in a few second from network.
- * The response indicates the service status.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] ss_class
- *   - Specifying the Forward call type i.e. voice call, Video Call, Data Calls etc.
- *
- * @param [in] condition
- *   - Used to specify the forward condition i.e. unconditional, When no reply, when busy, when not reachable etc.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF  and asynchronous return status is indicated by #TelSsCause_t.
- *  The event data is #TelSsForwardingStatusInfo_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * \see tel_set_ss_forward
- *
- * @code
- * #include<ITapiSS.h>
- * int  ret_status = 0;
- * TelSsForwardType_t Type =TAPI_CS_FORWARD_TYPE_VOICE_EV;
- * TelSsForwardWhen_t  Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
- * int pRequestId=0;
- *
- * ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId); // get forward status
- *
- * @endcode
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function activates/deactivates the call waiting service.
- * The call waiting service permits a mobile to be notified of an incoming
- * call (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
- * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
- * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
- * the service request has been granted or not.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] info
- *   - Specifies the status of call-waiting service i.e. On (TRUE) or off (FALSE)
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_WAITING_CNF and asynchronous return status is indicated by #TelSsCause_t.
- *  The event data is #TelSsWaitingStatusInfo_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * \see tel_get_ss_waiting_status
- *
- * @code
- * #include<ITapiSS.h>
- *
- * int   ret_status;
- * TelSsWaitingInfo_t waitInfo;
- * waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
- * waitInfo.CallType =TAPI_CALL_TYPE_VOICE_EV;
- * int RequestID;
- *
- * ret_status = tel_set_ss_waiting (&waitInfo,&RequestID); // set call waiting
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function queries the status of call waiting service.
- *
- * @par Notes:
- * The call waiting service permits a mobile to be notified of an incoming call
- * (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
- * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
- * If this function is called normally, the asynchronous response comes in a few second from network.
- * The response indicates the service status.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] ss_class
- *   - enum data defines call type
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
- *  The event data is #TelSsWaitingInfo_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- * @par Prospective Clients:
- * External Apps.
- *
- * \see tel_set_ss_waiting
- * @code
- * #include<ITapiSS.h>
- *
- * int   ret_status;
- * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
- * int RequestID;
- *
- * ret_status = tel_get_ss_waiting_status ( CallType,&RequestID); // get call waiting info
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t ss_class, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function queries the status of calling line identity service.
- *
- * @par Notes:
- * The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:
- * CLIP - Calling line identification presentation
- *        This Supplementary Service provides for the ability to indicate the line identity of the calling party to the called party.
- *        The network shall deliver the calling line identity to the called party at call set-up time,
- *        regardless of the terminal capability to handle the information.
- * CLIR - Calling line identification restriction
- *       the CLIR Supplementary Service is a Supplementary Service offered to the calling party
- *       to prevent presentation of the calling party's line identity, to the called party.
- * COLP - Connected line identification presentation
- *        This Supplementary Service is not a dialing check but an indication to the calling subscriber
- *        of the connected line identity in a full ISDN/PLMN environment,
- *        the connected line identity shall include all the information necessary to unambiguously identify the connected party.
- *        The network shall deliver the connected line identity to the calling party
- *        regardless of the terminal capability to handle the information.
- * COLR - Connected line identification restriction
- *        The COLR Supplementary Service is a Supplementary Service offered
- *        to the connected party to prevent presentation of the connected line identity, to the calling party.
- *        In the case where the calling party has an override category.
- * CDIP - Called line identification presentation
- * CNAP - Calling name presentation
- * This function queries the service status with #TelSsCliType_t
- *
- * If this function is called normally, the asynchronous response comes in a few second from network.
- * The response indicates the service status.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] type
- *   - enum data defines Cli service type
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
- *  The event data is #TelCliStatusInfo_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * @code
- * #include<ITapiSS.h>
- *
- * int  ret_status = 0;
- * TelSsCliType_t CliType =TAPI_SS_CLI_CDIP;
- * int pRequestId;
- *
- * ret_status = tel_get_ss_cli_status(CliType,&pRequestId); // get cli info
- * @endcode
- *
- * @see
- * - None
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function is used to send a USSD string or User response to the Network.
- *
- * The unstructured supplementary service data (USSD) mechanism allows the Mobile Station (MS) user and
- * a PLMN operator defined application to communicate in a way which is transparent
- * to the MS and to intermediate network entities.
- * The mechanism allows development of PLMN specific supplementary services.
- * USSD string is like *109, *109*72348937857623#.
- * There are two modes of USSD: MMI-mode and application mode.
- * MMI-mode USSD is for the transparent transport of MMI strings entered by the user to the network using this function
- * and for the transparent transport of text strings from the network that are displayed
- * by the mobile for user information.
- * Application mode USSD is for the transparent transport of data between the network and the UE.
- * Application mode USSD is intended to be used by applications in the network and their peer applications in the UE.
- * The peer application in the UE send response with #tel_send_ss_ussd_response
- *
- * If this function is called normally, the asynchronous response comes in a few second from the telephony server.
- * The response indicates whether the sending request is successfully delivered or not.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] info
- *   - Data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038)
- *   - USSD String data length
- *   - ANSI string passed by the client
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
- *  is #TelSsUssdMsgInfo_t.
- *
- * @pre
- *  - Initialize Dbus connection with #tel_init
- *  - Register caller's application name with #tel_register_app_name
- *  - Register telephony events to listen
- *  - A event loop is running to listen events
- *  - No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application
- *   with an error (USSD_BUSY)
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * \see #tel_send_ss_ussd_response, #tel_send_ss_ussd_cancel
- *
- *\image html ussd.jpg
- *\image latex ussd.jpg
- *
- * @code
- * #include<ITapiSS.h>
- *
- * char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
- * int  ret;
- *
- * memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
- * strcpy(ussdString , "*124#");
- *
- * ret = tel_send_ss_ussd_request(ussdString, &request_id); // request ussd
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function is used to Read AOC parameter values on the SIM.
- *
- * @par Notes
- * This supplementary service provides the MS with the information to produce an estimate
- * of the cost of the service used. Charges are indicated for the call(s) in progress
- * when mobile originated or for the roaming leg only when mobile terminated.
- * Any charges for non-call related transactions, and for certain supplementary services,
- * such as Call Forwarding are not indicated.
- * The MS will receive at the beginning of each call (and as necessary during the call)
- * a message, the Charge Advice Information. This message contains the elements which together define
- * the rate at which the call is to be charged, time dependence,
- * data dependence and for unit increments - see TS 22.024 [3].
- * The MS shall still indicate appropriate charges even when roaming, based on Home PLMN units.
- * Where applicable, the volume charge for Packet data service,
- * in addition to the normal time dependent and incremental charges, shall be indicated.
- * To indicate the charge per call the Mobile station shall display the units consumed
- * so far during the present call(s) and maintain this value until the MS is switched off or a new call set-up is attempted.
- * Where required to indicate the total accumulated charge, the MS shall be able to display,
- * and the SIM/USIM shall store in the ACM, the running cumulative unit charge.
- * This value must be stored securely, and all reasonable steps shall be taken to ensure that
- * the written value cannot be interrupted, reset or corrupted (except resetting under control of the unblocking key).
- * This function get the AOC configuration information from PLMN
- *
- * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
- * The response indicates whether the query is delivered successfully to network or not.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] AocType
- *   - Specifies which type of Advice of charge information to be read namely Maximum ACM,
- *     Price per unit currency, Current call meter and Accumulated call meter values.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_AOC_RSP and asynchronous return status is indicated by #TelSsCause_t. The event data
- *  is #TelCallAocInfo_t.
- *
- * @pre
- *  - Advice of charge depends on the SIM for setting or reading AOC parameters.
- *  - Setting of AOC needs PIN2 Verification
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * \see tel_set_ss_aoc_info
- *
- *\image html ussd.jpg
- *\image latex ussd.jpg
- * @code
- * #include<ITapiSS.h>
- *
- * TelSsAocType_t AocType = TAPI_SS_AOC_TYPE_ACM;
- * ret_status = tel_get_ss_aoc_info (AocType,&pRequestId); // get AOC info
- * @endcode
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_get_ss_aoc_info(TapiHandle *handle, TelSsAocType_t AocType, tapi_response_cb callback, void *user_data);
-
- /**
- *
- * @brief  This function is used to Read AOC parameter values on the SIM.
- *
- * @par Notes:
- * Refer #tel_get_ss_aoc_info
- *
- * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
- * The response indicates whether the query is delivered successfully to network or not.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is being delivered asynchronously.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @par Important Notes:
- * - None.
- *
- * @warning
- * - None.
- *
- *
- * @param [in] handle
- * - handle from tel_init().
- *
- * @param [in] AocSetInfo
- *   - Specifies which type of Advice of charge information to be set namely Maximum ACM,
- *     Price per unit currency, Current call meter and Accumulated call meter values.
- *
- * @param [in] callback
- * - To register callback function for result.
- *
- * @param [in] user_data
- * - user_data for user specification.
- *
- * @par Async Response Message:
- *  The event associated is TAPI_EVENT_SS_SET_AOC_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
- *  is #TelSsErrorInfo_t.
- *
- * @pre
- *  - Advice of charge depends on the SIM for setting or reading AOC parameters.
- *  - Setting of AOC needs PIN2 Verification
- *
- * @post
- *  - None.
- *
- * @return Return Type (int) \n
- * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
- * - Refer #TapiResult_t for failure and error code
- *
- * @par Prospective Clients:
- * External Apps.
- *
- * \see tel_get_ss_aoc_info
- *
- *\image html ussd.jpg
- *\image latex ussd.jpg
- * @code
- * #include<ITapiSS.h>
- *
- * TelCallAocInfo_t  *pAocSetInfo;
- * int request_id=0;
- * pAocSetInfo = (TelCallAocInfo_t *)calloc(1,sizeof(TelCallAocInfo_t));
- * pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
- * int ret_status =0;
- *
- * ret = tel_set_ss_aoc_info (pAocSetInfo,&request_id); // set aoc info
- * @endcode
- *
- *
- * @remarks
- * - None
- *
- *
- */
-/*================================================================================================*/
-int tel_set_ss_aoc_info(TapiHandle *handle, TelCallAocInfo_t *AocSetInfo, tapi_response_cb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ITAPI_SS_H_ */
-
-/**
-* @}
-*/
diff --git a/include/TapiUtility.h b/include/TapiUtility.h
deleted file mode 100644 (file)
index c7227c5..0000000
+++ /dev/null
@@ -1,272 +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 COMMON_TAPI     COMMON
- * @{
- *
- * @file TelUtility.h
-
- @brief This file serves as a "C" header file defines structures for Utility Services. \n
- It contains a sample set of constants, enums, structs that would be required by applications.
- */
-
-#ifndef _TEL_UTILITY_H_
-#define _TEL_UTILITY_H_
-
-__BEGIN_DECLS
-
-#define INVALID_REQUEST_ID     -1    /**< Invalid RequestId Value */
-#define DBUS_DEFAULT_PATH      "/org/tizen/telephony"
-
-/**
- * @enum TapiResult_t
- * Below enumerations are the return codes of TAPI API's
- */
-typedef enum {
-       TAPI_API_SUCCESS = 0, /**<No Error occurred */
-       TAPI_API_INVALID_INPUT = -1, /**<input values are not correct in TAPI Library */
-       TAPI_API_INVALID_PTR = -2, /**<invalid pointer */
-       TAPI_API_NOT_SUPPORTED = -3, /**<The feature corresponding to requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network. */
-       TAPI_API_DEPRICATED = -4, /**<This API is deprecated and will be so in future also */
-       TAPI_API_SYSTEM_OUT_OF_MEM = -5, /**<Out of memory */
-       TAPI_API_SYSTEM_RPC_LINK_DOWN = -6, /**<RPC link down */
-       TAPI_API_SERVICE_NOT_READY = -7, /**<Phone was powered on, but yet to receive the power up completed notification */
-       TAPI_API_SERVER_FAILURE = -8, /**<error occurred in Telephony server  */
-       TAPI_API_OEM_PLUGIN_FAILURE = -9, /**<Plug-in layer failure */
-       TAPI_API_TRANSPORT_LAYER_FAILURE = -10, /**<Transport layer Failure*/
-       TAPI_API_INVALID_DATA_LEN = -11, /**<Invalid data length */
-       TAPI_API_REQUEST_MAX_IN_PROGRESS = -12, /**<Maximum number of API Request for the same service are already in progress */
-       TAPI_API_OFFLINE_MODE_ERROR = -13, /**<OEM Telephony Provider is in Offline mode. */
-       TAPI_EVENT_CLASS_UNKNOWN = -14, /**<Event class specified is not present in Event Class list. - 20*/
-       TAPI_EVENT_UNKNOWN = -15, /**<Event specified is not present in TAPI Unsolicited Event list. */
-       TAPI_REGISTRATION_OP_FAILED = -16, /**<Callback Registration/De-registration failed */
-       TAPI_API_OPERATION_FAILED = -17, /**<API operation failed*/
-       TAPI_API_INVALID_OPERATION = -18, /**<API Invalid Operation */
-
-       TAPI_API_SYSTEM_RPC_LINK_NOT_EST = -100, /**< RPC link down */
-       TAPI_API_API_NOT_SUPPORTED = -101, /**<API not supported */
-       TAPI_API_SERVER_LAYER_FAILURE = -102, /**< Server layer failure*/
-
-       /*      CALL */
-       TAPI_API_INVALID_CALL_ID = -200, /**< Invalid call ID*/
-       TAPI_API_CALL_CTXT_OVERFLOW = -201, /**<Call context overflow */
-       TAPI_API_COULD_NOT_GET_CALL_CTXT = -202, /**< Could not get call  context*/
-       TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT = -203, /**< Context search returned non-call context*/
-       TAPI_API_COULD_NOT_DESTROY_CTXT = -204, /**< could not destroy context*/
-       TAPI_API_INVALID_LINE_ID = -205, /**< invalid line ID*/
-       TAPI_API_INVALID_CALL_HANDLE = -206, /**<Invalid call handle  - 35*/
-       TAPI_API_INVALID_CALL_STATE = -207, /**<Invalid call state- Newly added. Need to raise a CR for this */
-       TAPI_API_CALL_PRE_COND_FAILED = -208, /**<Pre condition like MO call can not be established now.*/
-       TAPI_API_CALL_SAME_REQ_PENDING = -209, /**<  Can not accept same request multiple times  */
-
-       /*      POWER   */
-       TAPI_API_MODEM_POWERED_OFF = -300, /**<The Modem is powered off */
-       TAPI_API_MODEM_ALREADY_ON = -301, /**<Modem already on */
-       TAPI_API_MODEM_ALREADY_OFF = -302, /**<Modem already off */
-
-       /* NETTEXT */
-       TAPI_API_NETTEXT_DEVICE_NOT_READY = -400, /**<Nettext device not ready */
-       TAPI_API_NETTEXT_SCADDR_NOT_SET = -401, /**<Nettext SCA address not set */
-       TAPI_API_NETTEXT_INVALID_DATA_LEN = -402, /**<Nettext Invalid data length */
-       TAPI_NETTEXT_SCADDRESS_NOT_SET = -403, /**<Nettext SCA address not set*/
-
-       /* SIM  */
-       TAPI_API_SIM_CARD_ERROR = -500, /**<SIM error/blocked state */
-       TAPI_API_SIM_NOT_FOUND = -501, /**<SIM is not present / removed */
-       TAPI_API_SIM_NOT_INITIALIZED = -502, /**<SIM has not initialized yet (waiting for PIN verification, etc) */
-       TAPI_API_SIM_LOCKED = -503,
-
-       /* SAT  */
-       TAPI_API_SAT_INVALID_COMMAND_ID = -600, /**<Command Number Invalid      */
-       TAPI_API_SAT_COMMAND_TYPE_MISMATCH = -601, /**< Command Type Mismatch   */
-       TAPI_API_SAT_EVENT_NOT_REQUIRED_BY_USIM = -602, /**< Event Not Requested by USIM*/
-
-       /* Network */
-       TAPI_API_NETWORK_INVALID_CTXT = -700, /**< Network invalid context*/
-
-       /*Misc */
-       TAPI_API_MISC_RETURN_NULL = -800, /**< MISC return NULL*/
-       TAPI_API_MISC_VALIDITY_ERROR = -801, /**< MISC validity error*/
-       TAPI_API_MISC_INPUTPARM_ERROR = -802, /**< MISC input parameter error*/
-       TAPI_API_MISC_OUTPARAM_NULL = -803, /**< MISC output parameter null*/
-} TapiResult_t;
-
-/**
- * This will check the 'scalar_exp' for TRUE, if failed then return 'err_value' from function.
- */
-#define TAPI_RET_ERR_NUM_IF_FAIL(scalar_exp, err_num) {\
-       if (!(scalar_exp)) \
-       { \
-               err("TAPI_RET_ERR_NUM_IF_FAIL Failed. returning [%d]", err_num);\
-               return err_num; \
-       } \
-}
-
-/**
- * Returns from the current function if the expression is not true. If the expression evaluates to FALSE,
- * a critical message is logged and the function returns. This can only be used in functions which do not
- * return a value.
- *
- * expr : the expression to check.
- */
-#define TAPI_RETURN_IF_FAIL(scalar_exp) {\
-       if (!scalar_exp) \
-       { \
-               err("TAPI_RETURN_IF_FAIL: Failed: Returning from here."); \
-               return; \
-       } \
-}
-
-/**
- * Returns from the current function, returning the value ret, if the expression is not true.
- * If the expression evaluates to FALSE, a critical message is logged and ret is returned.
- */
-#define TAPI_RETURN_VAL_IF_FAIL(scalar_exp, ret) { \
-       if (!scalar_exp) \
-       { \
-               err("TAPI_RETURN_VAL_IF_FAIL: Failed: Returning [%d]", ret); \
-               return ret; \
-       } \
-}
-
-/**
- * Returns from the current function, returning the value ret, if the expression is not true.
- * If the expression evaluates to FALSE, a critical message is logged and ret is returned.
- */
-#define TAPI_RETURN_VAL_IF_SUCCESS(scalar_exp, ret) { \
-       if (scalar_exp) \
-       { \
-               err("TAPI_RETURN_VAL_IF_SUCCESS: Failed Returning [%d]", ret); \
-               return ret; \
-       } \
-}
-
-/**
- * This assert will log an err on stderr and abort,  if assertion failed,
- * Use this only if the telephpny sevrer needs to be exited, if asertion fails
- */
-#define TAPI_ASSERT(scalar_exp)        assert(scalar_exp);
-
-/**
- * Returns from the current function, returning the value ret, if the exp1 and exp2 are of same value.
- * If the equal expression evaluates to TRUE, a critical message is logged and ret is returned.
- */
-#define TAPI_RETURN_VAL_IF_EQUAL(exp1, exp2, ret) {    \
-       if (exp1 == exp2) \
-       { \
-               err("TAPI_RETURN_VAL_IF_EQUAL: FAILED, Returning [%d]", ret); \
-               return ret; \
-       } \
-}
-
-/**
- * void *calloc(size_t nelements, size_t bytes);
- * which allocates a region of memory large enough to hold nelements of size bytes each.
- * The allocated region is initialized to zero.
- */
-#define TAPI_CALLOC(ptr, no_elements, type)    \
-       ptr = (type *) calloc (no_elements , sizeof (type)); \
-       if (ptr == NULL) { \
-               perror("NULL is returned"); \
-               err("calloc error -NULL, errno is [%d]", errno); \
-               fprintf(stderr,"Calloc ERRNO %d\n", errno); \
-               TAPI_ASSERT(ptr); \
-       }
-
-/**
- * why ptr = NULL; after free()?.
- * If the same pointer is passed to free twice,        known as a double free. To avoid this, set pointers to
- * NULL after passing them to free: free(NULL) is safe (it does nothing).
- */
-#define TAPI_FREE(ptr) \
-       if (ptr != NULL) { \
-               free(ptr); \
-               ptr = NULL; \
-       } \
-       else { \
-               err("Double Free or NULL"); \
-       }
-
-/**
- * check for available destination buffer size before copying source buffer data to destination buffer.
- * Assert if destination buffer size less than source buffer size.
- */
-#define TAPI_MEMCPY(dest, src, dest_len, src_len) \
-       if (dest_len >= src_len) { \
-               memcpy(dest, src, src_len); \
-       } \
-       else { \
-               err("TAPI_MEMCPY FAILURE - dest_len(%d) < src_len(%d)", dest_len, src_len); \
-               assert(0); \
-       }
-
-/**
- * Encode a sequence of binary data into its Base-64 stringified representation.
- *
- * data : the binary data to encode.
- * len : the length of data.
- * Returns : a newly allocated, zero-terminated Base-64 encoded string representing data.
- * gchar *g_base64_encode (const guchar *data, gsize len);
- */
-#define TAPI_BASE64_ENCODE(data, len, encoded_data) \
-       encoded_data = g_base64_encode((const guchar *)data, (gsize) len);
-
-/**
- * Decode a sequence of Base-64 encoded text into binary data
- *
- * text : zero-terminated string with base64 text to decode.
- * out_len : The length of the decoded data is written here.
- * Returns : a newly allocated buffer containing the binary data that text represents
- * guchar *g_base64_decode  (const gchar *text, gsize *out_len);
- */
-#define TAPI_BASE64_DECODE(text, decoded_data, ptr_out_len)    \
-       decoded_data = g_base64_decode((const gchar *)text, (gsize *)ptr_out_len);
-
-/**
- * Define Macro for calculate the length of SCA in BCD type.
- */
-#define TAPI_GET_LENGTH_FROM_BCD(nLength, rtn) { \
-       if (nLength <= 0) { \
-               rtn = 0; \
-       } \
-       else if ((nLength) % 2) { \
-               rtn = ((nLength) / 2) + 1; \
-       } \
-       else { \
-               rtn = (nLength) / 2; \
-       } \
-}
-
-
-#define TAPI_VALIDATE_EVENTTYPE(val_min ,val_max, type, ret) { \
-       if (type < val_min || type > val_max ) { \
-               return ret; \
-       } \
-}
-
-__END_DECLS
-
-#endif //_TEL_UTILITY_H_
-/**
- * @}
- */
diff --git a/include/TelCall.h b/include/TelCall.h
deleted file mode 100644 (file)
index f20f9b8..0000000
+++ /dev/null
@@ -1,1015 +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 TAPI_CALL       CALL
- * @{
- *
- * @file TelCall.h
-
- @brief This file serves as a "C" header file defines structures for Tapi Call Services. \n
- It contains a sample set of constants, enums, structs that would be required by applications.
- */
-
-#ifndef _TEL_CALL_H_
-#define _TEL_CALL_H_
-
-#include <TelSs.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define TAPI_CALLING_NAME_SIZE_MAX      80      /**< The maximum length of the string for calling party name.   */
-#define TAPI_CALL_UUS_DATA_LEN_MAX      131     /**< The Maximum length of the user to user singnalling data string.   */
-#define TAPI_CALL_DISPLAY_RECORD_MAX    32      /**< The maximum length of the string for display record in CDMA   */
-#define MAX_TAPI_CALL_COUNT                            6       /**< Maximum number of call can be possible at a time */
-#define MAX_TAPI_CONF_CALL_COUNT               5       /**< Maximum number of Call can be possible in a conference call at a time */
-#define INVALID_CALL_HANDLE                            0               /**< TS_UINT is used for call handle */
-
-/* Call */
-#define        TAPI_CALL_DIALDIGIT_LEN_MAX             82              /**< Maximum Dialling Digit Length  */
-#define        TAPI_CALL_SUBADDRESS_LEN_MAX    40              /**< Maximum Call Subaddress Length */
-#define        TAPI_CALL_NUMBER_LEN_MAX                7               /**< Dialling Num length */
-#define        TAPI_CONTEXT_CALL_SIZE_MAX              6               /**< Maximum Call context */
-#define        TAPI_CALL_DIAL_NUMBER_LEN_MAX   82
-
-#define TAPI_INVALID_CONTEXTHANDLE             (HTapiContext)-1
-#define TAPI_CLIENT_SIZE_MAX                   30
-#define TAPI_CALL_CUSTOM_SERVICE_DATA_MAX              128
-
-/**
- * @enum TelCallCause_t
- * This structure defines the values for Call Cause.
- */
-typedef enum {
-       TAPI_CAUSE_SUCCESS,                             /**< Success  */
-       TAPI_CAUSE_ACCESSDISCARD,                       /**< Access discarded  */
-       TAPI_CAUSE_BARR_BYOPERATOR,             /**< Barred by operator */
-       TAPI_CAUSE_BEARERMODE_NOTIMPL,          /**< Bearer mode not implemented */
-       TAPI_CAUSE_BEARERMODE_RESTRICTED,       /**< Bearer mode restricted */
-       TAPI_CAUSE_BEARERMODE_UNAUTH,           /**< Bearer mode un authorized */
-       TAPI_CAUSE_BEARERMODE_UNAVAIL,          /**< Bearer mode not available */
-       TAPI_CAUSE_BUSY,                                        /**< (Network/Server) busy */
-       TAPI_CAUSE_CALLMETER_EXPIRED,           /**< Call meter expired */
-       TAPI_CAUSE_CALLNO_ERROR,                        /**< Call number error */
-       TAPI_CAUSE_CKTUNAVAIL,                          /**< Circuit channel unavailable */                     //10
-       TAPI_CAUSE_CONGESTION,                          /**< Congestion happened */
-       TAPI_CAUSE_NO_CIRCUIT_AVAIL,            /**< Circuit  not available */
-       TAPI_CAUSE_DESTIN_INCOMPAT,             /**< Destination incompatibility */
-       TAPI_CAUSE_DTMF_NOSPEECH,                       /**< No speech in DTMF */
-       TAPI_CAUSE_DTMF_REJECTED,                       /**< DTMF rejected */
-       TAPI_CAUSE_FACILITY_NOTIMPL,            /**< Facility not implemented */
-       TAPI_CAUSE_FACILITY_NOTSUBSCRIBED,      /**< Facility not subscribed */
-       TAPI_CAUSE_INCOMINGCUGCALLS_BARRED, /**< Incoming CUG Calls barred */
-       TAPI_CAUSE_INVALNUM,                            /**< Invalid number */
-       TAPI_CAUSE_MPTY_ERROR,                          /**< Multiparty error */                                                //20
-       TAPI_CAUSE_NOANSWER,                            /**< No answer  */
-       TAPI_CAUSE_NONCUGMEMBER,                        /**< Non CUG member */
-       TAPI_CAUSE_NUMBERCHANGED,                       /**< Number changed */
-       TAPI_CAUSE_NUMBER_ERROR,                        /**< Number error */
-       TAPI_CAUSE_NWFAILURE,                           /**< Network failure */
-       TAPI_CAUSE_OPERATIONUNAVAIL,            /**< Operation not available */
-       TAPI_CAUSE_OUTOFORDER,                          /**< Out of order */
-       TAPI_CAUSE_PROTOCOL_ERROR,                      /**< Protocol error */
-       TAPI_CAUSE_QOSUNAVAIL,                          /**< QOS unavailable */
-       TAPI_CAUSE_REJECT,                                      /**< Rejected */                                                                //30
-       TAPI_CAUSE_REJ_FAIL,                            /**< Rejection failed */
-       TAPI_CAUSE_REJ_SRVC_NOT_AVL,            /**< Rejection service not available  */
-       TAPI_CAUSE_REMOTE_CKTUNAVAIL,           /**< Remote Circuit channel unavailable */
-       TAPI_CAUSE_RESOURCEUNAVAIL,             /**< Resource not available */
-       TAPI_CAUSE_SERVICEID_ERROR,             /**< Service id error */
-       TAPI_CAUSE_SERVICE_NOTIMPL,             /**< Service not implemented */
-       TAPI_CAUSE_SERVICE_UNAVAIL,             /**< Service not available */
-       TAPI_CAUSE_MODIFY_SAME_BEARER,          /**< Modify same bearer */
-       TAPI_CAUSE_MODIFY_NOT_PERMITTED,        /**< Modification not permitted */
-       TAPI_CAUSE_HOLD_FAIL,                           /**< Call hold fail */                                                  //40
-       TAPI_CAUSE_TEMPFAILURE,                 /**< Temporary failure */
-       TAPI_CAUSE_WRONGNUM,                            /**< Wrong number */
-       TAPI_CAUSE_NORMAL_UNSPECIFIED,          /**< Normal but unspecified */
-       TAPI_CAUSE_SSERRINVALIDTIVALUE, /**< SS invalid Transaction ID Value */
-       TAPI_CAUSE_SSERRINVALIDTI,                      /**< SS Invalid transaction ID */
-       TAPI_CAUSE_SSINCOMPATIBLESTATE, /**< SS incompatible state */
-       TAPI_CAUSE_SSERRSYNTAXERROR,            /**< SS syntax error */
-       TAPI_CAUSE_SSPROTOCOLERROR,             /**< Protocol error */
-       TAPI_CAUSE_SSNEGATIVEPASSWORDCHECK, /**< Negative password check */
-       TAPI_CAUSE_SSSENTASPHASE1,                      /**< SS sent as phase1 message */                               //50
-       TAPI_CAUSE_SSERROR,                             /**< Supplementary service error */
-       TAPI_CAUSE_SS_USSD_BUSY,                        /**< Second USSD request will be rejected when already USSD transaction is ongoing. */
-       TAPI_CAUSE_IDLE,                                        /**< Idle */
-       TAPI_CAUSE_NETWORK_SPECIFIC,            /**< Network specific error */
-       TAPI_CAUSE_FADE,                                        /**< voice call was dropped e.g. because of a loss of signal */
-       TAPI_CAUSE_UNKNOWN,                             /**< unknown no details available */
-       TAPI_CAUSE_INCOM_CALL,                          /**< terminated by incoming call */
-       TAPI_CAUSE_ALERT_STOP,                          /**< terminated by alert stop */
-       TAPI_CAUSE_INTERCEPT,                           /**< voice call was dropped by interception */
-       TAPI_CAUSE_REORDER,                             /**< voice call was dropped by reordering */    //60
-       TAPI_CAUSE_CLIENT_END,                          /**< client ended the call */
-       TAPI_CAUSE_ACCESS_CLASS_BLOCKED,        /**< access class blocked */
-       TAPI_CAUSE_MEMCAPEXCEEDED,                      /**< Memory capacity exceeded */
-       TAPI_CAUSE_TYPENOTSUPPORTED,            /**< Type not supported */
-       TAPI_CAUSE_REPLACENOTSUPPORTED, /**< Replace not supported */
-       TAPI_CAUSE_PROTOCOLID_ERROR,            /**< Protocol id error */
-       TAPI_CAUSE_CLASSNOTSUPPORTED,           /**< Class not supported */
-       TAPI_CAUSE_DATACODING_ERROR,            /**< Data coding error */
-       TAPI_CAUSE_INVAL_MSG,                           /**< Invalid message */
-       TAPI_CAUSE_CALL_BARRED,                 /**< Call barred */                                                     //70
-       TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_SS,              /**< Sim call control changed to SS */
-       TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_CALL,    /**< SIM Call control changed to call */
-       TAPI_CAUSE_SIM_ERROR,                           /**< SIM error */
-       TAPI_CAUSE_SIM_CALL_CONTROL_MODIFIED,                   /**< SIM call control modified */
-       TAPI_CAUSE_RANDOM_ACCESS_FAILURE,       /**< Random access error */
-       TAPI_CAUSE_LOWER_LAYER_FAILURE, /**< Lower layer error */
-       TAPI_CAUSE_ACCESS_REJECTED,             /**< Access rejected */
-       TAPI_CAUSE_RESET_NOT_ALLOWED,           /**< Reset not allowed */
-       TAPI_CAUSE_EMERGENCY_CALL_NOT_ALLOWED,                  /**< Emergency call not allowed */
-       TAPI_CAUSE_ACCESS_NOT_ALLOWED,          /**< Access not allowed */                                              //80
-       TAPI_CAUSE_RADIO_LINK_FAILURE,          /**< Radio link failure */
-       TAPI_CAUSE_INVALID_IDENTITY,            /**< Invalid identity */
-       TAPI_CAUSE_UNKNOWN_IDENTITY,            /**< Unknown identity */
-       TAPI_CAUSE_UNACCEPTABLE_IDENTITY,       /**< Un acceptable identity */
-       TAPI_CAUSE_NO_SERVICE_HERE,             /**< No service here */
-       TAPI_CAUSE_SERVICE_NOT_ALLOWED, /**< Service not allowed */
-       TAPI_CAUSE_SERVICE_NOT_AVAIL,           /**< Service not available */
-       TAPI_CAUSE_SERVICE_NOT_WORKING, /**< Service not working */
-       TAPI_CAUSE_CANNOT_IDENTIFY_CALL,        /**< Cannot identify the call */
-       TAPI_CAUSE_DEACTIVATION,                        /**< Deactivation */                                                    //90
-       TAPI_CAUSE_FATAL_ERROR,                 /**< Fatal error */
-       TAPI_CAUSE_SEND_DTMF_SUCCESS,           /**< Sending DTMF Success */
-       TAPI_CAUSE_SEND_DTMF_FAIL,                      /**< Sending DTMF Failed */
-       TAPI_CAUSE_FIXED_DIALING_NUMBER_ONLY,   /**< Fixed Dialing Number Only */
-       TAPI_CAUSE_TIMER_EXPIRED,                       /**< Call Timer Expired */
-} TelCallCause_t;
-
-/**
- * @enum TelTapiEndCause_t
- * When a call is ended, this end cause is given with the CALL END notification to the application.  This end cause can be originated
- * from different elements in the communication path or different modules in the same element.
- */
-typedef enum {
-       TAPI_CALL_END_NO_CAUSE = 0x00,                          /**< No Cause */
-
-       TAPI_CC_CAUSE_UNASSIGNED_NUMBER,                        /**< Unassigned Number */
-       TAPI_CC_CAUSE_NO_ROUTE_TO_DEST,                 /**< No Route to Destination */
-       TAPI_CC_CAUSE_CHANNEL_UNACCEPTABLE,             /**< Channel Unacceptable */
-       TAPI_CC_CAUSE_OPERATOR_DETERMINED_BARRING,      /**< Operator Determined Barring */
-       TAPI_CC_CAUSE_NORMAL_CALL_CLEARING,             /**< Normal Call Clearing */
-
-       TAPI_CC_CAUSE_USER_BUSY,                                        /**< User Busy */
-       TAPI_CC_CAUSE_NO_USER_RESPONDING,                       /**< No user Responding */
-       TAPI_CC_CAUSE_USER_ALERTING_NO_ANSWER,          /**< User Alerting no Answer */
-       TAPI_CC_CAUSE_CALL_REJECTED,                            /**< Call Rejected */
-       TAPI_CC_CAUSE_NUMBER_CHANGED,                           /**< Number Changed */
-
-       TAPI_CC_CAUSE_NON_SELECTED_USER_CLEARING,       /**< Non Selected User Clearing */
-       TAPI_CC_CAUSE_DESTINATION_OUT_OF_ORDER, /**< Destination out of Order */
-       TAPI_CC_CAUSE_INVALID_NUMBER_FORMAT,            /**< Invalid Number Format */
-       TAPI_CC_CAUSE_FACILITY_REJECTED,                        /**< Facility Rejected */
-       TAPI_CC_CAUSE_RESPONSE_TO_STATUS_ENQUIRY,       /**< Response to Status Enquiry */
-
-       TAPI_CC_CAUSE_NORMAL_UNSPECIFIED,                               /**< Normal Unspecified */
-       TAPI_CC_CAUSE_NO_CIRCUIT_CHANNEL_AVAILABLE,     /**< No Circuit Channel Available */
-       TAPI_CC_CAUSE_NETWORK_OUT_OF_ORDER,                     /**< Network out of Order */
-       TAPI_CC_CAUSE_TEMPORARY_FAILURE,                                /**< Temporary Failure */
-       TAPI_CC_CAUSE_SWITCHING_EQUIPMENT_CONGESTION,   /**< Switching Equipment Congestion */
-
-       TAPI_CC_CAUSE_ACCESS_INFORMATION_DISCARDED,                     /**< Access Information Discarded */
-       TAPI_CC_CAUSE_REQUESTED_CIRCUIT_CHANNEL_NOT_AVAILABLE,  /**< Requested Circuit channel not available */
-       TAPI_CC_CAUSE_RESOURCES_UNAVAILABLE_UNSPECIFIED,                /**< Resources unavailable unspecified */
-       TAPI_CC_CAUSE_QUALITY_OF_SERVICE_UNAVAILABLE,                   /**< Quality of service unavailable */
-       TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_SUBSCRIBED,                /**< Requested facility not subscribed */
-
-       TAPI_CC_CAUSE_INCOMING_CALL_BARRED_WITHIN_CUG,                  /**< incomming call barred within CUG */
-       TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_AUTHORISED,         /**< Bearer Capability not Authorised */
-       TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE,/**< Bearer capability not presently Available */
-       TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_AVAILABLE,                  /**< Service or Option not available */
-       TAPI_CC_CAUSE_BEARER_SERVICE_NOT_IMPLEMENTED,                   /**< Service not implemented */
-
-       TAPI_CC_CAUSE_ACM_GEQ_ACMMAX,                                                   /**< ACM GEQ ACMAX */
-       TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_IMPLEMENTED,               /**< Requested facility not implemented */
-       TAPI_CC_CAUSE_ONLY_RESTRICTED_DIGITAL_INFO_BC_AVAILABLE,/**< Resticted digital info BC not available */
-       TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_IMPLEMENTED,                /**< Service or Option not Implemented  */
-       TAPI_CC_CAUSE_INVALID_TRANSACTION_ID_VALUE,                     /**< Transaction ID value */
-
-       TAPI_CC_CAUSE_USER_NOT_MEMBER_OF_CUG,                           /**< Not member of CUG */
-       TAPI_CC_CAUSE_INCOMPATIBLE_DESTINATION,                 /**< Incompatible Destination */
-       TAPI_CC_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION,        /**< Transit Network selection */
-       TAPI_CC_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE,           /**< Semantically Incorrect message */
-       TAPI_CC_CAUSE_INVALID_MANDATORY_INFORMATION,            /**< Invalid Mandatory Message */
-
-       TAPI_CC_CAUSE_MESSAGE_TYPE_NON_EXISTENT,                                        /**< Message Type Non Existent */
-       TAPI_CC_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROT_STATE,      /**< Message type not compatible with Prot state */
-       TAPI_CC_CAUSE_IE_NON_EXISTENT_OR_NOT_IMPLEMENTED,                       /**< IE non exitent or not implemented */
-       TAPI_CC_CAUSE_CONDITIONAL_IE_ERROR,                                             /**< Conditional IE error */
-       TAPI_CC_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE,       /**< Not Compatible with protocol state */
-
-       TAPI_CC_CAUSE_RECOVERY_ON_TIMER_EXPIRY, /**< Recovery on timer expiry */
-       TAPI_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,       /**< Protocol error unspecified */
-       TAPI_CC_CAUSE_INTERWORKING_UNSPECIFIED, /**< Interworking unspecified */
-
-       TAPI_CC_CAUSE_END = 128,
-
-       /* Reject causes*/
-       TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR,  /**< IMSI unknown in HLR */
-       TAPI_REJECT_CAUSE_ILLEGAL_MS,                   /**< Illegal MS */
-       TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR,  /**< IMSI unknown in VLR */
-       TAPI_REJECT_CAUSE_IMEI_NOT_ACCEPTED,    /**< IMEI not accepted */
-       TAPI_REJECT_CAUSE_ILLEGAL_ME,                   /**< Illegal ME */
-
-       TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED,                                            /**< GPRS service not allowed */
-       TAPI_REJECT_CAUSE_GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED,      /**< GPRS services and Non-GPRS services not allowed */
-       TAPI_REJECT_CAUSE_MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK, /**< MS device cannot be derived by the network */
-       TAPI_REJECT_CAUSE_IMPLICITLY_DETACHED,                                                          /**< Implicitly detached */
-       TAPI_REJECT_CAUSE_PLMN_NOT_ALLOWED,                                                             /**< PLMN not allowed */
-
-       TAPI_REJECT_CAUSE_LA_NOT_ALLOWED,                                                       /**< LA not allowed */
-       TAPI_REJECT_CAUSE_NATIONAL_ROAMING_NOT_ALLOWED,                 /**< National roaming not allowed */
-       TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN,       /**< GPRS services not allowed in this PLMN */
-       TAPI_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LA,                                      /**< No suitable cells in the LA */
-       TAPI_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE,                        /**< MSC temporarily not reachable */
-
-       TAPI_REJECT_CAUSE_NETWORK_FAILURE,              /**< Network unavailable */
-       TAPI_REJECT_CAUSE_MAC_FAILURE,                  /**< MAC failure */
-       TAPI_REJECT_CAUSE_SYNCH_FAILURE,                /**< SYNCh failure */
-       TAPI_REJECT_CAUSE_CONGESTTION,                  /**< Congestion */
-       TAPI_REJECT_CAUSE_GSM_AUTH_UNACCEPTED,  /**< GSM Auth unaccepted */
-
-       TAPI_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED, /**< Service option not supported */
-       TAPI_REJECT_CAUSE_REQ_SERV_OPT_NOT_SUBSCRIBED,  /**< REQ_SERV option not suscribed */
-       TAPI_REJECT_CAUSE_SERVICE_OPT__OUT_OF_ORDER,    /**< Service OPT out of order */
-       TAPI_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED,    /**< Call cannot be identified */
-       TAPI_REJECT_CAUSE_NO_PDP_CONTEXT_ACTIVATED,     /**< No PDP context Activated */
-
-       TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MIN_VALUE,   /**< Retry upon entry into a new call min value */
-       TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MAX_VALUE,   /**< Retry upon entry into a new call max value */
-       TAPI_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MSG,                                   /**< Semantically incorret message */
-       TAPI_REJECT_CAUSE_INVALID_MANDATORY_INFO,                                               /**< Invalid mandatory information */
-       TAPI_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTANT,                                    /**< Message type non-existant */
-
-       TAPI_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMP_PRT_ST,         /**< Message type not COMP PRT ST */
-       TAPI_REJECT_CAUSE_IE_NON_EXISTANT,                                              /**< IE not existant */
-       TAPI_REJECT_CAUSE_MSG_NOT_COMPATIBLE_PROTOCOL_STATE,    /**< MSG not compatible protocol state */
-
-       /* Connection Management establishment rejection cause */
-       TAPI_REJECT_CAUSE_REJ_UNSPECIFIED,      /**< rej unspecified */
-
-       /* AS reject causes */
-       TAPI_REJECT_CAUSE_AS_REJ_RR_REL_IND,                                            /**< RR release indication */
-       TAPI_REJECT_CAUSE_AS_REJ_RR_RANDOM_ACCESS_FAILURE,                      /**< Random Access Failure */
-       TAPI_REJECT_CAUSE_AS_REJ_RRC_REL_IND,                                           /**< RRC release indication */
-       TAPI_REJECT_CAUSE_AS_REJ_RRC_CLOSE_SESSION_IND,                 /**< RRC close session indication */
-       TAPI_REJECT_CAUSE_AS_REJ_RRC_OPEN_SESSION_FAILURE,                      /**< RRC open session failure */
-       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL,                                        /**< Low level failure */
-       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL_REDIAL_NOT_ALLOWED, /**< Low level failure redial not alowed */
-       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_IMMED_RETRY,                 /**< low level immediate retry */
-
-       /* MM reject causes */
-       TAPI_REJECT_CAUSE_MM_REJ_INVALID_SIM,                   /**< invalid Sim */
-       TAPI_REJECT_CAUSE_MM_REJ_NO_SERVICE,                    /**< No service */
-       TAPI_REJECT_CAUSE_MM_REJ_TIMER_T3230_EXP,               /**< Timer T3230 expire */
-       TAPI_REJECT_CAUSE_MM_REJ_NO_CELL_AVAILABLE,     /**< No call available  */
-       TAPI_REJECT_CAUSE_MM_REJ_WRONG_STATE,                   /**< wrong state */
-       TAPI_REJECT_CAUSE_MM_REJ_ACCESS_CLASS_BLOCKED,  /**< Access class blocked */
-
-       /* Definitions for release ind causes between MM  and CNM*/
-       TAPI_REJECT_CAUSE_ABORT_MSG_RECEIVED,   /**< Abort Message received */
-       TAPI_REJECT_CAUSE_OTHER_CAUSE,                  /**< Other cause  */
-
-       /* CNM reject causes */
-       TAPI_REJECT_CAUSE_CNM_REJ_TIMER_T303_EXP,       /**< Timer T303 expiry */
-       TAPI_REJECT_CAUSE_CNM_REJ_NO_RESOURCES, /**< Rejected due to unavailibilty of resources */
-       TAPI_REJECT_CAUSE_CNM_MM_REL_PENDING,           /**< MM release pending */
-       TAPI_REJECT_CAUSE_CNM_INVALID_USER_DATA,        /**< Invalid user data */
-       TAPI_CALL_END_CAUSE_MAX = 255,                          /**< Maximum End Cause limit for gsm/wcdma */
-
-       /* CDMA CALL END CAUSE */
-       TAPI_CDMA_END_CAUSE_REL_BY_USER = 0x1001,               /**< Call Released by User */
-       TAPI_CDMA_END_CAUSE_REL_BY_NET,                         /**< Call Released by Network */
-       TAPI_CDMA_END_CAUSE_REL_NET_BUSY,                               /**< Call Released because of Network busy */
-       TAPI_CDMA_END_CAUSE_NO_SVC,                                     /**< Call Released because of No Service area */
-       TAPI_CDMA_END_CAUSE_FADING,                                     /**< Call Released because of Fading */
-       TAPI_CDMA_END_CAUSE_RELEASE_BY_REORDER,         /**< Call Released because of reorder */
-       TAPI_CDMA_END_CAUSE_RELEASE_BY_INTERCEPT,               /**< Call Released because of intercept */
-       TAPI_CDMA_END_CAUSE_SILENT_ZONE_RETRY,                  /**< Call Released because of silent zone retry */
-       TAPI_CDMA_END_CAUSE_OTA_CALL_FAIL,                              /**< Call Released because of OTA cal failure */
-       TAPI_CDMA_END_CAUSE_PHONE_OFFLINE,                              /**< Call Released because of phone offline */
-       TAPI_CDMA_END_CAUSE_PHONE_IS_CDMA_LOCKED,               /**< Call Released because of CDMA locked */
-       TAPI_CDMA_END_CAUSE_FLASH_IS_IN_PROGRESS_ERR,   /**< Call Released because of flash-is-in-progress error */
-       TAPI_CDMA_END_CAUSE_E911_MODE_ERR,                              /**< Call Released because of e911 mode */
-       TAPI_CDMA_END_CAUSE_OTHERS,                                     /**< Call Released by Others */
-       TAPI_CDMA_END_CAUSE_MAX                                         /**< Maximum End Cause limit for cdma */
-} TelTapiEndCause_t;
-
-/**
- * @enum TelConferenceCallState_t
- * This enum defines the call conference states
- */
-typedef enum {
-       TAPI_CALL_CONFERENCE_IDLE,      /**< idle */
-       TAPI_CALL_CONFERENCE_ACTIVE /**< active */
-} TelConferenceCallState_t;
-
-/**
- * @enum TelCallStates_t
- * Applications can use these sates or can have their own states.
- */
-typedef enum {
-       TAPI_CALL_STATE_IDLE,           /**< Call is in idle state - i.e. no call */
-       TAPI_CALL_STATE_ACTIVE,         /**< Call is in connected and conversation state */
-       TAPI_CALL_STATE_HELD,           /**< Call is in held state */
-       TAPI_CALL_STATE_DIALING,        /**< Call is in dialing state */
-       TAPI_CALL_STATE_ALERT,          /**< Call is in alerting state */
-       TAPI_CALL_STATE_INCOMING,       /**< Call is in incoming state */
-       TAPI_CALL_STATE_WAITING,        /**< Call is in answered state, and waiting for connected indication event */
-       TAPI_CALL_STATE_MAX
-} TelCallStates_t;
-
-/**
- * IN GSM ONLY: call identification number.
- */
-typedef enum {
-       TAPI_CALL_ACTIVE_LINE1, /**< Line 1 */
-       TAPI_CALL_ACTIVE_LINE2  /**< Line 2 */
-} TelCallActiveLine_t;
-
-typedef enum {
-       TAPI_CALL_UUS_NONE, /**< No User to User information  */
-       TAPI_CALL_UUS_1,        /**< User to User information 1 */
-} TelCallUusType_t;
-
-/**
- * The Incoming call indication could have be one of the following SS info messages in it.
- */
-typedef enum {
-       /*      Number details are present in the "char number" of call info struct. if number is not present
-        then "no cli cause" member in  mt_ss_info is set accordingly.  */
-       TAPI_CALL_MT_CLI_PRESENT = 0x31,
-
-       /*      Calling Name Info presnet,      TelCallingNameInfo_t of call info struct contains this info.  */
-       TAPI_CALL_MT_CNA_PRESENT = 0x32,
-
-       /*      Undefined ss indication. Ignore mt_ss_info */
-       TAPI_CALL_MT_SS_UNDEFINED = 0x00,
-
-} TelCallMtSSInfo_t;
-
-/**
- * @enum TelCallAnswerType_t
- * Answer type used as in parameter in the answer call API.
- */
-typedef enum {
-       TAPI_CALL_ANSWER_ACCEPT = 0,            /**< Used to answer an incoming call when there are no current active calls. */
-       TAPI_CALL_ANSWER_REJECT,                        /**< Used to reject the incoming call */
-       TAPI_CALL_ANSWER_REPLACE,                       /**< Release current active call and accept the */
-       TAPI_CALL_ANSWER_HOLD_AND_ACCEPT,       /**< Hold the current active call, and accept the wating call */
-} TelCallAnswerType_t;
-
-/**
- * @enum TelCallEndType_t
- * End type used as in parameter in the end call API.
- */
-typedef enum {
-       TAPI_CALL_END = 0,      
-       TAPI_CALL_END_ALL,
-       TAPI_CALL_END_ACTIVE_ALL,
-       TAPI_CALL_END_HOLD_ALL,
-} TelCallEndType_t;
-
-
-
-
-/**
- * @enum TelCallType_t
- * Applications needs to use this call type while using the setup call API. Like the requested call is a voice call or video call.
- */
-typedef enum {
-       TAPI_CALL_TYPE_VOICE,   /**< Voice call type. */// in ipcv4, 0x0100
-       TAPI_CALL_TYPE_DATA,    /**< Data call type - (for modem, fax, packet, etc. calls). */// in ipcv4, 0x0200
-       TAPI_CALL_TYPE_E911     /**< Emergency call type. */// in ipcv4, 0x0700
-} TelCallType_t;
-
-/**
- * @enum TelCallAlertingPattern_t
- * This enumeration defines the different alerting patterns available.
- */
-typedef enum {
-       TAPI_CALL_ALERTING_PATTERN_1 = 0x00, /**< Pattern 1 */
-       TAPI_CALL_ALERTING_PATTERN_2 = 0x01, /**< Pattern 2 */
-       TAPI_CALL_ALERTING_PATTERN_3 = 0x02, /**< Pattern 3 */
-       TAPI_CALL_ALERTING_PATTERN_4 = 0x03, /**< Pattern 4 */
-       TAPI_CALL_ALERTING_PATTERN_5 = 0x04, /**< Pattern 5 */
-       TAPI_CALL_ALERTING_PATTERN_6 = 0x05, /**< Pattern 6 */
-       TAPI_CALL_ALERTING_PATTERN_7 = 0x06, /**< Pattern 7 */
-       TAPI_CALL_ALERTING_PATTERN_8 = 0x07, /**< Pattern 8 */
-       TAPI_CALL_NO_ALERTING_PATTERN = 0x08 /**< No Alerting Pattern */
-} TelCallAlertingPattern_t;
-
-/**
- * @enum TelCallActiveState_t
- * State of the current call.
- */
-typedef enum {
-       TAPI_CALL_CONNECT_IDLE, /**< Call is in Idle state. */
-       TAPI_CALL_CONNECT_ACTIVE,       /**< Call is in Active state.*/
-       TAPI_CALL_CONNECT_HELD          /**< Call is in Held state. */
-} TelCallActiveState_t;
-
-/**
- * @enum TelCallCugOptions_t
- * This enumeration defines the closed user group options
- */
-typedef enum {
-       TAPI_CALL_CUG_NO_INFO = 0x00,           /**< No information */
-       TAPI_CALL_CUG_SUPRESS_OA,                       /**< suppress OA */
-       TAPI_CALL_CUG_SUPRESS_PRF_CUG,          /**< suppress preferential CUG */
-       TAPI_CALL_CUG_SUPRESS_OA_AND_CUG        /**< suppress OA and preferential CUG */
-} TelCallCugOptions_t;
-
-/**
- * @enum TelCallUusProtocolType_t
- *  This enumeration defines the tapi call uus protocol types
- */
-typedef enum {
-       TAPI_CALL_UUS_PROTO_SPECIFIC = 0,                       /**< The user information is structured according to user needs. */
-       TAPI_CALL_UUS_PROTO_OSI_HIGHER_LAYER = 1,       /**< OSI high layer protocols */
-       TAPI_CALL_UUS_PROTO_IA5_CHARS = 4,                      /**< user information consists of IA5 characters */
-       TAPI_CALL_UUS_PROTO_V120 = 7,                           /**< rate adaptation */
-       TAPI_CALL_UUS_PROTO_Q931 = 8                            /**< user-network call control messages */
-} TelCallUusProtocolType_t;
-
-/**
- * @enum TelCallNameMode_t
- *  This enumeration defines the call name mode
- */
-typedef enum {
-       TAPI_CALL_NAME_AVAIL = 0,                               /**< This identifier refers to the presentation of the calling party's name identity to the called party. */
-       TAPI_CALL_NAME_RESTRICTED = 1,                  /**< This identifier refers to the restriction of presentation of the name identity of the calling party to the called party. */
-       TAPI_CALL_NAME_UNAVAIL = 2,                     /**< This identifier refers to the unavailability of the calling party's name identity to be offered to the called party. */
-       TAPI_CALL_NAME_AVAIL_RESTRICTED = 3     /**< This identifier refers to the calling party's name identity to be offered to the called party with which presentation restriction is overridden.  */
-} TelCallNameMode_t;
-
-/**
- * @enum TelCallSSNocliCause_t
- * This enumeration defines the value for "No Cli cause".
- */
-typedef enum {
-       TAPI_SS_NO_CLI_CAUSE_UNAVAILABLE = 0x00,                /**< Unavailable */
-       TAPI_SS_NO_CLI_CAUSE_REJECTBY_USER = 0x01,              /**< Rejected by User */
-       TAPI_SS_NO_CLI_CAUSE_INTERACTION_OTHERSERVICES = 0x02, /**<  Other services */
-       TAPI_SS_NO_CLI_CAUSE_COINLINE_PAYPHONE = 0x03,  /**< Coin line phone */
-       TAPI_SS_NO_CLI_CAUSE_MAX                                                /**< maximum usage */
-} TelCallSSNocliCause_t;
-
-/**
- * Fwded Ind Type used for MO and Mt from SS Noti Info
- */
-typedef enum {
-       TAPI_CALL_OUTGOING_FWDED = 0x00,        /* Outgoing call forwarded */
-       TAPI_CALL_INCOMMING_FWDED = 0x01,       /* Incoming call forwarded */
-} TelCallForwardType_t;
-
-/**
- * @enum TelCallPrivacyMode_t
- * This structure contains the voice privacy option mode(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_PRIVACY_MODE_STANDARD = 0x00, /**< Standard mode */
-       TAPI_CALL_PRIVACY_MODE_ENHANCED         /**< Enhanced mode */
-} TelCallPrivacyMode_t;
-
-/**
- * @enum TelCallPrivacyType_t
- * This structure contains the voice privacy request type(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_PRIVACY_TYPE_MS = 0x01,       /**< Mobile Station Voice Privacy Mode */
-       TAPI_CALL_PRIVACY_TYPE_BS,                      /**< Base Station Voice Privacy Mode */
-       TAPI_CALL_PRIVACY_TYPE_CURRENT          /**< Current Serving Privacy Mode */
-} TelCallPrivacyType_t;
-
-/**
- * @enum TelCallEmergecyMode_t
- * This structure contains the emergency callback mode(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_EMERGENCY_MODE_EXIT,  /**< Emergency CB Exit mode */
-       TAPI_CALL_EMERGENCY_MODE_ENTER  /**< Emergency CB Enter mode */
-} TelCallEmergecyMode_t;
-
-/**
- * @enum TelCallOtaType_t
- * This structure contains the OTA type(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_OTATYPE_OTASP = 0x01, /**< OTASP : mobile initiated OTA*/
-       TAPI_CALL_OTATYPE_OTAPA,                /**< OTAPA : network initiated OTA */
-} TelCallOtaType_t;
-
-/**
- * @enum TelCallOtaspStatus_t
- * This structure contains the OTASP Status(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_OTASP_OK_SPL_UNLOCKED = 0x01, /**< OTASP : SPL unlocked ok*/
-       TAPI_CALL_OTASP_OK_AKEY_EXCESS,         /**< OTASP : A-Key excess ok*/
-       TAPI_CALL_OTASP_OK_SSD_UPDATE,                  /**< OTASP : SSD update ok */
-       TAPI_CALL_OTASP_OK_NAM_DWNLD,                   /**< OTASP : NAM download ok */
-       TAPI_CALL_OTASP_OK_MDN_DWNLD,                   /**< OTASP : MDN download ok */
-       TAPI_CALL_OTASP_OK_IMSI_DWNLD,                  /**< OTASP :  IMSI download ok*/
-       TAPI_CALL_OTASP_OK_PRL_DWNLD,                   /**< OTASP : PRL download ok */
-       TAPI_CALL_OTASP_OK_COMMIT,                              /**< OTASP : commit ok */
-       TAPI_CALL_OTASP_OK_PROGRAMMING,         /**< OTASP : programming ok */
-       TAPI_CALL_OTASP_SUCCESS,                                /**< OTASP : success */
-       TAPI_CALL_OTASP_UNSUCCESS,                              /**< OTASP : unsuccess */
-       TAPI_CALL_OTASP_OK_OTAPA_VERIFY,                /**< OTASP : verify ok */
-       TAPI_CALL_OTASP_PROGRESS,                               /**< OTASP : progress */
-       TAPI_CALL_OTASP_FAILURES_EXCESS_SPC,    /**< OTASP : SPC excess failure */
-       TAPI_CALL_OTASP_LOCK_CODE_PW_SET,               /**< OTASP : lock code password set*/
-} TelCallOtaspStatus_t;
-
-/**
- * @enum TelCallOtapaStatus_t
- * This structure contains the OTAPA Status(CDMA only).
- */
-typedef enum {
-       TAPI_CALL_OTAPA_STOP = 0x00,    /**< OTAPA : stop */
-       TAPI_CALL_OTAPA_START,                  /**< OTAPA : start */
-} TelCallOtapaStatus_t;
-
-/**
- * @enum TelCallTimeMaskType_t
- * This structure contains call time request mask type.
- */
-typedef enum {
-       TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT = 0x01,      /**< Total Call Count Mask */
-       TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME = 0x02, /**< Total Call Time Mask */
-       TAPI_CALL_TIME_TYPE_LAST_CALL_TIME = 0x04,      /**< Last Call Time Mask */
-} TelCallTimeMaskType_t;
-
-/**
- * @enum TelCallToneDuration_t
- * This structure contains dtmf tone length.
- */
-typedef enum {
-       TAPI_CALL_TONE_DURATION_SHORT = 0x01,
-       TAPI_CALL_TONE_DURATION_LONG
-} TelCallToneDuration_t;
-
-/**
- * @enum TelCallEmergencyCategory_t
- * This structure contains emergency category type
- */
-typedef enum {
-       TAPI_CALL_ECC_DEFAULT = 0x00,
-       TAPI_CALL_ECC_POLICE = 0x01,
-       TAPI_CALL_ECC_AMBULANCE = 0x02,
-       TAPI_CALL_ECC_FIREBRIGADE = 0x04,
-       TAPI_CALL_ECC_MARINEGUARD = 0x08,
-       TAPI_CALL_ECC_MOUNTAINRESCUE = 0x10,
-       TAPI_CALL_ECC_MANUAL_ECALL = 0x20,
-       TAPI_CALL_ECCY_AUTO_ECALL = 0x40
-} TelCallEmergencyCategory_t;
-
-typedef enum {
-       TAPI_CALL_IDENTITY_DEFAULT, /**< Calling line identity will be sent. Based on network setting, Line identity will presented to the called party. */
-       TAPI_CALL_IDENTITY_SHOW,        /**< Display calling line identity */
-       TAPI_CALL_IDENTITY_HIDE /**< Hide the display of Calling line identity */
-} TelCallIdentityMode_t;
-
-
-/**
- * context type
- */
-typedef enum {
-       TAPI_CONTEXT_TYPE_NONE = 0x00,
-       TAPI_CONTEXT_TYPE_VOICE_CALL = 0x01,
-       TAPI_CONTEXT_TYPE_DATA_CALL = 0x2,
-       TAPI_CONTEXT_TYPE_VIDEO_CALL = 0x3,
-       TAPI_CONTEXT_TYPE_NETTEXT,
-       TAPI_CONTEXT_TYPE_E911,
-} TapiContextType;
-
-
-/**
- * Timer State and or Call Timer ID
- */
-typedef enum {
-       TAPI_CALL_TSTATE_IDLE = 0x00,           /**< No timer running */
-       TAPI_CALL_TSTATE_SETUP_PENDING, /**< Setup Timer */
-       TAPI_CALL_TSTATE_CONNECT_PENDING,       /**< Connected Timer */
-       TAPI_CALL_TSTATE_END_PENDING,           /**< Release Timer */
-       TAPI_CALL_TSTATE_HOLD_PENDING,          /**< Hold Timer */
-       TAPI_CALL_TSTATE_RETRIEVE_PENDING,      /**< Retrieve Timer */
-       TAPI_CALL_TSTATE_JOIN_PENDING,          /**< Join Timer */
-       TAPI_CALL_TSTATE_SPLIT_PENDING, /**< Split Timer */
-       TAPI_CALL_TSTATE_ECT_PENDING,           /**< ECT Timer */
-       TAPI_CALL_TSTATE_DTMF_PENDING,          /**< DTMF Timer */
-} TelTapiCallTimerState;
-
-typedef struct {
-       TS_BOOL bRequestedBySAT;                        /** This flag is to indicate whether the request has been initiated by SAT or not.Possible values are 0 and 1. This flag should be updated only when originating a setup request */
-       TelCallIdentityMode_t IdentityMode; /**< Sets Calling Line Identity mode. If default value  TAPI_IDENTITY_DEFAULT is set, OEM will set the default value. */
-       TelCallEmergencyCategory_t ecc;
-} tel_set_call_satflag_identiymode;
-
-/**
- * This structure contains information about the redirect destination  information.
- */
-typedef struct {
-       unsigned char number[TAPI_CALL_DIAL_NUMBER_LEN_MAX + 1]; /**< Redirect destination number */
-} TelCallDeflectDstInfo_t;
-
-/**
- * This structure defines the calling name information
- */
-typedef struct {
-       TelCallNameMode_t NameMode;                                     /**< Display mode of the szNameData. */
-       char szNameData[TAPI_CALLING_NAME_SIZE_MAX];    /**< Calling party name string.   */
-} TelCallingNameInfo_t;
-
-/**
- * This structure contains information about an outgoing call.
- */
-typedef struct {
-       TelCallType_t CallType;                                         /**< sets type of call (voice, data, video, emergency) */
-       char szNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< A string containing the destination phone number. This follows the dial number format.*/
-} TelCallDial_t;
-
-/**
- * This structure contains information about call status.
- */
-typedef struct {
-       int CallHandle;
-       int bMoCall;                                                                    /**< Status will be yes for MO Call. If MT call, then FALSE*/
-       char pNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];  /**< Mobile Number */
-       TelCallType_t CallType;                                         /**< Specifies type of call (voice, data, emergency) */
-       TelCallStates_t CallState;                                              /**< Current Call state */
-       int bConferenceState;                                                   /**< Whether Call is in Conference or not*/
-} TelCallStatus_t;
-
-typedef void (*TelCallStatusCallback)( TelCallStatus_t *out, void *user_data );
-
-
-/**
- * This structure contains information about call redirection details.
- */
-typedef struct {
-       char szRedirectedNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];               /**< Redirected party number */
-       char szRedirectSubAddress[TAPI_CALL_SUBADDRESS_LEN_MAX + 1];    /**< Redirect party sub-address */
-} TelCallRedirectionInfo_t;
-
-/**
- * This structure contains the incoming call information.
- */
-typedef struct {
-       unsigned int CallHandle;                                /**< At Foundation API Level, Call handle indicates the Handle of the Call for the Application . At Framework API Level, call handle indicates the Call identifier used for call by the OEM Adaptation Layer Plug-in */
-       TelCallType_t CallType;                         /**< Call type */
-       TelSsLineIdentificationType_t CliPresentationIndicator; /**< Calling Party presentation indicator */
-       char szCallingPartyNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< caller number,null terminated ASCII */
-       TelCallingNameInfo_t CallingNameInfo;   /**< Call name info. If there is no information from network, this information will be NULL.*/
-       TelCallRedirectionInfo_t RedirectInfo;  /**< The data for the Call Redirect information. If there is no information from network, this information will be NULL.  */
-       TelCallSSNocliCause_t CliCause;         /**< No of CLI cause */
-       int fwded;                                                              /**< True or false. If Incoming call is a forwarded call, then true else false. */
-       TelCallActiveLine_t ActiveLine;         /**< Current Active Line */
-} TelCallIncomingCallInfo_t;
-
-/**
- *SS Info message.
- */
-typedef struct {
-       TelCallMtSSInfo_t type; /* Type of the SS Info presnet. */
-       TelCallSSNocliCause_t no_cli_cause;
-} TelCallMtSsInfo_t; // not used
-
-typedef struct {
-       int isMobileOriginated;                                 /* Is this call Mobile Originated? */
-       TelCallNameMode_t nameMode;                             /* Calling Party Name availability mode */
-       char callNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /* A character array of the destination address. This follows the dial callNumber format. */
-       unsigned int startTime;                                 /* Time when a call is started */
-       unsigned int endTime;                                           /* Time when a call is ended */
-       TelCallType_t callType;                                 /* Type of a call */
-       TelCallStates_t callState;                                      /* State of a call */
-       TelCallActiveState_t activeState;                       /* Status of a call */
-       TelConferenceCallState_t conferenceState;       /* State of a conference call */
-       TelCallingNameInfo_t callingNameInfo;           /* Calling name information of a call */
-       TelCallActiveLine_t current_line;                       /* Line information of a call */
-       TelCallCause_t cause;                                           /* End type of a call when a call is ended */
-       TelTapiEndCause_t endCause;                             /* EndCause */
-} TelTapiCallInfo_t;
-
-/**
- * This structure contains the connected number information.
- */
-typedef struct {
-       TelCallSSNocliCause_t no_cli_cause; /**< Cause when no CLI number. */
-       unsigned char dcs;                                      /**< DCS */
-       unsigned char number_type;                      /**< Number type */
-       TelCallNameMode_t name_mode;            /**< Display mode of the name. */
-       char number[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];           /**< Caller number, null terminated ASCII */
-       char sub_address[TAPI_CALL_SUBADDRESS_LEN_MAX + 1]; /**< Called sub-address, null terminated ASCII */
-} TelCallConnectedNumberInfo_t;
-
-/**
- * This structure contains the voice privacy info(CDMA only).
- */
-typedef struct {
-       TelCallPrivacyType_t PrivacyType; /**< Voice Privacy Request Type */
-       TelCallPrivacyMode_t PrivacyMode; /**< Voice Privacy Mode */
-} TelCallVoicePrivacyInfo_t;
-
-/**
- * This structure contains the OTA progress indication information(CDMA only).
- */
-typedef struct {
-       TelCallOtaType_t OtaType;                       /**< OTA type */
-       TelCallOtaspStatus_t OtaspStatus;       /**< OTASP status : if OTA type is  OTASP, it is valid */
-       TelCallOtapaStatus_t OtapaStatus;       /**< OTAPA status : if OTA type is  OTAPA, it is valid */
-} TelCallOtaProgressInfo_t;
-
-/**
- * This structure contains information about a call time and call count.
- */
-typedef struct {
-       unsigned short req_type_mask;   /**< call time request type */
-       unsigned long TotalCallCnt;     /**< Total Call Count */
-       unsigned long OutgoingCallCnt;  /**< Outgoing Call Count */
-       unsigned long IncomingCallCnt;  /**< Incoming Call Count */
-       unsigned long TotalCallTime;    /**< Overall Call Time(Outgoing + Incoming, in second) */
-       unsigned long OutgoingCallTime; /**< Overall Outgoing Call Time(in second) */
-       unsigned long IncomingCallTime; /**< Overall Incoming Call Time(in second) */
-       unsigned long LastCallTime;     /**< Last Call Time(in second) */
-} TelCallTimeInfo_t;
-
-/**
- * This structure contains information about display record in CDMA.
- */
-typedef struct {
-       unsigned char Record[TAPI_CALL_DISPLAY_RECORD_MAX + 1]; /**< display record */
-} TelCallDisplayRecordInfo_t;
-
-// New Struct for New API
-typedef enum {
-       TAPI_SOUND_MUTE              =0x00,             /**<Sound is mute*/
-       TAPI_SOUND_VOLUME_LEVEL_1=0x01,         /**<Volume level is 1*/
-       TAPI_SOUND_VOLUME_LEVEL_2=0x02,         /**<Volume level is 2*/
-       TAPI_SOUND_VOLUME_LEVEL_3=0x03,         /**<Volume level is 3*/
-       TAPI_SOUND_VOLUME_LEVEL_4=0x04,         /**<Volume level is 4*/
-       TAPI_SOUND_VOLUME_LEVEL_5=0x05,         /**<Volume level is 5*/
-       TAPI_SOUND_VOLUME_LEVEL_6=0x06,         /**<Volume level is 6*/
-       TAPI_SOUND_VOLUME_LEVEL_7=0x07,         /**<Volume level is 7*/
-       TAPI_SOUND_VOLUME_LEVEL_8=0x08,         /**<Volume level is 8*/
-       TAPI_SOUND_VOLUME_LEVEL_9=0x09          /**<Volume level is 9*/
-} TelSoundVolume_t;
-
-typedef enum {
-       TAPI_SOUND_RECORDING_OFF,
-       TAPI_SOUND_RECORDING_ON,
-
-} TelSoundRecording_t;
-
-typedef enum {
-       TAPI_SOUND_DEVICE_RECEIVER = 0x00,
-       TAPI_SOUND_DEVICE_SPEAKER_PHONE = 0x10,
-       TAPI_SOUND_DEVICE_HFK = 0x20,
-       TAPI_SOUND_DEVICE_HEADSET = 0x30,
-       TAPI_SOUND_DEVICE_BLUETOOTH = 0x40,
-       TAPI_SOUND_DEVICE_EC = 0xA0,
-} TelSoundDevice_t;
-
-typedef enum {
-       TAPI_SOUND_TYPE_VOICE = 0x01,
-       TAPI_SOUND_TYPE_KEYTONE = 0x02,
-       TAPI_SOUND_TYPE_BELL = 0x03,
-       TAPI_SOUND_TYPE_MESSAGE = 0x04,
-       TAPI_SOUND_TYPE_ALARM = 0x05,
-       TAPI_SOUND_TYPE_PDA_MISC = 0x06,
-} TelSoundType_t;
-
-
-typedef struct {
-       TelSoundDevice_t device;
-       TelSoundType_t type;
-       TelSoundVolume_t volume;
-} TelCallVolumeInfo_t;
-
-typedef enum {
-       TAPI_SOUND_PATH_HANDSET                 =0x01,          /**<Audio path is handset*/
-       TAPI_SOUND_PATH_HEADSET         =0x02,          /**<Audio path is handset*/
-       TAPI_SOUND_PATH_HANDSFREE               =0x03,          /**<Audio path is Handsfree*/
-       TAPI_SOUND_PATH_BLUETOOTH               =0x04,  /**<Audio path is bluetooth*/
-       TAPI_SOUND_PATH_STEREO_BLUETOOTH   =0x05,       /**<Audio path is stereo bluetooth*/
-       TAPI_SOUND_PATH_SPK_PHONE               =0x06,  /**<Audio path is speaker phone*/
-       TAPI_SOUND_PATH_HEADSET_3_5PI       =0x07,      /**<Audio path is headset_3_5PI*/
-       TAPI_SOUND_PATH_BT_NSEC_OFF         =0x08,
-       TAPI_SOUND_PATH_MIC1                =0x09,
-       TAPI_SOUND_PATH_MIC2                =0x0A,
-       TAPI_SOUND_PATH_HEADSET_HAC         =0x0B,
-} TelSoundPath_t;
-
-typedef struct {
-       TelSoundPath_t path;
-       enum ExtraVolumeStatus {
-               TAPI_SOUND_EX_VOLUME_OFF,
-               TAPI_SOUND_EX_VOLUME_ON,
-       } ex_volume;
-} TelCallSoundPathInfo_t;
-
-typedef enum {
-       TAPI_SOUND_MUTE_STATUS_OFF,
-       TAPI_SOUND_MUTE_STATUS_ON,
-} TelSoundMuteStatus_t;
-
-typedef enum {
-       TAPI_SOUND_NOISE_REDUCTION_OFF,
-       TAPI_SOUND_NOISE_REDUCTION_ON,
-} TelSoundNoiseReduction_t;
-
-typedef enum {
-       TAPI_SOUND_EQUALIZATION_MODE_OFF,
-       TAPI_SOUND_EQUALIZATION_MODE_ON,
-       TAPI_SOUND_EQUALIZATION_MODE_FLAG_OFF,
-       TAPI_SOUND_EQUALIZATION_MODE_FLAG_ON,
-       TAPI_SOUND_EQUALIZATION_MODE_SOFT1,
-       TAPI_SOUND_EQUALIZATION_MODE_SOFT2,
-} TelSoundEqualizationMode_t;
-
-typedef enum {
-       TAPI_SOUND_DIRECTION_LEFT,
-       TAPI_SOUND_DIRECTION_RIGHT,
-} TelSoundDirection_t;
-
-
-#define MAX_SOUND_EQ_PARAMETER_SIZE 6
-typedef struct {
-       TelSoundEqualizationMode_t mode;
-       TelSoundDirection_t direction;
-       unsigned short parameter[MAX_SOUND_EQ_PARAMETER_SIZE];
-} TelCallSoundEqualization_t;
-
-
-
-
-typedef struct {
-       unsigned int id;
-} TelCallAnswerCnf_t;
-
-typedef struct {
-       TelCallEndType_t type;
-       unsigned int id;
-} TelCallEndCnf_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallHoldCnf_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallActiveCnf_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallSwapCnf_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallJoinCnf_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallSplitCnf_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallTransferCnf_t;
-
-typedef struct {
-       unsigned int record_num;
-       TelCallVolumeInfo_t record[ 20 ];
-} TelCallGetVolumeInfoResp_t;
-
-typedef struct {
-       TelSoundMuteStatus_t status;
-} TelCallGetMuteStatusResp_t;
-
-
-
-
-
-
-typedef struct {
-       unsigned int id;
-       TelTapiEndCause_t cause; /**< End cause for the call indicates whether the call is released normally or due to other cause*/
-} TelCallStatusIdleNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallStatusActiveNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallStatusHeldNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallStatusDialingNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallStatusAlertNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallStatusIncomingNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallStatusWaitingNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoWaitingNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoForwardedNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoBarredIncomingNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoBarredOutgoingNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoForwardConditionalNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoForwardUnconditionalNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoActiveNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoHeldNoti_t;
-
-typedef struct {
-       unsigned int id;
-} TelCallInfoJoinedNoti_t;
-
-typedef struct {
-       TelSoundPath_t path;
-} TelCallSoundPathNoti_t;
-
-typedef enum {
-       TAPI_CALL_SOUND_RINGBACK_TONE_START,
-       TAPI_CALL_SOUND_RINGBACK_TONE_END,
-} TelCallSoundRingbackToneNoti_t;
-
-typedef enum {
-       TAPI_CALL_SOUND_WBAMR_STATUS_OFF,
-       TAPI_CALL_SOUND_WBAMR_STATUS_ON,
-} TelCallSoundWbamrNoti_t;
-
-typedef struct {
-       TelSoundNoiseReduction_t status;
-} TelCallSoundNoiseReductionNoti_t;
-
-typedef struct {
-       TelSoundEqualizationMode_t mode;
-       TelSoundDirection_t direction;
-} TelCallSoundEqualizationNoti_t;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // _TEL_CALL_H_
-/**
- * @}
- */
diff --git a/include/TelDefines.h b/include/TelDefines.h
deleted file mode 100644 (file)
index a303c99..0000000
+++ /dev/null
@@ -1,80 +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.
- */
-
-/**
- * @ingroup            TelephonyAPI
- * @addtogroup COMMON_TAPI     COMMON
- * @{
- *
- * @file TelDefines.h
- * @brief  This file  provides #defines required for Telephony server and TAPI Client Library
- */
-
-#ifndef _TEL_DEFINES_H_
-#define _TEL_DEFINES_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Machine independence */
-typedef long TS_INT32;
-typedef unsigned long TS_UINT32;
-
-typedef int TS_INT;
-typedef unsigned int TS_UINT;
-typedef double TS_DOUBLE;
-
-typedef int TS_BOOL;
-
-/* Programming concept */
-typedef unsigned char TS_BYTE;
-typedef unsigned short TS_WORD;
-typedef unsigned long TS_DWORD;
-typedef unsigned char TS_UINT8;
-typedef char TS_INT8;
-typedef unsigned short TS_UINT16;
-typedef unsigned long TS_ULONG;
-typedef unsigned long long TS_UINT64;
-typedef unsigned short TS_USHORT;
-
-#ifndef TRUE
-#define TRUE           1
-#endif
-
-#ifndef FALSE
-#define FALSE          0
-#endif
-
-#ifndef DEPRECATED
-#define DEPRECATED __attribute__((deprecated))
-#endif
-
-typedef int HObj;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TEL_DEFINES_H_ */
-
-/**
- *  @}
- */
diff --git a/include/TelDisplay.h b/include/TelDisplay.h
deleted file mode 100644 (file)
index 82eeda1..0000000
+++ /dev/null
@@ -1,200 +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.
- */
-
-/**
- * @internal
- * @ingroup            TelephonyAPI
- * @addtogroup         DISPLAY_TAPI    DISPLAY
- * @{
- *
- * These APIs allow an application to accomplish the following services: @n
- * - Get the Display Icon Information. @n
- */
-
-#ifndef _TEL_DISPLAY_H_
-#define _TEL_DISPLAY_H_
-
-#include <TelDefines.h>
-#include <TelUtility.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define TAPI_MAX_DISP_O2_HOMEZONE_TAG_LEN      13      /** Maximum number of bytes Home Zone Tag name */
-#define TAPI_MAX_DISP_ROAM_INFO_LEN                            49      /* Roaming location information Maximum length is 32 bytes, But, 49 bytes in Modem code*/
-#define TAPI_MAX_DISP_PHONE_FATAL_ERR_MSG_LEN  64      /* Phone fatal error message length */
-
-/**
- * This defines the RSSI levels.
- * In GSM, this field represent the radio signal strength in  dBm , but in the CDMA this field represents
- * the number of the antenna bar as follows
- */
-typedef enum {
-       TAPI_DISPLAY_RSSI_0 = 0x00,
-       TAPI_DISPLAY_RSSI_1 = 0x01,
-       TAPI_DISPLAY_RSSI_2 = 0x02,
-       TAPI_DISPLAY_RSSI_3 = 0x03,
-       TAPI_DISPLAY_RSSI_4 = 0x04,
-       TAPI_DISPLAY_RSSI_5 = 0x05,
-       TAPI_DISPLAY_RSSI_6 = 0x06
-} tapi_display_rssi_level_t;
-
-/**
- * This enum defines the strength of the battery in levels
- */
-typedef enum {
-       TAPI_POWER_PHONE_BATT_LEVEL0 = 0x00, /**< BLANK(Critical Low) */
-       TAPI_POWER_PHONE_BATT_LEVEL1 = 0x01, /**< bar1 */
-       TAPI_POWER_PHONE_BATT_LEVEL2 = 0x02, /**< bar2 */
-       TAPI_POWER_PHONE_BATT_LEVEL3 = 0x03, /**< bar3 */
-       TAPI_POWER_PHONE_BATT_LEVEL4 = 0x04, /**< bar4 */
-       TAPI_POWER_PHONE_BATT_LEVEL5 = 0x05, /**< bar5 */
-       TAPI_POWER_PHONE_BATT_LEVEL_INIT = 0x06 /**< init value */
-} tapi_phone_battery_level_t;
-
-/**
- * Home Zone UI Icon Indiction Type
- */
-typedef enum {
-       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_NONE = 0x00, /**< None */
-       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_IND = 0x01, /**< Ind */
-       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_CLEAR = 0x02 /**< Clear */
-} tapi_display_hmz_02_zone_ind_t;
-
-/**
- * Home Zone Type
- */
-typedef enum {
-       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_NONE = 0x00, /**< None */
-       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_HOME = 0x01, /**< Home Zone */
-       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_CITY = 0x02 /**< City Zone */
-} tapi_display_hmz_02_zone_type_t;
-
-/**
- * ZONE_TAG_PRESENT
- */
-typedef enum {
-       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_NONE = 0x00, /**< None */
-       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_PRESENT = 0x01, /**< Present */
-       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_ABSENT = 0x02 /**< Absent */
-} tapi_display_hmz_02_zone_tag_t;
-
-/**
- * This enumeration is used to identify what icon info the client is interested in..
- */
-typedef enum {
-       TAPI_DISPLAY_GET_ICON_RSSI = 0x01, /**< Signal Strength */
-       TAPI_DISPLAY_GET_ICON_BATT = 0x02, /**< Battery Level */
-       TAPI_DISPLAY_GET_ICON_HDR_RSSI = 0x04, /**< HDR(High Data Rate RSSI - CDMA */
-       TAPI_DISPLAY_GET_ICON_ALL = 0xFF /**< All Values Request */
-} tapi_display_get_icon_req_type_t;
-
-/**
- * roam info Control Indication Type
- */
-typedef enum {
-       TAPI_DISPLAY_ROAM_INDI_NONE = 0x00, /**< None */
-       TAPI_DISPLAY_ROAM_TEXT_OFF = 0x01, /**< Roam Text Off */
-       TAPI_DISPLAY_ROAM_TEXT_ON = 0x02 /**< Roam Text On */
-} tapi_display_roam_control_ind_t;
-
-/**
- * roam info data roam guard Indication Type
- */
-typedef enum {
-       TAPI_DISPLAY_DATA_ROAM_GUARD_NONE = 0x00, /**< None */
-       TAPI_DISPLAY_DATA_ROAM_GUARD_OFF = 0x01, /**< Data Roam Guard Off */
-       TAPI_DISPLAY_DATA_ROAM_GUARD_ON = 0x02 /**< Data Roam Guard On */
-} tapi_display_data_roam_guard_ind_t;
-
-/**
- * roam info data roam guard Indication Type
- */
-typedef enum {
-       TAPI_DISPLAY_USER_IND_NORMAL_MODE = 0x01, /**< Normal Mode */
-       TAPI_DISPLAY_USER_IND_INITIAL_PROGRAMMING = 0x02, /**< Initial Programming needed */
-       TAPI_DISPLAY_USER_IND_MAINTENANCE_REQUIRED = 0x03, /**< Maintenance Required */
-       TAPI_DISPLAY_USER_IND_AUTHENTICATION_REQUIRED = 0x04 /**< Authentication Required */
-} tapi_display_user_ind_message_t;
-
-/**
- * This structure defines the display icon information
- */
-typedef struct {
-       tapi_display_rssi_level_t rssi; /**< RSSI Levels */
-       tapi_display_rssi_level_t hdrRssi; /**< HDR(High Data Rate) RSSI Levels -CDMA */
-       tapi_phone_battery_level_t batt; /**< Battery Level */
-} tapi_display_icon_info_t;
-
-/**
- * HomeZone Information Notification Message
- *
- * This service specifies the implementation of o2 DE's HomeZone Indication (HZI) service
- * in 3G or 2G handsets. The HZI service consists of displaying a text and, optionally depending
- * on the zone, an icon in the handset (UE) when the UE is located within a zone which is defined
- * individually for each customer. The zone is defined by a set of cells, i. e. for each cell the
- * indication is either displayed or not. If the display of a MS is too small to display the complete
- * operator name together with the complete tag, it will be allowed to display the operator
- * name and the HomeZone/CityZone-tag in the same line ('o2 - de city' or 'o2 - de home').
- *
- * Reference O2 Home Zone spec.
- */
-typedef struct {
-       tapi_display_hmz_02_zone_ind_t ind;
-       tapi_display_hmz_02_zone_type_t type;
-       tapi_display_hmz_02_zone_tag_t tag_presnet;
-
-       /**
-        * The coding is 12-character string coded in the short message alphabet given
-        * In GSM 03.38 with bit 8 set to zero. Default FF. FF indicates no display.
-        * If ZONE_TAG_PRESENT, then this is 13 bytes.
-        * If ZONE_TAG_ABSENT, then this is zero byte.
-        */
-       unsigned char tag_name[TAPI_MAX_DISP_O2_HOMEZONE_TAG_LEN];
-} tapi_display_hmz_o2_ind_t;
-
-/**
- * Notify the TS of the occurrence of the phone fatal in the phone
- */
-typedef struct {
-       unsigned char Msg_len;
-       unsigned char Message[TAPI_MAX_DISP_PHONE_FATAL_ERR_MSG_LEN];
-} tapi_display_phone_fatal_info_noti_t;
-
-/**
- * Notify the TS of the occurrence of the ext roam info in the phone
- */
-typedef struct {
-       tapi_display_roam_control_ind_t control;
-       tapi_display_data_roam_guard_ind_t data_roam_guard;
-       unsigned char txt_len;
-       unsigned char text[TAPI_MAX_DISP_ROAM_INFO_LEN];
-} tapi_display_ext_roam_info_noti_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TEL_DISPLAY_H_ */
-
-/**
- *  @}
- */
diff --git a/include/TelErr.h b/include/TelErr.h
deleted file mode 100644 (file)
index 0b25164..0000000
+++ /dev/null
@@ -1,186 +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         COMMON_TAPI     COMMON
- * @{
- *     These error codes are used by Applications.
- */
-
-
-#ifndef _TEL_ERR_H_
-#define _TEL_ERR_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/************************************************************
-**    Errors defined in  "+CME ERROR" ,
-**    - see 3GPP TS 27.007
-**    - ranges are 0x00 ~ 0x7FFF
-************************************************************/
-/**
-       Error codes sent by the modem in response to the above operations.
-*/
-typedef enum
-{
-  /* GENERAL ERRORS */
-  TAPI_OP_GEN_ERR_PHONE_FAILURE        = 0,                                            /* 0 */
-  TAPI_OP_GEN_ERR_NO_CONNECTION_TO_PHONE,                                      /* 1 */
-  TAPI_OP_GEN_ERR_PHONE_ADAPTOR_LINK_RESERVED,                 /* 2 */
-  TAPI_OP_GEN_ERR_OPER_NOT_ALLOWED,                                            /* 3 */
-  TAPI_OP_GEN_ERR_OPER_NOT_SUPPORTED,                                          /* 4 */
-  TAPI_OP_GEN_ERR_PH_SIM_PIN_REQU,                                             /* 5 */
-  TAPI_OP_GEN_ERR_PH_FSIM_PIN_REQU,                                            /* 6 */
-  TAPI_OP_GEN_ERR_PH_FSIM_PUK_REQU,                                            /* 7 */
-  TAPI_OP_GEN_ERR_SIM_NOT_INSERTED     =10,                                    /* 10 */
-  TAPI_OP_GEN_ERR_SIM_PIN_REQU,                                                        /* 11 */
-  TAPI_OP_GEN_ERR_SIM_PUK_REQU,                                                        /* 12 */
-  TAPI_OP_GEN_ERR_SIM_FAILURE,                                                 /* 13 */
-  TAPI_OP_GEN_ERR_SIM_BUSY,                                                            /* 14 */
-  TAPI_OP_GEN_ERR_SIM_WRONG,                                                           /* 15 */
-  TAPI_OP_GEN_ERR_INCORRECT_PW,                                                        /* 16 */
-  TAPI_OP_GEN_ERR_SIM_PIN2_REQU,                                                       /* 17 */
-  TAPI_OP_GEN_ERR_SIM_PUK2_REQU,                                                       /* 18 */
-  TAPI_OP_GEN_ERR_MEM_FULL     = 20,                                                   /* 20 */
-  TAPI_OP_GEN_ERR_INVALID_INDEX,                                                       /* 21 */
-  TAPI_OP_GEN_ERR_NOT_FOUND,                                                           /* 22 */
-  TAPI_OP_GEN_ERR_MEM_FAILURE,                                                 /* 23 */
-  TAPI_OP_GEN_ERR_TEXT_STR_TOO_LONG,                                           /* 24 */
-  TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_TEXT_STR,                      /* 25 */
-  TAPI_OP_GEN_ERR_DIAL_STR_TOO_LONG,                                           /* 26 */
-  TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_DIAL_STR,                      /* 27 */
-  TAPI_OP_GEN_ERR_NO_NET_SVC   = 30,                                           /* 30 */
-  TAPI_OP_GEN_ERR_NET_TIMEOUT,                                                 /* 31 */
-  TAPI_OP_GEN_ERR_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY,        /* 32 */
-  TAPI_OP_GEN_ERR_NET_PERS_PIN_REQU    = 40,                                   /* 40 */
-  TAPI_OP_GEN_ERR_NET_PERS_PUK_REQU,                                           /* 41 */
-  TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PIN_REQU,                            /* 42 */
-  TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PUK_REQU,                            /* 43 */
-  TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PIN_REQU,                          /* 44 */
-  TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PUK_REQU,                          /* 45 */
-  TAPI_OP_GEN_ERR_CORPORATE_PERS_PIN_REQU,                             /* 46 */
-  TAPI_OP_GEN_ERR_CORPORATE_PERS_PUK_REQU,                             /* 47 */
-  TAPI_OP_GEN_ERR_HIDDEN_KEY_REQU,                                             /* 48 */
-  TAPI_OP_GEN_ERR_UNKNOWN      = 100,                                          /* 100 */
-
-  /* Errors related to a failure to perform an Attach */
-  TAPI_OP_GEN_ERR_ILLEGAL_MS   = 103,                                  /* 103 */
-  TAPI_OP_GEN_ERR_ILLEGAL_ME   = 106,                                  /* 106 */
-  TAPI_OP_GEN_ERR_GPRS_SVC_NOT_ALLOWED,                                        /* 107 */
-  TAPI_OP_GEN_ERR_PLMN_NOT_ALLOWED     = 111,                          /* 111 */
-  TAPI_OP_GEN_ERR_LOCATION_AREA_NOT_ALLOWED,                           /* 112 */
-  TAPI_OP_GEN_ERR_ROAMING_NOT_ALLOWED_IN_THIS_LOCATION_AREA,/* 113 */
-
-  /* Errors related to a failure to Activate a Context */
-  TAPI_OP_GEN_ERR_SVC_OPT_NOT_SUPPORTED        = 132,                  /* 132 */
-  TAPI_OP_GEN_ERR_REQ_SVC_OPT_NOT_SUBSCRIBED,                          /* 133 */
-  TAPI_OP_GEN_ERR_SVC_OPT_TEMPORARILY_OUT_OF_ORDER,            /* 134 */
-  TAPI_OP_GEN_ERR_UNSPECIFIED_GPRS_ERR = 148,                  /* 148 */
-  TAPI_OP_GEN_ERR_PDP_AUTHENTICATION_FAILURE,                          /* 149 */
-  TAPI_OP_GEN_ERR_INVALID_MOBILE_CLASS,                                        /* 150 */
-
-  /* VBS / VGCS and eMLPP -related errors */
-  TAPI_OP_GEN_ERR_VBS_VGCS_NOT_SUPPORTED_BY_THE_NET    = 151,  /* 151 */
-  TAPI_OP_GEN_ERR_NO_SVC_SUBSCRIPTION_ON_SIM,                          /* 152 */
-  TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_GROUP_ID,                        /* 153 */
-  TAPI_OP_GEN_ERR_GROUP_ID_NOT_ACTIVATED_ON_SIM,                       /* 154 */
-  TAPI_OP_GEN_ERR_NO_MATCHING_NOTI     = 155,                          /* 155 */
-  TAPI_OP_GEN_ERR_VBS_VGCS_CALL_ALREADY_PRESENT,                       /* 156 */
-  TAPI_OP_GEN_ERR_CONGESTION,                                                          /* 157 */
-  TAPI_OP_GEN_ERR_NET_FAILURE,                                                 /* 158 */
-  TAPI_OP_GEN_ERR_UPLINK_BUSY,                                                 /* 159 */
-  TAPI_OP_GEN_ERR_NO_ACCESS_RIGHTS_FOR_SIM_FILE        = 160,  /* 160 */
-  TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_PRIORITY,                        /* 161 */
-  TAPI_OP_GEN_ERR_OPER_NOT_APPLICABLE_OR_NOT_POSSIBLE, /* 162 */
-
-
-  TAPI_OP_GEN_ERR_NONE = 0x8000,                               /* 0x8000 : No Errors */
-
-  /* General Common Errors : 0x8000 - 0x80FF */
-  TAPI_OP_GEN_ERR_INVALID_IPC,                                                 /* 0x8001 : Invalid IPC_GSM Parameter or Format */
-  TAPI_OP_GEN_ERR_PHONE_OFFLINE,                                                       /* 0x8002 : */
-  TAPI_OP_GEN_ERR_CMD_NOT_ALLOWED,                                             /* 0x8003 : */
-  TAPI_OP_GEN_ERR_PHONE_IS_INUSE,                                                      /* 0x8004 : */
-  TAPI_OP_GEN_ERR_INVALID_STATE        = 0x8005,                                       /* 0x8005 : */
-
-  TAPI_OP_GEN_ERR_NO_BUFFER,                                                           /* 0x8006 :  No internal free buffers */
-  TAPI_OP_GEN_ERR_OPER_REJ,                                                            /* 0x8007 :  Operation Rejected */
-  TAPI_OP_GEN_ERR_INSUFFICIENT_RESOURCE,                                       /* 0x8008 : insufficient resource */
-  TAPI_OP_GEN_ERR_NET_NOT_RESPOND,                                             /* 0x8009 : Network not responding */
-  TAPI_OP_GEN_ERR_SIM_PIN_ENABLE_REQ   = 0x800A,                       /* 0x800A : SIM Pin Enable Required */
-  TAPI_OP_GEN_ERR_SIM_PERM_BLOCKED,                                    /* 0x800B : SIM Permanent Blocked */
-  TAPI_OP_GEN_ERR_SIM_PHONEBOOK_RESTRICTED,                            /*0x800C: SIM Phonebook Restricted*/
-  TAPI_OP_GEM_ERR_FIXED_DIALING_NUMBER_ONLY,                           /*0x800D: Restricted By FDN Mode */
-
-  /* Reserved : 0x800E ~ 0x80FF */
-  TAPI_OP_GEN_ERR_800E_RESERVED_START  = 0x800E,                       /* 0x800E */
-
-  TAPI_OP_GEN_ERR_80FF_RESERVED_END    = 0x80ff,                               /* 0x80FF */
-
-  /* the other errors */
-  TAPI_OP_GEN_ERR_OTHERS                               = 0xFFFE,                                 /* 0xFFFE */
-
-  TAPI_OP_GEN_ERR_MAX                                  = 0xFFFF
-
-}tapi_phone_err_t;
-
-typedef enum {
-       TAPI_PDP_FAILURE_CAUSE_NORMAL                                           = 0x00,           // 0x00 : Normal Process ( no problem )
-       TAPI_PDP_FAILURE_CAUSE_REL_BY_USER                                      = 0x01,           // Call Released by User
-       TAPI_PDP_FAILURE_CAUSE_REGULAR_DEACTIVATION                     = 0x02,           // Regular de-activation
-       TAPI_PDP_FAILURE_CAUSE_LLC_SNDCP                                        = 0x03,           // LLC SNDCP failure
-       TAPI_PDP_FAILURE_CAUSE_INSUFFICIENT_RESOURCE            = 0x04,           // Insufficient resources
-       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_APN                                      = 0x05,           // Missing or unknown APN
-       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS                      = 0x06,           // Unknown PDP address or type
-       TAPI_PDP_FAILURE_CAUSE_USER_AUTH_FAILED                         = 0x07,           // Unknown PDP address or type
-       TAPI_PDP_FAILURE_CAUSE_ACT_REJ_GGSN                                     = 0x08,           // Unknown PDP address or type
-       TAPI_PDP_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED                      = 0x09,           // Unknown PDP address or type
-       TAPI_PDP_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED         = 0x0A,           // Service option not supported
-       TAPI_PDP_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                       = 0x0B,           // Requested service option not subscribed
-       TAPI_PDP_FAILURE_CAUSE_SVC_OPT_OUT_ORDER                        = 0x0C,           // Service out of order
-    TAPI_PDP_FAILURE_CAUSE_NSAPI_USED                                  = 0x0D,           // NSAPI already used
-       TAPI_PDP_FAILURE_CAUSE_QOS_NOT_ACCEPTED                         = 0x0E,           // QoS not accepted
-       TAPI_PDP_FAILURE_CAUSE_NETWORK_FAILURE                          = 0x0F,           // Network Failure
-    TAPI_PDP_FAILURE_CAUSE_REACT_REQUIRED                              = 0x10,           // Reactivation Required
-       TAPI_PDP_FAILURE_CAUSE_FEATURE_NOT_SUPPORTED            = 0x11,           // Feature not supported
-       TAPI_PDP_FAILURE_CAUSE_TFT_FILTER_ERROR                         = 0x12,           // TFT or filter error
-       TAPI_PDP_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                       = 0x13,           // Unknown PDP context
-       TAPI_PDP_FAILURE_CAUSE_INVALID_MSG                                      = 0x14,           // Invalid MSG
-       TAPI_PDP_FAILURE_CAUSE_PROTOCOL_ERROR                           = 0x15,           // Protocol error
-       TAPI_PDP_FAILURE_CAUSE_MOBILE_FAILURE_ERROR                     = 0x16,           // Mobile failure error
-       TAPI_PDP_FAILURE_CAUSE_TIMEOUT_ERROR                            = 0x17,           // Timeout error
-       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_ERROR                            = 0x18,           // Unknown error
-       TAPI_PDP_FAILURE_CAUSE_MAX ,
-} tapi_pdp_err_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _TEL_ERR_H_
-
-/**
-* @}
-*/
diff --git a/include/TelMisc.h b/include/TelMisc.h
deleted file mode 100644 (file)
index 8e4a8c4..0000000
+++ /dev/null
@@ -1,349 +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.
- */
-
-/**
- * @internal
- * @ingroup            TelephonyAPI
- * @addtogroup MISC_TAPI       MISC
- * @{
- *
- * @file TelMisc.h
-
- @brief This file serves as a "C" header file defines structures for Tapi Misc Services. \n
- It contains a sample set of constants, enums, structs that would be required by applications.
-
- */
-
-#ifndef _TEL_MISC_H_
-#define _TEL_MISC_H_
-
-#include <sys/time.h>
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_VERSION_LEN        32    /**< Maximum version length *///sw version, hw version, rf cal date, me sn
-#define FUS_DUMMY_DATA_SIZE 2     /**< Data Size*/
-
-#define        MMICHECK_CALL_RELEASE_NOTI      "User.LauncherUi.RequestTermination"
-#define        MMICHECK_END_ALL_NOTI           "User.LauncherUi.RequestTermination"
-#define        MMICHECK_DIALER_KEY_NOTI        "User.LauncherUi.DialerKeyInsert"
-#define        MMICHECK_ACTIVITY_VIEW_NOTI     "User.MMICheck.ActivityView.ChangeStatus"
-
-#define TAPI_MISC_ME_SN_LEN_MAX                                32
-#define TAPI_MISC_PRODUCT_CODE_LEN_MAX         32
-#define TAPI_MISC_MODEL_ID_LEN_MAX                     17
-#define TAPI_MISC_PRL_ERI_VER_LEN_MAX          17
-
-#define TAPI_MISC_MCC_LEN_MAX                          3
-#define TAPI_MISC_MNC_LEN_MAX                          2
-#define TAPI_MISC_MIN_LEN_MAX                          10
-#define TAPI_MISC_MDN_LEN_MAX                          15
-#define TAPI_MISC_NAME_LEN_MAX                         17
-
-/**
- * @enum TelMiscApplicationKey_t
- * This enumeration defines mmi check key values
- */
-typedef enum {
-       MMI_CHECK_DIAL_STAR             =       0x2A,   //      20 00 2A AF 4B 7E
-       MMI_CHECK_DIAL_SHARP    =       0x23,   //      20 00 23 6E D6 7E
-       MMI_CHECK_DIAL_0                =       0x30,   //      20 00 30 74 F4 7E
-       MMI_CHECK_DIAL_1,                                       //      20 00 31 FD E5 7E
-       MMI_CHECK_DIAL_2,                                       //      20 00 32 66 D7 7E
-       MMI_CHECK_DIAL_3,                                       //      20 00 33 EF C6 7E
-       MMI_CHECK_DIAL_4,                                       //      20 00 34 50 B2 7E
-       MMI_CHECK_DIAL_5,                                       //      20 00 35 D9 A3 7E
-       MMI_CHECK_DIAL_6,                                       //      20 00 36 42 91 7E
-       MMI_CHECK_DIAL_7,                                       //      20 00 37 CB 80 7E
-       MMI_CHECK_DIAL_8,                                       //      20 00 38 3C 78 7E
-       MMI_CHECK_DIAL_9,                                       //      20 00 39 B5 69 7E
-
-       MMI_CHECK_END_ALL               =       0x41,   //
-
-       MMI_CHECK_CALL                  =       0x50,   //      20 00 50 72 97 7E
-       MMI_CHECK_END                   =       0x51,   //      20 00 51 FB 86 7E
-       MMI_CHECK_CANCEL                =       0x52,   //      20 00 52 60 B4 7E
-       MMI_CHECK_RIGHT                 =       0x53,   //      20 00 5C 1E 5D 7E
-       MMI_CHECK_SIDE_UP               =       0x54,   //      20 00 54 56 D1 7E
-       MMI_CHECK_SIDE_DOWN             =       0x55,   //      20 00 55 DF C0 7E
-
-       MMI_CHECK_LEFT                  =       0x5B,   //      20 00 5B A1 29 7E
-       MMI_CHECK_ARROW_UP              =       0x63,   //      20 00 63 6A 94 7E
-       MMI_CHECK_ARROW_DOWN    =       0x64,   //      20 00 64 D5 E0 7E
-       MMI_CHECK_ARROW_LEFT    =       0x65,   //      20 00 65 5C F1 7E
-       MMI_CHECK_ARROW_RIGHT   =       0x66,   //      20 00 66 C7 C3 7E
-
-       MMI_CHECK_WAP                   =       0x8C,   //      20 00 53 E9 A5 7E
-       MMI_CHECK_CAMERA                =       0x8D,   //      20 01 8D C2 83 7E
-       MMI_CHECK_MP3                   =       0xDD,   //      20 00 DD 9F C8 7E
-       MMI_CHECK_POWER                 =       0x95,   //      20 00 95 D3 06 7E
-       MMI_CHECK_LONG_PRESS    =       0xFF
-} TelMiscMMICHECK_t;
-
-/**
- * @enum TelMiscApplicationKey_t
- * This enumeration defines application key type
- */
-typedef enum {
-       KEY_EXT_DIAL_0 = 0,
-       KEY_EXT_DIAL_1,
-       KEY_EXT_DIAL_2,
-       KEY_EXT_DIAL_3,
-       KEY_EXT_DIAL_4,
-       KEY_EXT_DIAL_5,
-       KEY_EXT_DIAL_6,
-       KEY_EXT_DIAL_7,
-       KEY_EXT_DIAL_8,
-       KEY_EXT_DIAL_9,
-       KEY_EXT_DIAL_STAR,      // 10 : *
-       KEY_EXT_DIAL_SHARP,     // 11 : #
-
-       KEY_EXT_DIAL_BACK,      // 12 : <- (backkey)
-       KEY_EXT_DIAL_HIDE,      // 13 :�� (hidekey)
-       KEY_EXT_DIAL_P,         // 14 : p
-       KEY_EXT_DIAL_PLUS,      // 15 : +
-       KEY_EXT_DIAL_MUTE,      // 16 : mute
-
-       KEY_EXT_DIAL_CALL                       =       100,            // 100 : BTN1 (call)
-       KEY_EXT_DIAL_MESSAGE,                                           // 101 : BTN2 (message)
-       KEY_EXT_DIAL_VIDEO_CALL,                                        // 102 : BTN3 (video call)
-       KEY_EXT_DIAL_SAVE,                                                      // 103 : BTN4 (save)
-       KEY_EXT_DIAL_CALL_END,                                          // noti publish
-       KEY_EXT_TERMINATE_ALL,
-
-       KEY_EXT_PAGEDOWN                        =       114,            // Volume down
-       KEY_EXT_PAGEUP                          =       115,            // Volume up
-       KEY_EXT_POWER                           =       116,            // Power short
-       KEY_EXT_PEOPLE_VIEW                     =       132,            // People view
-       KEY_EXT_TIMELINE                        =       169,            // Lifedrive
-       KEY_EXT_PREPARE_CAMERA          =       171,            // Prepare Camera
-       KEY_EXT_ACTIVITY_VIEW           =       174,            // Activity view
-       KEY_EXT_CAMERA                          =       212,            // Camera
-       KEY_EXT_SEARCH                          =       217,            // Phone Search
-       KEY_EXT_POWER_LONG                      =       356,            // Power off
-
-       KEY_EXT_INVALID_KEY                     =       500
-} TelMiscApplicationKey_t;
-
-/**
- * @enum TelMiscDiagTouchEventType_t
- * This enumeration defines the touch event type
- */
-typedef enum {
-       TAPI_DIAG_TOUCH_CLICK_DOWN = 0x000F, /**< 0x0F00: Click Down */
-       TAPI_DIAG_TOUCH_MOVE = 0x0010, /**< 0x1000: Move  */
-       TAPI_DIAG_TOUCH_CLICK_UP = 0x0011, /**< 0x1100: Click Up */
-       TAPI_DIAG_TOUCH_HOLD = 0x0012 /**< 0x1200: Hold */
-} TelMiscDiagTouchEventType_t;
-
-/**
- * @enum  TelMiscAlarmMode_t
- * Enum type for Validity of the Alarm booting
- */
-typedef enum {
-       TAPI_MISC_ALARMBOOT_INACTIVATE, /**< 0x00: Inactivated */
-       TAPI_MISC_ALARMBOOT_ACTIVATE /**< 0x00: Activated */
-} TelMiscAlarmMode_t;
-
-typedef enum {
-       TAPI_MISC_ME_IMEI = 0x00, /**< 0x00: IMEI, GSM/UMTS device */
-       TAPI_MISC_ME_ESN = 0x01, /**< 0x01: ESN(Electronic Serial Number), It`s essentially run out. CDMA device */
-       TAPI_MISC_ME_MEID = 0x02, /**< 0x02: MEID, This value can have hexa decimal digits. CDMA device */
-       TAPI_MISC_ME_MAX = 0xff /**< 0xff: reserved */
-} TelMiscSNIndexType_t;
-
-/**
- * NAM Information MASK fiel
- */
-typedef enum {
-       TAPI_MISC_NAM_INFO_MASK_TOTAL                   = 0x0001,
-       TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX   = 0x0002,
-       TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX   = 0x0004,
-       TAPI_MISC_NAM_INFO_MASK_AUTONAM         = 0x0008,
-       TAPI_MISC_NAM_INFO_MASK_MCC                     = 0x0010,
-       TAPI_MISC_NAM_INFO_MASK_MNC                     = 0x0020,
-       TAPI_MISC_NAM_INFO_MASK_MIN                     = 0x0040,
-       TAPI_MISC_NAM_INFO_MASK_MDN                     = 0x0080,
-       TAPI_MISC_NAM_INFO_MASK_NAM_NAME                = 0x0100,
-       TAPI_MISC_NAM_INFO_MASK_NAM_CHANGE              = 0x0200,
-       TAPI_MISC_NAM_INFO_MASK_NAM_NUM         = 0x0400,
-       TAPI_MISC_NAM_INFO_MASK_ALL                     = 0x8000
-} TelMiscNamInfoMaskType_t;
-
-/**
- * NAMIndex Field
- */
-typedef enum {
-       TAPI_MISC_NAM_1 = 0x00,
-       TAPI_MISC_NAM_2,
-       TAPI_MISC_NAM_3,
-       TAPI_MISC_NAM_4,
-       TAPI_MISC_NAM_5
-} TelMiscNamIndex_t;
-
-
-/**
- * @enum  tapi_misc_nitz_dayofweek_t
- * Enum type for day of week
- */
-typedef enum {
-       TAPI_MISC_NITZ_DOW_SUN = 0x00, /**< Sunday */
-       TAPI_MISC_NITZ_DOW_MON = 0x01, /**< Monday */
-       TAPI_MISC_NITZ_DOW_TUE = 0x02, /**< Tuesday */
-       TAPI_MISC_NITZ_DOW_WED = 0x03, /**< Wednesday */
-       TAPI_MISC_NITZ_DOW_THU = 0x04, /**< Thursday */
-       TAPI_MISC_NITZ_DOW_FRI = 0X05, /**< Friday */
-       TAPI_MISC_NITZ_DOW_SAT = 0x06  /**< Saturday */
-} tapi_misc_nitz_dayofweek_t;
-
-/**
- * @enum  tapi_misc_nitz_daylight_t
- * Enum type for daylight
- */
-typedef enum {
-       TAPI_MISC_NITZ_NOADJUST = 0x00, /**< No daylight adjustment */
-       TAPI_MISC_NITZ_ONE_HR = 0x01, /**< One hour */
-       TAPI_MISC_NITZ_TW0_HR = 0x02  /**< two hours */
-} tapi_misc_nitz_daylight_t;
-
-/**
- * @enum  tapi_misc_nitz_timeinfo_t
- * Enum type for types of data
- */
-typedef enum {
-       TAPI_MISC_NITZ_INVALID                  = 0x00, /**< Invalid */
-       TAPI_MISC_NITZ_TIMEINFO_NW_CDMA = 0x01, /**< Time info network */
-       TAPI_MISC_NITZ_TIMEINFO_NW_GSM  = 0x02, /**< Time info network */
-       TAPI_MISC_NITZ_RTC_INFO_LINE    = 0x03, /**< RTC Info line */
-       TAPI_MISC_NITZ_RTC_BKUP_PHONE   = 0x04, /**< RTC Backup phone */
-       TAPI_MISC_NITZ_NO_TIME_INFO     = 0x05  /**< No time info */
-} tapi_misc_nitz_timeinfo_t;
-
-/**
- * Mobile Equipment Version Information
- */
-typedef struct {
-       unsigned char ver_mask; /**< version mask  - 0x01:SW_ver, 0x02:HW_ver, 0x04:RF_CAL_date, 0x08:Product_code, 0x10:Model_ID, 0x20:PRL, 0x04:ERI, 0xff:all */
-       unsigned char szSwVersion[MAX_VERSION_LEN]; /**< Software version, null termination */
-       unsigned char szHwVersion[MAX_VERSION_LEN]; /**< Hardware version, null termination */
-       unsigned char szRfCalDate[MAX_VERSION_LEN]; /**< Calculation Date, null termination */
-       unsigned char szProductCode[TAPI_MISC_PRODUCT_CODE_LEN_MAX]; /**< product code, null termination */
-       unsigned char szModelId[TAPI_MISC_MODEL_ID_LEN_MAX]; /**< model id (only for CDMA), null termination */
-       unsigned char prl_nam_num; /**< number of PRL NAM fields */
-       unsigned char szPrlVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< prl version (only for CDMA), null termination */
-       unsigned char eri_nam_num; /**< number of PRL NAM fields */
-       unsigned char szEriVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< eri version (only for CDMA), null termination */
-} TelMiscVersionInformation;
-
-/**
- * Mobile Equipment Serial Number Information
- */
-typedef struct {
-       TelMiscSNIndexType_t sn_index; /**< serial number index */
-       int sn_len; /**< Length */
-       unsigned char szNumber[TAPI_MISC_ME_SN_LEN_MAX]; /**< Number */
-} TelMiscSNInformation;
-
-/**
- * Event delivery - event type
- */
-typedef struct {
-       struct timeval time; /**< Time information */
-       unsigned short type; /**< Type of event */
-       unsigned short code; /**< Code */
-       long value; /**< Value */
-} input_event_t;
-
-/**
- * Diagnostic Key Code Information
- */
-typedef struct {
-       unsigned char keycode; /**< Key Code */
-       unsigned char keyhold; /**< Key Hold */
-} TelMiscDiagKeyCodeInfomation;
-
-/**
- * Struct for alarm info
- */
-typedef struct {
-       unsigned char year; /**< year */
-       unsigned char month; /**< month */
-       unsigned char day; /**< day */
-       unsigned char hour; /**< hour */
-       unsigned char minute; /**< minute */
-       unsigned char second; /**< second */
-       unsigned char time_zone; /**< time zone */
-       tapi_misc_nitz_dayofweek_t day_of_week; /**< day of week */
-} TelMiscAlarmInfo_t;
-
-/**
- * Struct for alarm response
- */
-typedef struct {
-       TelMiscAlarmMode_t validity; /**< validity */
-       TelMiscAlarmInfo_t alarm_info; /**< alarm info */
-} TelMiscAlarmStatus_t;
-
-/**
- * @struct  TelMiscNamInfo_t
- * struct type for nam info
- */
-typedef struct {
-       unsigned short nam_info_mask;
-       unsigned char nam_total; // this field is not used in case of nam set req.
-       unsigned char nam_current_index;
-       unsigned char nam_req_index;
-       unsigned char nam_auto;
-       unsigned char nam_mcc[TAPI_MISC_MCC_LEN_MAX+1];
-       unsigned char nam_mnc[TAPI_MISC_MCC_LEN_MAX+1];
-       unsigned char nam_min[TAPI_MISC_MIN_LEN_MAX+1];
-       unsigned char nam_mdn[TAPI_MISC_MDN_LEN_MAX+1];
-       unsigned char nam_name[TAPI_MISC_NAME_LEN_MAX+1];
-} TelMiscNamInfo_t;
-
-/**
- * Struct for time info
- */
-typedef struct {
-       tapi_misc_nitz_timeinfo_t time_zone_valid; /**< time zone */
-       int bDaylight_valid; /**< day light */
-       unsigned char year; /**< year */
-       unsigned char month; /**< month */
-       unsigned char day; /**< day */
-       unsigned char hour; /**< hour */
-       unsigned char minute; /**< minute */
-       unsigned char second; /**< second */
-       unsigned char time_zone; /**< time zone */
-       tapi_misc_nitz_daylight_t daylight_adjust; /**< day light adjust */
-       tapi_misc_nitz_dayofweek_t day_of_week; /**< day of week */
-       unsigned long plmn; /**< day of week */
-} tapi_misc_time_zone_info_type;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _TEL_MISC_H_
-/**
- *  @}
- */
diff --git a/include/TelNetwork.h b/include/TelNetwork.h
deleted file mode 100644 (file)
index d6b7f9c..0000000
+++ /dev/null
@@ -1,516 +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  Network_TAPI    Network
-* @{
-*
-* @file TelNetwork.h
-
-     @brief This file serves as a "C" header file and defines structures for Tapi Network Services\n
-      It contains a sample set of constants, enums, structs that would be required by applications.
- */
-
-#ifndef _TEL_NETWORK_H_
-#define _TEL_NETWORK_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define TAPI_NETWORK_ORDER_MAX                                 5               /**< Maximum network order */
-#define TAPI_NETWORK_LIST_MAX                                  15              /**< Maximum network list */
-#define TAPI_NETWORK_PLMN_LEN_MAX                              6               /**< Maximum PLMN length*/
-#define TAPI_NETWORK_NAME_LEN_MAX                              40              /**< Maximum network name or PLMN name length*/
-#define TAPI_NETWORK_SPN_LEN_MAX                               20              /**< Maximum network service provider name length */
-#define TAPI_PREFERRED_PLMN_RECORDS_MAX                        150             /**< Maximum record length for preferred plmn list*/
-#define TAPI_NETWORK_DISPLAY_INFO_ELEMENTS             4               /**< Maximum network Display info element length */
-#define TAPI_NETWORK_HOMEZONE_TAG_MAX_LEN              13              /**< Maximum Network  Home zone tag  length */
-#define TAPI_NETWORK_CS_DISP_INDEX                             0               /**< Maximum   Network CS display index length */
-#define TAPI_NETWORK_PS_DISP_INDEX                             1               /**< Maximum  Network PS display index  length */
-#define TAPI_NETWORK_SVC_DISP_INDEX                            2               /**< Maximum  Network SVC display index length */
-#define TAPI_NETWORK_ROAM_DISP_INDEX                   3               /**< Maximum  Network roaming display index length */
-#define TAPI_NETWORK_SUBS_SVC_NUM_MAX                  6               /**< Maximum number of the Subscriber's services */
-#define TAPI_NETWORK_SUBS_NUM_LEN_MAX                  40              /**< Maximum Subscriber Number Length */
-#define TAPI_NETWORK_SUBS_ALPHA_LEN_MAX                        16              /**< Maximum Subscriber Name Length */
-#define TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX 6 /**< Maximum GERAN neighboring cell list */
-#define TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX 24 /**< Maximum UMTS neighboring cell list  */
-
-/* This value defines the network mode */
-#define TAPI_NETWORK_MODE_AUTO         0x00            /**< Set Network mode to AUTOMATIC */
-#define TAPI_NETWORK_MODE_GSM          0x01            /**< Set Network mode to GSM */
-#define TAPI_NETWORK_MODE_WCDMA                0x02            /**< Set Network mode to WCDMA  */
-#define TAPI_NETWORK_MODE_CDMA         0x04            /**< Set Network mode to CDMA */
-#define TAPI_NETWORK_MODE_LTE          0x08            /**< Set Network mode to LTE */
-
-/**
- * @enum TelNetworkSelectionMode_t
- *  This enumeration defines the network selection modes.
- */
-typedef enum {
-       TAPI_NETWORK_SELECTIONMODE_AUTOMATIC,                   /**< Network selection is in Automatic selection mode*/
-       TAPI_NETWORK_SELECTIONMODE_MANUAL                               /**< Network selection is in Manual selection mode */
-} TelNetworkSelectionMode_t;
-
-/**
- * @enum TelNetworkServiceDomain_t
- * This enumeration defines the network service domains .
- */
-typedef enum {
-       TAPI_NETWORK_SERVICE_DOMAIN_COMBINED,           /**< This member sets the Circuit switch   and Packet Switch domain */
-       TAPI_NETWORK_SERVICE_DOMAIN_PS,                         /**< This member sets the Packet Switch service domain */
-       TAPI_NETWORK_SERVICE_DOMAIN_CS,                         /**< This member sets the Circuit Switch service domain */
-       TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC           /**< This member sets the service domain to Circuit Switch and Packet Switch or Circuit Switch or Packet Switch domain */
-} TelNetworkServiceDomain_t;
-
-/**
- * @enum TelNetworkServiceLevel_t
- * This enumeration defines the status of network service.
- */
-typedef enum {
-       TAPI_NETWORK_SERVICE_LEVEL_NO,                  /**< No service available in the network ME is camped */
-       TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY,   /**< Only emergency service available in the network ME is camped */
-       TAPI_NETWORK_SERVICE_LEVEL_FULL,                /**< FULL service available in the network ME is camped */
-       TAPI_NETWORK_SERVICE_LEVEL_SEARCH               /**< Searching for service */
-} TelNetworkServiceLevel_t;
-
-/**
- * @enum TelNetworkServiceLevel_t
- * This enumeration defines the service types of TAPI.
- */
-typedef enum {
-       TAPI_NETWORK_SERVICE_TYPE_NO_SVE,               /**< No service  (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
-       TAPI_NETWORK_SERVICE_TYPE_LIMITED,              /**< Limited service available in the camped network  (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
-       TAPI_NETWORK_SERVICE_TYPE_CS,                   /**< CS service available in the camped network */
-       TAPI_NETWORK_SERVICE_TYPE_PS,                   /**< PS service available in the camped network */
-       TAPI_NETWORK_SERVICE_TYPE_COMBINED              /**< Both CS and PS services available in the camped network */
-} TelNetworkServiceType_t;
-
-/**
- * @enum TelNetworkSystemType_t
- * This enumeration defines the system types of TAPI.
- */
-typedef enum
-{
-       TAPI_NETWORK_SYSTEM_NO_SRV,                             /**< No Service available */
-       TAPI_NETWORK_SYSTEM_GSM,                                /**< Available service is GSM  */
-       TAPI_NETWORK_SYSTEM_GPRS,                               /**< Available service is GPRS */
-       TAPI_NETWORK_SYSTEM_EGPRS,                              /**< Available service is EGPRS  */
-       TAPI_NETWORK_SYSTEM_PCS1900,                    /**< Available service is PCS1900 band */
-       TAPI_NETWORK_SYSTEM_UMTS,                               /**< Available service is UMTS  */
-       TAPI_NETWORK_SYSTEM_GSM_AND_UMTS,               /**< Both GSM and UMTS systems available */
-       TAPI_NETWORK_SYSTEM_HSDPA,                              /**< Available service is hsdpa */
-       TAPI_NETWORK_SYSTEM_IS95A,                              /**< Available service is IS95A */
-       TAPI_NETWORK_SYSTEM_IS95B,                              /**< Available service is IS95B */
-       TAPI_NETWORK_SYSTEM_CDMA_1X,                    /**< Available service is CDMA 1X */
-       TAPI_NETWORK_SYSTEM_EVDO_REV_0, /**< Available service is EV-DO rev0 */
-       TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID, /**< Available service is  1X and EV-DO rev0 */
-       TAPI_NETWORK_SYSTEM_EVDO_REV_A, /**< Available service is  EV-DO revA */
-       TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID, /**< Available service is 1X and EV-DO revA */
-       TAPI_NETWORK_SYSTEM_EVDV,               /**< Available service is EV-DV */
-       TAPI_NETWORK_SYSTEM_LTE                 /**< Available service is LTE */
-} TelNetworkSystemType_t;
-
-/**
- *  @enum TelNetworkBandPreferred_t
- * This enumeration defines the operations that can be done on network Band.
- */
-typedef enum
-{
-       TAPI_NETWORK_BAND_MODE_PREFERRED = 0x01,                 /**<  Preferred band. (If preferred Band is not available, then underlying modem can search on other bands) */
-       TAPI_NETWORK_BAND_MODE_ONLY = 0x02,                              /**<   This allows only particular band. */
-} TelNetworkBandPreferred_t;
-
-/**
- * @enum TelNetworkBand_t
- * This enumeration defines different network Bands.
- */
-typedef enum
-{
-       TAPI_NETWORK_BAND_TYPE_ANY = 0x00,              /**< All bands can be tried. */
-       TAPI_NETWORK_BAND_TYPE_GSM850,                  /**< This member sets the band to GSM 850 */
-       TAPI_NETWORK_BAND_TYPE_GSM_900_1800,    /**< This member sets the band to GSM 900_1800 */
-       TAPI_NETWORK_BAND_TYPE_GSM1900,                 /**< GSM 1900*/
-       TAPI_NETWORK_BAND_TYPE_GSM,                             /**< This member sets all GSM bands */
-       TAPI_NETWORK_BAND_TYPE_WCDMA,                   /**< This member sets all WCDMA bands */
-       TAPI_NETWORK_BAND_TYPE_WCDMA850,                /**< This member sets the band to WCDMA 850 */
-       TAPI_NETWORK_BAND_TYPE_WCDMA1900,               /**< This member sets the band to WCDMA 1900 */
-       TAPI_NETWORK_BAND_TYPE_WCDMA2100,               /**< This member sets the band to WCDMA 2100 */
-       TAPI_NETWORK_BAND_TYPE_GSM900,                  /**< GSM 900*/
-       TAPI_NETWORK_BAND_TYPE_GSM1800,                 /**< This member sets the band to GSM 1800 */
-       TAPI_NETWORK_BAND_TYPE_GSM_850_1900,    /**< This member sets the band to GSM 850_1900 */
-       TAPI_NETWORK_BAND_TYPE_LTE_BAND_4,              /**< This member sets the band to LTE BAND 4*/
-       TAPI_NETWORK_BAND_TYPE_LTE_BAND_17              /**< This member sets the band to LTE BAND 17 */
-} TelNetworkBand_t;
-
-/**
- * @enum TelNetworkOperationCause_t
- * This enumeration defines different network operation cause.
- */
-typedef enum
-{
-       TAPI_NETWORK_NO_ERR = 0x00,                                     /**< There is no error for any network operation.  */
-       TAPI_NETWORK_OPERATION_FAILED,                          /**< There is an error for any network operation.  */
-       TAPI_NETWORK_PHONE_IN_USE_ERR,                          /**< This error will be returned when any network operation is tried while phone is in use(eg, Voice / Data call in progress due to which network operation failed) */
-       TAPI_NETWORK_OFFLINE_ERR,                                       /**< This error is sent when any network option is tried when phone is in offline mode */
-       TAPI_NETWORK_CONFIG_SETTINGS_FAILURE_ERR,       /**< This error is sent when modem is unable to process the config settings information. */
-       TAPI_NETWORK_INTERNAL_FAILURE_ERR,                      /**< This error to indicate internal failure */
-       TAPI_NETWORK_MEMORY_FULL_ERR                            /**< This error is caused by memory full */
-} TelNetworkOperationCause_t;
-
-
-/**
- * @enum TelNetworkPreferredPlmnOp_t
- * This enumeration defines the operation that can be done on preferred PLMN.
- */
-typedef enum
-{
-       TAPI_NETWORK_PREF_PLMN_ADD=0x01,                        /**< Addition to  Network Preferred Plmn list*/
-       TAPI_NETWORK_PREF_PLMN_EDIT,                            /**< Edit the network Preferred Plmn list */
-       TAPI_NETWORK_PREF_PLMN_DELETE                           /**< Delete the entry to network Preferred Plmn list*/
-} TelNetworkPreferredPlmnOp_t;
-
-/**
- * @enum TelNetworkPowerOnAttach_t
- * This enumeration defines operation that can be done on power on attach.
- * It is used on CDMA.
- */
-typedef enum
-{
-       TAPI_NETWORK_SERVING_CARRIER_TEST = 0x00,                       /**< TestBed */
-       TAPI_NETWORK_SERVING_CARRIER_SKT,                                       /**< Korea SKT */
-       TAPI_NETWORK_SERVING_CARRIER_KTF,                                       /**< Korea KTF */
-       TAPI_NETWORK_SERVING_CARRIER_LGT,                                       /**< Korea LGT */
-       TAPI_NETWORK_SERVING_CARRIER_VERIZON = 0x11,            /**< US VERIZON */
-       TAPI_NETWORK_SERVING_CARRIER_SPRINT,                            /**< US SPRINT */
-       TAPI_NETWORK_SERVING_CARRIER_ALLTEL,                            /**< US ALLTEL */
-       TAPI_NETWORK_SERVING_CARRIER_METRO_PCS,                 /**< US METRO_PCS */
-       TAPI_NETWORK_SERVING_CARRIER_CELLULAR,                          /**< US CELLULAR */
-       TAPI_NETWORK_SERVING_CARRIER_CRIKET,                            /**< US CRIKET */
-       TAPI_NETWORK_SERVING_CARRIER_TELUS = 0x21,                      /**< CANADA TELUS */
-       TAPI_NETWORK_SERVING_CARRIER_BMC,                                       /**< CANADA BMC */
-       TAPI_NETWORK_SERVING_CARRIER_BWA,                                       /**< CANADA BWA */
-       TAPI_NETWORK_SERVING_CARRIER_CTC = 0x31,                        /**< CHINA CTC */
-       TAPI_NETWORK_SERVING_CARRIER_UNKNOWN = 0xFF             /**< SERVING NETWORK UNKNOWN */
-} TelNetworkServCarrierType_t;
-
-/**
- * @enum TelNetworkPlmnType_t
- * This structure defines Network Plmn type.
- */
-typedef enum
-{
-       TAPI_UNKNOWN_PLMN=0,                            /**< Network Plmn type Unknown */
-       TAPI_HOME_PLMN ,                                        /**< Network Plmn type Home Plmn */
-       TAPI_AVAILABLE_PLMN,                            /**< Network Plmn Available */
-       TAPI_FORBIDDEN_PLMN,                            /**< Network Plmn Forbidden */
-}TelNetworkPlmnType_t;
-
-/**
- * @enum TelNetworkHomeZoneCommand_t
- * This enumeration defines network home zone command.
- */
-typedef enum
-{
-       TAPI_NETWORK_ZONEINFO_NONE,                             /**< Network Zone info none */
-       TAPI_NETWORK_ZONEINFO_IND,                              /**< Network Zone info indication */
-       TAPI_NETWORK_ZONEINFO_CLEAR                             /**< Network Zone info clear */
-}TelNetworkHomeZoneCommand_t;
-
-/**
- * @enum TelNetworkHomeZone_t
- * This enumeration defines network home zone type.
- */
-typedef enum
-{
-       TAPI_NETWORK_ZONE_NONE,                                 /**< Network Zone Type none */
-       TAPI_NETWORK_ZONETYPE_HOMEZONE,         /**< Network Zone Type Home zone */
-       TAPI_NETWORK_ZONETYPE_CITYZONE,                 /**< Network Zone Type City zone */
-}TelNetworkHomeZone_t;
-
-/**
- * @enum TelNetworkNameDispCondition_t
- * This enumeration defines network name display condition type.
- */
-typedef enum
-{
-       TAPI_NETWORK_DISP_INVALID= 0x00,
-       TAPI_NETWORK_DISP_SPN = 0x01,
-       TAPI_NETWORK_DISP_PLMN = 0x02,
-       TAPI_NETWORK_DISP_SPN_PLMN = 0x03,
-}TelNetworkNameDispCondition_t;
-
-/**
- * @enum TelNetworkPrefNetType_t
- * This enumeration defines CDMA Preferred Network Type(CDMA only).
- */
-typedef enum
-{
-    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC = 0x01,               /**< 0x01 : AUTOMATIC */
-    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A,                    /**<  0x02 : AUTOMATIC A */
-    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B,                    /**<  0x03 : AUTOMATIC B */
-    TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY,                      /**<  0x04 : HOME ONLY */
-    TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY,                      /**<  0x05 : ROAM ONLY */
-} TelNetworkPrefNetType_t;
-
-/**
- * @enum TelNetworkPrlPrefOnly_t
- * This enumeration defines CDMA PRL Preferred Only field stored in the PRL(CDMA only).
- */
-typedef enum
-{
-    TAPI_NETWORK_PRL_PREF_ONLY_OFF,                    /**< Preferred Only is FALSE */
-    TAPI_NETWORK_PRL_PREF_ONLY_ON,                     /**< Preferred Only is TRUE */
-    TAPI_NETWORK_PRL_PREF_ONLY_NONE                    /**< There isn't Preferred Only Option */
-} TelNetworkPrlPrefOnly_t;
-
-/**
- * @enum TelNetworkCDMAHybridMode_t
- * This enumeration defines CDMA Hybrid Mode State(CDMA only).
- */
-typedef enum
-{
-    TAPI_NETWORK_CDMA_HYBRID = 0x01,   /**< 0x01 : HYBRID(1X + EVDO) */
-    TAPI_NETWORK_CDMA_1X_ONLY,         /**< 0x02 : 1X ONLY */
-    TAPI_NETWORK_CDMA_EVDO_ONLY,               /**< 0x03 : EVDO ONLY */
-}TelNetworkCDMAHybridMode_t;
-
-
-/**
- * This structure has information related to cdma system.
- */
-typedef struct {
-       TelNetworkServCarrierType_t carrier; /**< for CDMA, Optional */
-       unsigned short system_id; /**< for CDMA, Mandatory */
-       unsigned short network_id; /**< for CDMA, Mandatory */
-       unsigned short base_station_id; /**< for CDMA, Mandatory */
-       unsigned short base_station_latitude; /**< for CDMA, Mandatory */
-       unsigned short base_station_longitude; /**< for CDMA, Mandatory */
-       unsigned short registration_zone; /**< for CDMA, Optional */
-       unsigned short pilot_offset; /**< for CDMA, Optional */
-} TelNetworkCDMASysInfo_t;
-
-/**
- *
- * This structure defines the preferred plmn information.
- */
-typedef struct {
-       unsigned char Index; /**< Network Preferred Plmn list index */
-       char Plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1]; /**< Network Preferred Plmn */
-       char network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network Name  */
-       char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Service provider name */
-       TelNetworkSystemType_t SystemType; /**< Network system type */
-} TelNetworkPreferredPlmnInfo_t;
-
-/**
- *
- * This structure defines the preferred plmn list.
- */
-typedef struct {
-       unsigned int NumOfPrefPlmns; /**< Number of preferred plmns in the list */
-       TelNetworkPreferredPlmnInfo_t PrefPlmnRecord[TAPI_PREFERRED_PLMN_RECORDS_MAX]; /**< preferred plmns list */
-} TelNetworkPreferredPlmnList_t;
-
-/**
- *
- * This structure defines the location area code and cell id.
- */
-typedef struct {
-       unsigned short LocationAreaCode; /**< Network Location area code */
-       unsigned long CellId; /**< Network Cell Id */
-} TelNetworkLocationCellInfo_t;
-
-/**
- *
- * This structure defines the network status .
- */
-typedef struct {
-       unsigned char svctype; /**< Network svc type  */
-       unsigned char roaming; /**< Network roaming  */
-} TelNetworkStatus_t;
-
-/**
- *
- * This structure defines the network Cs,Ps status.
- */
-typedef struct {
-       unsigned char cstype; /**< Network Cs type  */
-       unsigned char pstype; /**< Network Ps type  */
-} TelNetworkCsPsStatus_t;
-
-/**
- *   TelNetworkIdentity_t
- * This structure defines the network identity.
- */
-typedef struct {
-       char network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network Name  */
-       char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Service provider name */
-       unsigned int plmn_id; /**< PLMN ID */
-       char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1]; /**< PLMN ID */
-       TelNetworkPlmnType_t type_of_plmn; /**< PLMN type */
-       TelNetworkSystemType_t access_technology; /**< Access technology  */
-} TelNetworkIdentity_t;
-
-/**
- *
- * This structure defines the network Plmn list.
- */
-typedef struct {
-       char networks_count; /**< Network Plmn count  */
-       TelNetworkIdentity_t network_list[TAPI_NETWORK_LIST_MAX]; /**< Network list  */
-} TelNetworkPlmnList_t;
-
-/**
- *
- * This structure defines the network display info.
- */
-typedef struct {
-       int DisplayInfo[TAPI_NETWORK_DISPLAY_INFO_ELEMENTS]; /**< Network display info  */
-} TelNetworkDisplayInfo_t;
-
-typedef struct {
-       TelNetworkNameDispCondition_t DispCondition; /*Display condition of SPN & PLMN*/
-       unsigned char Spn[TAPI_NETWORK_SPN_LEN_MAX + 1]; /*Spn value*/
-       unsigned char Plmn[TAPI_NETWORK_NAME_LEN_MAX + 1]; /*PLMN value,  In 2G case if DispPlmn is true and the PLMN value is null then Network module has to display registered PLMN*/
-} TelNetworkSpnPlmnDisplayInfo_t;
-
-/**
- *  * @struct TelNetworkSpnMccMncInfo_t
- * This structure defines the network Spn, Mcc and Mnc info.
- */
-typedef struct {
-       int mcc; /**< Network mcc  */
-       int mnc; /**< Network Mnc  */
-       char bDispCondition; /**<Display condition */
-       char short_network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network short Name  */
-       char spn_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network spn Name  */
-} TelNetworkSpnMccMncInfo_t;
-
-
-typedef struct {
-       TelNetworkSystemType_t act; /**< Access technology  */
-       char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
-       int lac;
-} TelNetworkServing_t;
-
-typedef struct {
-       int cell_id;    /* Cell ID (-1 indicates cell ID information not present)*/
-       int lac;                /* Location area code (this field is ignored when cell_id not present)*/
-       int bcch;               /* Broadcast Control Channel Frequency number */
-       int bsic;               /* Base Station Identification Code  */
-       int rxlev;              /* Received Signal Strength level. Valid values are (0-63, 99)
-                                        * Reference: 33GPP TS 45.008 [20] subclause 8.1.4
-                                          - Rxlev 0 is a signal strength less than -110 dBm
-                                      - Rxlev 1 is -110 dBm to -109 dBm
-                                      - Rxlev 2 is -109 dBm to -108 dBm
-                                      - ...
-                                      - Rxlev 62 is -49 dBm to -48 dBm
-                                      - Rxlev 63 is greater than -48 dBm
-                                      - Rxlev 99 is not known or not detectable
-                                    */
-} TelNetworkGeranNeighboringCellInfo_t;
-
-typedef struct {
-       int cell_id;    /* Cell ID (-1 indicates cell ID information not present)*/
-       int lac;                /* Location area code (this field is ignored when cell_id not present)*/
-       int arfcn;              /* UTRA Absolute RF Channel Number */
-       int psc;                /* Primary scrambling Code      */
-       int rscp;               /* Received Signal Code Power.  Valid values are (0-96, 255)
-                                        * Reference : 3GPP TS 25.133 [95] subclause 9.1.1.3 and 3GPP TS 25.123 [96] subclause 9.1.1.1.3)
-                                          - Rscp 0 is a signal strength less than -120 dBm
-                                      - Rscp 1 is -120 dBm to -119 dBm
-                                      - Rscp 2 is -119 dBm to -118 dBm
-                                      - ...
-                                      - Rscp 95 is -26 dBm to -25 dBm
-                                      - Rscp 96 is greater than -25 dBm
-                                      - Rscp 255 is not known or not detectable
-                                */
-} TelNetworkUmtsNeighboringCellInfo_t;
-
-typedef struct {
-       int geran_list_count;
-       TelNetworkGeranNeighboringCellInfo_t geran_list[TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX];
-       int umts_list_count;
-       TelNetworkUmtsNeighboringCellInfo_t umts_list[TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX];
-} TelNetworkNeighboringCellInfo_t;
-
-
-/**
- * NEW NEW NEW
- */
-struct tel_noti_network_registration_status {
-       int cs;
-       int ps;
-       int type;
-       int is_roaming;
-};
-
-struct tel_noti_network_info {
-       int rssi;
-       int battery;
-};
-
-struct tel_noti_network_cell_info {
-       int lac;
-       int cell_id;
-};
-
-struct tel_noti_network_change {
-       TelNetworkSystemType_t act; /**< Access technology  */
-       char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
-       int lac;
-};
-
-struct tel_noti_network_time_info {
-       int year;
-       int month;
-       int day;
-       int hour;
-       int minute;
-       int second;
-       int wday;
-       int gmtoff;
-       int dstoff;
-       int isdst;
-       char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
-};
-
-struct  tel_noti_network_identity {
-       char plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1];
-       char short_name[17];
-       char full_name[33];
-};
-
-struct tel_noti_network_neighboring_cell_info {
-       TelNetworkNeighboringCellInfo_t info;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _TEL_NETWORK_H_
-
-/**
-* @}
-*/
diff --git a/include/TelPower.h b/include/TelPower.h
deleted file mode 100644 (file)
index ffeb191..0000000
+++ /dev/null
@@ -1,96 +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.
- */
-
-/**
- * @internal
- * @ingroup            TelephonyAPI
- * @addtogroup POWER_TAPI      POWER
- * @{
- *
- * These APIs allow an application to accomplish the following services: @n
- * - Get current phone power status,  @n
- * - Reset the phone power (on / off), @n
- * - Get the Display Icon Information. @n
- */
-
-#ifndef _TEL_POWER_H_
-#define _TEL_POWER_H_
-
-#include <TelDefines.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * This defines the phone power reset commands.
- */
-typedef enum {
-       TAPI_PHONE_POWER_OFF = 0, TAPI_PHONE_POWER_ON, TAPI_PHONE_POWER_RESET,
-} tapi_power_phone_cmd_t;
-
-/**
- * This defines the phone power status values.
- */
-typedef enum {
-       TAPI_PHONE_POWER_STATUS_ON = 0, TAPI_PHONE_POWER_STATUS_OFF, TAPI_PHONE_POWER_STATUS_ERROR,
-} tapi_power_phone_power_status_t;
-
-/**
- * Use to Enter or Leave Flight Mode.
- *
- */
-typedef enum {
-       TAPI_POWER_FLIGHT_MODE_ENTER = 0x01, /**< ONLINE OFF */
-       TAPI_POWER_FLIGHT_MODE_LEAVE, /**< ONLINE ON */
-       TAPI_POWER_FLIGHT_MODE_MAX
-} tapi_power_flight_mode_type_t;
-
-typedef enum {
-       TAPI_POWER_FLIGHT_MODE_RESP_ON = 0x01, /**< Flight Mode On Success */
-       TAPI_POWER_FLIGHT_MODE_RESP_OFF, /**< Flight Mode Off Success */
-       TAPI_POWER_FLIGHT_MODE_RESP_FAIL, /**< Flight Mode Request Fail */
-       TAPI_POWER_FLIGHT_MODE_RESP_MAX
-} tapi_power_flight_mode_resp_type_t;
-
-/**
- * This enum defines the phone battery status levels.
- *
- * 0x01 : Power Off Level                     => PhoneLevel = power off
- * 0x02 : Critical-Low Battery Level          => PhoneLevel = 0
- * 0x03 : Low Battery Level                   => PhoneLevel = 1
- * 0x04 : Normal Level                        => PhoneLevel = 2,3,4
- */
-typedef enum {
-       TAPI_POWER_BATT_STAT_POWER_OFF_LEVEL = 0x01, /**< Power Off Level */
-       TAPI_POWER_BATT_STAT_CRIT_LOW_LEVEL = 0x02, /**< Critical-Low Battery Level */
-       TAPI_POWER_BATT_STAT_LOW_LEVEL = 0x03, /**< Low Battery Level */
-       TAPI_POWER_BATT_STAT_NORMAL_LEVEL = 0x04 /**< Normal Level */
-} tapi_power_battery_status_level_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TEL_POWER_H_ */
-
-/**
- * @}
- */
diff --git a/include/TelSat.h b/include/TelSat.h
deleted file mode 100644 (file)
index 203053f..0000000
+++ /dev/null
@@ -1,717 +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  SAT_TAPI        SAT
-* @{
-*
-* @file TelSat.h
-
-     @brief This file serves as a "C" header file defines structures for Telephony SAT Services. \n
-      It contains a sample set of constants, enums, structs that would be required by applications.
-
-
- */
-
-#ifndef _TEL_SAT_H_
-#define _TEL_SAT_H_
-
-#include <TelDefines.h>
-#include <TelCall.h>
-#include <TelSs.h>
-#include <TelSatObj.h>
-#include <TelSatProactvCmd.h>
-#include <TelSatEnvelope.h>
-#include <TelSim.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define TAPI_SAT_DEF_TITLE_LEN_MAX                     50 /**< max length for Menu Title */
-#define TAPI_SAT_DEF_ITEM_STR_LEN_MAX          50 /**< max length for Menu Item  */
-#define TAPI_SAT_DEF_TEXT_STRING_LEN_MAX       500 /**< max length for Text String  */
-#define TAPI_SAT_DEF_BIT_MASK_CONTACT          0x01 /**< Bit Mask for Contact */
-#define TAPI_SAT_DEF_BIT_MASK_MSG                      0x02 /**< Bit Mask for Msg */
-#define TAPI_SAT_DEF_BIT_MASK_OTHER                    0x04 /**< Bit Mask for Psh */
-#define TAPI_SAT_REFRESH_FILE_LIST                     20 /**< Refresh File List*/
-#define TAPI_SAT_DEF_SS_LEN_MAX             250
-#define TAPI_SAT_DEF_USSD_LEN_MAX           250
-
-//     Telephony UI USER CONFIRM TYPE
-/**
- * @enum TelSatUiUserConfirmType_t
- * This enumeration defines the UI User Confirm Type.
- */
-typedef enum
-{
-       TAPI_SAT_USER_CONFIRM_YES,                                              /**<This Enum Informs That user confirms yes */
-       TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL,                             /**<This enum informs that user confirms no/cancel */
-       TAPI_SAT_USER_CONFIRM_HELP_INFO,                                /**<This enum informs that user wants help information */
-       TAPI_SAT_USER_CONFIRM_END,                                              /**<This enum informs that user confirms end */
-       TAPI_SAT_USER_CONFIRM_TIMEOUT,                                  /**<This enum informs that user did not respond */
-}TelSatUiUserConfirmType_t;
-
-//     Telephony UI INKEY TYPE
-/**
- * @enum TelSatUiInkeyYesNoCaseType_t
- * This enumeration defines the UI Inkey Type Yes or No.
- */
-typedef enum
-{
-       TAPI_SAT_INKEY_CONFIRM_NO                               = 0x00,                 /**<No*/
-       TAPI_SAT_INKEY_CONFIRM_YES                              = 0x01,                 /**<Yes*/
-}TelSatUiInkeyYesNoCaseType_t;
-
-//     Telephony UI DISPLAY STATUS
-/**
- * @enum TelSatUiDisplayStatusType_t
- * This enumeration defines the UI Display Status.
- */
-typedef enum
-{
-       TAPI_SAT_DISPLAY_SUCCESS                                = 0x00,                                 /**<This enum informs  UI display success*/
-       TAPI_SAT_DISPLAY_FAIL                                   = 0x01,                                 /**<This enum informs  UI display failure*/
-}TelSatUiDisplayStatusType_t;
-
-//     TELEPHONY REFRESH APPLICATION TYPE
-/**
- * @enum TelSatRefreshAppType_t
- * This enumeration defines the Refresh Application Type.
- */
- typedef enum
-{
-       TAPI_SAT_REFRESH_CONTACT = 0x00,                                /**<refresh application type - Phonebook*/
-       TAPI_SAT_REFRESH_MSG,                                                   /**<refresh application type - SMS*/
-       TAPI_SAT_REFRESH_OTHER,                                                 /**<refresh application type - other*/
-       TAPI_SAT_REFRESH_MAX,                                                   /**<Maximum Enumeration Value*/
-}TelSatRefreshAppType_t;
-
-//     Telephony COMMAND PERFORMED RESULT
-/**
- * @enum TelSatCommandPerformResultType_t
- * This enumeration defines the Result of Proactive Command execution.
- */
-typedef enum
-{
-       TAPI_SAT_CMD_PERFORM_SUCCESS = 0x00,            /**<command performed successfully*/
-       TAPI_SAT_CMD_PERFORM_FAIL,                                      /**<command execution failed*/
-       TAPI_SAT_CMD_PERFORM_MAX,                                       /**<Maximum Enumeration Value*/
-}TelSatCommandPerformResultType_t;
-
-//     Telephony CALL CONTROL TYPE
-/**
- * @enum TelSatCallCtrlType_t
- * This enumeration defines Call Control Type.
- */
-typedef enum
-{
-       TAPI_SAT_CALL_CNF_NONE  = 0x00,         /**<call control confirm type - None*/
-       TAPI_SAT_CALL_CNF_CALL,                 /**<call control confirm type - call*/
-       TAPI_SAT_CALL_CNF_SS,                           /**<call control confirm type - ss*/
-       TAPI_SAT_CALL_CNF_USSD,                         /**<call control confirm type - ussd*/
-       TAPI_SAT_CALL_CNF_MAX,                          /**<Maximum Enumeration Value*/
-}TelSatCallCtrlType_t;
-
-//     SAT UI USER CONFIRMATION INFO
-/**
- * This structure defines the user confirmation data.
- */
-typedef struct
-{
-       int                                             commandId;                              /**<Proactive Command Number sent by USIM*/
-       TelSatCommandType_t             commandType;                    /**<Proactive Command Type*/
-       TelSatUiUserConfirmType_t       keyType;                                /**<User Response Type*/
-       unsigned char*                          pAdditionalData;                /**<Additional Data*/
-       int                                                     dataLen;                                /**<Additional Data Length*/
-}TelSatUiUserConfirmInfo_t;
-
-//     Telephony TEXT INFO
-/**
- * This structure defines the character data for sat engine data structure.
- */
-typedef struct
-{
-       unsigned short  stringLen;                                                                              /**<character data length*/
-       unsigned char           string[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1];             /**<character data*/
-}TelSatTextInfo_t;
-
-//     Telephony MAIN MENU TITLE INFO
-/**
- * This structure defines the main menu title to check sat menu.
- */
-typedef struct
-{
-       int                             bIsMainMenuPresent;             /**<flag to check sat main menu existence*/
-       TelSatTextInfo_t        mainMenuTitle;                  /**<main menu title data*/
-}TelSatMainMenuTitleInfo_t;
-
-//     Telephony DISPLAY TEXT DATA
-/**
- * This structure defines the display text proactive command for sat ui.
- */
-typedef struct
-{
-       int                                                     commandId;                                      /**<Proactive Command Number sent by USIM*/
-       TelSatTextInfo_t                                text;                                           /**<character data to display on screen*/
-       unsigned int                                    duration;                                       /**<the duration of display */
-       int                                                     bIsPriorityHigh;                        /**<indicates whether the text is to be displayed if some other app is using the screen.*/
-       int                                                     bIsUserRespRequired;            /**<indicates whether user response required or Not*/
-       int                                                     b_immediately_resp;
-       TelSatIconIdentifierInfo_t      iconId;                                         /**< Icon Identifier */
-}TelSatDisplayTextInd_t;
-
-//     Telephony INKEY DATA
-/**
- * This structure defines the get inkey proactive command data for sat ui.
- */
-typedef struct
-{
-       int                                                     commandId;                              /**<Proactive Command Number sent by USIM*/
-       TelSatInkeyType_t                               keyType;                                /**<input Type:Character Set or Yes/No*/
-       TelSatUseInputAlphabetType_t    inputCharMode;                  /**<input character mode(SMS default, UCS2)*/
-       int                                                     bIsNumeric;                             /**<is input character numeric(0-9, *, # and +)*/
-       int                                                     bIsHelpInfoAvailable;   /**<help info request flag*/
-       TelSatTextInfo_t                                text;                                   /**<character data to display on screen*/
-       unsigned int                                    duration;                               /**<the duration of display*/
-       TelSatIconIdentifierInfo_t              iconId;                                 /**<Icon Identifier*/
-}TelSatGetInkeyInd_t;
-
-//     Telephony GET INPUT DATA
-/**
- * This structure defines the get input proactive command data for sat ui.
- */
-typedef struct
-{
-       int                                                     commandId;                              /**<Proactive Command Number sent by USIM*/
-       TelSatUseInputAlphabetType_t    inputCharMode;                  /**<input character mode(SMS default, UCS2)*/
-       int                                                     bIsNumeric;                             /**<is input character numeric(0-9, *, # and +)*/
-       int                                                     bIsHelpInfoAvailable;   /**<flag for help info request */
-       int                                                     bIsEchoInput;                   /**<indicates whether to show input data on screen or not*/
-       TelSatTextInfo_t                                text;                                   /**<character data to display on screen*/
-       TelSatRespLenInfo_t                             respLen;                                /**<input data min, max length*/
-       TelSatTextInfo_t                                defaultText;                    /**<default input character data*/
-       TelSatIconIdentifierInfo_t              iconId;                                 /**<Icon Identifier*/
-}TelSatGetInputInd_t;
-
-//     Telephony PLAY TONE DATA
-/**
- * This structure defines the play tone proactive command data for application.
- */
-typedef struct
-{
-       int                                             commandId;      /**<Proactive Command Number sent by USIM*/
-       TelSatTextInfo_t                        text;           /**<character data to display on screen*/
-       TelSatToneInfo_t                        tone;           /**<tone info   */
-       unsigned int                            duration;       /**<the duration for playing tone*/
-       TelSatIconIdentifierInfo_t      iconId;         /**<Icon Identifier*/
-}TelSatPlayToneInd_t;
-
-//     Telephony UI info
-/**
- * This structure defines the data for sat ui.
- */
-typedef struct
-{
-       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
-       int                                             user_confirm;
-       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
-       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
-}TelSatSendUiInfo_t;
-
-//     Telephony MENU ITEM DATA FOR SETUP MENU
-/**
- * This structure defines the menu item info for setup menu.
- */
-typedef struct
-{
-       char itemString[TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6];     /**<menu item character data*/
-       char itemId;                                                                                    /**<identifies the item on the menu that user selected*/
-}TelSatMenuInfo_t;
-
-//     Telephony SETUP MENU INFO
-/**
- * This structure defines the sat main menu info.
- */
-typedef struct
-{
-       int commandId;  /**<Proactive Command Number sent by USIM*/
-       int     bIsMainMenuPresent;
-       char satMainTitle[TAPI_SAT_DEF_TITLE_LEN_MAX + 1];      /**<menu title text*/
-       TelSatMenuInfo_t satMainMenuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**< menu items*/
-       unsigned short satMainMenuNum;  /**<number of menu items*/
-       int     bIsSatMainMenuHelpInfo; /**<flag for help information request */
-       int     bIsUpdatedSatMainMenu;
-       TelSatIconIdentifierInfo_t iconId;      /**<Icon Identifier*/
-       TelSatIconIdentifierListInfo_t iconIdList;      /**<List of Icon Identifiers*/
-}TelSatSetupMenuInfo_t;
-
-//     Telephony SELECT ITEM DATA
-/**
- * This structure defines the select item proactive command data for sat ui.
- */
-typedef struct
-{
-       int                                                     commandId;                                                                      /**<Proactive Command Number sent by USIM*/
-       int                                                     bIsHelpInfoAvailable;                                           /**<flag for help information request*/
-       TelSatTextInfo_t                                text;                                                                           /**<menu title text*/
-       char                                                    defaultItemIndex;                                                       /**<selected default item - default value is 0*/
-       char                                                    menuItemCount;                                                          /**<number of menu items*/
-       TelSatMenuItemInfo_t                    menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX];         /**<menu items*/
-       TelSatIconIdentifierInfo_t              iconId;                                                                         /**<Icon Identifier*/
-       TelSatIconIdentifierListInfo_t  iconIdList;                                                                     /**<List of Icon Identifiers*/
-
-}TelSatSelectItemInd_t;
-
-//     Telephony IDLE MODE TEXT DATA
-/**
- * This structure defines the setup idle mode text proactive command for idle application.
- */
-typedef struct
-{
-       int                                             commandId;                      /**<Proactive Command Number sent by USIM*/
-       TelSatTextInfo_t                        text;                           /**<character data to display on screen*/
-       TelSatIconIdentifierInfo_t      iconId;
-} TelSatSetupIdleModeTextInd_t;
-
-//     Telephony REFRESH DATA
-/**
- * This structure defines the refresh proactive command data for sat ui.
- */
-typedef struct
-{
-       int                                                     commandId;                      /**<Proactive Command Number sent by USIM*/
-       unsigned int                            duration;                       /**<the duration of display*/
-       TelSatCmdQualiRefresh_t         refreshType;            /**<refresh mode*/
-}TelSatRefreshIndUiInfo_t;
-
-//     Telephony REFRESH DATA
-/**
- * This structure defines the refresh proactive command data for applications which are concerned with files resident on USIM .
- */
-typedef struct
-{
-       int                                             commandId;                                                              /**<Proactive Command Number sent by USIM*/
-       TelSatRefreshAppType_t          appType;                                                                /**<concerned application type */
-       TelSatCmdQualiRefresh_t         refreshMode;                                                    /**<refresh mode*/
-       unsigned char                                   fileCount;                                                              /**<refresh file count*/
-       TelSimFileID_t                          fileId[TAPI_SAT_REFRESH_FILE_LIST];             /**<refresh file identifier*/
-}TelSatRefreshInd_t;
-
-//     Telephony END PROACTIVE COMMAND INFO
-/**
- * This structure defines the data objects to indicate to sat ui, the end of execution of a specific proactive command by other application.
- */
-typedef struct
-{
-       int                                                                     commandId;                      /**<Proactive Command Number sent by USIM*/
-       char                                                                    commandType;            /**< Command Type*/
-       TelSatCommandPerformResultType_t                result;                         /**<result of command execution by application*/
-}TelSatProactiveCmdEndIndInfo_t;
-
-//     Telephony SEND SMS DATA
-/**
- * This structure defines the send sms proactive command data for sms application.
- */
-typedef struct
-{
-       int                                     commandId;                              /**<Proactive Command Number sent by USIM*/
-       int                                     bIsPackingRequired;             /**<flag to check if packing required for sms tpdu*/
-       TelSatAddressInfo_t     address;                                /**<destination address*/
-       TelSatSmsTpduInfo_t     smsTpdu;                                /**<SMS TPDU data*/
-} TelSatSendSmsIndSmsData_t;
-
-//     Telephony SEND SS DATA
-/**
- * This structure defines the send ss proactive command data for ss application.
- */
-typedef struct
-{
-       int                                     commandId;              /**<Proactive Command Number sent by USIM*/
-       unsigned short          ssStringLen;
-       unsigned char           ssString[TAPI_SAT_DEF_SS_LEN_MAX+1];
-}TelSatSendSsIndSsData_t;
-
-//     Telephony USSD DATA
-/**
- * This structure defines the send ussd proactive command data for ussd application.
- */
-typedef struct
-{
-       int                     commandId;              /**<Proactive Command Number sent by USIM*/
-       unsigned char           rawDcs;                 /**<data coding scheme*/
-       unsigned short          ussdStringLen;
-       unsigned char           ussdString[TAPI_SAT_DEF_USSD_LEN_MAX+1];
-}TelSatSendUssdIndUssdData_t;
-
-//     Telephony SEND DTMF DATA
-/**
- * This structure defines the send dtmf proactive command data for dtmf application.
- */
-typedef struct
-{
-       int                                     commandId;                      /**<Proactive Command Number sent by USIM*/
-       int                                     bIsHiddenMode;          /**<hidden mode flag*/
-       TelSatTextInfo_t                dtmfString;                     /**<dtmf string data*/
-}TelSatSendDtmfIndDtmfData_t;
-
-//     Telephony SETUP CALL  DATA
-/**
- * This structure defines the setup call proactive command data for call application.
- */
-typedef struct
-{
-       int                                                     commandId;              /**<Proactive Command Number sent by USIM*/
-       TelSatCmdQualiSetupCall_t               calltype;                       /**<call type*/
-       TelSatTextInfo_t                                dispText;                       /**<display data for calling*/
-       TelSatTextInfo_t                                callNumber;             /**<call number*/
-       unsigned int                                    duration;                       /**<maximum repeat duration*/
-       TelSatIconIdentifierInfo_t              iconId;                 /**<icon identifier for call application*/
-}TelSatSetupCallIndCallData_t;
-
-//     Telephony LAUNCH BROWSER DATA
-/**
- * This structure defines the launch browser proactive command data for browser application.
- */
-typedef struct
-{
-       int                                                     commandId;              /**<Proactive Command Number sent by USIM*/
-       TelSatUrlInfo_t                                 url;                    /**<url to connect*/
-       TelSatCmdQualiLaunchBrowser_t   launchType;             /**<launch type*/
-       TelSatBrowserIdentityType_t     IdentityType;   /**<Browser Identity -default, html, etc*/
-}TelSatLaunchBrowserIndBrowserData_t;
-
-//     Telephony PROVIDE LOCAL INFO DATA
-/**
- * This structure defines the provide local info proactive command data for application.
- */
-typedef struct
-{
-       int commandId;                                                                          /**<Proactive Command Number sent by USIM*/
-       TelSatCmdQualiProvideLocalInfo_t localInfoType;         /**<Provide Local Information Type*/
-}TelSatProvideLocalInfoInd_t;
-
-//     Telephony LANGUAGE NOTIFICATION DATA
-/**
- * This structure defines the language notification proactive command data for application.
- */
-typedef struct
-{
-       int                                                     commandId;                                              /**<Proactive Command Number sent by USIM*/
-       int                                                     bSpecificLanguageNotification;  /**<flag for checking specific language notification. if FALSE, non-specific language notification      */
-       TelSatLanguageInfo_t                    language;                                       /**<language info from USIM application */
-}TelSatLanguageNotiInfoInd_t;
-
-//     Telephony PLAY TONE RETURN INFO
-/**
- * This structure defines the return result data for Play Tone proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t      resp;                   /**<result response value*/
-}TelSatSetupMenuRetInfo_t;
-
-//     Telephony REFRESH RETURN INFO
-/**
- * This structure defines the return result data for refresh proactive command.
- */
-typedef struct
-{
-       TelSatRefreshAppType_t  appType;                        /**<application type*/
-       TelSatResultType_t              resp;                           /**<result response value*/
-}TelSatRefreshRetInfo_t;
-
-//     Telephony CALL RETURN INFO
-/**
- * This structure defines the return result data for setup call proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t                              resp;                                                   /**<result response value*/
-       int                                                     bIsTapiCauseExist;                              /**<flag for checking tapi error cause */
-       TelCallCause_t                                  tapiCause;                                              /**<tapi call error cause*/
-       TelSsCause_t                                            ssCause;                                                /**<tapi ss error cause*/
-       TelSatMeProblemType_t                           meProblem;                                              /**<me problem error cause*/
-       int                                                             bIsOtherInfoExist;                              /**<call control result existence flag*/
-       TelSatCallCtrlProblemType_t             permanentCallCtrlProblem;               /**<call control problem type*/
-       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<call control request data*/
-       TelSatResultInfo_t                      result2;                                                /**<call control envelope result value*/
-       TelSatTextTypeInfo_t                    text;                                                   /**<call control envelope display data*/
-}TelSatCallRetInfo_t;
-
-//     Telephony SS RETURN INFO
-/**
- * This structure defines the return result data for send ss proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t                              resp;                                                   /**<result response value*/
-       TelSsCause_t                                            ssCause;                                                /**<error - ss cause*/
-       TelSatTextInfo_t                                        ssString;                                               /**<ss result string*/
-       TelSatMeProblemType_t                   meProblem;                                              /**<error - me problem*/
-       int                                                             bIsOtherInfoExist;                              /**<call control result exist flag*/
-       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**<call control problem*/
-       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<call control request data*/
-       TelSatResultInfo_t                                      result2;                                                /**<call control envelope result value*/
-}TelSatSsRetInfo_t;
-
-//     Telephony USSD RETURN INFO
-/**
- * This structure defines the return result data for send ussd proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t                                      resp;                                                   /**<result response value*/
-       TelSsCause_t                                            ssCause;                                                /**<error - ss cause*/
-       TelSatTextInfo_t                                        ussdString;                                             /**<ussd result string*/
-       TelSatDataCodingSchemeInfo_t            dcsUssdString;                                  /**<dcs of ussd result string */
-       TelSatMeProblemType_t                           meProblem;                                              /**<error - me problem*/
-       int                                                             bIsOtherInfoExist;                              /**<call control result exist flag*/
-       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**<call control problem*/
-       int                                                             bCallCtrlHasModification;               /**<call control request modification flag*/
-       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<call control request data*/
-       TelSatResultInfo_t                                      result2;                                                /**<call control envelope result value*/
-       TelSatTextTypeInfo_t                            text2;                                                  /**<cc envelope display data */
-}TelSatUssdRetInfo_t;
-
-//     Telephony SMS RETURN INFO
-/**
- * This structure defines the return result data for send sms proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t      resp;                   /**<result response value*/
-}TelSatSmsRetInfo_t;
-
-//     Telephony DTMF RETUEN INFO
-/**
- * This structure defines the return result data for send dtmf proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t      resp;                   /**<result response value*/
-}TelSatDtmfRetInfo_t;
-
-//     Telephony BROWSER RETURN INFO
-/**
- * This structure defines the return result data for launch browser proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t                                      resp;                   /**<result response value*/
-       TelSatLaunchBrowserProblemType_t    browserProblem;     /**<specific browser problem*/
-}TelSatBrowserRetInfo_t;
-
-//     Telephony SETUP IDLE MODE TEXT RETURN INFO
-/**
- * This structure defines the return result data for setup idle mode text proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t      resp;                   /**<result response value*/
-}TelSatIdleTextRetInfo_t;
-
-//     Telephony PLAY TONE RETURN INFO
-/**
- * This structure defines the return result data for Play Tone proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t      resp;                   /**<result response value*/
-}TelSatPlayToneRetInfo_t;
-
-//     Telephony  PROVIDE LOCAL INFO RETURN INFO
-/**
- * This structure defines the return result data for setup idle mode text proactive command.
- */
-typedef struct
-{
-       TelSatResultType_t                                      resp;                   /**<result response value*/
-       int                                                             bOtherInfo;             /**<flag to check whether other information are required or not */
-       TelSatCmdQualiProvideLocalInfo_t        infoType;               /**<local info type - e.g. time zone or language info, etc      */
-       union
-       {
-               TelSatDataTimeZoneInfo_t                timeZoneInfo;   /**<    current time zone info  */
-               TelSatLanguageInfo_t                    languageInfo;   /**<    current ME language setting info        */
-       }u;                                                                                                     /**<    Union*/
-}TelSatProvideLocalRetInfo_t;
-
-//     Telephony LANGUAGE NOTI RETURN INFO
-/**
- * This structure defines the return result data for setup idle mode text proactive command.
- */
-typedef struct
-       {
-               TelSatResultType_t               resp;                          /**<result response value*/
-       }TelSatLanguageNotiRetInfo_t;
-
-//     Telephony DISPLAY TEXT RETURN INFO
-/**
- * This structure defines the return result data for setup idle mode text proactive command.
- */
-typedef struct
-       {
-               TelSatResultType_t               resp;                          /**<result response value*/
-               TelSatMeProblemType_t    meProblem;                     /**<Me Problem Type */
-       }TelSatDiplayTextRetInfo_t;
-
-//     Telephony APPLICATIONS RETURN DATA
-/**
- * This structure defines the common return result data for applications proactive command.
- */
-typedef struct
-{
-       TelSatCommandType_t     commandType;                                            /**<Proactive Command type*/
-       int commandId;                                                                                  /**<Proactive Command Number sent by USIM*/
-       union
-               {
-                       TelSatSetupMenuRetInfo_t        setupMenu;                      /**<result response value for setup menu*/
-                       TelSatRefreshRetInfo_t          refresh;                                /**<result response value for refresh*/
-                       TelSatCallRetInfo_t                     setupCall;                              /**<result response value for setup call*/
-                       TelSatSsRetInfo_t                       sendSs;                                 /**<result response value for send ss*/
-                       TelSatUssdRetInfo_t                     sendUssd;                               /**<result response value for send ussd*/
-                       TelSatSmsRetInfo_t                      sendSms;                                /**<result response value for send sms*/
-                       TelSatDtmfRetInfo_t                     sendDtmf;                               /**<result response value for send dtmf*/
-                       TelSatBrowserRetInfo_t          launchBrowser;                  /**<result response value for launch browser*/
-                       TelSatIdleTextRetInfo_t         setupIdleModeText;              /**<result response value for setup idle mode text*/
-                       TelSatLanguageNotiRetInfo_t     languageNoti;                   /**<result response value for language notification*/
-                       TelSatProvideLocalRetInfo_t provideLocalInfo;           /**<result response value for provide local info*/
-                       TelSatDiplayTextRetInfo_t   displayText;                        /**<result response value for dsiplay text*/
-                       TelSatPlayToneRetInfo_t     playTone;                           /**<result response value for play tone*/
-               }appsRet;                                                                                               /**< common union result value */
-}TelSatAppsRetInfo_t;
-
-//     Telephony CALL CONTROL CONFIRM  DATA FOR CALL
-/**
- * This structure defines the call control confirm data for call.
- */
-typedef struct
-{
-       TelSatTextInfo_t                                address;                                        /**< call destination address*/
-       TelSatTextInfo_t                                subAddress;                                     /**< call SUB address*/
-       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;                      /**< bc repeat indicator*/
-       TelSatTextInfo_t                                ccp1;                                           /**< Configuration Capability Parameter 1*/
-       TelSatTextInfo_t                                ccp2;                                           /**< Configuration Capability Parameter 2*/
-} TelSatCallCtrlIndCallData_t;
-
-//     Telephony CALL CONTROL CONFIRM  DATA FOR SS
-/**
- * This structure defines the call control confirm data for ss.
- */
-typedef struct
-{
-       TelSatTextInfo_t                                ssString;                                       /**< ss destination address*/
-       TelSatTextInfo_t                                subAddress;                                     /**< call SUB address*/
-       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;                      /**< bc repeat indicator*/
-       TelSatTextInfo_t                                ccp1;                                           /**< Configuration Capability Parameter 1*/
-       TelSatTextInfo_t                                ccp2;                                           /**< Configuration Capability Parameter 2*/
-} TelSatCallCtrlIndSsData_t;
-
-//     Telephony CALL CONTROL CONFIRM  DATA FOR USSD
-/**
- * This structure defines the call control confirm data for ussd.
- */
-typedef struct
-{
-       TelSatTextInfo_t                ussdString;                     /**< ussd destination address*/
-} TelSatCallCtrlIndUssdData_t;
-
-//     Telephony READ FILE REQUEST DATA
-/**
- * This structure defines the common call control confirm data.
- */
-typedef struct
-{
-       TelSatCallType_t                        callCtrlCnfType;                                /**<call control confirm type - call, ss or ussd*/
-       TelSatCallCtrlResultType_t      callCtrlResult;                                 /**<call control result*/
-       TelSatTextInfo_t                        dispData;                                               /**<call control display data*/
-       int                                             bIsUserInfoDisplayEnabled;              /**<flag for checking existence of call control display */
-
-       union
-               {
-                       TelSatCallCtrlIndCallData_t             callCtrlCnfCallData;    /**<call control call address*/
-                       TelSatCallCtrlIndSsData_t               callCtrlCnfSsData;              /**<call control ss string*/
-                       TelSatCallCtrlIndUssdData_t             callCtrlCnfUssdData;    /**<call control ussd string*/
-               }u;                                                                                                                             /**<   Union*/
-} TelSatCallCtrlIndData_t;
-
-//     Telephony MO SMS CONTROL CONFIRMATION DATA
-/**
- * This structure defines the mo sms control confirm data.
- */
-typedef struct
-{
-       TelSatCallCtrlResultType_t              moSmsCtrlResult;                        /**<envelope result*/
-       int                                                             bIsUserInfoDisplayEnabled;      /**<display present flag*/
-       TelSatTextTypeInfo_t                    dispData;                                       /**<display data for sending SMS*/
-       TelSatTextTypeInfo_t                    rpDestAddr;                             /**<the RP_Destination_Address of the Service Center */
-       TelSatTextTypeInfo_t                    tpDestAddr;                                     /**<the TP_Destination_Address */
-} TelSatMoSmCtrlIndData_t;
-
-//     Telephony EVENT LIST INFO
-/**
- * This structure defines the Event List Info.
- */
-typedef struct
-{
-       int bIsEventDownloadActive;                     /**<Is Event Download Active*/
-       int bIsMtCallEvent;                                     /**<Is Mt Call Event*/
-       int bIsCallConnected;                           /**<Is Call Connected*/
-       int bIsCallDisconnected;                        /**<Is Call Disconnected*/
-       int bIsLocationStatus;                          /**<Is Location Status*/
-       int bIsUserActivity;                            /**<Is User Activity*/
-       int bIsIdleScreenAvailable;                     /**<Is Idle Screen Available*/
-       int bIsCardReaderStatus;                        /**<Is Card Reader Status*/
-       int bIsLanguageSelection;                       /**<Is Language Selection*/
-       int bIsBrowserTermination;                      /**<Is Browser Termination*/
-       int bIsDataAvailable;                           /**<Is Data Available*/
-       int bIsChannelStatus;                           /**<Is Channel Status*/
-}      TelSatEventListData_t;
-
-/**
- * This is the structure to be used by the Application to send envelope/event download data.
- * This contains the data structures to be used to send any envelope/event download data.
- */
-typedef struct
-{
-       TelSatEventDownloadType_t                                       eventDownloadType;                              /**<    eventDownload Type      */
-
-       union
-       {
-               int                                                                     bIdleScreenAvailable;                   /**<flag to specify whether Idle Screen is Available or not*/
-               TelSatLanguageSelectionEventReqInfo_t   languageSelectionEventReqInfo;  /**<Selected Language Information*/
-               TelSatBrowserTerminationEventReqInfo_t  browserTerminationEventReqInfo; /**<BrowserTermination Event Information        */
-               TelSatDataAvailableEventReqInfo_t               dataAvailableEventReqInfo;              /**<dataAvailableEventReqInfo   */
-               TelSatChannelStatusEventReqInfo_t               channelStatusEventReqInfo;              /**<channelStatusEventReqInfo   */
-       } u;                                                                                                                                            /**<Union*/
-} TelSatEventDownloadReqInfo_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TEL_SAT_H_ */
-
-/**
-* @}
-*/
diff --git a/include/TelSatEnvelope.h b/include/TelSatEnvelope.h
deleted file mode 100644 (file)
index 0232bff..0000000
+++ /dev/null
@@ -1,225 +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  SAT_TAPI        SAT
-* @{
-*
-* @file TelSatEnvelope.h
-
-     @brief This file serves as a "C" header file defines structures for Tapi Sat envelope command Services. \n
-      It contains a sample set of constants, enums, structs that would be required by applications.
- */
-
-#ifndef _TEL_SAT_ENVELOPE_H_
-#define _TEL_SAT_ENVELOPE_H_
-
-#include <TelSatObj.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- * @enum TelSatCallType_t
- * This enum indicates the SAT call type
- */
-typedef enum
-{
-       TAPI_SAT_CALL_TYPE_MO_VOICE = 0X00,     /**<    call type -  mo voice   */
-       TAPI_SAT_CALL_TYPE_MO_SMS,                      /**<    call type - mo sms      */
-       TAPI_SAT_CALL_TYPE_SS,                          /**<    call type -  ss */
-       TAPI_SAT_CALL_TYPE_USSD,                        /**<    call type -  ussd       */
-       TAPI_SAT_PDP_CNTXT_ACT,                         /**<    call type -  pdp context action */
-       TAPI_SAT_CALL_TYPE_MAX                          /**<    call type -  max        */
-}TelSatCallType_t;
-
-/**
- * @enum TelSatCallCtrlResultType_t
- * This enum indicates the result of call control by SIM.
- */
-typedef enum
-{
-       TAPI_SAT_CALL_CTRL_R_ALLOWED_NO_MOD                     = 0,            /**<    call control result type -  ALLOWED WITH NO MOD */
-       TAPI_SAT_CALL_CTRL_R_NOT_ALLOWED                        = 1,            /**<    call control result type -  NOT ALLOWED */
-       TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD           = 2,            /**<    call control result type -  ALLOWED WITH MOD    */
-       TAPI_SAT_CALL_CTRL_R_RESERVED                           = 0xFF          /**<    call control result type -  RESERVED    */
-
-} TelSatCallCtrlResultType_t;
-
-/**
- * @enum TelSatEnvelopeResp_t
- * This enum indicates the general result of sending an envelope command to USIM.
- */
-typedef enum
-{
-       TAPI_SAT_ENVELOPE_SUCCESS,      /**<    envelope result - success       */
-       TAPI_SAT_ENVELOPE_SIM_BUSY,     /**<    envelope result - USIM busy     */
-       TAPI_SAT_ENVELOPE_FAILED        /**<    envelope result - failed        */
-
-}TelSatEnvelopeResp_t;
-
-//     8.      MENU SELECTION
-/**
- * This structure contains the data objects for MENU SELECTION envelope.
- */
-typedef struct
-{
-       unsigned char           itemIdentifier;         /**<    menu selection item identifier  */
-       int                             bIsHelpRequested;       /**<    flag to check whether help information required or not  */
-} TelSatMenuSelectionReqInfo_t;
-
-//     9.1 CALL CONTROL BY SIM
-/**
- * This struct contains the data objects for Call Control result data sent by USIM.
- */
-typedef struct
-{
-       TelSatAddressInfo_t                             address;                        /**<    call number     */
-       TelSatSubAddressInfo_t                  subAddress;                     /**<    call number sub address */
-       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;      /**<    bc repeat indicator */
-       TelSatCapaConfigParamInfo_t             ccp1;                           /**<    capability configuration parameter1     */
-       TelSatCapaConfigParamInfo_t             ccp2;                           /**<    capability configuration parameter2     */
-}TelSatVoiceCallCtrlIndInfo_t;
-
-/**
- * This struct contains SAT ss control result data sent by USIM.
- */
-typedef struct
-{
-       TelSatSsStringInfo_t                    ssString;                       /**<    ss number       */
-       TelSatSubAddressInfo_t                  subAddress;                     /**<    ss sub address */
-       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;      /**<    bc repeat indicator     */
-       TelSatCapaConfigParamInfo_t             ccp1;                           /**<    capability configuration parameter1     */
-       TelSatCapaConfigParamInfo_t             ccp2;                           /**<    capability configuration parameter2     */
-}TelSatSsCtrlIndInfo_t;
-
-/**
- * This struct contains SAT mo SMS control configuration data
- */
-typedef struct
-{
-       TelSatAddressInfo_t             rpDestAddress;  /**<    sms control rp destination address      */
-       TelSatAddressInfo_t             tpDestAddress;  /**<    sms control tp destination address      */
-} TelSatMoSmsCtrlIndInfo_t;
-
-/**
- * This struct contains SAT call control configuration data
- */
-typedef struct
-{
-       TelSatCallType_t                                        callType;               /**<    call type       */
-       TelSatCallCtrlResultType_t                      callCtrlResult; /**<    call control result     */
-       TelSatAlphaIdentifierInfo_t                     alphaIdentifier;/**<    alpha identifier        */
-       unsigned char                                           callId;                 /**<    call id */
-       TelSatCallType_t                                        oldCallType;    /**<    old call type   */
-       union
-       {
-               TelSatVoiceCallCtrlIndInfo_t    voiceCallData;  /**<    voice call control data */
-               TelSatSsCtrlIndInfo_t                   ssData;                 /**<    ss control data */
-               TelSatMoSmsCtrlIndInfo_t                smsData;
-       }u;                                                                                                     /**<    Union           */
-} TelSatCallCtrlIndInfo_t;
-
-//     9.2 MO SHORT MESSAGE CONTROL BY SIM RESULT
-/**
- * This struct contains SAT mo ss control request data
- */
- typedef struct
-{
-       TelSatCallCtrlResultType_t              callCtrlResult;         /**<    call control result     */
-       TelSatAlphaIdentifierInfo_t             alphaIdentifier;        /**<    alpha identifier        */
-       TelSatMoSmsCtrlIndInfo_t                smsData;                        /**<    sms control data        */
-}TelSatMoSMCtrlResult_t;
-
-//     11.5 EVENT DOWNLOAD - USER ACTIVITY EVENT
-/**
- * This struct contains SAT user activity event request data
- */
-typedef struct
-{
-       TelSatEventListInfo_t                           eventList;                      /**<    event List      */
-       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info  */
-
-} TelSatUserActivityEventReqInfo_t;
-
-//     11.6 EVENT DOWNLOAD - IDLE SCREEN AVAILABLE EVENT
-/**
- * This structure contains the data objects for IDLE SCREEN AVAILABLE event download.
- */
-typedef struct
-{
-       TelSatEventDownloadType_t       eventData;      /**<    event type      */
-} TelSatIdleScreenAvailableEventReqInfo_t;
-
-//     11.8 EVENT DOWNLOAD - LANGUAGE SELECTION EVENT
-/**
- * This structure contains the data objects for LANGUAGE SELECTION event download.
- */
-typedef struct
-{
-       TelSatLanguageType_t     language;              /**<    selected language info  */
-} TelSatLanguageSelectionEventReqInfo_t;
-
-//     11.9 EVENT DOWNLOAD - BROWSER TERMINATION EVENT
-/**
- * This structure contains the data objects for BROWSER TERMINATION event download.
- */
-typedef struct
-{
-       TelSatBrowserTerminationCauseType_t             browserTerminationCause;        /**<    browser Termination Cause       */
-} TelSatBrowserTerminationEventReqInfo_t;
-
-//     11.10 EVENT DOWNLOAD - DATA AVAILABLE EVENT
-/**
- * This struct contains SAT data available event request data
- */
-typedef struct
-{
-       TelSatEventListInfo_t                   eventList;                      /**<    event List      */
-       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**<    device identities info  */
-       TelSatChannelStatusInfo_t               channelStatus;          /**<    channel status  */
-       TelSatChannelDataLengthInfo_t   channelDataLen;         /**<    channel data length     */
-
-} TelSatDataAvailableEventReqInfo_t;
-
-//     11.11 EVENT DOWNLOAD - CHANNEL STATUS EVENT
-/**
- * This struct contains SAT channel status even request data
- */
-typedef struct
-{
-       TelSatEventListInfo_t                   eventList;                      /**<    event list      */
-       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**<    device identities info  */
-       TelSatChannelStatusInfo_t               channelStatus;          /**<    channel Status  */
-} TelSatChannelStatusEventReqInfo_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TEL_SAT_ENVELOPE_H_ */
-
-/**
- * @}
- */
diff --git a/include/TelSatObj.h b/include/TelSatObj.h
deleted file mode 100644 (file)
index 7c75233..0000000
+++ /dev/null
@@ -1,1399 +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         SAT_TAPI        SAT
- * @{
- *
- * @file TelSatObj.h
-
- @brief This file serves as a "C" header file defines structures for Telephony SAT Services. \n
- It contains a sample set of constants, enums, structs that would be required by applications.
- */
-
-#ifndef _TEL_SAT_OBJ_H_
-#define _TEL_SAT_OBJ_H_
-
-#include <TelDefines.h>
-#include <TelSim.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define EXTENDED_ASCII 1
-
-#define TAPI_SAT_DIALLING_NUMBER_LEN_MAX                               200      /**<   max length of dialing number            */
-#define TAPI_SAT_ALPHA_ID_LEN_MAX                                              255      /**<   max length of  alpha identifier         */
-#define TAPI_SAT_TEXT_STRING_LEN_MAX                                   500      /**<   max length of text string -when the string data is in 7Bit packed format, this length is not enough to support the maximum size so should increase the value to a value > 275 */
-#define TAPI_SAT_SUB_ADDR_LEN_MAX                                              30       /**<   max length of sub address               */
-#define TAPI_SAT_CCP_DATA_LEN_MAX                                              30       /**<   max length of ccp data          */
-#define TAPI_SAT_ITEM_TEXT_LEN_MAX                                             45       /**<   max length of item text                 */
-#define TAPI_SAT_SMS_TPDU_SMS_DATA_LEN_MAX                             175      /**<   max length of sms tpdu data             */
-#define TAPI_SAT_SS_STRING_LEN_MAX                                             160      /**<   max length of ss string         */
-#define TAPI_SAT_USSD_STRING_LEN_MAX                                   255      /**<   max length of ussd string               */
-#define TAPI_SAT_FILE_ID_LIST_MAX_COUNT                                        255      /**<   max count of file id list               */
-#define TAPI_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT 50       /**<   max count of items next action indication list  */
-#define TAPI_SAT_EVENT_LIST_MAX_COUNT                                  17       /**<   max count of sat event list             */
-#define TAPI_SAT_IMG_INSTANT_RAW_DATA_LEN_MAX                  256      /**<   max length of image instant raw         */
-#define TAPI_SAT_CLUT_DATA_LEN_MAX                                             256      /**<   max length of clut data                 */
-#define TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX                            50       /**<   max length of image data file name (Icon, CLUT)         */
-#define TAPI_SAT_ICON_LIST_MAX_COUNT                                   50       /**<   max count of icon list          */
-#define TAPI_SAT_DTMF_STRING_LEN_MAX                                   30       /**<   max length of dtmf string               */
-#define TAPI_SAT_DATE_TIME_AND_TIME_ZONE_LEN                   7        /**<   max length of date time and time zone           */
-#define TAPI_SAT_URL_LEN_MAX                                                   129      /**<   max length of url               */
-#define TAPI_SAT_BEARER_LIST_MAX_COUNT                                 50       /**<   max count of bearer list                */
-#define TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX                        50       /**<   max length of provisioning file path    */
-#define TAPI_SAT_BEARER_PARAMS_LEN_MAX                                 10       /**<   max length of bearer parameters                 */
-#define TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX                   255      /**<   max length of channel data string               */
-#define TAPI_SAT_CHANNEL_STATUS_LEN                                            2        /**<   max length of channel status            */
-#define TAPI_SAT_CHANNEL_ID_LEN                                                        3        /**<   max length of channel id                */
-#define TAPI_SAT_OTHER_ADDR_LEN_MAX                                            30       /**<   max length of other address             */
-#define TAPI_SAT_PORT_NUMBER_LEN                                               2        /**<   max length of port number               */
-#define TAPI_SAT_NET_ACC_NAM_LEN_MAX                                   30       /**<   max length of net acc name              */
-#define TAPI_SAT_AID_LEN_MAX                                                   128      /**<   max length of aid               */
-#define TAPI_SAT_REMOTE_ENTITY_ADDR_LEN_MAX                            50       /**<   max length of remote entity address     */
-#define TAPI_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT   50       /**<   max count of item text attributes list          */
-#define TAPI_SAT_MCC_CODE_LEN                                                  3        /**<   max length of mcc               */
-#define TAPI_SAT_MNC_CODE_LEN                                                  3        /**<   max length of mnc               */
-#define TAPI_SAT_LAC_CODE_LEN                                                  2        /**<   max length of lac               */
-#define TAPI_SAT_CELL_ID_LEN                                                   2        /**<   max length of cell id   */
-
-/**
- * @enum TelSatAlphabetFormatType_t
- * This enum lists the Alphabet Format.
- */
-typedef enum {
-       TAPI_SAT_ALPHABET_FORMAT_SMS_DEFAULT = 0x00, /**<       ALPHABET FROMAT SMS DEFAULT             */
-       TAPI_SAT_ALPHABET_FORMAT_8BIT_DATA = 0x01, /**< ALPHABET FROMAT 8BIT DATA               */
-       TAPI_SAT_ALPHABET_FORMAT_UCS2 = 0x02, /**<      ALPHABET FROMAT UCS2            */
-       TAPI_SAT_ALPHABET_FORMAT_RESERVED = 0x03 /**<   ALPHABET FROMAT RESERVED                */
-} TelSatAlphabetFormatType_t;
-
-/**
- * @enum TelSatMsgClassType_t
- * This enum lists the message class.
- */
-typedef enum {
-       TAPI_SAT_MSG_CLASS_NONE = 0x00, /**<    none    */
-       TAPI_SAT_MSG_CLASS_0 = 0x01, /**<       class 0                 */
-       TAPI_SAT_MSG_CLASS_1, /**<      class 1 Default meaning:ME-specific             */
-       TAPI_SAT_MSG_CLASS_2, /**<      class 2 SIM specific message            */
-       TAPI_SAT_MSG_CLASS_3, /**<      class 3 Default meaning: TE specific            */
-       TAPI_SAT_MSG_CLASS_RESERVED = 0xFF /**< class reserved          */
-} TelSatMsgClassType_t;
-
-/**
- * @enum TelSatCommandType_t
- * This enum lists the type of command and the next action indicator.
- */
-typedef enum {
-       TAPI_SAT_CMD_TYPE_NONE = 0x00, /**<     command type - None             */
-
-       TAPI_SAT_CMD_TYPE_REFRESH = 0x01, /**<  command type - refresh          */
-       TAPI_SAT_CMD_TYPE_MORE_TIME = 0x02, /**<        command type - more time                */
-       TAPI_SAT_CMD_TYPE_SETUP_EVENT_LIST = 0x05, /**< command type - setup event list                 */
-       TAPI_SAT_CMD_TYPE_SETUP_CALL = 0x10, /**<       command type - setup call               */
-       TAPI_SAT_CMD_TYPE_SEND_SS = 0x11, /**<  command type - send ss          */
-       TAPI_SAT_CMD_TYPE_SEND_USSD = 0x12, /**<        command type - send ussd                */
-       TAPI_SAT_CMD_TYPE_SEND_SMS = 0x13, /**< command type - send sms                 */
-       TAPI_SAT_CMD_TYPE_SEND_DTMF = 0x14, /**<        command type - send dtmf                */
-       TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER = 0x15, /**<   command type - launch browser           */
-       TAPI_SAT_CMD_TYPE_PLAY_TONE = 0x20, /**<        command type - play tone                */
-       TAPI_SAT_CMD_TYPE_DISPLAY_TEXT = 0x21, /**<     command type - display text             */
-       TAPI_SAT_CMD_TYPE_GET_INKEY = 0x22, /**<        command type - get inkey                */
-       TAPI_SAT_CMD_TYPE_GET_INPUT = 0x23, /**<        command type - get input                */
-       TAPI_SAT_CMD_TYPE_SELECT_ITEM = 0x24, /**<      command type - select item              */
-       TAPI_SAT_CMD_TYPE_SETUP_MENU = 0x25, /**<       command type - setup menu               */
-       TAPI_SAT_CMD_TYPE_PROVIDE_LOCAL_INFO = 0x26, /**<       command type - provide local info               */
-       TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT = 0x28, /**<     command type - setup idle mode text             */
-       TAPI_SAT_CMD_TYPE_LANGUAGE_NOTIFICATION = 0x35, /**<    command type - language notification            */
-       TAPI_SAT_CMD_TYPE_OPEN_CHANNEL = 0x40, /**<     command type - open channel -class e            */
-       TAPI_SAT_CMD_TYPE_CLOSE_CHANNEL = 0x41, /**<    command type - close channel - class e          */
-       TAPI_SAT_CMD_TYPE_RECEIVE_DATA = 0x42, /**<     command type - receive data -class e            */
-       TAPI_SAT_CMD_TYPE_SEND_DATA = 0x43, /**<        command type - send data                */
-       TAPI_SAT_CMD_TYPE_GET_CHANNEL_STATUS = 0x44, /**<       command type - get channel status -class e              */
-       TAPI_SAT_CMD_TYPE_END_OF_APP_EXEC = 0xFD, /**<  inform to End the execution of a Proactive Command*/
-       TAPI_SAT_CMD_TYPE_END_PROACTIVE_SESSION = 0xFE, /**<    inform end proactive session            */
-       TAPI_SAT_CMD_TYPE_RESERVED = 0xFF /**<  command type - reserved         */
-} TelSatCommandType_t;
-
-/**
- * @enum TelSatCmdQualiRefresh_t
- * This enum lists the Command qualifier values for Refresh command.
- */
-typedef enum {
-       TAPI_SAT_REFRESH_SIM_INIT_AND_FULL_FCN = 0x00, /**<     command qualifier for REFRESH SIM INIT AND FULL FILE CHANGE_NOTIFICATION                */
-       TAPI_SAT_REFRESH_FCN = 0x01, /**<       command qualifier for REFRESH FILE CHANGE NOTIFICATION          */
-       TAPI_SAT_REFRESH_SIM_INIT_AND_FCN = 0x02, /**<  command qualifier for REFRESH SIM INIT AND FILE CHANGE NOTIFICATION             */
-       TAPI_SAT_REFRESH_SIM_INIT = 0x03, /**<  command qualifier for REFRESH SIM INIT          */
-       TAPI_SAT_REFRESH_SIM_RESET = 0x04, /**< command qualifier for REFRESH SIM RESET         */
-       TAPI_SAT_REFRESH_3G_APPLICATION_RESET = 0x05, /**<      command qualifier for REFRESH 3G APPLICATION RESET              */
-       TAPI_SAT_REFRESH_3G_SESSION_RESET = 0x06, /**<  command qualifier for REFRESH 3G SESSION RESET          */
-       TAPI_SAT_REFRESH_RESERVED = 0xFF /**<   command qualifier for REFRESH RESERVED          */
-} TelSatCmdQualiRefresh_t;
-
-/**
- * @enum TelSatCmdQualiSetupCall_t
- * This enum lists the Command qualifier values for setup call command.
- */
-typedef enum {
-       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY = 0x00, /**<       command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY               */
-       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL = 0x01, /**<   command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY WITH REDIAL           */
-       TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD = 0x02, /**<    command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD                */
-       TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD_WITH_REDIAL = 0x03, /**<        command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD WITH REDIAL            */
-       TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS = 0x04, /**<        command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS          */
-       TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS_WITH_REDIAL = 0x05, /**<    command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS WITH REDIAL              */
-       TAPI_SAT_SETUP_CALL_RESERVED = 0xFF /**<        command qualifier for SETUP CALL RESERVED               */
-} TelSatCmdQualiSetupCall_t;
-
-/**
- * @enum TelSatDisplayTextPriorityType_t
- * This is associated with the command qualifier for display text.
- */
-typedef enum {
-       TAPI_SAT_MSG_PRIORITY_NORMAL = 0, /**<  MSG PRIORITY NORMAL             */
-       TAPI_SAT_MSG_PRIORITY_HIGH = 1 /**<     MSG PRIORITY HIGH               */
-} TelSatDisplayTextPriorityType_t;
-
-/**
- * @enum TelSatDisplayTextMsgClearType_t
- * This is associated with the command qualifier for display text.
- */
-typedef enum {
-       TAPI_SAT_AUTO_CLEAR_MSG_AFTER_A_DELAY = 0, /**< message clear type -  AUTO CLEAR MSG AFTER A DELAY              */
-       TAPI_SAT_WAIT_FOR_USER_TO_CLEAR_MSG = 1 /**<    message clear type -  WAIT FOR USER TO CLEAR MSG                */
-} TelSatDisplayTextMsgClearType_t;
-
-/**
- * @enum TelSatInkeyType_t
- * This is associated with the command qualifier for get inkey.
- */
-typedef enum {
-       TAPI_SAT_INKEY_TYPE_CHARACTER_SET_ENABLED = 0, /**<     command qualifier for  INKEY TYPE CHARACTER SET ENABLED         */
-       TAPI_SAT_INKEY_TYPE_YES_NO_REQUESTED = 1 /**<   command qualifier for  INKEY TYPE YES NO REQUESTED              */
-} TelSatInkeyType_t;
-
-/**
- * @enum TelSatUseInputAlphabetType_t
- * This is associated with the command qualifier for get input.
- */
-typedef enum {
-       TAPI_SAT_USER_INPUT_ALPHABET_TYPE_SMS_DEFAULT = 1, /**< command qualifier for  ALPHABET TYPE SMS DEFAULT                */
-       TAPI_SAT_USER_INPUT_ALPHABET_TYPE_UCS2 = 2 /**< command qualifier for  ALPHABET TYPE UCS2               */
-} TelSatUseInputAlphabetType_t;
-
-/**
- * @enum TelSatDisplayVibrateAlertType_t
- * This is associated with the command qualifier for play tone command.
- */
-typedef enum {
-       TAPI_SAT_VIBRATE_ALERT_OPTIONAL = 0, /**<       VIBRATE ALERT UPTO THE TERMINAL         */
-       TAPI_SAT_VIBRATE_ALERT_REQUIRED = 1 /**<        VIBRATE, IF AVAILABLE, WITH TONE.               */
-} TelSatDisplayVibrateAlertType_t;
-
-/**
- * @enum TelSatPresentationType_t
- * This is associated with the command qualifier for select item command.
- */
-typedef enum {
-       TAPI_SAT_PRESENTATION_TYPE_NOT_SPECIFIED = 0x00, /**<   command qualifier for PRESENTATION TYPE NOT SPECIFIED */
-       TAPI_SAT_PRESENTATION_TYPE_DATA_VALUE = 0x01, /**<      command qualifier for PRESENTATION TYPE DATA VALUE              */
-       TAPI_SAT_PRESENTATION_TYPE_NAVIGATION_OPTION = 0x02 /**<        command qualifier for PRESENTATION TYPE NAVIGATION OPTION       */
-} TelSatPresentationType_t;
-
-/**
- * @enum TelSatSelectionPreferenceType_t
- * This is associated with the command qualifier for select item command.
- */
-typedef enum {
-       TAPI_SAT_SELECTION_PREFERENCE_NONE_REQUESTED = 0, /**<  command qualifier for SELECTION PREFERENCE NONE REQUESTED               */
-       TAPI_SAT_SELECTION_PREFERENCE_USING_SOFT_KEY = 1 /**<   command qualifier for SELECTION PREFERENCE USING SOFT KEY               */
-} TelSatSelectionPreferenceType_t;
-
-/**
- * @enum TelSatCmdQualiProvideLocalInfo_t
- * This enum defines the Command qualifier values for provide local info command.
- */
-typedef enum {
-       TAPI_SAT_PROVIDE_DATE_TIME_AND_TIME_ZONE = 0x03, /**<   command qualifier for PROVIDE DATE TIME AND TIME ZONE           */
-       TAPI_SAT_PROVIDE_LANGUAGE_SETTING = 0x04, /**<  command qualifier for PROVIDE LANGUAGE SETTING          */
-       TAPI_SAT_PROVIDE_IMEISV = 0x08, TAPI_SAT_PROVIDE_RESERVED = 0xFF /**<   reserved                */
-} TelSatCmdQualiProvideLocalInfo_t;
-
-/**
- * @enum TelSatCmdQualiLaunchBrowser_t
- * This enum defines the Command qualifier values for launch browser command.
- */
-typedef enum {
-       TAPI_SAT_LAUNCH_BROWSER = 0, /**<       command qualifier for  LAUNCH BROWSER           */
-       TAPI_SAT_NOT_USED = 1, /**<     command qualifier for  NOT USED         */
-       TAPI_SAT_USE_EXISTING_BROWSER = 2, /**< command qualifier for  USE EXISTING BROWSER if secure session, do not use it.           */
-       TAPI_SAT_CLOSE_AND_LAUNCH_NEW_BROWSER = 3, /**< command qualifier for CLOSE AND LAUNCH NEW BROWSER              */
-       TAPI_SAT_NOT_USED2 = 4, /**<    command qualifier for  NOT USED2                */
-       TAPI_SAT_LB_RESERVED = 0xFF /**<        reserved        */
-} TelSatCmdQualiLaunchBrowser_t;
-
-/**
- * @enum TelSatDeviceIdentitiesTagType_t
- * This enum lists the device identity tag value IDs.
- */
-typedef enum {
-       TAPI_SAT_DEVICE_ID_KEYPAD = 0x01, /**<  DEVICE ID KEYPAD                */
-       TAPI_SAT_DEVICE_ID_DISPLAY = 0x02, /**< DEVICE ID DISPLAY               */
-       TAPI_SAT_DEVICE_ID_EARPIECE = 0x03, /**<        DEVICE ID EARPIECE              */
-
-       TAPI_SAT_DEVICE_ID_SIM = 0x81, /**<     DEVICE ID SIM           */
-       TAPI_SAT_DEVICE_ID_ME = 0x82, /**<      DEVICE ID ME            */
-       TAPI_SAT_DEVICE_ID_NETWORK = 0x83, /**< DEVICE ID NETWORK               */
-
-       TAPI_SAT_DEVICE_ID_RESERVED = 0XFF /**< reserved        */
-} TelSatDeviceIdentitiesTagType_t;
-
-/**
- * @enum TelSatTimeUnitType_t
- * This enum lists the time units for the duration data object.
- */
-typedef enum {
-       TAPI_SAT_TIME_UNIT_MINUTES = 0x0, /**<  time unit - minutes             */
-       TAPI_SAT_TIME_UNIT_SECONDS = 0x01, /**< time unit - second              */
-       TAPI_SAT_TIME_UNIT_TENTHS_OF_SECONDS = 0x02, /**<       time unit - tenths of seconds           */
-       TAPI_SAT_TIME_UNIT_RESERVED = 0xFF /**< reserved        */
-} TelSatTimeUnitType_t;
-
-/**
- * @enum TelSatResultType_t
- * This enum lists the values for the RESULT data object - General Response.
- */
-typedef enum {
-       TAPI_SAT_R_SUCCESS = 0x0, /**<  command performed successfully */
-       TAPI_SAT_R_SUCCESS_WITH_PARTIAL_COMPREHENSION = 0x01, /**<      command performed with partial comprehension    */
-       TAPI_SAT_R_SUCCESS_WITH_MISSING_INFO = 0x02, /**<       command performed, with missing information     */
-
-       TAPI_SAT_R_REFRESH_PERFORMED_WITH_ADDITIONAL_EFS_READ = 0x03, /**<      REFRESH PERFORMED WITH ADDITIONAL EFS READ              */
-       TAPI_SAT_R_SUCCESS_BUT_REQUESTED_ICON_NOT_DISPLAYED = 0x04, /**<        command performed but REQUESTED ICON NOT DISPLAYED                      */
-       TAPI_SAT_R_SUCCESS_BUT_MODIFIED_BY_CALL_CONTROL_BY_SIM = 0x05, /**<     command performed but MODIFIED BY CALL CONTROL BY SIM           */
-       TAPI_SAT_R_SUCCESS_LIMITED_SERVICE = 0x06, /**< command performed with LIMITED SERVICE          */
-       TAPI_SAT_R_SUCCESS_WITH_MODIFICATION = 0x07, /**<       command performed with MODIFICATION             */
-       TAPI_SAT_R_REFRESH_PRFRMD_BUT_INDICATED_USIM_NOT_ACTIVE = 0x08, /**<    REFRESH PERFORMED BUT INDICATED USIM NOT ACTIVE                 */
-
-       TAPI_SAT_R_PROACTIVE_SESSION_TERMINATED_BY_USER = 0x10, /**<    proactive sim application session terminated by user            */
-       TAPI_SAT_R_BACKWARD_MOVE_BY_USER = 0x11, /**<   backward move in the proactive sim application session request by the user              */
-       TAPI_SAT_R_NO_RESPONSE_FROM_USER = 0x12, /**<   no response from user           */
-
-       TAPI_SAT_R_HELP_INFO_REQUIRED_BY_USER = 0x13, /**<      HELP INFO REQUIRED BY USER              */
-       TAPI_SAT_R_USSD_OR_SS_TRANSACTION_TERMINATED_BY_USER = 0x14, /**<       USSD OR SS TRANSACTION TERMINATED BY USER       */
-
-       TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND = 0x20, /**<    ME currently unable to process command          */
-       TAPI_SAT_R_NETWORK_UNABLE_TO_PROCESS_COMMAND = 0x21, /**<       Network currently unable to process command             */
-       TAPI_SAT_R_USER_DID_NOT_ACCEPT_CALL_SETUP_REQ = 0x22, /**<      User did not accept call setup request          */
-       TAPI_SAT_R_USER_CLEAR_DOWN_CALL_BEFORE_CONN = 0x23, /**<        User cleared down call before connection or network released            */
-
-       TAPI_SAT_R_INTERACTION_WITH_CC_BY_SIM_IN_TMP_PRBLM = 0x25, /**< INTERACTION WITH CALL CONTROL BY SIM IN TEMPORARY PROBLEM               */
-       TAPI_SAT_R_LAUNCH_BROWSER_GENERIC_ERROR_CODE = 0x26, /**<       LAUNCH BROWSER GENERIC ERROR CODE               */
-
-       TAPI_SAT_R_BEYOND_ME_CAPABILITIES = 0x30, /**<  command beyond ME's capabilities                */
-       TAPI_SAT_R_COMMAND_TYPE_NOT_UNDERSTOOD_BY_ME = 0x31, /**<       command type not understood by ME               */
-       TAPI_SAT_R_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME = 0x32, /**<       command data not understood by ME               */
-       TAPI_SAT_R_COMMAND_NUMBER_NOT_KNOWN_BY_ME = 0x33, /**<  command number not known by ME          */
-       TAPI_SAT_R_SS_RETURN_ERROR = 0x34, /**< SS return error         */
-       TAPI_SAT_R_SMS_RP_ERROR = 0x35, /**<    SMS rp-error            */
-       TAPI_SAT_R_ERROR_REQUIRED_VALUES_ARE_MISSING = 0x36, /**<       Error, required values are missing              */
-
-       TAPI_SAT_R_USSD_RETURN_ERROR = 0x37, /**<       USSD_RETURN_ERROR               */
-       TAPI_SAT_R_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM = 0x39, /**< INTERACTION WITH CALL CONTROL OR SMS CONTROL PERMANENT PROBLEM          */
-       TAPI_SAT_R_BEARER_INDEPENDENT_PROTOCOL_ERROR = 0x3A, /**<       BEARER INDEPENDENT PROTOCOL ERROR               */
-       TAPI_SAT_R_FRAMES_ERROR = 0x3C /**<     FRAMES ERROR            */
-} TelSatResultType_t;
-
-/**
- * @enum TelSatMeProblemType_t
- * This enum lists the values for the Additional response for the RESULT object and specifies a particular ME PROBLEM.
- */
-typedef enum {
-       TAPI_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE = 0x0, /**<       ME problem with NO SPECIFIC CAUSE               */
-       TAPI_SAT_ME_PROBLEM_SCREEN_BUSY = 0x01, /**<    ME problem with SCREEN BUSY             */
-       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_CALL = 0x02, /**<        ME problem with ME BUSY ON CALL         */
-       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_SS = 0x03, /**<  ME problem with ME_BUSY ON SS           */
-       TAPI_SAT_ME_PROBLEM_NO_SERVICE = 0x04, /**<     ME problem with NO SERVICE              */
-       TAPI_SAT_ME_PROBLEM_ACCESS_CONTROL_CLASS_BAR = 0x05, /**<       ME problem with ACCESS CONTROL CLASS BAR                */
-       TAPI_SAT_ME_PROBLEM_RADIO_RES_NOT_GRANTED = 0x06, /**<  ME problem with RADIO RES NOT GRANTED           */
-       TAPI_SAT_ME_PROBLEM_NOT_IN_SPEECH_CALL = 0x07, /**<     ME problem with NOT IN SPEECH CALL      */
-       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_USSD = 0x08, /**<        ME problem with ME BUSY ON USSD         */
-       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_SEND_DTMF_CMD = 0x09, /**<       ME problem with ME BUSY ON SEND DTMF CMD        */
-       TAPI_SAT_ME_PROBLEM_NO_USIM_ACTIVE = 0x0A, /**< ME problem with NO USIM ACTIVE          */
-       TAPI_SAT_ME_PROBLEM_INVALID = 0xFF /**< ME problem with INVALID                 */
-} TelSatMeProblemType_t;
-
-/**
- * @enum TelSatNetworkProblemType_t
- * This enum lists the values for the Additional response for the RESULT object and specifies a particular network PROBLEM.
- */
-typedef enum {
-       TAPI_SAT_NETWORK_PROBLEM_NO_SPECIFIC_CAUSE = 0x0, /**<  Network problem with no specific cause          */
-       TAPI_SAT_NETWORK_PROBLEM_USER_BUSY = 0x91 /**<  Network problem with USER BUSY          */
-} TelSatNetworkProblemType_t;
-
-/**
- * @enum TelSatSsProblemType_t
- * This enum lists the values for the Additional response for the RESULT object related to SEND SS.
- */
-typedef enum {
-       TAPI_SAT_SS_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**< SS problem with no specific cause               */
-       TAPI_SAT_SS_PROBLEM_FACILITY_NOT_SUPPORTED = 0x15 /**<  SS problem with FACILITY NOT SUPPORTED          */
-} TelSatSsProblemType_t;
-
-/**
- * @enum TelSatSmsProblemType_t
- * This enum lists the values for the Additional response for the RESULT object related to SEND SMS.
- */
-typedef enum {
-       TAPI_SAT_SMS_PROBLEM_NO_SPECIFIC_CAUSE = 0 /**< SMS problem with no specific cause              */
-} TelSatSmsProblemType_t;
-
-/**
- * @enum TelSatUssdProblemType_t
- * This enum lists the values for the Additional response for the RESULT object related to SEND USSD STRING.
- */
-typedef enum {
-       TAPI_SAT_USSD_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**<       USSD problem with no specific cause             */
-       TAPI_SAT_USSD_PROBLEM_UNKNOWN_ALPHABET = 0x47 /**<      USSD problem with UNKNOWN ALPHABET              */
-} TelSatUssdProblemType_t;
-
-/**
- * @enum TelSatCallCtrlProblemType_t
- * This enum lists the values for the Additional response for the RESULT object related to CALL CONTROL or MO SMS CONTROL.
- */
-typedef enum {
-       TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**< Call Control problem with no specific cause             */
-       TAPI_SAT_CC_PROBLEM_ACTION_NOT_ALLOWED = 1, /**<        Call Control problem with action not allowed    */
-       TAPI_SAT_CC_PROBLEM_REQUEST_TYPE_HAS_CHANGED = 2 /**<   Call Control problem with request type has changed      */
-} TelSatCallCtrlProblemType_t;
-
-/**
- * @enum TelSatLaunchBrowserProblemType_t
- * This enum lists the values for the Additional response for the RESULT object related to LAUNCH BROWSER PROBLEM
- */
-typedef enum {
-       TAPI_SAT_BROWSER_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**<    Browser problem with no specific cause          */
-       TAPI_SAT_BROWSER_PROBLEM_BEARER_UNAVAILABLE = 1, /**<   Browser problem with bearer unavailable         */
-       TAPI_SAT_BROWSER_PROBLEM_BROWSER_UNAVAILABLE = 2, /**<  Browser problem with browser unavailable                */
-       TAPI_SAT_BROWSER_PRBLM_ME_UNABLE_TO_READ_PROV_DATA = 3 /**<     Browser problem with ME unable to read provisioning data                */
-} TelSatLaunchBrowserProblemType_t;
-
-/**
- * @enum TelSatBipProblemType_t
- * This enum lists the values for the Additional response for the RESULT object.
- *  Permanent Problems  ::: 12.12.11 ADDITIONAL INFORMATION :  BEARER INDEPENDENT PROTOCOL
- */
-typedef enum {
-       TAPI_SAT_BIP_PROBLEM_NO_SPECIFIC_CAUSE = 0x00, /**<     BIP problem with no specific cause      */
-       TAPI_SAT_BIP_PROBLEM_NO_CHANNEL_AVAILABLE = 0x01, /**<  BIP problem with no channel available           */
-       TAPI_SAT_BIP_PROBLEM_CHANNEL_CLOSED = 0x02, /**<        BIP problem with channel closed                 */
-       TAPI_SAT_BIP_PROBLEM_CHANNEL_ID_NOT_VALID = 0x03, /**<  BIP problem with channel id not valid           */
-       TAPI_SAT_BIP_PROBLEM_BUF_SIZE_NOT_AVAILABLE = 0x04, /**<        BIP problem with buffer size not available              */
-       TAPI_SAT_BIP_PROBLEM_SECURITY_ERROR = 0x05, /**<        BIP problem with security error                 */
-       TAPI_SAT_BIP_PRBLM_SIM_ME_IF_TRNSPRT_LEVEL_NOT_AVL = 0x06, /**< BIP problem with SIM ME interface transport level not available         */
-       TAPI_SAT_BIP_REMOTE_DEV_NOT_REACHABLE = 0x07, /**<      BIP problem with remote device not reachable            */
-       TAPI_SAT_BIP_SERVICE_ERROR = 0x08, /**< BIP service error               */
-       TAPI_SAT_BIP_SERVICE_IDENTIFIER_UNKNOWN = 0x09 /**<     BIP service identifier unknown          */
-} TelSatBipProblemType_t;
-
-/**
- * @enum TelSatSmsTpduType_t
- * This enum lists the values for the SMS TPDU type.
- */
-typedef enum {
-       TAPI_SAT_SMS_TPDU_TYPE_DELIVER_TPDU = 0, /**<   sms tpdu type - DELIVER TPDU    */
-       TAPI_SAT_SMS_TPDU_TYPE_DELIVER_RPT = 1, /**<    sms tpdu type - DELIVER RPT     */
-       TAPI_SAT_SMS_TPDU_TYPE_SUBMIT_TPDU = 2, /**<    sms tpdu type - SUBMIT TPDU             */
-       TAPI_SAT_SMS_TPDU_TYPE_SUBMIT_RPT = 3, /**<     sms tpdu type - SUBMIT RPT      */
-       TAPI_SAT_SMS_TPDU_TYPE_STATUS_RPT = 4, /**<     sms tpdu type - STATUS RPT      */
-       TAPI_SAT_SMS_TPDU_TYPE_TPDU_CMD = 5 /**<        sms tpdu type - TPDU CMD        */
-} TelSatSmsTpduType_t;
-
-/**
- * @enum TelSatToneType_t
- * This enum lists the values tones type.
- */
-typedef enum {
-       // standard supervisory tones
-       TAPI_SAT_DIAL_TONE = 0x01, /**< TONE TYPE DIAL TONE             */
-       TAPI_SAT_CALLED_SUBSCRIBER_BUSY = 0x02, /**<    TONE TYPE CALLED SUBSCRIBER BUSY                */
-       TAPI_SAT_CONGESTION = 0x03, /**<        TONE TYPE CONGESTION    */
-       TAPI_SAT_RADIO_PATH_ACK = 0x04, /**<    TONE TYPE RADIO PATH ACK        */
-       TAPI_SAT_RADIO_PATH_NOT_AVAILABLE_CALL_DROPPED = 0x05, /**<     TONE TYPE RADIO PATH NOT AVAILABLE CALL DROPPED */
-       TAPI_SAT_ERR_SPECIAL_INFO = 0x06, /**<  TONE TYPE ERR SPECIAL INFO      */
-       TAPI_SAT_CALL_WAITING_TONE = 0x07, /**< TONE TYPE CALL WAITING TONE             */
-       TAPI_SAT_RINGING_TONE = 0x08, /**<      TONE TYPE RINGING TONE  */
-
-       // ME proprietary tones
-       TAPI_SAT_GENERAL_BEEP = 0x10, /**<      TONE TYPE GENERAL BEEP          */
-       TAPI_SAT_POSITIVE_ACK_TONE = 0x11, /**< TONE TYPE POSITIVE ACK TONE             */
-       TAPI_SAT_NEGATIVE_ACK_OR_ERROR_TONE = 0x12, /**<        TONE TYPE NEGATIVE ACK OR ERROR TONE            */
-       TAPI_SAT_RINGING_TONE_SLCTD_BY_USR_FOR_INCOM_SPEECH_CALL = 0x13, /**<   TONE TYPE RINGING TONE SELECTED BY USER FOR INCOMING SPEECH CALL                */
-       TAPI_SAT_ALERT_TONE_SELECTED_BY_USER_FOR_INCOMING_SMS = 0x14, /**<      TONE TYPE ALERT TONE SELECTED BY USER FOR INCOMING SMS          */
-       TAPI_SAT_CRITICAL_ALERT = 0x15, /**<    TONE TYPE CRITICAL ALERT                */
-
-       //Themed tones
-       TAPI_SAT_HAPPY_TONE = 0x30, /**<        TONE TYPE HAPPY TONE            */
-       TAPI_SAT_SAD_TONE = 0x31, /**<  TONE TYPE SAD TONE                      */
-       TAPI_SAT_URGENT_ACTION_TONE = 0x32, /**<        TONE TYPE URGENT ACTION TONE            */
-       TAPI_SAT_QUESTION_TONE = 0x33, /**<     TONE TYPE QUESTION TONE                 */
-       TAPI_SAT_MESSAGE_RECEIVED_TONE = 0x34, /**<     TONE TYPE MESSAGE RECEIVED TONE                 */
-
-       //Melody tones
-       TAPI_SAT_MELODY_1 = 0x40, /**<  TONE TYPE MELODY 1              */
-       TAPI_SAT_MELODY_2 = 0x41, /**<  TONE TYPE MELODY 2              */
-       TAPI_SAT_MELODY_3 = 0x42, /**<  TONE TYPE MELODY 3              */
-       TAPI_SAT_MELODY_4 = 0x43, /**<  TONE TYPE MELODY 4              */
-       TAPI_SAT_MELODY_5 = 0x44, /**<  TONE TYPE MELODY 5              */
-       TAPI_SAT_MELODY_6 = 0x45, /**<  TONE TYPE MELODY 6              */
-       TAPI_SAT_MELODY_7 = 0x46, /**<  TONE TYPE MELODY 7              */
-       TAPI_SAT_MELODY_8 = 0x47, /**<  TONE TYPE MELODY 8              */
-
-       TAPI_SAT_TONE_TYPE_RESERVED = 0xFF /**< TONE TYPE RESERVED              */
-} TelSatToneType_t;
-
-/**
- * @enum TelSatEventDownloadType_t
- * This enum lists event types required by ME to monitor and report to SIM.
- */
-typedef enum {
-       TAPI_EVENT_SAT_DW_TYPE_MT_CALL = 0,
-       TAPI_EVENT_SAT_DW_TYPE_CALL_CONNECTED = 1,
-       TAPI_EVENT_SAT_DW_TYPE_CALL_DISCONNECTED = 2,
-       TAPI_EVENT_SAT_DW_TYPE_LOCATION_STATUS = 3,
-       TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY = 4, /**<  data download type - USER_ACTIVITY              */
-       TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE = 5, /**<  data download type - IDLE SCREEN AVAILABLE              */
-       TAPI_EVENT_SAT_DW_TYPE_CARD_READER_STATUS = 6,
-       TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION = 7, /**<     data download type - LANGUAGE SELECTION         */
-       TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION = 8, /**<    data download type - BROWSER TERMINATION                */
-       TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE = 9, /**< data download type -DATA AVAILABLE              */
-       TAPI_EVENT_SAT_DW_TYPE_CHANNEL_STATUS = 0x0A, /**<      data download type - CHANNEL STATUS             */
-       TAPI_EVENT_SAT_DW_TYPE_ACCESS_TECHNOLOGY_CHANGED = 0x0B,
-       TAPI_EVENT_SAT_DW_TYPE_DISPLAY_PARAMETERS_CHANGED = 0x0C,
-       TAPI_EVENT_SAT_DW_TYPE_LOCAL_CONNECTION = 0x0D,
-       TAPI_EVENT_SAT_DW_TYPE_NW_SEARCH_MODE_CHANGED = 0X0E,
-       TAPI_EVENT_SAT_DW_TYPE_BROWSING_STATUS = 0X0F,
-       TAPI_EVENT_SAT_DW_TYPE_FRAMES_INFORMATION_CHANGED = 0X10,
-       TAPI_EVENT_SAT_DW_TYPE_RESERVED_FOR_3GPP = 0X11,
-       TAPI_EVENT_SAT_DW_TYPE_UNKNOWN = 0xFF /**<      data download type - unknown            */
-} TelSatEventDownloadType_t;
-
-/**
- * @enum TelSatImageCodingSchemeType_t
- * This enum lists image coding scheme types required by ME to show.
- */
-typedef enum {
-       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC = 0x11, /**<     IMAGE CODING SCHEME BASIC               */
-       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_COLOUR = 0x21, /**<    IMAGE CODING SCHEME COLOUR              */
-       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_RESERVED = 0xFF /**<      RESERVED             */
-} TelSatImageCodingSchemeType_t;
-
-/**
- * @enum TelSatIconQualifierType_t
- * This enum defines the icon qualifier.
- */
-typedef enum {
-       TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY = 0, /**<  ICON QUALI SELF EXPLANATORY     */
-       TAPI_SAT_ICON_QUALI_NOT_SELF_EXPLANATORY = 1, /**<      ICON QUALI NOT SELF EXPLANATORY         */
-       TAPI_SAT_ICON_QUALI_RESERVED = 0xFF /**<          RESERVED      */
-} TelSatIconQualifierType_t;
-
-/**
- * @enum TelSatBcRepeatIndicatorType_t
- * This enum defines the SIM ATK BC repeat indicator type.
- */
-typedef enum {
-       TAPI_SAT_BC_REPEAT_INDI_ALTERNATE_MODE = 0x01, /**<     BC REPEAT ALTERNATE MODE                */
-       TAPI_SAT_BC_REPEAT_INDI_SEQUENTIAL_MODE = 0x03, /**<    BC REPEAT SEQUENTIAL MODE               */
-       TAPI_SAT_BC_REPEAT_INDI_RESERVED = 0xFF /**<    RESERVED        */
-} TelSatBcRepeatIndicatorType_t;
-
-/**
- * @enum TelSatCallCtrlStringType_t
- * This enum defines call control string type.
- */
-typedef enum {
-       TAPI_SAT_CC_VOICE = 0x00, /**<  Call Control String Type - voice                */
-       TAPI_SAT_CC_SS = 0x01, /**<     Call Control String Type - ss           */
-       TAPI_SAT_CC_USSD = 0x02, /**<   Call Control String Type - ussd         */
-       TAPI_SAT_CC_NONE = 0xFF /**<    Call Control String Type - none                 */
-} TelSatCallCtrlStringType_t;
-
-/**
- * @enum TelSatLanguageType_t
- * This enum lists the language values.
- */
-typedef enum {
-       TAPI_SAT_LP_GERMAN = 0x00, /**< GERMAN          */
-       TAPI_SAT_LP_ENGLISH = 0x01, /**<        ENGLISH         */
-       TAPI_SAT_LP_ITALIAN = 0x02, /**<        ITALIAN         */
-       TAPI_SAT_LP_FRENCH = 0x03, /**< FRENCH          */
-       TAPI_SAT_LP_SPANISH = 0x04, /**<        SPANISH         */
-       TAPI_SAT_LP_DUTCH = 0x05, /**<  DUTCH           */
-       TAPI_SAT_LP_SWEDISH = 0x06, /**<        SWEDISH */
-       TAPI_SAT_LP_DANISH = 0x07, /**< DANISH  */
-       TAPI_SAT_LP_PORTUGUESE = 0x08, /**<     PORTUGUESE      */
-       TAPI_SAT_LP_FINNISH = 0x09, /**<        FINNISH */
-       TAPI_SAT_LP_NORWEGIAN = 0x0A, /**<      NORWEGIAN       */
-       TAPI_SAT_LP_GREEK = 0x0B, /**<  GREEK   */
-       TAPI_SAT_LP_TURKISH = 0x0C, /**<        TURKISH */
-       TAPI_SAT_LP_HUNGARIAN = 0x0D, /**<      HUNGARIAN       */
-       TAPI_SAT_LP_POLISH = 0x0E, /**< POLISH  */
-       TAPI_SAT_LP_LANG_UNSPECIFIED = 0x0F /**<        LANGUAGE UNSPECIFIED    */
-} TelSatLanguageType_t;
-
-/**
- * @enum TelSatBrowserIdentityType_t
- * This enum lists the SAT browser identity type.
- */
-typedef enum {
-       TAPI_SAT_BROWSER_ID_DEFAULT = 0x0, /**< DEFAULT BROWSER                 */
-       TAPI_SAT_BROWSER_ID_WML, /**<   BROWSER WML     */
-       TAPI_SAT_BROWSER_ID_HTML, /**<  BROWSER HTML    */
-       TAPI_SAT_BROWSER_ID_XHTML, /**< BROWSER XHTML   */
-       TAPI_SAT_BROWSER_ID_CHTML, /**< BROWSER CHTML   */
-       TAPI_SAT_BROWSER_ID_RESERVED = 0xFF /**<        RESERVED        */
-} TelSatBrowserIdentityType_t;
-
-/**
- * @enum TelSatBearerType_t
- * This enum lists the SAT bearer type.
- */
-typedef enum {
-       TAPI_SAT_BEARER_TYPE_SMS = 0x0, /**<    BEARER SMS              */
-       TAPI_SAT_BEARER_TYPE_CSD = 0x1, /**<    BEARER CSD              */
-       TAPI_SAT_BEARER_TYPE_USSD = 0x2, /**<   BEARER USSD             */
-       TAPI_SAT_BEARER_TYPE_GPRS = 0x3, /**<   BEARER GPRS             */
-       TAPI_SAT_BEARER_TYPE_RESERVED = 0xFF /**<       BEARER RESERVED         */
-} TelSatBearerType_t;
-
-/**
- * @enum TelSatBrowserTerminationCauseType_t
- * This enum lists the SAT browser termination cause type.
- */
-typedef enum {
-       TAPI_SAT_BROWSER_TERMINATED_BY_USER = 0, /**<   BROWSER TERMINATED BY USER              */
-       TAPI_SAT_BROWSER_TERMINATED_BY_ERROR = 1, /**<  BROWSER TERMINATED BY ERROR             */
-} TelSatBrowserTerminationCauseType_t;
-
-/**
- * @enum TelSatBearerDescType_t
- * This enum lists the SAT bearer destination type.
- */
-typedef enum {
-       TAPI_SAT_BEARER_CSD = 0x1, /**< BEARER DESC CSD                 */
-       TAPI_SAT_BEARER_GPRS = 0x2, /**<        BEARER DESC GPRS                */
-       TAPI_SAT_BEARER_DEFAULT_BEARER_FROM_TRANSPORT_LAYER = 0x3, /**< BEARER DESC DEFAULT BEARER FROM TRANSPORT LAYER         */
-       TAPI_SAT_BEARER_LOCAL_LINK_TECHNOLOGY_INDEPENDENT = 0x4, /**<   BEARER DESC LOCAL LINK TECHNOLOGY INDEPENDENT           */
-       TAPI_SAT_BEARER_BLUETOOTH = 0x5, /**<   BEARER DESC BLUETOOTH   */
-       TAPI_SAT_BEARER_IrDA = 0x6, /**<        BEARER DESC IrDA        */
-       TAPI_SAT_BEARER_RS232 = 0x7, /**<       BEARER DESC RS232       */
-       TAPI_SAT_BEARER_USB = 0x10, /**<        BEARER DESC USB */
-       TAPI_SAT_BEARER_RESERVED = 0xFF /**<    RESERVED        */
-} TelSatBearerDescType_t;
-
-/**
- * @enum TelSatBearerParamCsdDataRateType_t
- * This enum lists the SAT bearer parameter csd data rate. refer TS 27.007
- */
-typedef enum {
-       TAPI_SAT_BIP_DR_AUTOBAUDING = 0, /**<   CSD data rate - AUTOBAUDING             */
-       TAPI_SAT_BIP_DR_300BPS_V21 = 1, /**<    CSD data rate -300BPS V21               */
-       TAPI_SAT_BIP_DR_1200BPS_V22 = 2, /**<   CSD data rate - 1200BPS V22             */
-       TAPI_SAT_BIP_DR_1200_75BPS_V23 = 3, /**<        CSD data rate -1200 75BPS V23                   */
-       TAPI_SAT_BIP_DR_2400BPS_V22 = 4, /**<   CSD data rate -2400BPS V22              */
-       TAPI_SAT_BIP_DR_2400BPS_V26 = 5, /**<   CSD data rate - 2400BPS V26                     */
-       TAPI_SAT_BIP_DR_4800BPS_V32 = 6, /**<   CSD data rate - 4800BPS V32             */
-       TAPI_SAT_BIP_DR_9600BPS_V32 = 7, /**<   CSD data rate - 9600BPS V32             */
-       TAPI_SAT_BIP_DR_9600BPS_V34 = 12, /**<  CSD data rate - 9600BPS_V34             */
-       TAPI_SAT_BIP_DR_14400BPS_V34 = 14, /**< CSD data rate -14400BPS V34             */
-       TAPI_SAT_BIP_DR_19200BPS_V34 = 15, /**< CSD data rate -19200BPS V34             */
-       TAPI_SAT_BIP_DR_28800BPS_V34 = 16, /**< CSD data rate -28800BPS V34             */
-       TAPI_SAT_BIP_DR_33600BPS_V34 = 17, /**< CSD data rate -33600BPS V34             */
-       TAPI_SAT_BIP_DR_1200BPS_V120 = 34, /**< CSD data rate -1200BPS V120             */
-       TAPI_SAT_BIP_DR_2400BPS_V120 = 36, /**< CSD data rate -2400BPS V120             */
-       TAPI_SAT_BIP_DR_4800BPS_V120 = 38, /**< CSD data rate -4800BPS V120             */
-       TAPI_SAT_BIP_DR_9600BPS_V120 = 39, /**< CSD data rate -9600BPS V120             */
-       TAPI_SAT_BIP_DR_14400BPS_V120 = 43, /**<        CSD data rate -14400BPS V120            */
-       TAPI_SAT_BIP_DR_19200BPS_V120 = 47, /**<        CSD data rate -19200BPS V120            */
-       TAPI_SAT_BIP_DR_28800BPS_V120 = 48, /**<        CSD data rate -28800BPS V120            */
-       TAPI_SAT_BIP_DR_38400BPS_V120 = 49, /**<        CSD data rate -38400BPS V120            */
-       TAPI_SAT_BIP_DR_48000BPS_V120 = 50, /**<        CSD data rate -48000BPS V120            */
-       TAPI_SAT_BIP_DR_56000BPS_V120 = 51, /**<        CSD data rate -56000BPS V120            */
-       TAPI_SAT_BIP_DR_300BPS_V110 = 65, /**<  CSD data rate - 300BPS V110             */
-       TAPI_SAT_BIP_DR_1200BPS_V110 = 66, /**< CSD data rate -1200BPS V110             */
-       TAPI_SAT_BIP_DR_2400BPS_V110_OR_X31_FALG_STUFFING = 68, /**<    CSD data rate - 2400BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_4800BPS_V110_OR_X31_FALG_STUFFING = 70, /**<    CSD data rate - 4800BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_9600BPS_V110_OR_X31_FALG_STUFFING = 71, /**<    CSD data rate - 9600BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_14400BPS_V110_OR_X31_FALG_STUFFING = 75, /**<   CSD data rate - 14400BPS V110 OR X31 FALG STUFFING              */
-       TAPI_SAT_BIP_DR_19200BPS_V110_OR_X31_FALG_STUFFING = 79, /**<   CSD data rate -19200BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_28800BPS_V110_OR_X31_FALG_STUFFING = 80, /**<   CSD data rate -28800BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_38400BPS_V110_OR_X31_FALG_STUFFING = 81, /**<   CSD data rate -38400BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_48000BPS_V110_OR_X31_FALG_STUFFING = 82, /**<   CSD data rate -48000BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_56000BPS_V110_OR_X31_FALG_STUFFING = 83, /**<   CSD data rate -56000BPS V110 OR X31 FALG STUFFING               */
-       TAPI_SAT_BIP_DR_64000BPS = 84, /**<     CSD data rate -64000BPS                 */
-       TAPI_SAT_BIP_DR_56000BPS_BIT_TRANSPERENT = 115, /**<    CSD data rate -56000BPS BIT TRANSPERENT                 */
-       TAPI_SAT_BIP_DR_64000BPS_BIT_TRANSPERENT = 116, /**<    CSD data rate -64000BPS BIT TRANSPERENT                 */
-       TAPI_SAT_BIP_DR_32000BPS_PIAFS32K = 120, /**<   CSD data rate -32000BPS PIAFS32K                */
-       TAPI_SAT_BIP_DR_64000BPS_PIAFS64K = 121, /**<   CSD data rate - 64000BPS PIAFS64K               */
-       TAPI_SAT_BIP_DR_28800BPS_MULTIMEDIA = 130, /**< CSD data rate -28800BPS MULTIMEDIA              */
-       TAPI_SAT_BIP_DR_32000BPS_MULTIMEDIA = 131, /**< CSD data rate -32000BPS MULTIMEDIA              */
-       TAPI_SAT_BIP_DR_33600BPS_MULTIMEDIA = 132, /**< CSD data rate - 33600BPS MULTIMEDIA             */
-       TAPI_SAT_BIP_DR_56000BPS_MULTIMEDIA = 133, /**< CSD data rate -56000BPS MULTIMEDIA              */
-       TAPI_SAT_BIP_DR_64000BPS_MULTIMEDIA = 134 /**<  CSD data rate -64000BPS MULTIMEDIA              */
-} TelSatBearerParamCsdDataRateType_t;
-
-/**
- * @enum TelSatBearerParamCsdBearerServiceType_t
- * This enum lists the SAT bearer parameter csd bearer service
- */
-typedef enum {
-       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_ASYNC_UDI = 0, /**<    CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS UDI              */
-       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_SYNC = 1, /**< CSD Bearer service - DATA CIRCUIT SYNCHRONOUS UDI               */
-       TAPI_SAT_BIP_CSD_BS_PAD_ACCESS_ASYNC_UDI = 2, /**<      CSD Bearer service - PAD ACCESS ASYNCHRONOUS UDI                        */
-       TAPI_SAT_BIP_CSD_BS_PACKET_ACCESS_SYNC = 3, /**<        CSD Bearer service - PACKET ACCESS SYNCHRONOUS UDI              */
-       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_ASYNC_RDI = 4, /**<    CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS RDI              */
-       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_SYNC_RDI = 5, /**<     CSD Bearer service - DATA CIRCUIT SYNCHRONOUS RDI               */
-       TAPI_SAT_BIP_CSD_BS_PAD_ACCESS_ASYNC_RDI = 6, /**<      CSD Bearer service - PAD ACCESS ASYNCHRONOUS RDI                */
-       TAPI_SAT_BIP_CSD_BS_PACKET_ACCESS_SYNC_RDI = 7 /**<     CSD Bearer service - PACKET ACCESS SYNCHRONOUS RDI              */
-} TelSatBearerParamCsdBearerServiceType_t;
-
-/**
- * @enum TelSatBearerParamCsdConnectionElementType_t
- * This enum lists the SAT bearer parameter csd connection element
- */
-typedef enum {
-       TAPI_SAT_BIP_CSD_CONN_ELEM_TRANSPARENT = 0, /**<        CSD connection element - TRANSPARENT            */
-       TAPI_SAT_BIP_CSD_CONN_ELEM_NON_TRANSPARENT = 1, /**<    CSD connection element - NON TRANSPARENT                */
-       TAPI_SAT_BIP_CSD_CONN_ELEM_BOTH_TRANSPARENT_PREF = 2, /**<      CSD connection element -BOTH TRANSPARENT PREFFERED              */
-       TAPI_SAT_BIP_CSD_CONN_ELEM_BOTH_NON_TRANSPARENT_PREF = 3 /**<   CSD connection element -  NON TRANSPARENT PREFFERED             */
-} TelSatBearerParamCsdConnectionElementType_t;
-
-/**
- * @enum TelSatBearerParamGprsPrecedenceClassType_t
- * This enum lists the SAT bearer parameter GPRS precedence class. refer  TS 23.107
- */
-typedef enum {
-       TAPI_SAT_BIP_GPRS_PRECED_CLASS_HIGH_PRIORITY = 0x01, /**<       GPRS precedence class -HIGH PRIORITY            */
-       TAPI_SAT_BIP_GPRS_PRECED_CLASS_NORM_PRIORITY = 0x02, /**<       GPRS precedence class -NORM PRIORITY            */
-       TAPI_SAT_BIP_GPRS_PRECED_CLASS_LOW_PRIORITY = 0x03 /**< GPRS precedence class - LOW PRIORITY            */
-} TelSatBearerParamGprsPrecedenceClassType_t;
-
-/**
- * @enum TelSatBearerParamGprsDelayClassType_t
- * This enum lists the SAT bearer parameter GPRS delay class.
- */
-typedef enum {
-       TAPI_SAT_BIP_GPRS_DELAY_CLASS_1 = 0x01, /**<    GPRS delay class - 1            */
-       TAPI_SAT_BIP_GPRS_DELAY_CLASS_2 = 0x02, /**<    GPRS delay class -      2       */
-       TAPI_SAT_BIP_GPRS_DELAY_CLASS_3 = 0x03, /**<    GPRS delay class -      3       */
-       TAPI_SAT_BIP_GPRS_DELAY_CLASS_4 = 0x04 /**<     GPRS delay class - 4            */
-} TelSatBearerParamGprsDelayClassType_t;
-
-/**
- * @enum TelSatBearerParamGprsReliabilityClassType_t
- * This enum lists the SAT bearer parameter GPRS Reliability class.
- */
-typedef enum {
-       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_1 = 0x01, /**<      GPRS Reliability class -1               */
-       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_2 = 0x02, /**<      GPRS Reliability class -2               */
-       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_3 = 0x03, /**<      GPRS Reliability class -3               */
-       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_4 = 0x04, /**<      GPRS Reliability class -4               */
-       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_5 = 0x05 /**<       GPRS Reliability class -5               */
-} TelSatBearerParamGprsReliabilityClassType_t;
-
-/**
- * @enum TelSatBearerParamGprsPeakThroughputClassType_t
- * This enum lists the SAT bearer parameter GPRS peak throughput class.
- */
-typedef enum {
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_8KBPS = 0x01, /**< GPRS peak throughput class- UPTO 8KBPS          */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_16KBPS = 0x02, /**<        GPRS peak throughput class- UPTO 16KBPS         */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_32KBPS = 0x03, /**<        GPRS peak throughput class-UPTO 32KBPS          */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_64KBPS = 0x04, /**<        GPRS peak throughput class-UPTO 64KBPS          */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_128KBPS = 0x05, /**<       GPRS peak throughput class- UPTO 128KBPS                        */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_256KBPS = 0x06, /**<       GPRS peak throughput class- UPTO 256KBPS                        */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_512KBPS = 0x07, /**<       GPRS peak throughput class- UPTO 512KBPS                */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_1024KBPS = 0x08, /**<      GPRS peak throughput class-UPTO 1024KBPS                */
-       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_2048KBPS = 0x09 /**<       GPRS peak throughput class- UPTO 2048KBPS               */
-} TelSatBearerParamGprsPeakThroughputClassType_t;
-
-/**
- * @enum TelSatBearerParamGprsMeanThroughputClassType_t
- * This enum lists the SAT bearer parameter GPRS mean throughput class.
- */
-typedef enum {
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_BPS = 0x01, /**< GPRS mean throughput class - DOT 22 BPS         */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_BPS = 0x02, /**< GPRS mean throughput class - DOT 44 BPS         */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_BPS = 0x03, /**<       GPRS mean throughput class -1 DOT 11 BPS                */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_BPS = 0x04, /**<        GPRS mean throughput class -2 DOT 2 BPS         */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_4_BPS = 0x05, /**<        GPRS mean throughput class -2 DOT 4 BPS                 */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_BPS = 0x06, /**<       GPRS mean throughput class - 11 DOT 1 BPS               */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_22BPS = 0x07, /**<      GPRS mean throughput class -22BPS               */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_44BPS = 0x08, /**<      GPRS mean throughput class - 44BPS              */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_111BPS = 0x09, /**<     GPRS mean throughput class - 111BPS             */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_KBPS = 0x0A, /**<        GPRS mean throughput class - DOT 22 KBPS                */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_KBPS = 0x0B, /**<        GPRS mean throughput class -DOT 44 KBPS                 */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_KBPS = 0x0C, /**<      GPRS mean throughput class -1 DOT 11 KBPS               */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_KBPS = 0x0D, /**<       GPRS mean throughput class -2 DOT 2 KBPS                */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_4_DOT_4_KBPS = 0x0E, /**<       GPRS mean throughput class - 4 DOT 4 KBPS               */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_KBPS = 0x0F, /**<      GPRS mean throughput class -11 DOT 1 KBPS               */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_22KBPS = 0x10, /**<     GPRS mean throughput class - 22KBPS             */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_44KBPS = 0x11, /**<     GPRS mean throughput class - 44KBPS             */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_111KBPS = 0x12, /**<    GPRS mean throughput class -111KBPS             */
-       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_BEST_EFFORT = 0x13 /**< GPRS mean throughput class - BEST EFFORT                */
-} TelSatBearerParamGprsMeanThroughputClassType_t;
-
-/**
- * @enum TelSatBearerParamGprsPdpType_t
- * This enum lists the SAT bearer parameter GPRS pdp type.
- */
-typedef enum {
-       TAPI_SAT_BIP_GPRS_PDP_TYPE_IP = 0x02, /**<      bearer parameter GPRS pdp type - IP             */
-       TAPI_SAT_BIP_GPRS_PDP_TYPE_RESERVED = 0xff /**< reserved                */
-} TelSatBearerParamGprsPdpType_t;
-
-/**
- * @enum TelSatBearerParamLocalLinksServiceIdentityType_t
- * This enum lists the SAT bearer parameters local links service identity.
- */
-typedef enum {
-       TAPI_SAT_BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_USIM = 0x00, /**<       local links service identity - value assigned by USIM           */
-       TAPI_SAT_BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_REMOTED_DEVICE = 0xFF /**<      local links service identity - value assigned by remote service */
-} TelSatBearerParamLocalLinksServiceIdentityType_t;
-
-/**
- * @enum TelSatChannelStatusType_t
- * This enum lists the SAT channel status type.
- */
-typedef enum {
-       TAPI_SAT_CS_LINK_ESTABLISHED_OR_PDP_CTX_NOT_ACTIVATED, /**<     channel status type-CS LINK ESTABLISHED OR PDP CTX NOT ACTIVATED                */
-       TAPI_SAT_CS_LINK_ESTABLISHED_OR_PDP_CTX_ACTIVATED, /**< channel status type-CS LINK ESTABLISHED OR PDP CTX ACTIVATED            */
-       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_CLOSED_STATE, /**<     channel status type-UICC SERVER MODE TCP IN CLOSED STATE                */
-       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_LISTEN_STATE, /**<     channel status type-UICC SERVER MODE TCP IN LISTEN STATE                */
-       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_ESTABLISHED_STATE, /**<        channel status type-UICC SERVER MODE TCP IN ESTABLISHED STATE           */
-       TAPI_SAT_UICC_SERVER_MODE_RESERVED /**< reserved                */
-} TelSatChannelStatusType_t;
-
-/**
- * @enum TelSatChannelStatusInfoType_t
- * This enum lists the SAT channel status info type.
- */
-typedef enum {
-       TAPI_SAT_CHANNEL_STATUS_NO_FURTHER_INFO_AVAILABLE = 0, /**<     CHANNEL STATUS NO FURTHER INFO AVAILABLE                */
-       TAPI_SAT_CHANNEL_STATUS_NOT_USED = 1, /**<      CHANNEL STATUS NOT USED                 */
-       TAPI_SAT_CHANNEL_STATUS_LINK_DROPPED = 5 /**<   CHANNEL STATUS LINK DROPPED     */
-} TelSatChannelStatusInfoType_t;
-
-/**
- * @enum TelSatAddressType_t
- * This enum lists the SAT address type.
- */
-typedef enum {
-       TAPI_SAT_ADDR_TYPE_IPv4 = 0x21, /**<    address type - IPv4     */
-       TAPI_SAT_ADDR_TYPE_IPv6 = 0x57, /**<    address type - IPv6     */
-       TAPI_SAT_ADDR_RESERVED = 0xFF /**<      reserved                */
-} TelSatAddressType_t;
-
-/**
- * @enum TelSatTransportProtocolType_t
- * This enum lists the SAT transport protocol type.
- */
-typedef enum {
-       TAPI_SAT_TP_TYPE_UDP_UICC_CLIENT = 0x01, /**<   transport protocol type- UDP UICC CLIENT        */
-       TAPI_SAT_TP_TYPE_TCP_UICC_CLIENT = 0x02, /**<   transport protocol type-TCP UICC CLIENT         */
-       TAPI_SAT_TP_TYPE_TCP_UICC_SERVER = 0x03 /**<    transport protocol type- TCP UICC SERVER        */
-} TelSatTransportProtocolType_t;
-
-/**
- * @enum TelSatRemoteEntityAddrCodingType_t
- * This enum lists the SAT remote entity address coding type.
- */
-typedef enum {
-       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IEEE802_48BIT = 0, /**< remote entity address coding type- IEEE802 48BIT                */
-       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IRDA_32BIT = 1, /**<    remote entity address coding type- IRDA 32BIT           */
-       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_RESERVED = 0xFF /**<    reserved                */
-} TelSatRemoteEntityAddrCodingType_t;
-
-/**
- * This structure defines the Address data object.
- */
-typedef struct {
-       TelSimTypeOfNum_t ton; /**<     type of number          */
-       TelSimNumberingPlanIdentity_t npi; /**< number plan identity            */
-       unsigned char diallingNumberLen; /**<   dialing number length           */
-       char diallingNumber[TAPI_SAT_DIALLING_NUMBER_LEN_MAX]; /**<     dialing number  */
-} TelSatAddressInfo_t;
-
-/**
- * This structure defines the data coding scheme object.
- */
-typedef struct {
-       int bIsCompressedFormat; /**<   flag to verify compressed format        */
-       TelSatAlphabetFormatType_t alphabetFormat; /**< alphabet format Type            */
-       TelSatMsgClassType_t msgClass; /**<     Type of message class           */
-       unsigned char rawDcs; /**<      raw dcs info            */
-} TelSatDataCodingSchemeInfo_t;
-
-/**
- * This structure defines the Alpha ID data object.
- */
-typedef struct {
-       int bIsPresent; /**<    flag for checking existence of alpha identifier         */
-       TelSatDataCodingSchemeInfo_t dcs; /**<  dcs info                */
-       unsigned char stringLen; /**<   alpha identifier length                 */
-       char string[TAPI_SAT_ALPHA_ID_LEN_MAX]; /**<    alpha identifier info   */
-} TelSatAlphaIdentifierInfo_t;
-
-/**
- * This structure defines the Sub Address data object.
- */
-typedef struct {
-       unsigned char subAddressLen; /**<       sub address length              */
-       char subAddress[TAPI_SAT_SUB_ADDR_LEN_MAX]; /**<        sub address             */
-} TelSatSubAddressInfo_t;
-
-/**
- * This structure defines the Capability Configuration Parameters data object.
- */
-typedef struct {
-       unsigned char dataLen; /**<     capability configuration parameter length       */
-       char data[TAPI_SAT_CCP_DATA_LEN_MAX]; /**<      capability configuration parameter      */
-} TelSatCapaConfigParamInfo_t;
-
-/**
- * This struct defines the Command qualifier values for send SMS command.
- */
-typedef struct {
-       int bIsPackingByMeRequired; /**<        flag to verify packing requirement, if FALSE, packing by ME not required        */
-} TelSatCmdQualiSendSms_t;
-
-/**
- * This struct defines the Command qualifier values for display text command.
- */
-typedef struct {
-       TelSatDisplayTextPriorityType_t msgPriority; /**<       message priority                */
-       TelSatDisplayTextMsgClearType_t msgClear; /**<  message clear type              */
-} TelSatCmdQualiDisplayText_t;
-
-/**
- * This struct defines the Command qualifier values for get inkey command.
- */
-typedef struct {
-       TelSatInkeyType_t inkeyType; /**<       inkey type              */
-       int bIsUsingAlphabetSet; /**<   flag for checking whether using alphabet set or not. if FALSE, digits(0-9,*,#and+) only         */
-       TelSatUseInputAlphabetType_t alphabetType; /**< alphabet type           */
-       int bIsImmediateResponseRequired;/**<   flag for checking whether immediate response required or not            */
-       int bIsHelpInfoAvailable; /**<  flag for checking whether help info available or not. if FALSE, no help information available   */
-} TelSatCmdQualiGetInkey_t;
-
-/**
- * This struct defines the Command qualifier values for get input command.
- */
-typedef struct {
-       int bIsUsingAlphabetSet; /**<   flag for checking whether using alphabet set. if FALSE, digits(0-9,*,#and+) only        */
-       TelSatUseInputAlphabetType_t alphabetType; /**< alphabet type. only using alphabet set case.            */
-       int bIsMeEchoUserInput; /**<    flag for checking whether ME should echo user input. if FALSE, user input shall not be displayed*/
-       int bIsUserInputUnpackedFormat; /**<    flag for checking whether user input is in unpacked format or not.  if FALSE, user input in SMS packed format   */
-       int bIsHelpInfoAvailable; /**<  flag to verify if help info available or not. if FALSE, no help information available   */
-} TelSatCmdQualiGetInput_t;
-
-/**
- * This struct defines the Command qualifier values for play tone command.
- */
-typedef struct {
-       TelSatDisplayVibrateAlertType_t vibrateAlert; /**<      type of vibrate alert           */
-} TelSatCmdQualiPlayTone_t;
-
-/**
- * This struct defines the Command qualifier values for select item command.
- */
-typedef struct {
-       TelSatPresentationType_t presentationType; /**< type of presentation. only presentation type specified          */
-       TelSatSelectionPreferenceType_t selectionPreference; /**<       type of selection preference            */
-       int bIsHelpInfoAvailable; /**<  flag for checking whether help info available or not. if FALSE, no help information available   */
-} TelSatCmdQualiSelectItem_t;
-
-/**
- * This struct defines the Command qualifier values for setup menu command.
- */
-typedef struct {
-       TelSatSelectionPreferenceType_t selectionPreference; /**<       type of selection preference            */
-       int bIsHelpInfoAvailable; /**<  flag to verify help info available or not. if FALSE, no help information available      */
-} TelSatCmdQualiSetupMenu_t;
-
-/**
- * This struct defines the Command qualifier values for language notification command.
- */
-typedef struct {
-       int bSpecificLanguageNotification; /**< flag for specific language notification. if FALSE, non-specific language notification   */
-} TelSatCmdQualiLanguageNotification_t;
-
-/**
- * SAT command qualifier open channel
- */
-typedef struct {
-       int bIsEstablishImmediateLink; /**<     flag whether establishing immediate link or not. if FALSE, on demand link establishment */
-       int bIsAutomaticReconnection; /**<      flag whether automatic reconnection or not. if FALSE, no automatic reconnection */
-       int bIsModeBackground; /**<     flag whether background mode or not.            */
-} TelSatCmdQualiOpenChannel_t;
-
-/**
- * SAT command qualifier send data
- */
-typedef struct {
-       int bIsSendDataImmediately; /**<        flag whether to send data immediately or not. if FALSE, store data in Tx buffer*/
-} TelSatCmdQualiSendData_t;
-
-/**
- * This structure contains the command number, type and the qualifier objects of a SATK command.
- */
-typedef struct {
-       unsigned char commandNumber; /**< specific command number       */
-       TelSatCommandType_t commandType; /**<   proactive command type          */
-
-       union {
-               TelSatCmdQualiRefresh_t cmdQualiRefresh; /**<   refresh command qualifier info  */
-               TelSatCmdQualiSetupCall_t cmdQualiSetupCall; /**<       setup call command qualifier info       */
-               TelSatCmdQualiSendSms_t cmdQualiSendSms; /**<   send sms command qualifier info */
-               TelSatCmdQualiDisplayText_t cmdQualiDisplayText; /**<   display text command qualifier info     */
-               TelSatCmdQualiGetInkey_t cmdQualiGetInkey; /**< get inkey command qualifier info        */
-               TelSatCmdQualiGetInput_t cmdQualiGetInput; /**< get input command qualifier info        */
-               TelSatCmdQualiPlayTone_t cmdQualiPlayTone; /**< play tone command qualifier info        */
-               TelSatCmdQualiSelectItem_t cmdQualiSelectItem; /**<     select item command qualifier info      */
-               TelSatCmdQualiSetupMenu_t cmdQualiSetupMenu; /**<       setup menu command qualifier info       */
-               TelSatCmdQualiProvideLocalInfo_t cmdQualiProvideLocalInfo;/**<  provide local info command qualifier info       */
-               TelSatCmdQualiLanguageNotification_t cmdQualiLanguageNotification;/**<  language notification command qualifier info    */
-               TelSatCmdQualiLaunchBrowser_t cmdQualiLaunchBrowser; /**<       launch Browser command qualifier info   */
-               TelSatCmdQualiOpenChannel_t cmdQualiOpenChannel; /**<   Open channel command qualifier info     */
-               TelSatCmdQualiSendData_t cmdQualiSendData; /**< send data command qualifier info        */
-       } u; /**<       Union   */
-} TelSatCommandDetailInfo_t;
-
-/**
- * This struct defines the device identity values.
- */
-typedef struct {
-       TelSatDeviceIdentitiesTagType_t source; /**<    device identity tag for source  */
-       TelSatDeviceIdentitiesTagType_t destination; /**<       device identity for destination */
-} TelSatDeviceIdentitiesInfo_t;
-
-/**
- * This structure defines the Duration data object.
- */
-typedef struct {
-       TelSatTimeUnitType_t timeUnit; /**<     time units for the duration data                */
-       unsigned char timeInterval; /**<        time interval           */
-} TelSatDurationInfo_t;
-
-/**
- * This structure defines the menu item data object.
- */
-typedef struct {
-       unsigned char itemId; /**<      item identifier                 */
-       unsigned char textLen; /**<     text length             */
-       unsigned char text[TAPI_SAT_ITEM_TEXT_LEN_MAX + 1]; /**<        text information                */
-} TelSatMenuItemInfo_t;
-
-/**
- * This structure defines the item identifier object.
- */
-typedef struct {
-       unsigned char selectedItemIdentifier; /**<      selected item identifier                */
-} TelSatItemIdentifierInfo_t;
-
-/**
- * This structure defines expected user response length.
- */
-typedef struct {
-       unsigned char min; /**< user response length minimum value              */
-       unsigned char max; /**< user response length maximum value              */
-} TelSatRespLenInfo_t;
-
-/**
- * This structure defines RESUlT data object.
- */
-typedef struct {
-       TelSatResultType_t generalResult; /**<  general result  */
-       TelSatMeProblemType_t meProblem; /**<   additional information on general result        */
-} TelSatResultInfo_t;
-
-/**
- * This structure defines RESUlT data object.
- */
-typedef struct {
-       TelSatSmsTpduType_t tpduType; /**<      SMS TPDU TYPE   */
-       unsigned char dataLen; /**<     SMS TPDU DATA LENGTH    */
-       unsigned char data[TAPI_SAT_SMS_TPDU_SMS_DATA_LEN_MAX]; /**< SMS TPDU DATA*/
-} TelSatSmsTpduInfo_t;
-
-/**
- * This structure defines SS STRING data object.
- */
-typedef struct {
-       TelSimTypeOfNum_t ton; /**<     type of number  */
-       TelSimNumberingPlanIdentity_t npi; /**< number plan identity    */
-       unsigned char stringLen; /**<   ss string length        */
-       char string[TAPI_SAT_SS_STRING_LEN_MAX]; /**<   ss string       */
-} TelSatSsStringInfo_t;
-
-/**
- * This structure defines TEXT STRING data object.
- */
-typedef struct {
-       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
-       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme              */
-       unsigned short stringLen; /**<  text length             */
-       char string[TAPI_SAT_TEXT_STRING_LEN_MAX + 1]; /**<     text string     */
-} TelSatTextTypeInfo_t;
-
-/**
- * This structure defines menu item text object.
- */
-typedef struct {
-       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
-       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme              */
-       unsigned char stringLen; /**<   menu item string length */
-       char* pString; /**<     Menu Item String */
-} TelSatMenuItemTextInfo_t;
-
-/**
- * This structure defines tone object.
- */
-typedef struct {
-       TelSatToneType_t type; /**<     tone type       */
-} TelSatToneInfo_t;
-
-/**
- * This structure defines USSD string data object.
- */
-typedef struct {
-       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme      */
-       unsigned char ussdStringLen; /**<       ussd string length      */
-       char ussdString[TAPI_SAT_USSD_STRING_LEN_MAX]; /**<     ussd string     */
-} TelSatUssdStringInfo_t;
-
-/**
- * This structure defines File list data object.
- */
-typedef struct {
-       unsigned char fileCount; /**<   file count      */
-//     TelSimFileName_t fileId[TAPI_SAT_FILE_ID_LIST_MAX_COUNT]; /**<  file identifier */
-} TelSatFileListInfo_t;
-
-/**
- * This structure defines default text data object.
- */
-typedef struct {
-       int bIsPresent; /**<    flag for checking whether default text exists or not    */
-       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
-       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme      */
-       unsigned char stringLen; /**<   default text string length              */
-       char string[TAPI_SAT_TEXT_STRING_LEN_MAX]; /**< default text    */
-} TelSatDefaultTextInfo_t;
-
-/**
- * This structure defines Next Action Indicator List data object.
- */
-typedef struct {
-       unsigned char listCount; /**<   next action identifier count    */
-       unsigned char list[TAPI_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT]; /**<        next action identifier list     */
-} TelSatItemsNextActionIndiListInfo_t;
-
-/**
- * This structure defines event list data object.
- */
-typedef struct {
-       unsigned char eventListCount; /**<      event list count        */
-       TelSatEventDownloadType_t list[TAPI_SAT_EVENT_LIST_MAX_COUNT]; /**<     event list */
-} TelSatEventListInfo_t;
-
-/**
- * This structure defines icon info object.
- */
-typedef struct {
-       unsigned char width; /**<       icon width              */
-       unsigned char height; /**<      icon height     */
-       TelSatImageCodingSchemeType_t ics; /**< image coding scheme     */
-       unsigned short iconDataLen; /**<        icon data length        */
-       unsigned short clutDataLen; /**<        clut data length        */
-       char iconFile[TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX];
-       char clutFile[TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX];
-} TelSatIconInfo_t;
-
-/**
- * This structure defines icon data object.
- */
-typedef struct {
-       int bIsPresent; /**<    flag for checking whether icon identifier exists or not         */
-       TelSatIconQualifierType_t iconQualifier; /**<   icon qualifier type             */
-       unsigned char iconIdentifier; /**<      icon identifier         */
-       TelSatIconInfo_t iconInfo; /**< icon info       */
-} TelSatIconIdentifierInfo_t;
-
-/**
- * This structure defines icon identifier data object.
- */
-typedef struct {
-       int bIsPresent; /**<    flag for checking whether icon identifier exists or not */
-       TelSatIconQualifierType_t iconListQualifier; /**<       icon list qualifier     */
-       unsigned char iconCount; /**<   icon count      */
-       unsigned char iconIdentifierList[TAPI_SAT_ICON_LIST_MAX_COUNT]; /**<    icon identifier list    */
-       TelSatIconInfo_t iconInfo[TAPI_SAT_ICON_LIST_MAX_COUNT]; /**<   icon list info  */
-} TelSatIconIdentifierListInfo_t;
-
-/**
- * This structure defines SAT bc repeat indicator Info
- */
-typedef struct {
-       TelSatBcRepeatIndicatorType_t indType; /**<     bc repeat indicator type        */
-} TelSatBcRepeatIndicatorInfo_t;
-
-/**
- * This structure defines call control strings.
- */
-typedef struct {
-       TelSatCallCtrlStringType_t callCtrlStringType; /**<     call control type       */
-       union {
-               TelSatAddressInfo_t voiceString; /**<   voice call string       */
-               TelSatSsStringInfo_t ssString; /**<     ss string       */
-               TelSatUssdStringInfo_t ussdString; /**< ussd string     */
-       } u; /**<       Union   */
-} TelSatCallCtrlAddressStringInfo_t;
-
-/**
- * This structure defines the Action requested call control data.
- */
-typedef struct {
-       TelSatCallCtrlAddressStringInfo_t callCtrlAddString; /**< Call control address string */
-       TelSatCapaConfigParamInfo_t ccp1; /**< Capability configuration parameter 1 */
-       TelSatSubAddressInfo_t subAddress; /**< Subaddress */
-       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier */
-       TelSatBcRepeatIndicatorInfo_t bcRepeatIndicator; /**< Bc repeat indicator */
-       TelSatCapaConfigParamInfo_t ccp2; /**< Capability configuration parameter 2 */
-} TelSatCallCtrlRequestedActionInfo_t;
-
-/**
- * This structure defines dtmf string data object.
- */
-typedef struct {
-       unsigned char stringLen; /**<   dtmf string lengh       */
-       char dtmfTone[TAPI_SAT_DTMF_STRING_LEN_MAX]; /**<       dtmf tone data  */
-} TelSatDtmfStringInfo_t;
-
-/**
- * This structure defines language data object.
- */
-typedef struct {
-       TelSatLanguageType_t language; /**<     language type   */
-} TelSatLanguageInfo_t;
-
-/**
- * This structure defines date time and time zone data object.
- */
-typedef struct {
-       unsigned char year; /**<        year    */
-       unsigned char month; /**<       month   */
-       unsigned char day; /**< day     */
-       unsigned char hour; /**<        hour    */
-       unsigned char minute; /**<      minute  */
-       unsigned char second; /**<      second  */
-       unsigned char timeZone; /**<    timeZone        */
-} TelSatDataTimeZoneInfo_t;
-
-/**
- * This structure defines SAT browser identities.
- */
-typedef struct {
-       TelSatBrowserIdentityType_t browserIdentity; /**<       browser identity        */
-} TelSatBrowserIdentitiesInfo_t;
-
-/**
- * This structure defines SAT browser URL Data Object.
- */
-typedef struct {
-       char string[TAPI_SAT_URL_LEN_MAX + 1]; /**<     url string      */
-} TelSatUrlInfo_t;
-
-/**
- * This structure defines SAT bearer type.
- */
-typedef struct {
-       unsigned char listLen; /**<     bearer list length      */
-       TelSatBearerType_t bearerList[TAPI_SAT_BEARER_LIST_MAX_COUNT]; /**<     bearer list     */
-} TelSatBearerInfo_t;
-
-/**
- * This structure defines SAT provisioning reference.
- */
-typedef struct {
-       char provisioningFilePath[TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX]; /**<        provisioning file path  */
-} TelSatProvisioningRefInfo_t;
-
-/**
- * This structure defines SAT browser termination cause.
- */
-typedef struct {
-       TelSatBrowserTerminationCauseType_t cause; /**< browser termination cause       */
-} TelSatBrowserTerminationCauseInfo_t;
-
-/**
- * This structure defines SAT Csd bearer parameters .
- */
-typedef struct {
-       TelSatBearerParamCsdDataRateType_t dataRate; /**<       bearer csd data rate    */
-       TelSatBearerParamCsdBearerServiceType_t bearerService; /**<     bearer csd service type */
-       TelSatBearerParamCsdConnectionElementType_t connectionElement; /**<     bearer connection element type  */
-} TelSatBearerParametersCsdInfo_t;
-
-/**
- * This structure defines SAT bearer parameters GPRS.
- */
-typedef struct {
-       TelSatBearerParamGprsPrecedenceClassType_t precedenceClass; /**<        bearer gprs     precedence class        */
-       TelSatBearerParamGprsDelayClassType_t delayClass; /**<  bearer gprs delay       */
-       TelSatBearerParamGprsReliabilityClassType_t reliabilityClass; /**<      bearer gprs reliability */
-       TelSatBearerParamGprsPeakThroughputClassType_t peakThroughputClass;/**< bearer gprs peak throughput     */
-       TelSatBearerParamGprsMeanThroughputClassType_t meanThroughputClass;/**< bearer gprs mean throughput     */
-       TelSatBearerParamGprsPdpType_t pdpType; /**<    bearer gprs pdp type    */
-} TelSatBearerParametersGprsInfo_t;
-
-/**
- * This structure defines SAT bearer parameters local links.
- */
-typedef struct {
-       TelSatBearerParamLocalLinksServiceIdentityType_t serviceIdentifier; /**<        bearer local link service identifier            */
-       char serviceRecord[TAPI_SAT_BEARER_PARAMS_LEN_MAX]; /**<        bearer local link service record        */
-} TelSatBearerParametersLocalLinksInfo_t;
-
-/**
- * This structure defines SAT bearer description.
- */
-typedef struct {
-       TelSatBearerDescType_t bearerType; /**< bearer type     */
-       union {
-               TelSatBearerParametersCsdInfo_t bearerParamsCsd; /**<   csd     */
-               TelSatBearerParametersGprsInfo_t bearerParamsGprs; /**< gprs    */
-               TelSatBearerParametersLocalLinksInfo_t bearerParamsLocalLinks; /**<     local link      */
-       } bearer_params; /**<Union */
-} TelSatBearerDescriptionInfo_t;
-
-/**
- * This structure defines SAT channel data.
- */
-typedef struct {
-       unsigned char channelDataStringLen; /**<        channel data length     */
-       char channelDataString[TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX]; /**<      channel data    */
-} TelSatChannelDataInfo_t;
-
-/**
- * This structure defines SAT channel data length.
- */
-typedef struct {
-       unsigned char channelDataLen; /**<      channel data length     */
-} TelSatChannelDataLengthInfo_t;
-
-/**
- * This structure defines SAT buffer size.
- */
-typedef struct {
-       unsigned char bufferSize[2]; /**<       channel data buffer size        */
-} TelSatBufferSizeInfo_t;
-
-/**
- * This structure defines SAT channel status.
- */
-typedef struct {
-       unsigned char channelId; /**<   channel id      */
-       TelSatChannelStatusType_t status; /**<  channel status          */
-       TelSatChannelStatusInfoType_t channelInfo; /**< channel status info     */
-} TelSatChannelStatusInfo_t;
-
-/**
- * This structure defines SAT other address.
- */
-typedef struct {
-       TelSatAddressType_t addressType; /**<   channel address type    */
-       unsigned char addressLen; /**<  channel address length  */
-       char address[TAPI_SAT_OTHER_ADDR_LEN_MAX]; /**< channel address */
-} TelSatOtherAddressInfo_t;
-
-/**
- * This structure defines SIM me interface transport level.
- */
-typedef struct {
-       TelSatTransportProtocolType_t transportProtocolType; /**<       transport protocol type */
-       unsigned short portNumber; /**< port number     */
-} TelSatSimMeInterfaceTransportLevelInfo_t;
-
-/**
- * This structure defines SAT network access name.
- */
-typedef struct {
-       unsigned char length; /**<      network access name length      */
-       unsigned char netAccName[TAPI_SAT_NET_ACC_NAM_LEN_MAX]; /**<    network access name     */
-} TelSatnetworkAccessNameInfo_t;
-
-/**
- * This structure defines SAT aid.
- */
-typedef struct {
-       char aid[TAPI_SAT_AID_LEN_MAX]; /**<    application Id  */
-} TelSatAidInfo_t;
-
-/**
- * This structure defines SAT remote entity address.
- */
-typedef struct {
-       TelSatRemoteEntityAddrCodingType_t codingType; /**<     remote entity address coding type       */
-       unsigned short length; /**<     remote entity address length    */
-       unsigned char remoteEntityAddress[TAPI_SAT_REMOTE_ENTITY_ADDR_LEN_MAX]; /**<    remote entity address data      */
-} TelSatRemoteEntityAddressInfo_t;
-
-/**
- * This structure defines SAT text attribute.
- */
-typedef struct {
-       unsigned char textFormatting[4]; /**<   text attribute -e.g. bold, center align, etc    */
-} TelSatTextAttributeInfo_t;
-
-/**
- * This structure defines SAT text attribute list.
- */
-typedef struct {
-       unsigned int listCount; /**<    text attribute list count               */
-       TelSatTextAttributeInfo_t list[TAPI_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT]; /**<      text attribute list info        */
-} TelSatTextAttributeListInfo_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TEL_SAT_OBJ_H_ */
-
-/**
- * @}
- */
diff --git a/include/TelSatProactvCmd.h b/include/TelSatProactvCmd.h
deleted file mode 100644 (file)
index 86ad042..0000000
+++ /dev/null
@@ -1,704 +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 SAT_TAPI        SAT
- * @{
- *
- * @file TelSatProactvCmd.h
-
- @brief This file serves as a "C" header file defines structures for Tapi SAT Proactive commands and terminal response Services. \n
- It contains a sample set of constants, enums, structs that would be required by applications.
- */
-
-#ifndef _TEL_SAT_PROACTV_CMD_H_
-#define _TEL_SAT_PROACTV_CMD_H_
-
-#include <TelSatObj.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define TAPI_SAT_MENU_ITEM_COUNT_MAX                   40      /**<    max count of sat menu items     */
-#define TAPI_SAT_PROVISIONING_REF_MAX_COUNT            10      /**<    max count of sat provisioning reference */
-
-/**
- * This structure contains the data objects for DISPLAY TEXT proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-} TelSatMoreTimeIndInfo_t;
-
-/**
- * This structure contains the data objects for DISPLAY TEXT proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatTextTypeInfo_t text; /**< display text info       */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       int bImmediateRespRequested; /**<       flag for checking whether immediate response required or not    */
-       TelSatDurationInfo_t duration; /**<     duration for which text should be displayed     */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatDisplayTextIndInfo_t;
-
-/**
- * This structure contains the data objects for GET INKEY proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatTextTypeInfo_t text; /**< display text info       */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatDurationInfo_t duration; /**<     duration for which text should be displayed     */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatGetInkeyIndInfo_t;
-
-/**
- * This structure contains the data objects for GET INPUT proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatTextTypeInfo_t text; /**< display text info       */
-       TelSatRespLenInfo_t respLen; /**<       input response length   */
-       TelSatTextTypeInfo_t defaultText; /**<  default text info       */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatGetInputIndInfo_t;
-
-/**
- * This structure contains the data objects for PLAY TONE proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatToneInfo_t tone; /**<     tone info       */
-       TelSatDurationInfo_t duration; /**<     duration for which tone should be played        */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatPlayToneIndInfo_t;
-
-/**
- * This structure contains the data objects for SETUP MENU proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       unsigned char menuItemCount; /**<       count of menu items     */
-       TelSatMenuItemInfo_t menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**<       menu item data  */
-       TelSatItemsNextActionIndiListInfo_t itemNextActionIndList; /**< next action indication list     */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatIconIdentifierListInfo_t iconIdList; /**< icon identifier list info       */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-       TelSatTextAttributeListInfo_t itemTextAttributeList; /**<       item text attribute list        */
-} TelSatSetupMenuIndInfo_t;
-
-/**
- * This structure contains the data objects for SELECT ITEM proactive command indication data.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatItemsNextActionIndiListInfo_t itemNextActionIndList; /**< next action indication list     */
-       unsigned char defaultItemIdentifier; /**<       default item identifier(default selected item id)       */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatIconIdentifierListInfo_t iconIdList; /**< icon identifier list info       */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-       TelSatTextAttributeListInfo_t itemTextAttributeList; /**<       item text attribute list        */
-       unsigned char menuItemCount; /**<       count of menu items     */
-       TelSatMenuItemInfo_t menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**<       menu item data  */
-} TelSatSelectItemIndInfo_t;
-
-/**
- * This structure contains the data objects for SEND SHORT MESSAGE proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatAddressInfo_t address; /**<       address for sending sms */
-       TelSatSmsTpduInfo_t smsTpdu; /**<       sms tpdu info   */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatSendSmsIndInfo_t;
-
-/**
- * This structure contains the data objects for SEND SS proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatSsStringInfo_t ssString; /**<     ss string       */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatSendSsIndInfo_t;
-
-/**
- * This structure contains the data objects for SEND USSD proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatUssdStringInfo_t ussdString; /**< ussd string info        */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatSendUssdIndInfo_t;
-
-/**
- * This structure contains the data objects for SETUP CALL proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAddressInfo_t address; /**<       setup call address info*/
-       TelSatCapaConfigParamInfo_t ccp; /**<   capability configuration parameter      */
-       TelSatSubAddressInfo_t subAddress; /**< setup call sub address  */
-       TelSatDurationInfo_t duration; /**<     command execution time duration */
-       TelSatAlphaIdentifierInfo_t userConfirmPhaseAlphaId;/**<        user Confirmation Phase AlphaId */
-       TelSatAlphaIdentifierInfo_t callSetupPhaseAlphaId; /**< call Setup Phase AlphaId        */
-       TelSatIconIdentifierInfo_t userConfirmPhaseIconId; /**< user Confirmation Phase IconId  */
-       TelSatIconIdentifierInfo_t callSetupPhaseIconId; /**<   call Setup Phase IconId */
-       TelSatTextAttributeInfo_t userConfirmPhaseTextAttribute; /**<   user Confirmation Phase Text Attribute  */
-       TelSatTextAttributeInfo_t callSetupPhaseTextAttribute; /**<     call Setup PhaseText Attribute  */
-} TelSatSetupCallIndInfo_t;
-
-/**
- * This structure contains the data objects for REFRESH proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatFileListInfo_t fileList; /**<     file list for refresh   */
-       TelSatAidInfo_t aid; /**<       application Id  */
-} TelSatRefreshIndInfo_t;
-
-/**
- * This structure contains the data objects for PROVIDE LOCAL INFO proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-
-} TelSatProvideLocalInfoIndInfo_t;
-
-/**
- * This structure contains the data objects for SETUP EVENT LIST proactive command indication data.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatEventListInfo_t eventList; /**<   event list contains events which are required by USIM application       */
-
-} TelSatSetupEventListIndInfo_t;
-
-/**
- * This structure contains the data objects for SETUP IDLE MODE TEXT proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatTextTypeInfo_t text; /**< text to be shown on idle screen */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatSetupIdleModeTextIndInfo_t;
-
-/**
- * This structure contains the data objects for SEND DTMF COMMAND proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatDtmfStringInfo_t dtmfString; /**< dtmf string     */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatSendDtmfIndInfo_t;
-
-/**
- * This structure contains the data objects for LANGUAGE NOTIFICATION proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatLanguageInfo_t language; /**<     language info from USIM application     */
-} TelSatLanguageNotificationIndInfo_t;
-
-/**
- * This structure contains the data objects for LAUNCH BROWSER proactive command indication.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatBrowserIdentitiesInfo_t browserId; /**<   browser identity        */
-       TelSatUrlInfo_t url; /**<       url     */
-       TelSatBearerInfo_t bearer; /**< bearer which is used by browser */
-       unsigned char provisioningRefCount; /**<        provisioning reference count    */
-       TelSatProvisioningRefInfo_t provisioningRef[TAPI_SAT_PROVISIONING_REF_MAX_COUNT]; /**<  provisioning reference data     */
-       TelSatTextTypeInfo_t text; /**< display text info       */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatLaunchBrowserIndInfo_t;
-
-/**
- * This structure contains the data objects for OPEN CHANNEL CSB proactive command indication data.
- */
-typedef struct {
-       TelSatAddressInfo_t address; /**<       channel address */
-       TelSatSubAddressInfo_t subAddress; /**< channel sub address     */
-       TelSatDurationInfo_t duration1; /**<    connection require time */
-       TelSatDurationInfo_t duration2; /**<    connection require time2        */
-       TelSatBearerParametersCsdInfo_t bearerParamsCsd; /**<   csd info        */
-       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
-       TelSatOtherAddressInfo_t otherAddress; /**<     otherAddress    */
-       TelSatTextTypeInfo_t userLogin; /**<    userLogin       */
-       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
-       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
-       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
-} TelSatOpenChannelCsbInfo_t;
-
-/**
- * This structure contains the data objects for OPEN CHANNEL (packet) proactive command indication data.
- */
-typedef struct {
-       TelSatBearerParametersGprsInfo_t bearerParamsGprs; /**< gprs info       */
-       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
-       TelSatnetworkAccessNameInfo_t networkAccessName; /**<   networkAccessName       */
-       TelSatOtherAddressInfo_t otherAddress; /**<     otherAddress    */
-       TelSatTextTypeInfo_t userLogin; /**<    userLogin       */
-       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
-       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
-       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatOpenChannelpdbInfo_t;
-
-/**
- * This structure contains the data objects for OPEN CHANNEL LOCAL LINK proactive command indication data.
- */
-typedef struct {
-       TelSatDurationInfo_t duration1; /**<    command execution time duration1        */
-       TelSatDurationInfo_t duration2; /**<    command execution time duration2        */
-       TelSatBearerParametersLocalLinksInfo_t bearerParamsLocalLinks; /**<     local link info */
-       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
-       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
-       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
-       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
-       TelSatRemoteEntityAddressInfo_t remoteEntityAddress; /**<       remoteEntityAddress     */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatOpenChannelLocalBearerInfo_t;
-
-/**
- * This structure contains the data objects for OPEN CHANNEL (DEFAULT BEARER) proactive command indication data.
- */
-typedef struct {
-       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
-       TelSatOtherAddressInfo_t otherAddress; /**<     otherAddress    */
-       TelSatTextTypeInfo_t userLogin; /**<    userLogin       */
-       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
-       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel;/**<      simMeInterfaceTransportLevel    */
-       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
-} TelSatOpenChannelDefaultBearerInfo_t;
-
-/**
- * This structure contains the data objects for OPEN CHANNEL (UICC Server Mode) proactive command indication data.
- */
-typedef struct {
-       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
-       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
-} TelSatOpenChannelUiccServerModeInfo_t;
-
-/**
- * This structure contains the data objects for OPEN CHANNEL proactive command indication data.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       int bIsUiccServerMode; /**<     flag whether UICC server mode or not    */
-       TelSatBearerDescType_t bearerType; /**< bearer destination type */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       union {
-               TelSatOpenChannelCsbInfo_t csBearer; /**<       cs info */
-               TelSatOpenChannelpdbInfo_t pdBearer; /**<       pbd info        */
-               TelSatOpenChannelLocalBearerInfo_t locBearer; /**<      local link info */
-               TelSatOpenChannelDefaultBearerInfo_t defaultBearer; /**<        defaultBearer   */
-               TelSatOpenChannelUiccServerModeInfo_t uiccServerMode; /**<      uiccServerMode  */
-       } details; /**< Open Channel Details */
-} TelSatOpenChannelIndInfo_t;
-
-/**
- * This structure contains the data objects for CLOSE CHANNEL proactive command indication data.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
-} TelSatCloseChannelIndInfo_t;
-
-/**
- * This structure contains the data objects for RECEIVE DATA proactive command indication data.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatChannelDataLengthInfo_t channelDataLen; /**<      channel data length     */
-} TelSatReceiveDataIndInfo_t;
-
-/**
- * This structure contains the data objects for SEND DATA proactive command indication data.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-       TelSatAlphaIdentifierInfo_t alphaId; /**<       alpha identifier(string) info   */
-       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
-       TelSatChannelDataInfo_t channel_data; /**<      channel data for sending        */
-} TelSatSendDataIndInfo_t;
-
-/**
- * This structure contains the data objects for GET CHANNEL STATUS proactive command indication data.
- */
-typedef struct {
-       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
-       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
-} TelSatGetChannelStatusIndInfo_t;
-
-/**
- * This structure contains the data object for END PROACTIVE SESSION command indication.
- */
-typedef struct {
-       TelSatCommandType_t commandType; /**<   proactive command type  */
-} TelSatEndProactiveSessionIndInfo_t;
-
-/**
- * This structure contains the data objects for PROACTIVE command indication union data.
- */
-typedef struct {
-       union {
-               TelSatMoreTimeIndInfo_t moreTime;
-               TelSatDisplayTextIndInfo_t displayText; /**<    Parsed proactive command info from TLV to Telephony data type - display text    */
-               TelSatGetInkeyIndInfo_t getInkey; /**<  Parsed proactive command info from TLV to Telephony data type - getInkey        */
-               TelSatGetInputIndInfo_t getInput; /**<  Parsed proactive command info from TLV to Telephony data type - getInput        */
-               TelSatPlayToneIndInfo_t playTone; /**<  Parsed proactive command info from TLV to Telephony data type - play tone       */
-               TelSatSetupMenuIndInfo_t setupMenu; /**<        Parsed proactive command info from TLV to Telephony data type - setup menu      */
-               TelSatSelectItemIndInfo_t selectItem; /**<      Parsed proactive command info from TLV to Telephony data type - select item     */
-               TelSatSendSmsIndInfo_t sendSms; /**<    Parsed proactive command info from TLV to Telephony data type - send sms        */
-               TelSatSendSsIndInfo_t sendSs; /**<      Parsed proactive command info from TLV to Telephony data type - send ss */
-               TelSatSendUssdIndInfo_t sendUssd; /**<  Parsed proactive command info from TLV to Telephony data type - send  ussd      */
-               TelSatSetupCallIndInfo_t setupCall; /**<        Parsed proactive command info from TLV to Telephony data type - setup call      */
-               TelSatRefreshIndInfo_t refresh; /**<    Parsed proactive command info from TLV to Telephony data type - refresh */
-               TelSatProvideLocalInfoIndInfo_t provideLocInfo; /**<    Parsed proactive command info from TLV to Telephony data type - provide local info      */
-               TelSatLaunchBrowserIndInfo_t launchBrowser; /**<        Parsed proactive command info from TLV to Telephony data type - launch browser  */
-               TelSatSetupIdleModeTextIndInfo_t idleText; /**< Parsed proactive command info from TLV to Telephony data type - setup idle mode text    */
-               TelSatSendDtmfIndInfo_t sendDtmf; /**<  Parsed proactive command info from TLV to Telephony data type - send dtmf       */
-               TelSatLanguageNotificationIndInfo_t languageNotification;/**<   Parsed proactive command info from TLV to Telephony data type - language notification   */
-               TelSatSetupEventListIndInfo_t setupEventList; /**<      Parsed proactive command info from TLV to Telephony data type - setup event list        */
-               TelSatOpenChannelIndInfo_t openChannel; /**<    Parsed proactive command info from TLV to Telephony data type - open channel    */
-               TelSatCloseChannelIndInfo_t closeChannel; /**<  Parsed proactive command info from TLV to Telephony data type - close channel   */
-               TelSatReceiveDataIndInfo_t receiveData; /**<    Parsed proactive command info from TLV to Telephony data type - receive data    */
-               TelSatSendDataIndInfo_t sendData; /**<  Parsed proactive command info from TLV to Telephony data type - send data       */
-               TelSatGetChannelStatusIndInfo_t getChannelStatus; /**<  Parsed proactive command info from TLV to Telephony data type - get channel status      */
-       } cmdInfo; /**< Union   */
-} TelSatProactiveCmdData_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of DISPLAY TEXT proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatDisplayTextRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of GET INKEY proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       TelSatTextTypeInfo_t text; /**< inserted key info       */
-       TelSatDurationInfo_t duration;
-} TelSatGetInkeyRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of PLAY TONE proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatPlayToneRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of MORE TIME proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatMoreTimeRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SETUP MENU proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatSetupMenuRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of GET INPUT proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       TelSatTextTypeInfo_t text; /**< inserted string info    */
-} TelSatGetInputRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SELECT ITEM proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       int bOtherInfo; /**<    flag to check whether other information is required or not      */
-       unsigned char itemIdentifier; /**<      item identifier */
-} TelSatSelectItemRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of PROVIDE LOCAL INFORMATION proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       int bOtherInfo; /**<    flag to check whether other information is required or not      */
-       TelSatCmdQualiProvideLocalInfo_t infoType; /**< local info type - e.g. time zone or language info, etc  */
-       union {
-               TelSatDataTimeZoneInfo_t timeZoneInfo; /**<     current time zone info  */
-               TelSatLanguageInfo_t languageInfo; /**< current ME language setting info        */
-       } u; /**<       Union   */
-} TelSatProvideLocalInfoRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SETUP EVENT LIST proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatSetupEventListRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SEND SMS proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       TelSatCallCtrlProblemType_t additionalCallCtrlProblemInfo; /**< call control problem    */
-} TelSatSendSmsRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SET UP CALL proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       int bOtherInfo; /**<    flag to check whether other information are required or not     */
-       TelSatNetworkProblemType_t networkProblem; /**< network problem during setup call       */
-       TelSatCallCtrlProblemType_t permanentCallCtrlProblem; /**<      permanent call control problem  */
-       TelSatCallCtrlRequestedActionInfo_t callCtrlRequestedAction; /**<       call control requested action info      */
-       TelSatResultInfo_t result2; /**<        additional response on general result   */
-       TelSatTextTypeInfo_t text; /**< text string info        */
-       int bIsTapiCause; /**<  flag to check whether tapi makes problem or not */
-       unsigned long tapiCause; /**<   tapi call level cause   */
-       unsigned long tapiSsCause; /**< tapi ss level cause     */
-} TelSatSetupCallRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SEND SS proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       int bOtherInfo; /**<    flag to check whether whether other information is required or not      */
-       TelSatSsProblemType_t additionalSsProblemInfo; /**<     additional ss problem */
-       TelSatCallCtrlProblemType_t additionalCallCtrlProblemInfo; /**< additional call control problem */
-       TelSatCallCtrlRequestedActionInfo_t callCtrlRequestedAction; /**<       call control requested action info      */
-       TelSatResultInfo_t result2; /**<        additional response on general result   */
-       TelSatTextTypeInfo_t text; /**< text string info        */
-} TelSatSendSsRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SEND USSD proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       int bOtherInfo; /**<    flag to check whether other information is required or not      */
-       TelSatUssdProblemType_t additionalUssdProblemInfo; /**< additional ussd problem */
-       TelSatCallCtrlProblemType_t additionalCallCtrlProblemInfo; /**< additional call control problem */
-       int bCallCtrlHasModification; /**<      flag to check whether modification happens during call control  */
-       TelSatTextTypeInfo_t text; /**< text string info        */
-       TelSatCallCtrlRequestedActionInfo_t callCtrlRequestedAction; /**<       call control requested action info      */
-       TelSatResultInfo_t result2; /**<        additional response on general result   */
-       TelSatTextTypeInfo_t text2; /**<        text string info        */
-} TelSatSendUssdRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of REFRESH proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatRefreshRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of GET CHANNEL STATUS proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       int bOtherInfo; /**<    flag whether other information are required or not      */
-       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
-       TelSatChannelStatusInfo_t channelStatus; /**<   channel Status  */
-} TelSatGetChannelStatusRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of CLOSE CHANNEL proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
-} TelSatCloseChannelRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of OPEN CHANNEL proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       int bOtherInfo; /**<    flag whether other information are required or not */
-       TelSatBearerDescriptionInfo_t bearerDescription; /**<   bearerDescription       */
-       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
-       TelSatChannelStatusInfo_t channelStatus; /**<   channelStatus   */
-       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
-} TelSatOpenChannelRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of LANGAUGE NOTIFICATION proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatLanguageNotificationRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of LAUNCH BROWSER proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       TelSatLaunchBrowserProblemType_t additionalProblemInfo; /**<    browser specific problem info   */
-} TelSatLaunchBrowserRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of RECEIVE DATA proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
-       int bOtherInfo; /**<    flag whether other information are required or not      */
-       TelSatChannelDataInfo_t channel_data; /**<      channel data    */
-       unsigned char channelDataLen; /**<      channel data length     */
-} TelSatReceiveDataRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SEND DATA proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
-       unsigned char channelDataLen; /**<      channel data length     */
-} TelSatSendDataRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SETUP IDLE MODE TEXT proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatSetupIdlemodeTextRespInfo_t;
-
-/**
- * This structure contains the data objects for the Terminal Response of SEND DTMF proactive command.
- */
-typedef struct {
-       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
-} TelSatSendDtmfRespInfo_t;
-
-/**
- * This contains the data structures to be used to send proactive command response.
- */
-typedef struct {
-       unsigned char commandNumber; /**<         proactive command number      */
-       TelSatCommandType_t commandType; /**<     proactive command type        */
-       union {
-               TelSatMoreTimeRespInfo_t moreTime;
-               TelSatDisplayTextRespInfo_t displayText; /**<   terminal response info from displayText proactive command       */
-               TelSatGetInkeyRespInfo_t getInkey; /**< terminal response info from getInkey proactive command  */
-               TelSatGetInputRespInfo_t getInput; /**< terminal response info from getInput proactive command  */
-               TelSatPlayToneRespInfo_t playTone; /**< terminal response info from playTone proactive command  */
-               TelSatSetupMenuRespInfo_t setupMenu; /**<       terminal response info from setupMenu proactive command */
-               TelSatSelectItemRespInfo_t selectItem; /**<     terminal response info from selectItem proactive command        */
-               TelSatSendSmsRespInfo_t sendSms; /**<   terminal response info from sendSms proactive command   */
-               TelSatSendSsRespInfo_t sendSs; /**<     terminal response info from sendSs proactive command    */
-               TelSatSendUssdRespInfo_t sendUssd; /**< terminal response info from sendUssd proactive command  */
-               TelSatSetupCallRespInfo_t setupCall; /**<       terminal response info from setupCall proactive command */
-               TelSatRefreshRespInfo_t refresh; /**<   terminal response info from refresh proactive command   */
-               TelSatProvideLocalInfoRespInfo_t provideLocInfo; /**<   terminal response info from provide Local Info proactive command        */
-               TelSatLaunchBrowserRespInfo_t launchBrowser; /**<       terminal response info from launch Browser proactive command    */
-               TelSatSetupIdlemodeTextRespInfo_t idleText; /**<        terminal response info from setup idle mode text proactive command      */
-               TelSatSendDtmfRespInfo_t sendDtmf; /**< terminal response info from send Dtmf proactive command */
-               TelSatLanguageNotificationRespInfo_t languageNotification; /**< terminal response info from language Notification proactive command     */
-               TelSatSetupEventListRespInfo_t setupEventList; /**<     terminal response info from setup Event List proactive command  */
-               TelSatOpenChannelRespInfo_t openChannel; /**<   terminal response info from openChannel proactive command       */
-       } terminalRespInfo; /**<        Union   */
-} TelSatRespInfo_t;
-
-/*
- *SAT Icon Data
- */
-
-typedef struct {
-       unsigned char iconId;
-       unsigned char imgType;
-       unsigned char imgLen;
-       unsigned char imgData[256];
-} TelSatIconDataResp_t;
-
-typedef struct {
-       unsigned char iconId;
-       unsigned char imgType;
-       unsigned char fileId[2];
-       unsigned char reqDataLen[2];
-       unsigned char offset[2];
-} TelsatIconDataGet_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TEL_SAT_PROACTV_CMD_H_ */
-
-/**
- * @}
- */
diff --git a/include/TelSim.h b/include/TelSim.h
deleted file mode 100644 (file)
index 69284ed..0000000
+++ /dev/null
@@ -1,1177 +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
-
-/** 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 16
-
-/** Authentication response data max length */
-#define TAPI_SIM_AUTH_MAX_RESP_DATA_LEN 16
-
-/** SAP APDU max length */
-#define TAPI_SIM_APDU_MAX_LEN 256+2 // to be fine tuned according to lower layers, 2bytes for SW1 & SW2 should be added
-
-/** SIM 3G Phone book EF Max count */
-#define TAPI_SIM_PB_3G_FILE_MAX_COUNT 13
-
-/** SAP Answer to Reset data max length */
-#define TAPI_SIM_SAP_ATR_DATA  256
-
-#define TAPI_SIM_NET_FULL_NAME_MAX_LEN 40
-
-#define TAPI_SIM_NET_SHORT_NAME_MAX_LEN 10
-
-#define        TAPI_SIM_MSP_CNT_MAX 2
-
-#define TAPI_SIM_OPERATION_TIMEOUT 1234
-
-/**
- * @enum TelSimCardType_t
- * This enumeration defines the card type.
- */
-typedef enum {
-       TAPI_SIM_CARD_TYPE_UNKNOWN, /**< Unknown card */
-       TAPI_SIM_CARD_TYPE_GSM, /**< SIm(GSM) card*/
-       TAPI_SIM_CARD_TYPE_USIM, /**< USIM card */
-       TAPI_SIM_CARD_TYPE_RUIM,
-       TAPI_SIM_CARD_TYPE_IMS,
-} TelSimCardType_t;
-
-/**
- * @enum TelSimFileID_t
- * This enumeration defines the card type.
- */
-typedef enum {
-       TAPI_SIM_EF_DIR = 0x2F00, /**< Root Directory for the USIM */
-       TAPI_SIM_EF_ICCID = 0x2FE2, /**< the ICC Identification file    */
-       TAPI_SIM_EF_IMSI = 0x6F07, /**< the IMSI file                */
-       TAPI_SIM_EF_SST = 0x6F38, /**< the SIM Service Table file   */
-       TAPI_SIM_EF_EST = 0x6F56, /**< the Enabled Service Table file   */
-       TAPI_SIM_EF_OPLMN_ACT = 0x6F61, /**< the OPLMN List file*/
-       TAPI_SIM_EF_GID1 = 0x6F3E, /**< the Group Identifier Level 1 */
-       TAPI_SIM_EF_GID2 = 0x6F3F, /**< the Group Identifier Level 2 */
-
-       TAPI_SIM_EF_ELP = 0x2F05, /**< the Extended Language Preference file */
-       TAPI_SIM_EF_LP = 0x6F05, /**< SIM: Language preference */
-       TAPI_SIM_EF_ECC = 0x6FB7, /**< the Emergency Call Codes     */
-       TAPI_SIM_EF_SPN = 0x6F46, /**< the Service Provider Name    */
-       TAPI_SIM_EF_SPDI = 0x6FCD, /**< the Service provider display information*/
-       TAPI_SIM_EF_PNN = 0x6FC5, /**< the PLMN Network Name File*/
-       TAPI_SIM_EF_OPL = 0x6FC6, /**< the Operator PLMN List File*/
-       TAPI_SIM_EF_MSISDN = 0x6F40, /**< MSISDN */
-
-       TAPI_SIM_EF_SMS = 0x6F3C, /** < Short Messages file */
-       TAPI_SIM_EF_SMSP = 0x6F42, /** < SMS Parameter */
-       TAPI_SIM_EF_SMSS = 0x6F43, /** < SMS Status */
-       TAPI_SIM_EF_CBMI = 0x6F45, /** < Cell Broadcast Message Identifier */
-       TAPI_SIM_EF_MBDN = 0x6FC7, /** < SIM Mail Box Dialing Number file */
-
-       TAPI_SIM_EF_USIM_MBI = 0x6FC9, /** < Mailbox Identifier -linear fixed*/
-       TAPI_SIM_EF_USIM_MWIS = 0x6FCA, /** < Message Waiting Indication Status -linear fixed*/
-       TAPI_SIM_EF_USIM_CFIS = 0x6FCB, /** < Call forward indication status -linear fixed*/
-
-       /* CPHS FILE ID */
-       TAPI_SIM_EF_CPHS_VOICE_MSG_WAITING = 0x6F11, /** < CPHS voice MSG waiting indication  */
-       TAPI_SIM_EF_CPHS_SERVICE_STRING_TABLE = 0x6F12, /** < CPHS service string table  */
-       TAPI_SIM_EF_CPHS_CALL_FORWARD_FLAGS = 0x6F13, /** < CPHS call forward flags  */
-       TAPI_SIM_EF_CPHS_OPERATOR_NAME_STRING = 0x6F14, /** < CPHS operator name string  */
-       TAPI_SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE = 0x6F15, /** < CPHS customer service profile  */
-       TAPI_SIM_EF_CPHS_CPHS_INFO = 0x6F16, /** < CPHS information  */
-       TAPI_SIM_EF_CPHS_MAILBOX_NUMBERS = 0x6F17, /** < CPHS mail box numbers  */
-       TAPI_SIM_EF_CPHS_OPERATOR_NAME_SHORT_FORM_STRING = 0x6F18, /** < CPHS operator name short form string  */
-       TAPI_SIM_EF_CPHS_INFORMATION_NUMBERS = 0x6F19, /** < CPHS information numbers  */
-       /*  CPHS ALS FILE ID */
-       TAPI_SIM_EF_CPHS_DYNAMICFLAGS = 0x6F9F, /** < CPHS Dynamics flags  */
-       TAPI_SIM_EF_CPHS_DYNAMIC2FLAG = 0x6F92, /** < CPHS Dynamics2 flags  */
-       TAPI_SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE_LINE2 = 0x6F98, /** < CPHS CSP2  */
-
-       /* Invalid File ID, All the file ID are less than this Value*/
-       TAPI_SIM_EF_INVALID = 0xFFFF, /**< Invalid file.*/
-       TAPI_SIM_EF_OTHERS, /**< Element to indicate an unknown file.*/
-}TelSimFileID_t;
-
-/**
- * @enum TelSimFacilityStatus_t
- * This enumeration defines the pin status.
- */
-typedef enum {
-       TAPI_SIM_FACILITY_DISABLED = 0x00,
-       TAPI_SIM_FACILITY_ENABLED = 0x01,
-       TAPI_SIM_FACILITY_UNKNOWN = 0xFF
-} TelSimFacilityStatus_t;
-
-/**
- * @enum TelSimPinOperationResult_t
- * This enumeration defines the pin operation result from the lower layers.
- */
-typedef enum {
-       TAPI_SIM_PIN_OPERATION_SUCCESS, /**< Operation involving PIN (verification/change/enable/disable, etc) is successful.  */
-       TAPI_SIM_BUSY, /**< SIM is busy  */
-       TAPI_SIM_CARD_ERROR, /**< SIM card error - Permanently blocked and general errors   */
-       TAPI_SIM_INCOMPATIBLE_PIN_OPERATION, /**< SIM Incompatible pin operation that is in case when invalid SIM command is given or incorrect parameters are supplied to the SIM. */
-       TAPI_SIM_PIN_INCORRECT_PASSWORD, /**< SIM PIN  Incorrect password */
-       TAPI_SIM_PUK_INCORRECT_PASSWORD, /**< SIM PUK Incorrect Password */
-       TAPI_SIM_PUK_REQUIRED, /**< PUK Required */
-       TAPI_SIM_PIN_REQUIRED, /**< PIN Required */
-       TAPI_SIM_NCK_REQUIRED, /**< Network Control Key Required */
-       TAPI_SIM_NSCK_REQUIRED, /**< Network Subset Control Key Required */
-       TAPI_SIM_SPCK_REQUIRED, /**< Service Provider Control Key Required */
-       TAPI_SIM_CCK_REQUIRED, /**< Corporate Control Key Required */
-       TAPI_SIM_LOCK_REQUIRED, /**<  PH-SIM (phone-SIM) locked state **/
-} TelSimPinOperationResult_t;
-
-/**
- * @enum TelSimAccessResult_t
- * This enumeration defines the SIM access result from the lower layers.
- */
-typedef enum {
-       TAPI_SIM_ACCESS_SUCCESS, /**< Access to file successful.  */
-       TAPI_SIM_ACCESS_CARD_ERROR, /**< SIM card error    */
-       TAPI_SIM_ACCESS_FILE_NOT_FOUND, /**< File not found  */
-       TAPI_SIM_ACCESS_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition is not fulfilled  */
-       TAPI_SIM_ACCESS_FAILED, /**< Access failed.  */
-} TelSimAccessResult_t;
-
-/**
- * @enum TelSimPinType_t
- * This enumeration defines the pin type.
- */
-typedef enum {
-       TAPI_SIM_PTYPE_PIN1 = 0x00, /**< PIN 1 code */
-       TAPI_SIM_PTYPE_PIN2 = 0x01, /**< PIN 2 code */
-       TAPI_SIM_PTYPE_PUK1 = 0x02, /**< PUK 1 code */
-       TAPI_SIM_PTYPE_PUK2 = 0x03, /**< PUK 2 code */
-       TAPI_SIM_PTYPE_UPIN = 0x04, /**< Universal PIN - Unused now */
-       TAPI_SIM_PTYPE_ADM = 0x05, /**< Administrator - Unused now */
-       TAPI_SIM_PTYPE_SIM = 0x06 /**< SIM Lock code */
-} TelSimPinType_t;
-
-/**
- * @enum TelSimTypeOfNum_t
- * This enumeration defines the type of number.
- */
-typedef enum {
-       TAPI_SIM_TON_UNKNOWN = 0, /**< unknown */
-       TAPI_SIM_TON_INTERNATIONAL = 1, /**< international number */
-       TAPI_SIM_TON_NATIONAL = 2, /**< national number */
-       TAPI_SIM_TON_NETWORK_SPECIFIC = 3, /**< network specific number */
-       TAPI_SIM_TON_DEDICATED_ACCESS = 4, /**< subscriber number */
-       TAPI_SIM_TON_ALPHA_NUMERIC = 5, /**< alphanumeric, GSM 7-bit default alphabet) */
-       TAPI_SIM_TON_ABBREVIATED_NUMBER = 6, /**< abbreviated number */
-       TAPI_SIM_TON_RESERVED_FOR_EXT = 7 /**< reserved for extension */
-} TelSimTypeOfNum_t;
-
-/**
- *  @enum TelSimTextEncrypt_t
- *   This enumeration defines the text encryption types
- */
-typedef enum {
-       TAPI_SIM_TEXT_ENC_ASCII, /**< ASCII Encoding */
-       TAPI_SIM_TEXT_ENC_GSM7BIT, /**< GSM 7 Bit Encoding */
-       TAPI_SIM_TEXT_ENC_UCS2, /**< UCS2 Encoding */
-       TAPI_SIM_TEXT_ENC_HEX, /**< HEX Encoding */
-} TelSimTextEncrypt_t;
-
-/**
- * @enum TelSimNumberingPlanIdentity_t
- * This enumeration defines the numbering plan identifier.
- */
-typedef enum {
-       TAPI_SIM_NPI_UNKNOWN = 0, /**< Unknown */
-       TAPI_SIM_NPI_ISDN_TEL = 1, /**< ISDN/Telephone numbering plan */
-       TAPI_SIM_NPI_DATA_NUMBERING_PLAN = 3, /**< Data numbering plan */
-       TAPI_SIM_NPI_TELEX = 4, /**< Telex numbering plan */
-       TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /**< Service Center Specific plan */
-       TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6, /**< Service Center Specific plan */
-       TAPI_SIM_NPI_NATIONAL = 8, /**< National numbering plan */
-       TAPI_SIM_NPI_PRIVATE = 9, /**< Private numbering plan */
-       TAPI_SIM_NPI_ERMES_NUMBERING_PLAN = 10, /**< ERMES numbering plan */
-       TAPI_SIM_NPI_RESERVED_FOR_EXT = 0xF /**< Reserved for extension */
-} TelSimNumberingPlanIdentity_t;
-
-/**
- * @enum TelSimEccEmergencyServiceInfo_t
- * This enumeration defines the emergency service type.
- */
-typedef enum {
-       TAPI_SIM_ECC_ESC_POLICE = 0x01, /**< Police */
-       TAPI_SIM_ECC_ESC_AMBULANCE = 0x02, /**< Ambulance */
-       TAPI_SIM_ECC_ESC_FIREBRIGADE = 0x04, /**< Fire brigade */
-       TAPI_SIM_ECC_ESC_MARAINEGUARD = 0x08, /**< Marine guard */
-       TAPI_SIM_ECC_ESC_MOUTAINRESCUE = 0x10, /**< Mountain rescue */
-       TAPI_SIM_ECC_ESC_SPARE = 0x00 /**< Spare */
-} TelSimEccEmergencyServiceInfo_t;
-
-/**
- * @enum TelSimLanguagePreferenceCode_t
- * This enumeration defines the language indication code.
- */
-typedef enum {
-       TAPI_SIM_LP_GERMAN = 0x00, /**< German */
-       TAPI_SIM_LP_ENGLISH = 0x01, /**< English */
-       TAPI_SIM_LP_ITALIAN = 0x02, /**< Italian */
-       TAPI_SIM_LP_FRENCH = 0x03, /**< French */
-       TAPI_SIM_LP_SPANISH = 0x04, /**< Spanish */
-       TAPI_SIM_LP_DUTCH = 0x05, /**< Dutch */
-       TAPI_SIM_LP_SWEDISH = 0x06, /**< Swedish */
-       TAPI_SIM_LP_DANISH = 0x07, /**< Danish */
-       TAPI_SIM_LP_PORTUGUESE = 0x08, /**< Portuguese */
-       TAPI_SIM_LP_FINNISH = 0x09, /**< Finnish */
-       TAPI_SIM_LP_NORWEGIAN = 0x0A, /**< Norwegian */
-       TAPI_SIM_LP_GREEK = 0x0B, /**< Greek */
-       TAPI_SIM_LP_TURKISH = 0x0C, /**< Turkish */
-       TAPI_SIM_LP_HUNGARIAN = 0x0D, /**< Hungarian */
-       TAPI_SIM_LP_POLISH = 0x0E, /**< Polish */
-       TAPI_SIM_LP_KOREAN = 0x0F, /**< Korean */
-       TAPI_SIM_LP_CHINESE = 0x10, /**< Chinese */
-       TAPI_SIM_LP_RUSSIAN = 0x11, /**< Russian */
-       TAPI_SIM_LP_JAPANESE = 0x12, /**< Japanese */
-       TAPI_SIM_LP_LANG_UNSPECIFIED = 0xFF /**< Unspecified */
-} TelSimLanguagePreferenceCode_t;
-
-/**
- * @enum TelSimCardStatus_t
- * This enumeration defines the SIM card status
- */
-typedef enum {
-       TAPI_SIM_STATUS_CARD_ERROR = 0x00, /**< Bad card / On the fly SIM gone bad **/
-       TAPI_SIM_STATUS_CARD_NOT_PRESENT = 0x01, /**<  Card not present **/
-       TAPI_SIM_STATUS_SIM_INITIALIZING = 0x02, /**<  SIM is Initializing state **/
-       TAPI_SIM_STATUS_SIM_INIT_COMPLETED = 0x03, /**<  SIM Initialization ok **/
-       TAPI_SIM_STATUS_SIM_PIN_REQUIRED = 0x04, /**<  PIN  required state **/
-       TAPI_SIM_STATUS_SIM_PUK_REQUIRED = 0x05, /**<  PUK required state **/
-       TAPI_SIM_STATUS_CARD_BLOCKED = 0x06, /**<  PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) **/
-       TAPI_SIM_STATUS_SIM_NCK_REQUIRED = 0x07, /**<  Network Control Key required state **/
-       TAPI_SIM_STATUS_SIM_NSCK_REQUIRED = 0x08, /**<  Network Subset Control Key required state **/
-       TAPI_SIM_STATUS_SIM_SPCK_REQUIRED = 0x09, /**<  Service Provider Control Key required state **/
-       TAPI_SIM_STATUS_SIM_CCK_REQUIRED = 0x0a, /**<  Corporate Control Key required state **/
-       TAPI_SIM_STATUS_CARD_REMOVED = 0x0b, /**<  Card removed **/
-       TAPI_SIM_STATUS_SIM_LOCK_REQUIRED = 0x0c, /**<  PH-SIM (phone-SIM) locked state **/
-       TAPI_SIM_STATUS_UNKNOWN = 0xff /**<  Unknown status. It can be initial status **/
-} TelSimCardStatus_t;
-
-/**
- * @enum TelSimCphsPhaseType_t
- * This enum gives the current CPHS phase of SIM card.
- */
-typedef enum {
-       TAPI_SIM_CPHS_PHASE1 = 0x01, /**< phase1  */
-       TAPI_SIM_CPHS_PHASE2 = 0x02, /**< phase2  */
-       TAPI_SIM_CPHS_PHASE_RFU = 0xff /**< RFU  */
-} TelSimCphsPhaseType_t;
-
-/**
- * @enum TelSimCphsIndexLevelIndicator_t
- * This struct gives CPHS index level indication.
- */
-typedef enum {
-       TAPI_SIM_CPHS_INDEX_LEVEL_ONE = 0x01, /**< SIM cphs index level one */
-       TAPI_SIM_CPHS_INDEX_LEVEL_TWO = 0x02, /**< SIM cphs index level two */
-       TAPI_SIM_CPHS_INDEX_LEVEL_THREE = 0x03, /**< SIM cphs index level three */
-       TAPI_SIM_CPHS_INDEX_LEVEL_RFU = 0xff /**< SIM cphs index level rfu */
-} TelSimCphsIndexLevelIndicator_t;
-
-/**
- * @enum TelSimCphsCustomerServiceGroup_t
- * This struct gives CPHS group service type information .
- */
-typedef enum {
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_OFFERING = 0x01, /**< Group csp offering*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_RESTRICTION = 0x02, /**< Group csp restriction*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_OTHER_SUPP_SERVICES = 0x03, /**< Group csp supplementary services*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_COMPLETION = 0x04, /**< Group csp completion*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_TELESERVICES = 0x05, /**< Group csp teleservices*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_TELESERVICES = 0x06, /**< Group csp cphs teleservies*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_FEATURES = 0x07, /**< Group csp cphs features*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_NUMBER_IDENTIFIERS = 0x08, /**< Group csp number identifiers*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_PHASE_SERVICES = 0x09, /**< Group csp phase services*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_VALUE_ADDED_SERVICES = 0xC0, /**< Group csp value added services*/
-       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_INFORMATION_NUMBERS = 0xD5 /**< Group csp information numbers*/
-} TelSimCphsCustomerServiceGroup_t;
-
-/**
- * @enum TelSimMailboxType_t
- * This enum gives mailbox type.
- */
-typedef enum {
-       TAPI_SIM_MAILBOX_VOICE = 0x01, /**< CFIS voice*/
-       TAPI_SIM_MAILBOX_FAX = 0x03, /**< CFIS fax*/
-       TAPI_SIM_MAILBOX_DATA = 0x04, /**< CFIS data*/
-       TAPI_SIM_MAILBOX_EMAIL = 0x05, /**< CFIS email*/
-       TAPI_SIM_MAILBOX_OTHER = 0x06, /**< CFIS other*/
-} TelSimMailboxType_t;
-
-/**
- * @enum TelSimDynamicFlagsSelectedLineId_t
- * This enum gives dynamics flag selected line  information.
- */
-typedef enum {
-       TAPI_SIM_DYNAMIC_FLAGS_LINE1 = 0x01, /**< line 1 */
-       TAPI_SIM_DYNAMIC_FLAGS_LINE2 = 0x00, /**< line 2*/
-       TAPI_SIM_DYNAMIC_FLAGS_RFU = 0xff /**< rfu*/
-} TelSimDynamicFlagsSelectedLineId_t;
-
-/**
- * @enum tapi_sim_dynamic2_flag_als_status_t
- * This enum gives dynamics2 flag selected line  information.
- */
-typedef enum {
-       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_LOCKED = 0x01, /**< Dynamic flags locked */
-       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_UNLOCKED = 0x00, /**< Dynamic flags unlocked */
-       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_RFU = 0xff /**< rfu */
-} TelSimDynamic2FlagAlsStatus_t;
-
-
-/**
- * @enum TelSimAuthenticationType_t
- * This is used for Authentication Procedure by using SIM.
- */
-typedef enum {
-       TAPI_SIM_AUTH_TYPE_IMS = 0x00, /**< IMS Authentication */
-       TAPI_SIM_AUTH_TYPE_GSM, /**< GSM Authentication */
-       TAPI_SIM_AUTH_TYPE_3G, /**< 3G Authentication */
-       TAPI_SIM_AUTH_TYPE_MAX /**< TBD */
-} TelSimAuthenticationType_t;
-
-/**
- * @enum TelSimAuthenticationResult_t
- * This is used for Authentication Procedure.
- */
-typedef enum {
-       TAPI_SIM_AUTH_NO_ERROR = 0x00, /**< ISIM no error */
-       TAPI_SIM_AUTH_CANNOT_PERFORM, /**< status - can't perform authentication */
-       TAPI_SIM_AUTH_SKIP_RESPONSE, /**< status - skip authentication response */
-       TAPI_SIM_AUTH_MAK_CODE_FAILURE, /**< status - MAK(Multiple Activation Key) code failure */
-       TAPI_SIM_AUTH_SQN_FAILURE, /**< status - SQN(SeQuenceNumber) failure */
-       TAPI_SIM_AUTH_SYNCH_FAILURE, /**< status - synch failure */
-       TAPI_SIM_AUTH_UNSUPPORTED_CONTEXT, /**< status - unsupported context */
-       TAPI_SIM_AUTH_MAX /**< TBD */
-} TelSimAuthenticationResult_t;
-
-/**
- * @enum TelSimLockType_t
- *     This structure gives security lock type enum values
- */
-typedef enum {
-       TAPI_SIM_LOCK_PS = 0x01, /** < PH-SIM (phone-SIM) locked.Lock Phone to SIM/UICC card
-        *      (MT asks password when other than current SIM/UICC card inserted;
-        *      MT may remember certain amount of previously used cards thus not
-        *      requiring password when they are inserted
-        */
-       TAPI_SIM_LOCK_PF, /** < PH-FSIM (phone-first-SIM) Lock Phone to the very
-        * First inserted SIM/UICC card(MT asks password when other than the first SIM/UICC
-        * card is inserted
-        */
-       TAPI_SIM_LOCK_SC, /** < SIM Lock (PIN, PIN2, PUK, PUK2) Lock SIM/UICC card ( SIM asks password in ME power-up and
-        *      when this command is issued
-        */
-       TAPI_SIM_LOCK_FD, /** < FDN - SIM card or active application in the UICC (GSM or USIM)
-        *      fixed dialing memory feature */
-       TAPI_SIM_LOCK_PN, /**< Network Personalization */
-       TAPI_SIM_LOCK_PU, /** < network subset Personalization */
-       TAPI_SIM_LOCK_PP, /** < service Provider Personalization */
-       TAPI_SIM_LOCK_PC, /** < Corporate Personalization */
-} TelSimLockType_t;
-
-/**
- * @enum TelSimLockKey_t
- *     This structure gives security lock key information enum values
- */
-typedef enum {
-       TAPI_SIM_LOCK_KEY_NOT_NEED = 0x00, /**< key not need */
-       TAPI_SIM_LOCK_KEY_PIN = 0x01, /**< PIN required */
-       TAPI_SIM_LOCK_KEY_PUK = 0x02, /**< PUK required */
-       TAPI_SIM_LOCK_KEY_PIN2 = 0x03, /**< PIN2 required */
-       TAPI_SIM_LOCK_KEY_PUK2 = 0x04, /**< PUK2 required */
-       TAPI_SIM_LOCK_PERM_BLOCKED = 0x05, /**< Permanent block SIM */
-} TelSimLockStatus_t;
-
-/**
- * @enum TelSimSapPowerMode_t
- * This enum gives the SAP message Ids between SAP client and SAP server.
- */
-typedef enum {
-       TAPI_SIM_SAP_POWER_SIM_ON_REQ, /**< SAP Client request about power SIM on in Server */
-       TAPI_SIM_SAP_POWER_SIM_OFF_REQ, /**< SAP Client request about power SIM off in Server */
-       TAPI_SIM_SAP_RESET_SIM_REQ, /**< SAP Client request about SIM reset in Server */
-} TelSimSapPowerMode_t;
-
-/**
- * @enum TelSimSapConnectionStatus_t
- * This enum gives the SAP connection status information .
- */
-typedef enum {
-       TAPI_SIM_SAP_CONNECTION_STATUS_OK = 0x00, /**< connect successfully */
-       TAPI_SIM_SAP_CONNECTION_STATUS_UNABLE_TO_ESTABLISH, /**< unable to establish connection */
-       TAPI_SIM_SAP_CONNECTION_STATUS_NOT_SUPPORT_MAX_SIZE, /**< when server does not support message length that client want send */
-       TAPI_SIM_SAP_CONNECTION_STATUS_TOO_SMALL_MAX_SIZE /**< when client want to connect with very small message length which is not supported by Server */
-} TelSimSapConnectionStatus_t;
-
-/**
- * @enum TelSimSapDissconnectType_t
- * This enum gives the SAP  disconnect type information.
- */
-typedef enum {
-       TAPI_SIM_SAP_DISCONNECT_TYPE_GRACEFUL = 0x00, /**< disconnection procedure ends after finishing current work */
-       TAPI_SIM_SAP_DISCONNECT_TYPE_IMMEDIATE /**<  disconnection procedure ends immediately*/
-} TelSimSapDissconnectType_t;
-
-/**
- * @enum TelSimSapStatusInfo_t
- * This enum gives the SAP current connection status information
- */
-typedef enum {
-       TAPI_SIM_SAP_STATUS_UNKNOWN = 0x00, /**<  SAP server connection status - unknown*/
-       TAPI_SIM_SAP_STATUS_NO_SIM, /**<  SAP server connection status - no SIM*/
-       TAPI_SIM_SAP_STATUS_NOT_READY, /**<  SAP server connection status - not ready*/
-       TAPI_SIM_SAP_STATUS_READY, /**<  SAP server connection status - ready*/
-       TAPI_SIM_SAP_STATUS_CONNECTED /**<  SAP server connection status - connected*/
-} TelSimSapStatusInfo_t;
-
-/**
- * @enum TelSimSapCardStatus_t
- * This enum gives the SIM card status if server`s status changed about connection with subscription module
- */
-typedef enum {
-       TAPI_SIM_SAP_CARD_STATUS_UNKNOWN = 0x00, /**<  SAP server status(card reader status) - unknown*/
-       TAPI_SIM_SAP_CARD_STATUS_RESET, /**<  SAP server status(card reader status) - reset*/
-       TAPI_SIM_SAP_CARD_STATUS_NOT_ACCESSIBLE, /**<  SAP server status(card reader status) - not accessible*/
-       TAPI_SIM_SAP_CARD_STATUS_REMOVED, /**<  SAP server status(card reader status) - removed*/
-       TAPI_SIM_SAP_CARD_STATUS_INSERTED, /**<  SAP server status(card reader status) - inserted*/
-       TAPI_SIM_SAP_CARD_STATUS_RECOVERED /**<  SAP server status(card reader status) - recovered*/
-} TelSimSapCardStatus_t;
-
-/**
- * @enum TelSimSapResultCode_t
- * This enum gives the SAP result information.
- */
-typedef enum {
-       TAPI_SIM_SAP_RESULT_CODE_OK = 0x00, /**<  SAP operation result - ok*/
-       TAPI_SIM_SAP_RESULT_CODE_NO_REASON, /**<  SAP operation result - no reason*/
-       TAPI_SIM_SAP_RESULT_CODE_CARD_NOT_ACCESSIBLE, /**<  SAP operation result - not accessible*/
-       TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_OFF, /**<  SAP operation result - card already power off*/
-       TAPI_SIM_SAP_RESULT_CODE_CARD_REMOVED, /**<  SAP operation result - card removed*/
-       TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_ON, /**<  SAP operation result - card already power on*/
-       TAPI_SIM_SAP_RESULT_CODE_DATA_NOT_AVAILABLE, /**<  SAP operation result - data not available*/
-       TAPI_SIM_SAP_RESULT_CODE_NOT_SUPPORT /**<  SAP operation result - not support*/
-} TelSimSapResultCode_t;
-
-/**
- * @enum TelSimSapProtocol_t
- * This enum gives SAP transport protocol type
- */
-typedef enum {
-       TAPI_SIM_SAP_PROTOCOL_T0, /**< T = 0, character*/
-       TAPI_SIM_SAP_PROTOCOL_T1 /**< T = 1, block*/
-} TelSimSapProtocol_t;
-
-/**
- * @enum TelSimPbAccessResult_t
- * This enumeration defines the Phone book access result
- */
-typedef enum {
-       TAPI_SIM_PB_SUCCESS, /**< SIM phonebook operation successful. */
-       TAPI_SIM_PB_FAIL, /**< SIM phonebook operation failure. */
-       TAPI_SIM_PB_INVALID_INDEX, /**< The index passed was not a valid index. */
-       TAPI_SIM_PB_INVALID_NUMBER_LENGTH, /**< The number length is exceeds the max length allowed (or 0). */
-       TAPI_SIM_PB_INVALID_NAME_LENGTH, /**< The name length is exceeds the max length allowed (or 0). */
-       TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition for PB file is not satisfied. */
-} TelSimPbAccessResult_t;
-
-/**
- * @enum TelSimPbFileType_t
- * This enumeration defines  different storage types to be selected in SIM or USIM
- */
-typedef enum {
-       TAPI_SIM_PB_FDN, /**< Fixed Dialing Number */
-       TAPI_SIM_PB_ADN, /**< SIM - ADN  */
-       TAPI_SIM_PB_SDN, /**< Service Dialing Number  */
-       TAPI_SIM_PB_3GSIM, /**< USIM - 3G phone book */
-       TAPI_SIM_PB_AAS, /**< Additional number Alpha String */
-       TAPI_SIM_PB_GAS, /**< Grouping identifier Alpha String */
-       TAPI_SIM_PB_UNKNOWNN = 0xFF, /**< Unknown file type */
-} TelSimPbType_t;
-
-/**
- * @enum TelSimPb3GFileType_t
- *  This enumeration defines the different storage field types in 3G Phone book.
- */
-typedef enum {
-       /* for 3G phone storage field type */
-       TAPI_PB_3G_NAME = 0x01, /**< Name */
-       TAPI_PB_3G_NUMBER, /**< Number */
-       TAPI_PB_3G_ANR1, /**< First Another number*/
-       TAPI_PB_3G_ANR2, /**< Second Another number */
-       TAPI_PB_3G_ANR3, /**< Third Another number */
-       TAPI_PB_3G_EMAIL1, /**< First Email */
-       TAPI_PB_3G_EMAIL2, /**< Second Email */
-       TAPI_PB_3G_EMAIL3, /**< Third Email */
-       TAPI_PB_3G_EMAIL4, /**< Fourth Email */
-       TAPI_PB_3G_SNE, /**< Second name entry of main name*/
-       TAPI_PB_3G_GRP, /**< Group  */
-       TAPI_PB_3G_PBC, /** <1 byte control info and 1 byte hidden info*/
-} TelSimPb3GFileType_t;
-
-/**
- * This data structure defines the data for the Imsi information.
- */
-typedef struct {
-       char szMcc[3 + 1]; /**< mobile country code */
-       char szMnc[3 + 1]; /**< mobile network code */
-       char szMsin[10 + 1]; /**< mobile station identification number */
-} TelSimImsiInfo_t;
-
-typedef struct {
-       char name[30+1];
-       char number[6+1];
-       TelSimEccEmergencyServiceInfo_t category;
-}TelSimEcc_t;
-
-typedef struct {
-       int ecc_count;
-       TelSimEcc_t list[15];
-}TelSimEccList_t;
-
-typedef struct {
-       int icc_length; /**< Integrated Circuit Card number length */
-       char icc_num[TAPI_SIM_ICCID_LEN_MAX]; /**< Integrated Circuit Card number */
-} TelSimIccIdInfo_t;
-
-typedef struct {
-       int b_cphs;
-       int rec_index; /**< index which stands for the location where record is saved in SIM*/
-       int profile_num; /**< SIM profile index*/
-       TelSimMailboxType_t mb_type;
-       int alpha_id_max_len; /**< alpha max length in SIM - READ ONLY*/
-       char alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< Alpha Identifier */
-       TelSimTypeOfNum_t ton; /**< Type Of Number */
-       TelSimNumberingPlanIdentity_t npi; /**< Number Plan Identity */
-       char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */
-       unsigned char cc_id; /**< Capability/Configuration Identifier */
-       unsigned char ext1_id; /**< Extensiion1 Record Identifier */
-}TelSimMailBoxNumber_t;
-
-typedef struct {
-       int count;
-       TelSimMailBoxNumber_t list[TAPI_SIM_MSP_CNT_MAX*5]; //max is 10
-}TelSimMailboxList_t;
-
-typedef struct {
-       int rec_index;
-       unsigned char msp_num; /**< MSP number*/
-       unsigned char cfu_status; /**< call forwarding unconditional indication status*/
-       TelSimTypeOfNum_t ton; /**< TON*/
-       TelSimNumberingPlanIdentity_t npi; /**< NPI*/
-       char cfu_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1];/**< Dialing Number/SSC String*/
-       unsigned char cc2_id; /**< Capability/Configuration2 Record Identifier */
-       unsigned char ext7_id; /**< Extension 7 Record Identifier */
-}TelSimCfis_t;
-
-typedef struct {
-       int profile_count;
-       TelSimCfis_t cf[TAPI_SIM_MSP_CNT_MAX];
-}TelSimCfisList_t;
-
-typedef struct {
-       int b_line1; /**< CallForwardUnconditionalLine 1 */
-       int b_line2; /**< CallForwardUnconditionalLine 2 */
-       int b_fax; /**< CallForwardUnconditional FAX */
-       int b_data; /**<CallForwardUnconditional data*/
-}TelSimCphsCf_t;
-
-typedef struct {
-       int b_cphs;
-       TelSimCfisList_t cf_list;
-       TelSimCphsCf_t cphs_cf;
-}TelSimCallForwardingResp_t;
-
-typedef struct {
-       int b_cphs;
-       union {
-               TelSimCfis_t cf;
-               TelSimCphsCf_t cphs_cf;
-       } cf_data_u;
-}TelSimCallForwardingReq_t;
-
-typedef struct {
-       int rec_index;
-       unsigned char indicator_status; /**< Indicator Type*/
-       int voice_count; /**< VoiceMail Count*/
-       int fax_count; /**< FAX Count*/
-       int email_count; /**< Email Count*/
-       int other_count; /**< Other Count*/
-       int video_count; /**< VideoMail Count*/
-}TelSimMwis_t;
-
-typedef struct {
-       int profile_count;
-       TelSimMwis_t mw[TAPI_SIM_MSP_CNT_MAX];
-}TelSimMwisList_t;
-
-typedef struct {
-       int b_voice1; /**< VoiceMsgLine1 message waiting flag */
-       int b_voice2; /**< VoiceMsgLine2 message waiting flag */
-       int b_fax; /**< FAX message waiting flag */
-       int b_data; /**< Data message waiting flag */
-}TelSimCphsMw_t;
-
-typedef struct {
-       int b_cphs;
-       TelSimMwisList_t mw_list;
-       TelSimCphsMw_t cphs_mw;
-}TelSimMessageWaitingResp_t;
-
-typedef struct {
-       int b_cphs;
-       union {
-               TelSimMwis_t mw;
-               TelSimCphsMw_t cphs_mw;
-       } mw_data_u;
-}TelSimMessageWaitingReq_t;
-
-/**
- *     This data structure represents MSISDN information
- */
-typedef struct {
-       char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< MSISDN number. If not exist, Null string will be returned*/
-       char name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< MSISDN name. If not exist, Null string will be returned*/
-} TelSimSubscriberInfo_t;
-
-typedef struct {
-       int count;
-       TelSimSubscriberInfo_t list[3]; //max is 3
-}TelSimMsisdnList_t;
-
-typedef struct {
-       char plmn[6+1];
-       int b_umts;
-       int b_gsm;
-}TelSimOplmnwact_t;
-
-typedef struct {
-       int count;
-       TelSimOplmnwact_t list[30]; //max is 30
-}TelSimOplmnwactList_t;
-
-typedef struct {
-       unsigned char display_condition; /**< display condition (1 byte) */
-       unsigned char spn[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1]; /**< SPN */
-}TelSimSpn_t;
-
-typedef struct {
-       unsigned char full_name[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1];
-       unsigned char short_name[TAPI_SIM_NET_SHORT_NAME_MAX_LEN + 1];
-}TelSimCphsNetName_t;
-
-/**
- *This is used for authentication request procedure.
- */
-typedef struct {
-       TelSimAuthenticationType_t auth_type; /**< Authentication type */
-       int rand_length; /**< the length of RAND */
-       int autn_length; /**< the length of AUTN. it is not used in case of GSM AUTH */
-       char rand_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< RAND data */
-       char autn_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< AUTN data. it is not used in case of GSM AUTH */
-} TelSimAuthenticationData_t;
-
-/**
- * This is used for result data of authentication.
- */
-typedef struct {
-       TelSimAuthenticationType_t auth_type; /**< authentication type */
-       TelSimAuthenticationResult_t auth_result; /**< authentication result */
-       int resp_length; /**< response length. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
-       char resp_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< response data. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
-       int authentication_key_length; /**< the length of authentication key, Kc*/
-       char authentication_key[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< the data of of authentication key, Kc*/
-       int cipher_length; /**< the length of cipher key length */
-       char cipher_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< cipher key */
-       int integrity_length; /**< the length of integrity key length */
-       char integrity_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< integrity key */
-} TelSimAuthenticationResponse_t;
-
-
-/**
- * This structure contains information about pin data.
- * SIM PIN DATA. For PIN handling (Change, UnBlock) & for Type of PIN information.
- */
-typedef struct {
-       TelSimPinType_t type; /**< Pin type */
-       unsigned char* pw; /**< PIN code */
-       unsigned int pw_len; /**< PIN code length*/
-} TelSimSecPw_t;
-
-/**
- * This data structure defines the data for the PIN Information.
- */
-typedef struct {
-       TelSimPinType_t type; /**< Specifies the PIN or PUK type.*/
-       int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
-} TelSimSecResult_t;
-
-/**
- * This structure is used to en/disable facility
- */
-typedef struct {
-       TelSimLockType_t lock_type; /**< Facility type */
-       unsigned char *pw; /**< password */
-       int pw_len; /**< password length */
-} TelSimFacilityPw_t;
-
-typedef struct {
-       TelSimLockType_t type; /**< Specifies the PIN or PUK type.*/
-       int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
-} TelSimFacilityResult_t;
-
-typedef struct {
-       TelSimLockType_t type;
-       TelSimFacilityStatus_t f_status;
-}TelSimFacilityInfo_t;
-
-/**
- *
- * This structure is used to get information about LOCK_TYPE
- */
-typedef struct {
-       TelSimLockType_t lock_type; /**< Lock type */
-       TelSimLockStatus_t lock_status; /**< Lock key */
-       int retry_count; /**< retry counts */
-} TelSimLockInfo_t;
-
-/**
- * This data structure defines the data for the apdu.
- */
-typedef struct {
-       unsigned 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;
-
-typedef struct {
-       TelSimPbType_t phonebook_type;
-       unsigned short index;
-       unsigned short next_index; //this field is not used in add/update case
-
-       unsigned char name[255+1];
-       TelSimTextEncrypt_t dcs;
-
-       unsigned char number[255+1];
-       TelSimTypeOfNum_t ton;
-
-       /* following field is valid in only USIM*/
-       unsigned char sne[255+1];
-       TelSimTextEncrypt_t sne_dcs;
-       unsigned char anr1[255+1];
-       TelSimTypeOfNum_t anr1_ton;
-       unsigned char anr2[255+1];
-       TelSimTypeOfNum_t anr2_ton;
-       unsigned char anr3[255+1];
-       TelSimTypeOfNum_t anr3_ton;
-
-       unsigned char email1[255+1];
-       unsigned char email2[255+1];
-       unsigned char email3[255+1];
-       unsigned char email4[255+1];
-
-       unsigned short group_index; //GRP
-       unsigned short pb_control; //PBC
-} TelSimPbRecord_t;
-
-/**
- *     This data structure defines the phone book storage count information.
- */
-typedef struct {
-       TelSimPbType_t StorageFileType; /**< Storage  file type */
-       unsigned short TotalRecordCount; /**< Total record count */
-       unsigned short UsedRecordCount; /**< Used record count */
-} TelSimPbStorageInfo_t;
-
-/**
- * This data structure gives the phone book entry information.
- */
-typedef struct {
-       TelSimPbType_t StorageFileType; /**< Storage  file type */
-       unsigned short PbIndexMin; /**< Phone book minimum index*/
-       unsigned short PbIndexMax; /**< Phone book maximum index */
-       unsigned short PbNumLenMax; /**< Phone number maximum length */
-       unsigned short PbTextLenMax; /**< Text maximum length */
-} TelSimPbEntryInfo_t;
-
-/**
- *
- This structure gives 3G phone book capability information.
- */
-typedef struct {
-       TelSimPb3GFileType_t field_type; /**< 3G phonebook file type */
-       unsigned short index_max; /**< max index */
-       unsigned short text_max; /**< max text length */
-       unsigned short used_count; /**< used record count */
-} TelSimPb3GFileTypeCapabiltyInfo_t;
-
-/**
- *
- * This data structure defines the data for the SIM PHONEBOOK & ITS CAPABILITIES information.
- * It refers to EF_PBR
- */
-typedef struct {
-       unsigned short FileTypeCount; /**< phonebook file type count */
-       TelSimPb3GFileTypeCapabiltyInfo_t FileTypeInfo[TAPI_SIM_PB_3G_FILE_MAX_COUNT]; /**< phonebook file type information */
-} TelSimPbCapabilityInfo_t;
-
-
-
-/* SAP (SIM Access Profile) related interface structures and enum */
-/**
- * This struct gives the SAP ATR response data information.
- */
-typedef struct {
-       int atr_len; /**<  SAP ATR response data length */
-       unsigned char atr_data[TAPI_SIM_SAP_ATR_DATA]; /**<  SAP ATR response data */
-} TelSapAtrInfo_t;
-
-/* SAP transfer APDU request */
-
-/**
- * This data structure gives the SAP APDU data information.
- */
-typedef struct {
-       int apdu_len; /**<  SAP APDU length */
-       unsigned char apdu_data[TAPI_SIM_APDU_MAX_LEN]; /**<  SAP APDU data */
-} TelSapApduData_t;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _TELSIM_H_
-/**
- * @}
- */
diff --git a/include/TelSms.h b/include/TelSms.h
deleted file mode 100644 (file)
index 0ed021b..0000000
+++ /dev/null
@@ -1,836 +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  NetText_TAPI    NetText(SMS)
-* @{
-*
-* @file TelNetText.h
-
-     @brief This file serves as a "C" header file defines structures for Tapi Network Text Services. \n
-      It contains a sample set of constants, enums, structs that would be required by applications.
-
- */
-#ifndef _TEL_NETTEXT_H_
-#define _TEL_NETTEXT_H_
-
-#include <TelSim.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* NetText */
-#define TAPI_SMS_ENCODED_SCA_LEN_MAX                           12      /** Encoded SCA is 12 bytes long maximum */
-#define TAPI_SIM_SMSP_ADDRESS_LEN                              20      /** EF-SMSP digit length */
-#define TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX                         128     /** EF-SMSP alpha id length */
-
-#define TAPI_NETTEXT_MSG_SIZE_MAX                              918     /** Maximum Message Size */
-#define TAPI_NETTEXT_CB_SIZE_MAX                               93      /** Maximum CB Message Size */
-#define TAPI_NETTEXT_ETWS_SIZE_MAX                             56      /** Maximum ETWS Message Size */
-#define TAPI_NETTEXT_ADDRESS_LEN_MAX                           20      /* Nettext Address Length */
-#define TAPI_NETTEXT_SCADDRESS_LEN_MAX                         18      /* SC Address Length */
-
-#define TAPI_NETTEXT_CB_PAGE_SIZE_MAX                          9       /** CB maximum page size*/
-#define TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX                       255     /** Maximum GSM SMS message number*/
-#define TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX                50      /** Maximum GSM SMS CBMI list size*/
-#define TAPI_NETTEXT_SMDATA_SIZE_MAX                           164     /** Maximum SMS data size that can be stored*/
-#define TAPI_NETTEXT_MAX_SMS_SERVICE_CENTER_ADDR               12      /** Maximum SMS service center address*/
-#define TAPI_NETTEXT_MAX_INDEX                                 255     /** Maximum index value for SMS */
-
-#define TAPI_NETTEXT_SMSP_PARAMS_MAX_LEN               28
-
-// ************************  CDMA Features  **************************//
-#define TAPI_NETTEXT_PARAM_TELESERVICE_MASK                    1 << 0                          /**< Teleservice parameter bit position */
-#define TAPI_NETTEXT_PARAM_SERVICE_CATEGORY_MASK               1 << 1                          /**< Service Category parameter bit position */
-#define TAPI_NETTEXT_PARAM_ADDRESS_MASK                                1 << 2                          /**< Address parameter bit position */
-#define TAPI_NETTEXT_PARAM_SUBADDRESS_MASK                     1 << 3                          /**< Subaddress parameter bit position */
-#define TAPI_NETTEXT_PARAM_BEARER_REPLY_MASK                   1 << 4                          /**< Bearer reply parameter bit position */
-#define TAPI_NETTEXT_PARAM_CAUSE_CODES_MASK                    1 << 5                          /**< Cause Code parameter bit position */
-#define TAPI_NETTEXT_PARAM_MESSAGE_ID_MASK                     1 << 6                          /**< Message ID parameter bit position */
-#define TAPI_NETTEXT_PARAM_USER_DATA_MASK                      1 << 7                          /**< User Data parameter bit position */
-#define TAPI_NETTEXT_PARAM_USER_RESPONSE_CODE_MASK             1 << 8                          /**< User Response Code parameter bit position */
-#define TAPI_NETTEXT_PARAM_MC_TIME_STAMP_MASK                  1 << 9                          /**< Message Center Timestamp parameter bit position */
-#define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_ABS_MASK            1 << 10                         /**< Valid period Absolute parameter bit position */
-#define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_REL_MASK                    1 << 11                         /**< Valid period Relative parameter bit position */
-#define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_ABS_MASK          1 << 12                         /**< Deferred delivery absolute parameter bit position */
-#define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_REL_MASK          1 << 13                         /**< Deferred delivery relative parameter bit position */
-#define TAPI_NETTEXT_PARAM_PRIORITY_MASK                               1 << 14                         /**< Priority parameter bit position */
-#define TAPI_NETTEXT_PARAM_PRIVACY_MASK                                1 << 15                         /**< Privacy parameter bit position */
-#define TAPI_NETTEXT_PARAM_REPLY_OPTION_MASK                   1 << 16                         /**< Reply Option parameter bit position */
-#define TAPI_NETTEXT_PARAM_NUMBER_OF_MESSAGE_MASK              1 << 17                         /**< Number of message parameter bit position */
-#define TAPI_NETTEXT_PARAM_ALERT_ON_DELIVERY_MASK                      1 << 18                         /**< Alert on delivery parameter bit position */
-#define TAPI_NETTEXT_PARAM_LANGUAGE_MASK                       1 << 19                         /**< Language parameter bit position */
-#define TAPI_NETTEXT_PARAM_CALLBACK_MASK                               1 << 20                         /**< Callback Number parameter bit position */
-#define TAPI_NETTEXT_PARAM_DISPLAY_MODE_MASK                   1 << 21                         /**< Display mode parameter bit position */
-#define TAPI_NETTEXT_PARAM_MULTI_ENCODING_USER_DATA_MASK       1 << 22                         /**< Multi Encoding user data parameter bit position */
-
-#define TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA                                160                                     /**< Maximum MT user data  size*/
-#define TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA                                160                                     /**< Maximum MO user data  size*/
-
-#define TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS                                             32                                      /**< MAX sms destination(or origination ) address /call back number */
-
-#define TAPI_NETTEXT_ERR_CLASS0_STATUS_SEND_OK                                                         0       /**< send success */
-#define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_VACANT                                                                0       /**< address vacant */
-#define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_TRANSLATION_FAILURE                                   1       /**< address translation failure */
-#define TAPI_NETTEXT_ERR_CLASS23_NETWORK_RESOURCE_SHORTAGE                                     2       /**< network resource shortage */
-#define TAPI_NETTEXT_ERR_CLASS23_NETWORK_FAILURE                                                               3       /**< network failure */
-#define TAPI_NETTEXT_ERR_CLASS23_INVALID_TELESERVICE_ID                                                        4       /**< invalid teleservice id */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM                                         5       /**< other network problem */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_FIRST                      6       /**< other network problem more first */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_LAST                       31      /**< other network problem more last */
-#define TAPI_NETTEXT_ERR_CLASS23_NO_PAGE_RESPONSE                                                              32      /**< no page response */
-#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_BUSY                                                              33      /**< destination busy */
-#define TAPI_NETTEXT_ERR_CLASS23_NO_ACK                                                                                        34      /**< no ack */
-#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_RESOURCE_SHORTAGE                         35      /**< destination resource shortage */
-#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED                                                36      /**< sms delivery postponed */
-#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_OUT_OF_SERVICE                                    37      /**< destination out of service */
-#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_NO_LONGER_AT_THIS_ADDRESS         38      /**< destination no longer at this address */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM                                                39      /**< other terminal problem */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_FIRST                     40      /**< other terminal problem more first */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_LAST                      47      /**< other terminal problem more last */
-#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_FIRST                     48      /**< sms delivery postpone more first */
-#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_LAST                      63      /**< sms delivery postpone more last */
-#define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_RESOURCE_SHORTAGE                                    64      /**< radio interface resource shortage */
-#define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_INCOMPATIBLE                                                 65      /**< radio interface incompatible */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM                                                66      /**< other radio interface problem */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_FIRST                     67      /**< other radio interface problem more first */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_LAST                      95      /**< other radio interface problem more last */
-#define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_SIZE                                                  96      /**< unexpected parameter size */
-#define TAPI_NETTEXT_ERR_CLASS23_SMS_ORIGINATION_DENIED                                                97      /**< sms origination denied */
-#define TAPI_NETTEXT_ERR_CLASS23_SMS_TERMINATION_DENIED                                                98      /**< sms termination denied */
-#define TAPI_NETTEXT_ERR_CLASS23_SUPPL_SERVICE_NOT_SUPPORTED                                   99      /**< supplementary service not supported */
-#define TAPI_NETTEXT_ERR_CLASS23_SMS_NOT_SUPPORTED                                                             100     /**< sms not supported */
-#define TAPI_NETTEXT_ERR_CLASS23_RESERVED_101                                                                  101     /**< reserved 101 */
-#define TAPI_NETTEXT_ERR_CLASS23_MISSING_EXPECTED_PARM                                         102     /**< missing expected parameter */
-#define TAPI_NETTEXT_ERR_CLASS23_MISSING_MANDATORY_PARM                                                103     /**< missing mandatory parameter value */
-#define TAPI_NETTEXT_ERR_CLASS23_UNRECOGNIZED_PARM_VALUE                                               104     /**< unrecognized parameter value */
-#define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_VALUE                                         105     /**< unexpected parameter value */
-#define TAPI_NETTEXT_ERR_CLASS23_USER_DATA_SIZE_ERROR                                                  106     /**< user data size error */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS                                                107     /**< other general problem */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_FIRST                     108     /**< other general problem first */
-#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_LAST                      255     /**< other general problem last */
-
-#define TAPI_NETTEXT_ERR_CLASS4_WAITING_FOR_TL_ACK                                                             1       /**< waiting for transport ack */
-#define TAPI_NETTEXT_ERR_CLASS4_OUT_OF_RESOURCES                                                               2       /**< out of resource */
-#define TAPI_NETTEXT_ERR_CLASS4_ACCESS_TOO_LARGE                                                               3       /**< access to large */
-#define TAPI_NETTEXT_ERR_CLASS4_DTC_TOO_LARGE                                                          4       /**< DTC too large */
-#define TAPI_NETTEXT_ERR_CLASS4_DTC_CONNECTED                                                                  5       /**< DTC connected */
-#define TAPI_NETTEXT_ERR_CLASS4_NETWORK_NOT_READY                                                              6       /**< network not ready */
-#define TAPI_NETTEXT_ERR_CLASS4_NO_SVC                                                                                 7       /**< no service */
-#define TAPI_NETTEXT_ERR_CLASS4_PHONE_NOT_READY                                                                8       /**< phone not ready */
-#define TAPI_NETTEXT_ERR_CLASS4_NOT_ALLOWED_IN_AMPS                                                    9       /**< fail to allowed in amps */
-#define TAPI_NETTEXT_ERR_CLASS4_CANNOT_SEND_BROADCAST                                                  10      /**< fail to send broadcast */
-#define TAPI_NETTEXT_ERR_CLASS4_INVALID_TRANSACTION_ID
-// ********************************************************************//
-
-/**
- * @enum TelSmsMsgStatus_t
- * This enumeration defines the network text status type.
- */
-typedef enum
-{
-       TAPI_NETTEXT_STATUS_READ,                                       /**< MT message, stored and read */
-       TAPI_NETTEXT_STATUS_UNREAD,                                     /**< MT message, stored and unread */
-       TAPI_NETTEXT_STATUS_SENT,                                       /**< MO message, stored and  sent */
-       TAPI_NETTEXT_STATUS_UNSENT,                                     /**< MO message, stored but not sent */
-       TAPI_NETTEXT_STATUS_DELIVERED,                         /**< delivered destination */
-       TAPI_NETTEXT_STATUS_DELIVERY_UNCONFIRMED,  /**< Service centre forwarded message but is unable to confirm delivery*/
-       TAPI_NETTEXT_STATUS_MESSAGE_REPLACED,          /**< Message has been replaced*/
-       TAPI_NETTEXT_STATUS_RESERVED                            /**< Reserved for future use*/
-} TelSmsMsgStatus_t;
-
-/**
- * @enum TelSmsMemStatusType
- * This enumeration defines the memory status type.
- */
-typedef enum
-{
-       TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE                = 0x01, /**< PDA Memory Available */
-       TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL                     = 0x02,  /**< PDAMemory is Full */
-       TAPI_NETTEXT_PHONE_MEMORY_STATUS_AVAILABLE      = 0x03, /**< Phone memory Available */
-       TAPI_NETTEXT_PHONE_MEMORY_STATUS_FULL                   = 0x04, /**< phone memory is full */
-}TelSmsMemStatusType;
-
-/**
- * @enum TelSmsBearerType_t
- * This enum defines the different bearer types
- */
-typedef enum
-{
-       TAPI_NETTEXT_BEARER_PS_ONLY = 0x01,       /**< Send SMS only on PS Bearer */
-       TAPI_NETTEXT_BEARER_CS_ONLY,                  /**< Send SMS only on CS Bearer */
-       TAPI_NETTEXT_BEARER_PS_PREFERRED,        /**<Send SMS preferably on PS Bearer*/
-       TAPI_NETTEXT_BEARER_CS_PREFERRED ,       /**<Send SMS preferably on CS Bearer*/
-       TAPI_NETTEXT_NO_PREFERRED_BEARER         /**<SMS is sent based on default preferred bearer set at OEM based on vendor/operator preference*/
-} TelSmsBearerType_t;
-
-
-/**
-* @enum TelSmsCbMsgType_t
-* This enumeration defines the different CB message types.
-*/
-typedef enum
-{
-               TAPI_NETTEXT_CB_MSG_GSM = 1,            /**< GSM Cell broadcast message */
-               TAPI_NETTEXT_CB_MSG_UMTS                        /**< UMTSCell broadcast message */
-} TelSmsCbMsgType_t;
-
-/**
-* @enum TelSmsEtwsMsgType_t
-* This enumeration defines the different ETWS message types.
-*/
-typedef enum
-{
-          TAPI_NETTEXT_ETWS_PRIMARY = 0,             /**< Primary ETWS message */
-          TAPI_NETTEXT_ETWS_SECONDARY_GSM,            /**< GSM Secondary ETWS message  */
-          TAPI_NETTEXT_ETWS_SECONDARY_UMTS,               /**< UMTS Secondary ETWS message  */
-} TelSmsEtwsMsgType_t;
-
-/**
- * @enum TelSmsResponse_t
- * This enum defines the different response types that come in the
- * sent status acknowledgement/notification after sending a message to the network
- */
-typedef enum
-{
-       TAPI_NETTEXT_SENDSMS_SUCCESS = 0x00,     /**<Message send success*/
-       TAPI_NETTEXT_ROUTING_NOT_AVAILABLE,     /**< Message routing not available*/
-       TAPI_NETTEXT_INVALID_PARAMETER,             /**< Invalid parameter present in TPDU*/
-       TAPI_NETTEXT_DEVICE_FAILURE,                    /**< Device failure*/
-       TAPI_NETTEXT_SERVICE_RESERVED,                /**< Reserved Service*/
-       TAPI_NETTEXT_INVALID_LOCATION,                /**< Invalid location*/
-       TAPI_NETTEXT_NO_SIM,                                    /**< No SIM error*/
-       TAPI_NETTEXT_SIM_NOT_READY,            /**< SIM not ready error*/
-       TAPI_NETTEXT_NO_NETWORK_RESP,          /**< No response from network*/
-       TAPI_NETTEXT_DEST_ADDRESS_FDN_RESTRICTED,/**< Destination address restricted*/
-       TAPI_NETTEXT_SCADDRESS_FDN_RESTRICTED,   /**< Service center address restricted*/
-       TAPI_NETTEXT_RESEND_ALREADY_DONE,        /**< Resend a operation already done*/
-       TAPI_NETTEXT_SCADDRESS_NOT_AVAILABLE,    /**< SCA address not available*/
-       TAPI_NETTEXT_UNASSIGNED_NUMBER = 0x8001,          /**< Unassigned number*/
-       TAPI_NETTEXT_OPERATOR_DETERMINED_BARRING = 0x8008,/**< Operator determined barring*/
-       TAPI_NETTEXT_CALL_BARRED = 0x800A,                /**< Call barred*/
-       TAPI_NETTEXT_MESSAGE_TRANSFER_REJECTED = 0x8015,  /**< Message transfer rejected*/
-       TAPI_NETTEXT_MEMORY_CAPACITY_EXCEEDED = 0x8016,   /**< Memory capacity exceeded/memory full*/
-       TAPI_NETTEXT_DESTINAITION_OUTOFSERVICE = 0x801B,  /**< Destination number/address out of service*/
-       TAPI_NETTEXT_UNSPECIFIED_SUBSCRIBER = 0x801C,     /**< Unspecified subscriber*/
-       TAPI_NETTEXT_FACILITY_REJECTED = 0x801D,          /**< Facility rejected*/
-       TAPI_NETTEXT_UNKNOWN_SUBSCRIBER = 0x801E,         /**< Unknown subscriber*/
-       TAPI_NETTEXT_NETWORK_OUTOFORDER = 0x8026,         /**< Network out of order*/
-       TAPI_NETTEXT_TEMPORARY_FAILURE = 0x8029,          /**< Temporary failure*/
-       TAPI_NETTEXT_CONGESTION = 0x802A,                 /**< Congestion happened*/
-       TAPI_NETTEXT_RESOURCES_UNAVAILABLE = 0x802F,      /**< Resource unavailable*/
-       TAPI_NETTEXT_FACILITY_NOT_SUBSCRIBED = 0x8032,    /**< Facility not subscribed by the user*/
-       TAPI_NETTEXT_FACILITY_NOT_IMPLEMENTED = 0x8045,   /**< Facility not implemented*/
-       TAPI_NETTEXT_INVALID_REF_VALUE = 0x8051,          /**< Invalid reference value*/
-       TAPI_NETTEXT_INVALID_MSG = 0x805F,                /**< Invalid message*/
-       TAPI_NETTEXT_INVALID_MANDATORY_INFO = 0x8060,     /**< Invalid Mandatory information*/
-       TAPI_NETTEXT_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x8061,/**< Message type not implemented*/
-       TAPI_NETTEXT_MESSAGE_NOT_COMPAT_PROTOCOL = 0x8062, /**< Message not compact protocol*/
-       TAPI_NETTEXT_IE_NOT_IMPLEMENTED = 0x8063,          /**< Information element not implemented*/
-       TAPI_NETTEXT_PROTOCOL_ERROR = 0x806F,              /**< Protocol error*/
-       TAPI_NETTEXT_INTERWORKING = 0x807F,              /**< Networking error*/
-       TAPI_NETTEXT_ME_FULL = 0x8080,                     /**< SMS ME FULL */
-       TAPI_NETTEXT_SIM_FULL = 0x8081,                     /**< SMS SIM FULL */
-       TAPI_NETTEXT_TIMEOUT                                            /**< Timeout error */
-}TelSmsResponse_t;
-
- /** @enum  TelSmsCause_t
- * This enum defines the different cause types that come in the
- * sent status acknowledgement/notification after sending a message to the network
- */
-
-typedef enum
-{
-
-  TAPI_NETTEXT_SUCCESS,                     /**< SMS Operation successful*/
-  TAPI_NETTEXT_INVALID_PARAMETER_FORMAT,    /**< Invalid format for some parameters passed in Data package information(TPDU)*/
-  TAPI_NETTEXT_PHONE_FAILURE,               /**<SMS operation failed due to Modem failure*/
-  TAPI_NETTEXT_SIM_BUSY,                    /**< SMS SIM operation cannot be performed as SIM is busy with some other operation*/
-  TAPI_NETTEXT_SIM_FAILURE,                 /**< SMS SIM operation cannot be performed due to SIM failure */
-  TAPI_NETTEXT_UNKNOWN,                     /**< unknown error*/
-  TAPI_NETTEXT_MEMORY_FAILURE,              /**< Error while accessing memory or allocation of memory for SMS operation.*/
-  TAPI_NETTEXT_OPERATION_NOT_SUPPORTED      /**< operation not allowed/supported*/
-}  TelSmsCause_t;
-
-/**
- * @enum TelSmsSetResponse
- * This defines the response values
- */
-typedef enum
-{
-       TAPI_NETTEXT_CBSETCONFIG_RSP,     /**<  cellbroadcast config response */
-       TAPI_NETTEXT_SETPREFERREDBEARER_RSP,     /**<  set preferred bearer response */
-       TAPI_NETTEXT_SETPARAMETERS_RSP,     /**<  set parameter response */
-       TAPI_NETTEXT_SETMEMORYSTATUS_RSP,     /**<   set memory status response*/
-       TAPI_NETTEXT_SETMESSAGESTATUS_RSP,     /**<   set message status response*/
-       TAPI_NETTEXT_SETDEVICESTATUS_RSP,    /**<   set device status response*/
-       TAPI_NETTEXT_SETSCADDR_RSP,     /**<   set SCA address response */
-       TAPI_NETTEXT_SET_RSP_MAX     /**<   maximum limit*/
-}TelSmsSetResponse;
-
-// ************************  CDMA Features  **************************//
- /** @enum  TelSmsIs637AlertPriority_t
- * This enum defines the type of alerts used to distinguish different priorities
- * of the message
- */
-typedef enum{
-  TAPI_NETTEXT_ALERT_PRIORITY_DEFAULT = 0,     /**< Mobile default alert */
-  TAPI_NETTEXT_ALERT_PRIORITY_LOW,                     /**< Low priority alert */
-  TAPI_NETTEXT_ALERT_PRIORITY_MEDIUM,          /**< Medium priority alert */
-  TAPI_NETTEXT_ALERT_PRIORITY_HIGH,                    /**< High priority alert */
-} TelSmsIs637AlertPriority_t;
-
- /** @enum  TelSmsIs637Privacy_t
- * This enum defines the desired privacy level of the message
- */
-typedef enum{
-  TAPI_NETTEXT_PRIVACY_NOT_RESTRICTED = 0,     /**< Not restricted */
-  TAPI_NETTEXT_PRIVACY_RESTRICTED,                     /**< Restricted */
-  TAPI_NETTEXT_PRIVACY_CONFIDENTIAL,                   /**< Confidential */
-  TAPI_NETTEXT_PRIVACY_SECRET,                         /**< Secret */
-} TelSmsIs637Privacy_t;
-
- /** @enum  TelSmsIs637Priority_t
- * This enum defines the priority level of the message
- */
-typedef enum{
-  TAPI_NETTEXT_PRIORITY_NORMAL = 0,                    /**< Normal */
-  TAPI_NETTEXT_PRIORITY_INTERACTIVE,                   /**< Interactive */
-  TAPI_NETTEXT_PRIORITY_URGENT,                                /**< Urgent */
-  TAPI_NETTEXT_PRIORITY_EMERGENCY,                     /**< Emergency */
-} TelSmsIs637Priority_t;
-
- /** @enum  TelSmsIs637LangIndicator_t
- * This enum defines the language of the message so that the receiving mobile station can
- * discard those messages that are not in the user's preferred language
- */
-typedef enum{
-  TAPI_NETTEXT_LANG_UNKNOWN = 0x0,                     /**< Unknown or unspecified */
-  TAPI_NETTEXT_LANG_ENGLISH,                                   /**< English */
-  TAPI_NETTEXT_LANG_FRENCH,                                    /**< French */
-  TAPI_NETTEXT_LANG_SPANISH,                                   /**< Spanish */
-  TAPI_NETTEXT_LANG_JAPANESE,                                  /**< Japanese */
-  TAPI_NETTEXT_LANG_KOREAN,                                    /**< Korean */
-  TAPI_NETTEXT_LANG_CHINESE,                                   /**< Chinese */
-  TAPI_NETTEXT_LANG_HEBREW,                                    /**< Hebrew */
-} TelSmsIs637LangIndicator_t;
-
- /** @enum  TelSmsIs637MsgDisplayMode_t
- * This enum defines the display mode to the mobile station when to display the received message
- */
-typedef enum{
-  TAPI_NETTEXT_MSG_DISPLAY_IMMEDIATE = 0x0,    /**< The mobile station is to display the received message as soon as possible */
-  TAPI_NETTEXT_MSG_DISPLAY_DEFAULT,                    /**< he mobile station is to display the received message based on a pre-defined mode in the mobile station. */
-  TAPI_NETTEXT_MSG_DISPLAY_USER_INVOKE = 0x3, /**< The mobile station is to display the received message based on the mode selected by the user. */
-  TAPI_NETTEXT_MSG_DISPLAY_RESERVED,                   /**< Reserved */
-} TelSmsIs637MsgDisplayMode_t;
-
- /** @enum  TelSmsIs637ErrorClass_t
- * This enum defines the error report class
- */
-typedef enum{
-  TAPI_NETTEXT_MSG_ERROR_CLASS_NONE = 0x0,                                     /**< None error(for SMS ack) */
-  TAPI_NETTEXT_MSG_ERROR_CLASS_TEMPORARY_ERROR = 0x2,          /**< Temporary error(for SMS ack) */
-  TAPI_NETTEXT_MSG_ERROR_CLASS_PERMANENT_ERROR = 0x3,          /**< Permanent error(for SMS ack) */
-  TAPI_NETTEXT_MSG_ERROR_CLASS_PHONE_INTERNAL_ERROR = 0x4,     /**< Phone Internal Status (for Send status) */
-} TelSmsIs637ErrorClass_t;
-
- /** @enum  TelSmsBroadCastCategory_t
- * This enum defines the Broadcast Service Category
- */
-typedef enum{
-  TAPI_NETTEXT_CATEGORY_UNKNOWN                        = 0x00,                 /**< Unknown category */
-  TAPI_NETTEXT_CATEGORY_EMERGENCY                      = 0x01,                 /**< Emergency category */
-  TAPI_NETTEXT_CATEGORY_ADMIN                          = 0x02,                 /**< Admin category */
-  TAPI_NETTEXT_CATEGORY_MAINTENANCE            = 0x03,                 /**< Maintenance category */
-  TAPI_NETTEXT_CATEGORY_GEN_NEWS_LOC           = 0x04,                 /**< General News(Local) category */
-  TAPI_NETTEXT_CATEGORY_GEN_NEWS_REG           = 0x05,                 /**< General News(Regional) category */
-  TAPI_NETTEXT_CATEGORY_GEN_NEWS_NAT           = 0x06,                 /**< General News(National) category */
-  TAPI_NETTEXT_CATEGORY_GEN_NEWS_INT           = 0x07,                 /**< General News(International) category */
-  TAPI_NETTEXT_CATEGORY_FIN_NEWS_LOC           = 0x08,                 /**< Business/Financial News(Local) category */
-  TAPI_NETTEXT_CATEGORY_FIN_NEWS_REG           = 0x09,                 /**< Business/Financial News(Regional) category */
-  TAPI_NETTEXT_CATEGORY_FIN_NEWS_NAT           = 0x0A,                 /**< Business/Financial News(National) category */
-  TAPI_NETTEXT_CATEGORY_FIN_NEWS_INT           = 0x0B,                 /**< Business/Financial News(International) category */
-  TAPI_NETTEXT_CATEGORY_SPT_NEWS_LOC           = 0x0C,                 /**< Sports News(Local) category */
-  TAPI_NETTEXT_CATEGORY_SPT_NEWS_REG           = 0x0D,                 /**< Sports News(Regional) category */
-  TAPI_NETTEXT_CATEGORY_SPT_NEWS_NAT           = 0x0E,                 /**< Sports News(National) category */
-  TAPI_NETTEXT_CATEGORY_SPT_NEWS_INT           = 0x0F,                 /**< Sports News(International) category */
-  TAPI_NETTEXT_CATEGORY_ENT_NEWS_LOC           = 0x10,                 /**< Entertainment News(Local) category */
-  TAPI_NETTEXT_CATEGORY_ENT_NEWS_REG           = 0x11,                 /**< Entertainment News(Regional) category */
-  TAPI_NETTEXT_CATEGORY_ENT_NEWS_NAT           = 0x12,                 /**< Entertainment News(National) category */
-  TAPI_NETTEXT_CATEGORY_ENT_NEWS_INT           = 0x13,                 /**< Entertainment News(International) category */
-  TAPI_NETTEXT_CATEGORY_LOC_WEATHER            = 0x14,                 /**< Local Weather category */
-  TAPI_NETTEXT_CATEGORY_AREA_TRAFFIC           = 0x15,                 /**< Area Traffic Reports category */
-  TAPI_NETTEXT_CATEGORY_AIRPORT_SCHED          = 0x16,                 /**< Local Airport Flight Schedules category */
-  TAPI_NETTEXT_CATEGORY_RESTAURANTS            = 0x17,                 /**< Restaurants category */
-  TAPI_NETTEXT_CATEGORY_LODGINGS                       = 0x18,                 /**< Lodgings category */
-  TAPI_NETTEXT_CATEGORY_RETAILS                        = 0x19,                 /**< Retail Directory category */
-  TAPI_NETTEXT_CATEGORY_ADS                            = 0x1A,                 /**< Advertisements category */
-  TAPI_NETTEXT_CATEGORY_STOCK_QUOTES           = 0x1B,                 /**< Stock Quotes category */
-  TAPI_NETTEXT_CATEGORY_JOBS                           = 0x1C,                 /**< Employment Opportunities category */
-  TAPI_NETTEXT_CATEGORY_MEDICAL                        = 0x1D,                 /**< Medical/Health/Hospitals category */
-  TAPI_NETTEXT_CATEGORY_TECH_NEWS                      = 0x1E,                 /**< Technology News category */
-  TAPI_NETTEXT_CATEGORY_MULTI                          =  0x1F,                        /**< Multi-category */
-} TelSmsBroadCastCategory_t;
-
-/** @enum  TelSmsMsgType_t
- * This enum defines the type of IS637 message
- */
-typedef enum{
-  TAPI_NETTEXT_MESSAGETYPE_DELIVER = 0x01,                                     /**< sms deliver message  */
-  TAPI_NETTEXT_MESSAGETYPE_SUBMIT = 0x02,                                      /**< sms submit message  */
-  TAPI_NETTEXT_MESSAGETYPE_CANCEL = 0x03,                                      /**< sms cancellation message  */
-  TAPI_NETTEXT_MESSAGETYPE_DELIVERY_ACK = 0x04,                                /**< sms delivery acknowledgment message  */
-  TAPI_NETTEXT_MESSAGETYPE_USER_ACK = 0x05,                                    /**< sms user acknowledgment message  */
-} TelSmsMsgType_t;
-
-/** @enum  TelSmsIs637DigitMode_t
- * This enum defines the type of address whether it is 4-bit mode or 8-bit mode
- */
-typedef enum{
-  TAPI_NETTEXT_DIGITMODE_4BITDTMF      = 0x00,                                 /**< 4-bit mode  */
-  TAPI_NETTEXT_DIGITMODE_8BITCODE      = 0x01,                                 /**< 8-bit mode  */
-} TelSmsIs637DigitMode_t;
-
-/** @enum  TelSmsIs637NumberMode_t
- * This enum defines the mode of address number to indicate whether the address type is as defined in ANSI TI.607 or is a data network address
- */
-typedef enum{
-  TAPI_NETTEXT_NUMMODE_NONE_DATANETWORK =      0x00,           /**< in ANSI TI.607 */
-  TAPI_NETTEXT_NUMMODE_DATANETWORK = 0x01,                                     /**< in Data Network */
-} TelSmsIs637NumberMode_t;
-
-/** @enum  TelSmsIs637NumberType_t
- * This enum defines the type of address
- */
-typedef enum{
-  TAPI_NETTEXT_NUMBER_TYPE_UNKNOWN          = 0x00,                            /**<  Unknown */
-  TAPI_NETTEXT_NUMBER_TYPE_INTERNATIONAL    = 0x01,                    /**<  International number*/
-  TAPI_NETTEXT_NUMBER_TYPE_NATIONAL         = 0x02,                            /**<  National number */
-  TAPI_NETTEXT_NUMBER_TYPE_NETWORK          = 0x03,                            /**<  Abbreviated number */
-  TAPI_NETTEXT_NUMBER_TYPE_SUBSCRIBER       = 0x04,                    /**< Abbreviated number */
-  TAPI_NETTEXT_NUMBER_TYPE_RESERVED_5       = 0x05,                    /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_TYPE_ABBREVIATED       = 0x06,                   /**<  Abbreviated number */
-  TAPI_NETTEXT_NUMBER_TYPE_RESERVED_7       = 0x07,                    /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_TYPE_IP                      = 0x11,                     /**<  Internet Protocol(RFC 791) */
-  TAPI_NETTEXT_NUMBER_TYPE_EMAILADDR       = 0x12,                     /**<  Internet Email Address(RFC 822) */
-} TelSmsIs637NumberType_t;
-
-/** @enum  TelSmsIs637NumberPlan_t
- * This enum defines the plan of address
- */
-typedef enum{
-  TAPI_NETTEXT_NUMBER_PLAN_UNKNOWN                         = 0x00,             /**<  Unknown */
-  TAPI_NETTEXT_NUMBER_PLAN_TELEPHONY               = 0x01,             /**< ISDN/Telephony numbering plan */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_2              = 0x02,             /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_DATA                                = 0x03,                 /**< Data numbering plan */
-  TAPI_NETTEXT_NUMBER_PLAN_TELEX                             = 0x04,           /**< CTelex numbering plan */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_5              = 0x05,             /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_6              = 0x06,             /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_7              = 0x07,             /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_8              = 0x08,             /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_PRIVATE                         = 0x09,             /**<  Private numbering plan */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_10           = 0x0A,                       /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_11           = 0x0B,                       /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_12           = 0x0C,                       /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_13           = 0x0D,                       /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_14           = 0x0E,                       /**<  Reserved */
-  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_15           = 0x0F,                       /**<  Reserved */
-} TelSmsIs637NumberPlan_t;
-
-/** @enum  TelSmsIs637SubAddressType_t
- * This enum defines the plan of address
- */
-typedef enum{
-  TAPI_NETTEXT_SUBADDR_NSAP                                      = 0x00,       /**< NSAP ( CCITT Recommendation X.213 or ISO 8348 AD2 ) */
-  TAPI_NETTEXT_SUBADDR_USER_SPECIFIED              = 0x01,     /**<  User-specified */
-} TelSmsIs637SubAddressType_t;
-
-/**
- * @enum telephony_sms_3gpp_type
- * This defines the type of 3gpp
- */
-typedef enum  {
-       TAPI_NETTEXT_NETTYPE_3GPP = 0x01,                                               /**< 3gpp type */
-       TAPI_NETTEXT_NETTYPE_3GPP2 = 0x02,                                      /**< 3gpp2 type (CDMA) */
-} TelSms3gppType_t;
-
-// ********************************************************************//
-
-/**
- * This structure defines the different parameters of  CB configuration
- */
-typedef struct {
- unsigned short FromMsgId; /**< Starting point of the range of CBS message ID */
- unsigned short ToMsgId; /**< Ending point of the range of CBS message ID */
- unsigned char Selected; /**< 0x00 . Not selected. 0x01 . Selected */
-} TelSmsCbMsgInfo3gpp_t;
-
-typedef struct {
- unsigned short CBCategory; /**< CB Service category */
- unsigned short CBLanguage; /**< Language indicator value
-                                                               . 0x00 . LANGUAGE_UNKNOWN .
-                                                                       Unknown or Unspecified
-                                                               . 0x01 . LANGUAGE_ENGLISH . English
-                                                               . 0x02 . LANGUAGE_FRENCH . French
-                                                               . 0x03 . LANGUAGE_SPANISH . Spanish
-                                                               . 0x04 . LANGUAGE_JAPANESE . Japanese
-                                                               . 0x05 . LANGUAGE_KOREAN . Korean
-                                                               . 0x06 . LANGUAGE_CHINESE . Chinese
-                                                               . 0x07 . LANGUAGE_HEBREW . Hebrew*/
- unsigned char Selected; /**< 0x00 . Not selected. 0x01 . Selected */
-} TelSmsCbMsgInfo3gpp2_t;
-
-typedef union {
-       TelSmsCbMsgInfo3gpp_t Net3gpp; /**< 3GPP Broadcast Configuration Information */
-       TelSmsCbMsgInfo3gpp2_t Net3gpp2; /**< 3GPP2 Broadcast Configuration Information, CDMA*/
-} TelSmsCbMsgInfo_t;
-
-typedef struct {
-       int Net3gppType;  /**< Type of 3gpp, 0x01 . 3gpp. 0x02 . 3gpp2(CDMA) */
-       int CBEnabled; /**< CB service state. If cb_enabled is true then cell broadcast service will be enabled and underlying modem will enable CB Channel to receiving CB messages. Otherwise CB service will be disabled, underlying modem will deactivate the CB channel. (enabled/disabled) */
-       unsigned char MsgIdMaxCount; /**< CB Channel List Max Count For Response */
-       int MsgIdRangeCount; /**< Range of CB message ID count */
-       TelSmsCbMsgInfo_t MsgIDs[TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX]; /**< Range of CB message ID information */
-} TelSmsCbConfig_t;
-
-/**
- * This structure defines the properties of a dialing number
- * Type of Number, Numbering Plan Indicator, length and the actual number.
- */
-typedef struct {
-       unsigned int DialNumLen; /**< length of address. If Service center address is not set, then this will be zero */
-       TelSimTypeOfNum_t Ton; /**< Type of number*/
-       TelSimNumberingPlanIdentity_t Npi; /**<Numbering plan identification*/
-       unsigned char szDiallingNum[TAPI_SIM_SMSP_ADDRESS_LEN + 1]; /**< destination address. If Address not set, then set to 0xFF */
-} TelSmsAddressInfo_t;
-
-/**
- * This structure defines different fields involved in setting the parameters of
- * a particular sms in EFsmsp.
- */
-typedef struct {
-
-       unsigned char RecordIndex; /**< Index*/
-       unsigned char RecordLen; /**< SMS Parameter Record length*/
-       unsigned long AlphaIdLen; /**< Alpha id length */
-       char szAlphaId[TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1]; /**< Alpha id .It is a unique identifier for each row/record in EFsmsp */
-       unsigned char ParamIndicator; /**< SMS parameter indicator is a 1 byte value. Each bit in this value indicates the presence/absence of the sms header parameters.If the parameter is present the corresponding bit value is set to 0.If the parameter is absent then it is set as 1.Refer 3GPP TS 31.02 :4.4.23 */
-       TelSmsAddressInfo_t TpDestAddr; /**< TP-destination address (TP-DA) */
-       TelSmsAddressInfo_t TpSvcCntrAddr; /**< TP-service center address */
-       unsigned short TpProtocolId; /**< TP-protocol Id */
-       unsigned short TpDataCodingScheme; /**< TP-data coding scheme */
-       unsigned short TpValidityPeriod; /**< TP-validity period */
-} TelSmsParams_t;
-
-/**
- * This structure defines the fields related to an Sms like SIM index, TPDU
- * and length.
- */
-typedef struct {
-       /**
-        * Service Centre address - an optional parameter. If this parameter
-        * is not present, then this field will be Null.If present, the valid
-        * service centre address information is filled as per 3GPP TS23.040
-        * 9.1.2.5 Address fields
-        */
-       unsigned char Sca[TAPI_SMS_ENCODED_SCA_LEN_MAX];
-       /**< Size of array szData (which is actual TPDU message) */
-       int MsgLength;
-       /**< SMS TPDU message */
-       unsigned char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
-} TelSmsDatapackageInfo_t;
-
-/**
- *This structure defines the data Related to SimIndex,MessageStatus and SMS Data Stored.
- */
-typedef struct {
-       int SimIndex; /**< Index where SMS is stored. */
-       TelSmsMsgStatus_t MsgStatus; /**< Message status.*/
-       TelSmsDatapackageInfo_t SmsData; /**<SMS message */
-} TelSmsData_t;
-
-/**
- * This structure defines the different parameters that are related to the message count
- *in a particular memory(Phone/SIM)
- */
-typedef struct {
-       unsigned int TotalCount; /**< Total count of messages stored in SIM*/
-       int UsedCount; /**< Stored message count in SIM in SIM*/
-       int IndexList[TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX]; /**< Message index list stored in SIM. And the maximum size of this array can be of totalCount.This array contains the list of index values in which the messages are stored.i.e. index_list[totalcount] = [2,3] denotes that indexs 2 and 3 are stored(valid) and others not(empty).*/
-} TelSmsStoredMsgCountInfo_t;
-
-/**
- * This structure defines a cell broadcast message.
- */
-typedef struct {
-
-       TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast  message type */
-       unsigned short Length; /**<Size of array szMsgData (which is actual TPDU message) */
-       char szMsgData[TAPI_NETTEXT_CB_SIZE_MAX + 1]; /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
-} TelSmsCbMsg_t;
-
-/**
- * This structure defines a ETWS message.
- */
-typedef struct {
-       TelSmsEtwsMsgType_t EtwsMsgType; /**< Cell Broadcast  message type */
-       unsigned short Length; /**<Size of array szMsgData (which is actual TPDU message) */
-       char szMsgData[TAPI_NETTEXT_ETWS_SIZE_MAX + 1]; /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
-} TelSmsEtwsMsg_t;
-
-// ************************  CDMA Features  **************************//
-/**
- *  This structure defines cause code as an indication whether an SMS error has occurred and
- *  if so, whether the condition is considered temporary or permanent
- **/
-typedef struct {
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       TelSmsIs637ErrorClass_t ErrClass; /**< Error report class */
-       unsigned char Cause; /**< Error cause identifier */
-} TelSmsIs637CauseCode_t;
-
-/**
- * This structure defines the parameters of address and its type
- */
-typedef struct {
-       TelSmsIs637DigitMode_t Digit; /**< Digit mode indicator (0x00:4bit_dtmf, 0x01:8bit_code) */
-       TelSmsIs637NumberMode_t NumberMode; /**< Number mode indicator (0x00:ANSI TI607, 0x01:Data network) */
-       TelSmsIs637NumberType_t NumberType; /**< Type of number */
-       TelSmsIs637NumberPlan_t NumberPlan; /**< Numbering plan */
-       unsigned char szAddrLength; /**< The number of CHARi */
-       unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< The address digit or character */
-} TelSmsIs637Address_t;
-
-/**
- * This structure defines the parameters of subaddress of originator and destination
- */
-typedef struct {
-       TelSmsIs637SubAddressType_t SubType; /**< Subaddress type */
-       unsigned char Odd; /**< Odd/even indicator */
-       unsigned char szAddrLength; /**< The number of CHARi */
-       unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< A subaddress octet */
-} TelSmsIs637SubAddress_t;
-
-/**
- * This structure defines the message center time stamp may be include
- * with SMS message sent from a message center
- */
-typedef struct {
-       unsigned int year; /**< Year - if the year is 2002, the year field contains 0x02 */
-       unsigned int month; /**< Month (1 ~ 12) */
-       unsigned int day; /**< Day (1 ~ 31) */
-       unsigned int hours; /**< Hours (0 ~ 23) */
-       unsigned int minutes; /**< Minute (0 ~ 59) */
-       unsigned int seconds; /**< Seconds (0 ~ 59) */
-} TelSmsTimeStamp_t;
-
-/**
- * The structure defines the parameter of SMS submit message
- */
-typedef struct {
-       TelSmsIs637Address_t DstAddr; /**< Destination address */
-       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
-       unsigned short TeleService; /**< Teleservice Identifier */
-       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       unsigned short MsgId; /**< Message identifier */
-       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
-       unsigned short MsgLength; /**< Message length */
-       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
-       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute (not supported) */
-       unsigned char ValidityPeriodRel; /**< Validity period - Relative (not supported) */
-       TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute */
-       unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative */
-       TelSmsIs637Priority_t Priority; /**< Priority indicator */
-       TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
-       int bUserAckRequest; /**< User acknowledge request */
-       int bDeliveryAckRequest; /**< Delivery acknowledge request */
-       TelSmsIs637AlertPriority_t AlertPriority; /**< Alert priority of message */
-       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
-       TelSmsIs637Address_t CallBackNumber; /**< Callback number address */
-} TelSmsIs637OutSubmit_t;
-
-/**
- * The structure defines the parameter of SMS acknowledgement message for submit
- */
-typedef struct {
-       TelSmsIs637Address_t DstAddr; /**< Destination address */
-       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
-       unsigned short TeleService; /**< Teleservice Identifier */
-       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       unsigned short MsgId; /**< Message identifier */
-       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
-       unsigned short MsgLength; /**< Message length */
-       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
-       unsigned char UserResponseCode; /**< User response code */
-} TelSmsIs637OutAck_t;
-
-/**
- * The structure defines the parameter of SMS cancellation message
- */
-typedef struct {
-       TelSmsIs637Address_t DstAddr; /**< Destination address */
-       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
-       unsigned short TeleService; /**< Teleservice Identifier */
-       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       unsigned short MsgId; /**< Message identifier */
-} TelSmsIs637OutCancel_t;
-
-/**
- * The structure defines the parameter of SMS devivery message
- */
-typedef struct {
-       TelSmsIs637Address_t OrigAddr; /**< Origination address */
-       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
-       unsigned short TeleService; /**< Teleservice Identifier */
-       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       unsigned short MsgId; /**< Message identifier */
-       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
-       unsigned short MsgLength; /**< Message length */
-       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
-       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
-       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
-       unsigned char ValidityPeriodRel; /**< Validity period - Relative */
-       TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute (not supported) */
-       unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative (not supported) */
-       TelSmsIs637Priority_t Priority; /**< Priority indicator */
-       TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
-       unsigned char NumMsg; /**< Number of voice mail (0-99) */
-       int bUserAckRequest; /**< User acknowledge request */
-       int bDeliveryAckRequest; /**< Delivery acknowledge request */
-       TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
-       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
-       TelSmsIs637Address_t CallBackNumer; /**< Callback number address */
-       TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
-} TelSmsIs637InDeliver_t;
-
-/**
- * The structure defines the parameter of SMS acknowledge message for deliver
- */
-typedef struct {
-       TelSmsIs637Address_t OrigAddr; /**< Origination address */
-       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
-       unsigned short TeleService; /**< Teleservice Identifier */
-       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       unsigned short MsgId; /**< Message identifier */
-       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
-       unsigned short MsgLength; /**< Message length */
-       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
-       unsigned char UserResponseCode; /**< User response code */
-       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
-} TelSmsIs637InAck_t;
-
-/**
- * The structure defines the parameter of SMS acknowledge message from message center
- */
-typedef struct {
-       TelSmsIs637Address_t OrigAddr; /**< Origination address */
-       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
-       unsigned short TeleService; /**< Teleservice Identifier */
-       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       unsigned short MsgId; /**< Message identifier */
-       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
-       unsigned short MsgLength; /**< Message length */
-       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
-       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
-} TelSmsIs637InDeliverAck_t;
-
-/**
- * The structure defines the parameter of SMS broadcast message
- */
-typedef struct {
-       TelSmsBroadCastCategory_t ServiceCategory; /**< Broadcast service category */
-       unsigned short MsgId; /**< Message identifier */
-       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
-       unsigned char ReplySeqNumber; /**< Reply sequence number */
-       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
-       unsigned short MsgLength; /**< Message length */
-       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
-       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
-       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
-       unsigned char ValidityPeriodRel; /**< Validity period - Relative */
-       TelSmsIs637Priority_t Priority; /**< Priority indicator */
-       TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
-       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
-       TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
-} TelSmsIs637InBroadCast_t;
-
-/**
- * The structure defines the type of SMS message as union
- */
-typedef union {
-       TelSmsIs637OutSubmit_t OutSubmit; /**< Outgoing Submit message */
-       TelSmsIs637OutAck_t OutAck; /**< Outgoing Acknowledge message */
-       TelSmsIs637OutCancel_t OutCancel; /**< Outgoing Cancel message */
-       TelSmsIs637InDeliver_t InDeliver; /**< Incoming Delivery message */
-       TelSmsIs637InAck_t InAck; /**< Incoming Acknowledge message */
-       TelSmsIs637InDeliverAck_t InDeliverAck; /**< Incoming Delivery Acknowledge message */
-       TelSmsIs637InBroadCast_t InBc; /**< Incoming Broadcast message */
-} TelSmsMessage_t;
-
-/**
- * The structure defines the parameter of entire SMS message of each type
- */
-typedef struct {
-       int ParamMask; /**< Parameter ID mask */
-       TelSmsMsgType_t MsgType; /**< Message type */
-       TelSmsMessage_t MsgData; /**< Message data */
-} TelSmsMsgInfo_t;
-// ********************************************************************//
-
-struct tel_noti_sms_incomming_msg {
-        char Sca[TAPI_SMS_ENCODED_SCA_LEN_MAX];
-        int MsgLength;
-        char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
-};
-
-struct tel_noti_sms_incomming_cb_msg {
-       TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast  message type */
-        short Length; /**<Size of array szMsgData (which is actual TPDU message) */
-        char szMsgData[TAPI_NETTEXT_CB_SIZE_MAX + 1]; /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
-};
-
-struct tel_noti_sms_incomming_etws_msg {
-       TelSmsEtwsMsgType_t EtwsMsgType; /**< ETWS  message type */
-        short Length; /**<Size of array szMsgData (which is actual TPDU message) */
-        char szMsgData[TAPI_NETTEXT_ETWS_SIZE_MAX + 1]; /**<ETWS message data[Refer 3GPP TS 23.041 9.4.1]*/
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif  // _TEL_NETTEXT_H_
-
-/**
- * @}
-*/
diff --git a/include/TelSs.h b/include/TelSs.h
deleted file mode 100644 (file)
index 9fcf8ae..0000000
+++ /dev/null
@@ -1,465 +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  SS_TAPI        SS(Supplementary services)
- * @{
- *
- * @file TelSs.h
-
- @brief This file serves as a "C" header file and defines structures for Tapi Supplementary Services\n
- It contains a sample set of constants, enums, structs that would be required by applications.
- */
-
-#ifndef _TEL_SS_H_
-#define _TEL_SS_H_
-
-#include <TelDefines.h>
-#include <TelErr.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/** maximum length of barring password */
-#define TAPI_SS_GSM_BARR_PW_LEN_MAX                            4 /**<Maximum length of barring password */
-
-/** maximum length of dial digit */
-#define TAPI_CALL_DIALDIGIT_LEN_MAX                            82 /**<maximum length of dial digit *///( To Accommodate Unpacked string length, which will be greater than 182, 182* 8 /7 = 208, Packed len = 182* 7/8 = 160)
-#define TAPI_SS_USSD_DATA_SIZE_MAX                             208      /**<User-to-user data maximum size */
-#define TAPI_SS_RECORD_NUM_MAX                                 5 /**< SS record maximum size */
-#define TAPI_SS_AOC_CURRENCY_LEN_MAX                   3 /**< maximum length of AOC currency */
-
-/* Supplementary Svc */
-#define TAPI_SS_ADDRESS_LEN_MAX                                        40
-#define TAPI_SS_CCBS_SIZE_MAX                                  5
-#define TAPI_SS_TELECOMM_SERVCE_SIZE_MAX               13
-#define TAPI_SS_PHONE_NUM_LEN_MAX                              33
-#define TAPI_SS_MMISTRING_LEN_MAX                              33
-#define TAPI_SS_PWD_LEN_MAX                                            5
-#define TAPI_MAX_RELEASE_COMPLETE_DATA_LEN             260
-#define TAPI_MAX_ULONG                                                 0xffffffff
-
-/**
- *  This enumeration defines the call forwarding flavor.
- */
-typedef enum {
-       TAPI_SS_CF_WHEN_CFU = 0x01, /* 0x01 : Call Forwarding Unconditional */
-       TAPI_SS_CF_WHEN_CFB,        /* 0x02 : Call Forwarding Mobile Busy */
-       TAPI_SS_CF_WHEN_CFNRy,      /* 0x03 : Call Forwarding No Reply */
-       TAPI_SS_CF_WHEN_CFNRc,      /* 0x04 : Call Forwarding Not Reachable */
-       TAPI_SS_CF_WHEN_CF_ALL,     /* 0x05 : All Call Forwarding */
-       TAPI_SS_CF_WHEN_CFC,        /* 0x06 : All Conditional Call Forwarding */
-       TAPI_SS_CF_WHEN_MAX         /* 0x07 : Max */
-} TelSsForwardWhen_t;
-
-/**
- * The various types of call barring. Note, only one type of incoming barring and only one type of outgoing barring may be active at any time.
- */
-typedef enum {
-       TAPI_SS_CB_TYPE_BAOC = 0x01,                /* 0x01 : Barring All Outgoing Calls */
-       TAPI_SS_CB_TYPE_BOIC,                /* 0x02 : Barring Outgoing International Calls */
-       TAPI_SS_CB_TYPE_BOIC_NOT_HC, /* 0x03 : Barring Outgoing International Calls
-                                                                except to Home Country */
-       TAPI_SS_CB_TYPE_BAIC,                /* 0x04 : Barring All Incoming Calls */
-       TAPI_SS_CB_TYPE_BIC_ROAM,       /* 0x05 : Barring Incoming Calls when roam, 
-                                                                       outside of the Home Country */
-       TAPI_SS_CB_TYPE_AB,                   /* 0x06 : All Barring Services */
-       TAPI_SS_CB_TYPE_AOB,                 /* 0x07 : All Outgoing Barring Services */
-       TAPI_SS_CB_TYPE_AIB,                  /* 0x08 : All Incoming Barring Services */
-       TAPI_SS_CB_TYPE_BIC_NOT_SIM, /* 0x09 : Barring Incoming Calls which is
-                                                                not stored in the SIM memory */
-       TAPI_SS_CB_TYPE_MAX
-} TelSsBarringType_t;
-
-/**
- * This enumeration defines the ussd Indication Type
- */
-typedef enum {
-       TAPI_SS_USSD_STATUS_NOTIFY = 0x00, /**< notify : to display USSD data to user */
-       TAPI_SS_USSD_STATUS_NO_ACTION_REQUIRE = 0x01, /**< No further user action required */
-       TAPI_SS_USSD_STATUS_ACTION_REQUIRE = 0x02, /**< Further user action required*/
-       TAPI_SS_USSD_STATUS_TERMINATED_BY_NET = 0x03, /**< 0x03 : USSD terminated by network */
-       TAPI_SS_USSD_STATUS_OTHER_CLIENT = 0x04, /**< 0x04 : other local client has responded */
-       TAPI_SS_USSD_STATUS_NOT_SUPPORT = 0x05, /**< 0x05 : operation not supported */
-       TAPI_SS_USSD_STATUS_TIME_OUT = 0x06 /**< 0x06 : Time out when there is no response from network */
-} TelSsUssdStatus_t;
-
-/**
- *
- * This enum defines the values for USSD type.
- */
-typedef enum {
-       TAPI_SS_USSD_TYPE_USER_INIT = 0x01, /**< USSD request type User Initiated. */
-       TAPI_SS_USSD_TYPE_USER_RSP, /**< USSD request type User Response. */
-       TAPI_SS_USSD_TYPE_USER_REL /**< USSD request type User Release. */
-} TelSsUssdType_t;
-
-/**
- *  This enumeration defines the call barring operation mode .
- */
-typedef enum {
-       TAPI_SS_CB_MODE_ACTIVATE, /**< Activate call barring  */
-       TAPI_SS_CB_MODE_DEACTIVATE, /**< De Activate call barring */
-} TelSsBarringMode_t;
-
-/**
- *  This enumeration defines the call barring operation mode .
- */
-typedef enum {
-       TAPI_SS_CW_MODE_ACTIVATE, /**< Activate call barring  */
-       TAPI_SS_CW_MODE_DEACTIVATE, /**< De Activate call barring */
-} TelSsCallWaitingMode_t;
-
-/**
- *  This enumeration defines the call type .
- */
-typedef enum {
-       /* TELESERVICE */
-       TAPI_SS_CLASS_ALL_TELE=0x10,                        /* 0x10 : All Teleservices */
-       TAPI_SS_CLASS_VOICE=0x11,                              /* 0x11 : All Voice ( telephony ) */
-       TAPI_SS_CLASS_ALL_DATA_TELE=0x12,             /* 0x12 : All Data Teleservices */
-       TAPI_SS_CLASS_FAX=0x13,                                /* 0x13 : All Fax Service */
-       TAPI_SS_CLASS_SMS=0x16,                                /* 0x16 : SMS service     */
-       TAPI_SS_CLASS_VGCS=0x17,                              /* 0x17 : Voice Group Call Service */
-       TAPI_SS_CLASS_VBS=0x18,                                /* 0x18 : Voice Broadcast */
-       TAPI_SS_CLASS_ALL_TELE_EXPT_SMS=0x19,    /* 0x19 : All teleservice except SMS */
-
-       /* BEARER SERVICE */
-       TAPI_SS_CLASS_ALL_BEARER=0x20,                  /* 0X20 : all bearer services */
-       TAPI_SS_CLASS_ALL_ASYNC=0x21,                    /* 0x21 : All Async services */
-       TAPI_SS_CLASS_ALL_SYNC=0x22,                      /* 0x22 : All sync services*/
-       TAPI_SS_CLASS_ALL_CS_SYNC=0x24,                /* 0x24 : All Circuit switched sync */
-       TAPI_SS_CLASS_ALL_CS_ASYNC=0x25,              /* 0x25 : All Circuit switched async */
-       TAPI_SS_CLASS_ALL_DEDI_PS=0x26,                /* 0x26 : All Dedicated packet Access */
-       TAPI_SS_CLASS_ALL_DEDI_PAD=0x27,              /* 0x27 : All Dedicated PAD Access */
-       TAPI_SS_CLASS_ALL_DATA_CDA=0x28,                /*0x28 : All Data CDA*/  
-
-       /* PLMN SPECIFIC TELESERVICE */
-       TAPI_SS_CLASS_PLMN_TELE_ALL = 0x50,         /*0x50 : PLMN specific teleservices*/
-       TAPI_SS_CLASS_PLMN_TELE_1 = 0x51,              /*0x51 :PLMN specific teleservice 1*/
-       TAPI_SS_CLASS_PLMN_TELE_2 = 0x52,             /*0x52 : PLMN specific teleservice 2*/
-       TAPI_SS_CLASS_PLMN_TELE_3 = 0x53,             /*0x53 : PLMN specific teleservice 3*/
-       TAPI_SS_CLASS_PLMN_TELE_4 = 0x54,             /*0x54 : PLMN specific teleservice 4*/
-       TAPI_SS_CLASS_PLMN_TELE_5 = 0x55,             /*0x55 : PLMN specific teleservice 5*/
-       TAPI_SS_CLASS_PLMN_TELE_6 = 0x56,             /*0x56 : PLMN specific teleservice 6*/
-       TAPI_SS_CLASS_PLMN_TELE_7 = 0x57,             /*0x57 : PLMN specific teleservice 7*/
-       TAPI_SS_CLASS_PLMN_TELE_8 = 0x58,             /*0x58 : PLMN specific teleservice 8*/
-       TAPI_SS_CLASS_PLMN_TELE_9 = 0x59,             /*0x59 : PLMN specific teleservice 9*/
-       TAPI_SS_CLASS_PLMN_TELE_A = 0x60,           /*0x60 :PLMN specific teleservice 10*/
-       TAPI_SS_CLASS_PLMN_TELE_B = 0x61,           /*0x61 :PLMN specific teleservice 11*/
-       TAPI_SS_CLASS_PLMN_TELE_C = 0x62,             /*0x62 : PLMN specific teleservice 12*/
-       TAPI_SS_CLASS_PLMN_TELE_D = 0x63,             /*0x63 : PLMN specific teleservice 13*/
-       TAPI_SS_CLASS_PLMN_TELE_E = 0x64,             /*0x64 : PLMN specific teleservice 14*/
-       TAPI_SS_CLASS_PLMN_TELE_F = 0x65,             /*0x65 : PLMN specific teleservice 15*/
-
-       /* PLMN SPECIFIC BEARER SERVICE */
-       TAPI_SS_CLASS_PLMN_BEAR_ALL = 0x70,         /*0x70 : All PLMN specific bearer services*/
-       TAPI_SS_CLASS_PLMN_BEAR_1 = 0x71,              /*0x71 :PLMN specific bearer service 1*/
-       TAPI_SS_CLASS_PLMN_BEAR_2 = 0x72,             /*0x72 : PLMN specific bearer service  2*/
-       TAPI_SS_CLASS_PLMN_BEAR_3 = 0x73,             /*0x73 : PLMN specific bearer service  3*/
-       TAPI_SS_CLASS_PLMN_BEAR_4 = 0x74,             /*0x74 : PLMN specific bearer service  4*/
-       TAPI_SS_CLASS_PLMN_BEAR_5 = 0x75,             /*0x75 : PLMN specific bearer service  5*/
-       TAPI_SS_CLASS_PLMN_BEAR_6 = 0x76,             /*0x76 : PLMN specific bearer service  6*/
-       TAPI_SS_CLASS_PLMN_BEAR_7 = 0x77,             /*0x77 : PLMN specific bearer service  7*/
-       TAPI_SS_CLASS_PLMN_BEAR_8 = 0x78,             /*0x78 : PLMN specific bearer service  8*/
-       TAPI_SS_CLASS_PLMN_BEAR_9 = 0x79,             /*0x79 : PLMN specific bearer service  9*/
-       TAPI_SS_CLASS_PLMN_BEAR_A = 0x80,            /*0x80 : PLMN specific bearer service  10*/
-       TAPI_SS_CLASS_PLMN_BEAR_B = 0x81,             /*0x81 : PLMN specific bearer service  11*/
-       TAPI_SS_CLASS_PLMN_BEAR_C = 0x82,            /*0x82 : PLMN specific bearer service  12*/
-       TAPI_SS_CLASS_PLMN_BEAR_D = 0x83,            /*0x83 : PLMN specific bearer service  13*/
-       TAPI_SS_CLASS_PLMN_BEAR_E = 0x84,             /*0x84 : PLMN specific bearer service  14*/
-       TAPI_SS_CLASS_PLMN_BEAR_F = 0x85,             /*0x85 : PLMN specific bearer service  15*/
-
-       /* CPHS - AUXILIARY SERVICE */
-       TAPI_SS_CLASS_AUX_VOICE = 0x89,                 /* 0x89 : All Auxiliary Voice ( Auxiliary telephony ) */
-
-       TAPI_SS_CLASS_ALL_GPRS_BEARER=0x99,       /* 0x99 : All GPRS bearer services */
-       TAPI_SS_CLASS_ALL_TELE_BEARER=0xFF,        /* 0xFF : all tele and bearer services */
-} TelSsClass_t;
-
-/**
- *  This enumeration defines the forward mode .
- */
-typedef enum {
-       TAPI_SS_CF_MODE_DISABLE_EV, /**< Deactivate call forwarding  */
-       TAPI_SS_CF_MODE_ENABLE_EV, /**< Activate call forwarding */
-       TAPI_SS_CF_MODE_REGISTRATION_EV, /**< Register Call forwarding  */
-       TAPI_SS_CF_MODE_ERASURE_EV, /**< De-register call forwarding */
-} TelSsForwardMode_t;
-
-typedef enum {
-       TAPI_SS_CF_NO_REPLY_TIME_5_SECS = 5, /**< Timer value set to 5secs*/
-       TAPI_SS_CF_NO_REPLY_TIME_10_SECS = 10, /**< Timer value set to 10secs*/
-       TAPI_SS_CF_NO_REPLY_TIME_15_SECS = 15, /**< Timer value set to 15secs*/
-       TAPI_SS_CF_NO_REPLY_TIME_20_SECS = 20, /**< Timer value set to 20secs*/
-       TAPI_SS_CF_NO_REPLY_TIME_25_SECS = 25, /**< Timer value set to 25secs*/
-       TAPI_SS_CF_NO_REPLY_TIME_30_SECS = 30, /**< Timer value set to 30secs*/
-} TelSsNoReplyTime_t;
-
-/**
- *  Describes whether a supplementary service request was a success or a failure; and if it failed, why.
- */
-typedef enum {
-       TAPI_SS_SUCCESS, /**<  SS operation was successful */
-       TAPI_SS_TIMEREXPIRE, /**< SS operation timer expired on network. */
-       TAPI_SS_UNKNOWNSUBSCRIBER, /**< SS error indicating unknown/illegal subscriber.  */
-       TAPI_SS_BEARERSERVICENOTPROVISIONED, /**<The network returns this error when it is requested to  @n
-        perform an operation on a supplementary service  */
-       TAPI_SS_TELESERVICENOTPROVISIONED, /**<The network returns this error when it is requested to perform  @n
-        an operation on a supplementary service  */
-       TAPI_SS_ILLEGALSSOPERATION, /**<This error is returned by the network when it is requested to perform an illegal operation @n
-        which is defined as not applicable for the relevant supplementary service */
-       TAPI_SS_ERRORSTATUS, /**<This error is returned by the network when it is requested to perform an operation @n
-        which is not compatible with the current status of the relevant supplementary service. */
-       TAPI_SS_NOTAVAILABLE, /**< SS not available in network */
-       TAPI_SS_SUBSCRIPTIONVIOLATION, /**< SS service subscription violation. */
-       TAPI_SS_INCOMPATIBILITY, /**< This error is returned by the network when it is requested for a supplementary service operation incompatible with the @n
-        status of another supplementary service or with the teleservice or bearer service for which the operation is requested */
-       TAPI_SS_SYSTEMFAILURE, /**< This error is returned by the network, when it cannot perform an operation because of a failure in the network */
-       TAPI_SS_DATAMISSING, /**< This error is returned by the network when an optional parameter is missing in an invoke component @n
-        or an inner data structure, while it is required by the context of the request. */
-       TAPI_SS_UNEXPECTEDDATAVALUE, /**< SS error indicating unexpected data value on network side *//**< SS operation barred.  */
-       TAPI_SS_PWREGISTRATIONFAILURE, /**< SS error indicating change password failure. */
-       TAPI_SS_NEGATIVEPWCHECK, /**< SS error indicating negative password check.  */
-       TAPI_SS_FACILITYNOTSUPPORTED, /**< SS service facility not supported  */
-       TAPI_SS_RESOURCESNOTAVAILABLE, /**< SS error indicating resources not available in network.  */
-       TAPI_SS_MAXNOMPTYEXCEEDED, /**< SS error indicating Maximum MPTY is reached.  */
-       TAPI_SS_CALLBARRED, /**< This error is returned by the network to the MS when call independent subscriber control procedures are barred by the operator */
-       TAPI_SS_NUMBEROFPWATTEMPTSVIOLATION, /**< SS error indicating barring password attempts violated.  */
-       TAPI_SS_ABSENTSUBSCRIBER, /**< This error is returned when the subscriber has activated the detach service or the system detects the absence condition */
-       TAPI_SS_ILLEGALSUBSCRIBER, /**<This error is returned when illegality of the access has been @n
-        established by use of authentication procedure. */
-       TAPI_SS_ILLEGALEQUIPMENT, /**<This error is returned when the IMEI check procedure has shown that  @n
-        the IMEI is blacklisted or not whitelisted  */
-       TAPI_SS_USSDBUSY, /**< SS error indicating USSD Busy(Already SS / USSD is ongoing).  */
-       TAPI_SS_UNKNOWNALPHABET, /**< SS error indicating unknown SS data coding of alphabet */
-       TAPI_SS_INVALIDDEFLECTEDTONUMBER, /**< SS error indicating the invalid deflected to number.  */
-       TAPI_SS_DEFLECTIONTOSERVEDSUBSCRIBER, /**< This error is returned if a diversion to the served  @n
-        subscriber's number was requested.  */
-       TAPI_SS_SPECIALSERVICECODE, /**< This error is returned if diversion to a special service code was requested.  */
-       TAPI_SS_REJECTEDBYUSER, /**< SS operation rejected by user.  */
-       TAPI_SS_REJECTEDBYNETWORK, /**< SS operation rejected by network.  */
-       TAPI_SS_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY, /**< SS operation is not allowed by network.  */
-       TAPI_SS_UNKNOWNERROR, /**< SS error indicating unknown error  */
-       TAPI_SS_OEM_NOT_SUPPORTED /**< If oem do not support any of SS requests, then this error will be returned back */
-} TelSsCause_t;
-
-/**
- *   The status of a supplementary service feature (e.g. Call Forwarding or Call Barring). @n
- *   These enumerated values should be used as masks
- */
-typedef enum {
-       TAPI_SS_STATUS_REGISTERED = 0x01, /**< Provisioned & registered (but not active/active-quiescent */
-       TAPI_SS_STATUS_PROVISIONED, /**<Provisioned but not registered (or active/active-quiescent) */
-       TAPI_SS_STATUS_ACTIVE, /**< Provisioned & registered & active */
-       TAPI_SS_STATUS_QUIESCENT, /**< Provisioned & registered & active but quiescent */
-       TAPI_SS_STATUS_NOTHING /**< Not provisioned */
-} TelSsStatus_t;
-
-/**
- * These are the four types of identity presentation / restriction services.
- */
-typedef enum {
-       TAPI_CALLING_LINE_IDENTITY_PRESENTATION, /**< identify the party calling this phone */
-       TAPI_CALLING_LINE_IDENTITY_RESTRICTION, /**< hide the identity of this phone when calling others */
-       TAPI_CONNECTED_LINE_IDENTITY_PRESENTATION, /**< identify the party to whom the calling party (this phone) is connected */
-       TAPI_CONNECTED_LINE_IDENTITY_RESTRICTION, /**< restrict yourself from being identified by incoming calls, such as forwarded calls */
-       TAPI_CALLED_LINE_IDENTITY_PRESENTATION, /**< Called line identity presentation  */
-       TAPI_CALLING_NAME_PRESENTATION /**< Calling Name Presentation */
-} TelSsLineIdentificationType_t;
-
-/**
- *  This enumeration defines the cli service status .
- */
-typedef enum {
-       TAPI_CLI_STATUS_NOT_PROVISONED = 0x01, /**<Service not provided by the service provider */
-       TAPI_CLI_STATUS_PROVISIONED, /**<Service is provided by the service provider */
-       TAPI_CLI_STATUS_ACTIVATED, /**<Service is activated at the network */
-       TAPI_CLI_STATUS_UNKOWN, /**<Service status is unknown*/
-       TAPI_CLI_STATUS_TEMP_RESTRICTED, /**<Service is temporarily restricted */
-       TAPI_CLI_STATUS_TEMP_ALLOWED /**<Service is temporarily allowed */
-} TelSsCliStatus_t;
-
-/**
- *  This enumeration defines the values for Cli service type .
- */
-typedef enum {
-       TAPI_SS_CLI_CLIP = 0x01, /**< Calling Line Identification Presentation. */
-       TAPI_SS_CLI_CLIR = 0x02, /**<  Calling Line Identification Restriction. */
-       TAPI_SS_CLI_COLP = 0x03, /**<  Connected Line Identification Presentation. */
-       TAPI_SS_CLI_COLR = 0x04, /**<  Connected Line Identification Restriction. */
-       TAPI_SS_CLI_CDIP = 0x05, /**<  Called Line Identification Presentation. */
-       TAPI_SS_CLI_CNAP = 0x06, /**<  Calling Name Presentation.*/
-} TelSsCliType_t;
-
-/**
- * This enum defines the values for AOC type.
- */
-typedef enum {
-       TAPI_SS_AOC_TYPE_RESET = 0x00, /**< Specifies the Reset MAXACM Value. */
-       TAPI_SS_AOC_TYPE_ACM = 0x01, /**< Specifies the Accumulated call meter. */
-       TAPI_SS_AOC_TYPE_CCM = 0x02, /**< Specifies the Current call meter. */
-       TAPI_SS_AOC_TYPE_MAXACM = 0x04, /**< Specifies the Max accumulated call meter. */
-       TAPI_SS_AOC_TYPE_PUC = 0x08 /**< Specifies the Price per unit and currency.*/
-} TelSsAocType_t;
-
-/**
- *  This structure  defines the different parameters related to forward info.
- */
-typedef struct {
-       TelSsClass_t Class;
-       TelSsForwardMode_t Mode; /**< Forward Mode */
-       TelSsForwardWhen_t Condition; /**< Forward Condition */
-       char szPhoneNumber[TAPI_CALL_DIALDIGIT_LEN_MAX]; /**< Phone Number*/
-       TelSsNoReplyTime_t NoReplyConditionTimer; /**< No reply wait time 5-30 secs in intervals of 5. */
-} TelSsForwardInfo_t;
-
-/**
- *  This structure defines the values for USSD request type.
- */
-typedef struct {
-       TelSsUssdType_t Type;
-       int Length; /**< USSD  String Length */
-       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD  String */
-} TelSsUssdMsgInfo_t;
-
-/**
- *  This structure  defines the different parameters related to call barring.
- */
-typedef struct {
-       TelSsClass_t Class; /**< Call type */
-       TelSsBarringMode_t Mode; /**< Barring mode  */
-       TelSsBarringType_t Type; /**< Barring type */
-       char szPassword[TAPI_SS_GSM_BARR_PW_LEN_MAX]; /**< password */
-} TelSsBarringInfo_t;
-
-/**
- *  This structure  defines the different parameters related to call waiting.
- */
-typedef struct {
-       TelSsClass_t Class; /**< Call type */
-       TelSsCallWaitingMode_t Mode; /**< Waiting mode  */
-} TelSsWaitingInfo_t;
-
-/**
- * This structure defines the release complete message notification type.
- */
-typedef struct {
-       unsigned char RelCompMsgLen; /**< Specifies the Release complete msg length.*/
-       unsigned char szRelCompMsg[TAPI_MAX_RELEASE_COMPLETE_DATA_LEN]; /**<  Specifies the Release complete msg. */
-} TelSsRelCompMsgInfo_t;
-
-/**
- * This structure defines the values for AOC request type.
- */
-
-typedef struct {
-       float PPM;
-       unsigned char CharTypeOfCurrency;
-       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX];
-} TelAocPucInfo_t;
-
-typedef struct {
-       TelSsAocType_t AocType; /**< Specifies the AOC type. */
-       unsigned int ACM; /**< Specifies the accumulated call meter value. */
-       unsigned int MaxAcm; /**< Specifies the maximum value of ACM . */
-       float CCM; /**< Specifies the Current call meter value. */
-       float PPM; /**< Specifies the Price per unit value. */
-       unsigned char CharTypeOfCurrency; /**< Specifies the Char type of currency. */
-       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX]; /**< Specifies the Currency characters. */
-} TelCallAocInfo_t;
-
-/**
- * This structure defines the values for ss call barring record
- */
-typedef struct {
-       int record_num;
-       struct {
-               TelSsClass_t Class;
-               TelSsStatus_t Status; /**< SS status  */
-               TelSsBarringType_t Flavour; /**< Call barring types providing various barring conditions on that basis call be barred */
-       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
-} TelSsBarringResp_t;
-
-/**
- * This structure defines the values for ss call forwarding record
- */
-typedef struct {
-       int record_num;
-       struct {
-               TelSsClass_t Class;
-               TelSsStatus_t Status; /**< Call forwarding SS status */
-               TelSsForwardWhen_t ForwardCondition; /**< Call forward types providing various conditions when call can be forwarded */
-               int bCallForwardingNumberPresent; /**< Call forwarding number present or not */
-               unsigned char NoReplyWaitTime;
-               unsigned char szCallForwardingNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< forwarded number.[Null Terminated string]*/
-       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
-} TelSsForwardResp_t;
-
-/**
- * This structure defines the values for ss call waiting record
- */
-typedef struct {
-       int record_num;
-       struct {
-               TelSsClass_t Class;
-               TelSsStatus_t Status; /**< SS status */
-       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
-} TelSsWaitingResp_t;
-
-/**
- * This structure defines the values for Calling line identity service
- */
-typedef struct {
-       TelSsLineIdentificationType_t Type; /**< Various line identification types */
-       TelSsCliStatus_t Status; /**< Line identification status from network */
-} TelSsCliResp_t;
-
-typedef struct {
-       TelSsUssdType_t Type;
-       TelSsUssdStatus_t Status;
-       int Length; /**< USSD  String Length */
-       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD  String */
-} TelSsUssdResp_t;
-
-typedef struct {
-       TelSsUssdStatus_t Status;
-       int Length; /**< USSD  String Length */
-       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD  String */
-} TelSsUssdNoti_t;
-
-typedef struct {
-       float PPM; /**< Specifies the Price per unit value. */
-       unsigned char CharTypeOfCurrency; /**< Specifies the Char type of currency. */
-       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX]; /**< Specifies the Currency characters. */
-} TelSsAoc_ppm_info_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _TEL_SS_H_
-/**
- * @}
- */
diff --git a/include/common/tel_call.h b/include/common/tel_call.h
new file mode 100644 (file)
index 0000000..5b18ac6
--- /dev/null
@@ -0,0 +1,831 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_CALL_H__
+#define __TEL_CALL_H__
+
+#include <glib.h>
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_CALL
+*  @{
+*
+*  @file tel_call.h
+*  @brief TAPI Call Interface
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TELEPHONY_CALL_INTERFACE TELEPHONY_SERVICE".Call"
+
+#define TEL_CALL_CALLING_NAME_LEN_MAX          82      /**< The maximum length of the string for calling party name.   */
+#define TEL_CALL_CALLING_NUMBER_LEN_MAX                82      /**< Maximum Dialling Digit Length  */
+#define TEL_CALL_MAX_CALLS_COUNT               6                       /**< Maximum number of call can be possible at a time */
+#define TEL_CALL_MAX_SOUND_EQ_PARAMETER_SIZE   6       /**< Maximum number of sound equalization parameter size */
+#define TEL_CALL_MAX_VOLUME_INFO_RECORD                20      /**< Maximum number of record for volume information */
+
+/**
+ * @enum TelCallResult
+ * Response (Return) values.
+ */
+typedef enum {
+       TEL_CALL_RESULT_SUCCESS,                                                /**< Operation completed successfully */
+       TEL_CALL_RESULT_FAILURE,                                                /**< Operation Failed */
+       TEL_CALL_RESULT_INVALID_PARAMETER,                      /**< Invalid input parameters */
+       TEL_CALL_RESULT_MEMORY_FAILURE,                         /**< Memory allocation failed */
+       TEL_CALL_RESULT_OPERATION_NOT_SUPPORTED,        /**< Operation not supported */
+       TEL_CALL_RESULT_FDN_RESTRICTED,                         /**< FDN calls only */
+       TEL_CALL_RESULT_NETWORK_BUSY,                           /**< Network busy */
+       TEL_CALL_RESULT_SERVICE_NOT_ALLOWED,            /**< Service is not allowed */
+       TEL_CALL_RESULT_OPERATION_NOT_PERMITTED /**< Operation not permitted */
+} TelCallResult;
+
+/**
+ * @enum TelCallEndCause
+ * Call End Cause.
+ */
+typedef enum {
+       TEL_CALL_END_CAUSE_NONE,                                                        /**< No Cause */
+       TEL_CALL_END_CAUSE_FAILED,                                              /**< Call failed */
+       TEL_CALL_END_CAUSE_UNASSIGNED_NUMBER,                   /**< Unassigned Number */
+       TEL_CALL_END_CAUSE_NO_ROUTE_TO_DEST,                    /**< No Route to Destination */
+       TEL_CALL_END_CAUSE_OPERATOR_DETERMINED_BARRING, /**< Operator Determined Barring */
+       TEL_CALL_END_CAUSE_NORMAL_CALL_CLEARING,                /**< Normal Call Clearing */
+       TEL_CALL_END_CAUSE_USER_BUSY,                                   /**< User Busy */
+       TEL_CALL_END_CAUSE_NO_USER_RESPONDING,          /**< No user Responding */
+       TEL_CALL_END_CAUSE_USER_ALERTING_NO_ANSWER,             /**< User Alerting no Answer */
+       TEL_CALL_END_CAUSE_CALL_REJECTED,                               /**< Call Rejected */
+       TEL_CALL_END_CAUSE_NUMBER_CHANGED,                              /**< Number Changed */
+       TEL_CALL_END_CAUSE_DESTINATION_OUT_OF_ORDER,    /**< Destination out of Order */
+       TEL_CALL_END_CAUSE_INVALID_NUMBER_FORMAT,               /**< Invalid Number Format */
+       TEL_CALL_END_CAUSE_FACILITY_REJECTED,                   /**< Facility Rejected */
+       TEL_CALL_END_CAUSE_NO_CIRCUIT_CHANNEL_AVAILABLE,        /**< No Circuit Channel Available */
+       TEL_CALL_END_CAUSE_NETWORK_OUT_OF_ORDER,                        /**< Network out of Order */
+       TEL_CALL_END_CAUSE_TEMPORARY_FAILURE,                           /**< Temporary Failure */
+       TEL_CALL_END_CAUSE_SWITCHING_EQUIPMENT_CONGESTION,      /**< Switching Equipment Congestion */
+       TEL_CALL_END_CAUSE_REQUESTED_CIRCUIT_CHANNEL_NOT_AVAILABLE,     /**< Requested Circuit channel not available */
+       TEL_CALL_END_CAUSE_REQUESTED_FACILITY_NOT_SUBSCRIBED,           /**< Requested facility not subscribed */
+       TEL_CALL_END_CAUSE_ACM_GEQ_ACMMAX,                      /**< ACM equal to greater than ACMAX */
+       TEL_CALL_END_CAUSE_IMEI_NOT_ACCEPTED,                   /**< IMEI not accepted */
+       TEL_CALL_END_CAUSE_NETWORK_FAILURE,             /**< Network unavailable */
+       TEL_CALL_END_CAUSE_CONGESTION,                  /**< Congestion */
+       TEL_CALL_END_CAUSE_SERVICE_OPTION_OUT_OF_ORDER, /**< Service option temporarily out of order */
+       TEL_CALL_END_CAUSE_ACCESS_CLASS_BLOCKED,                /**< Access class blocked */
+} TelCallEndCause;
+
+/**
+ * @enum TelCallState
+ * Call States.
+ */
+typedef enum {
+       TEL_CALL_STATE_IDLE,            /**< Call is in idle state - i.e. no call */
+       TEL_CALL_STATE_ACTIVE,          /**< Call is in connected and conversation state */
+       TEL_CALL_STATE_HELD,            /**< Call is in held state */
+       TEL_CALL_STATE_DIALING,         /**< Call is in dialing state */
+       TEL_CALL_STATE_ALERT,           /**< Call is in alerting state */
+       TEL_CALL_STATE_INCOMING,        /**< Call is in incoming state */
+       TEL_CALL_STATE_WAITING,         /**< Call is in waiting state */
+} TelCallState;
+
+/**
+ * @enum TelCallActiveLine
+ * IN GSM ONLY: Call Active Line.
+ */
+typedef enum {
+       TEL_CALL_ACTIVE_LINE1,          /**< Line 1 */
+       TEL_CALL_ACTIVE_LINE2           /**< Line 2 */
+} TelCallActiveLine;
+
+/**
+ * @enum TelCallAnswerType
+ * Call Answer Types.
+ */
+typedef enum {
+       TEL_CALL_ANSWER_ACCEPT,                 /**< Used to answer an incoming call when there are no current active calls. */
+       TEL_CALL_ANSWER_REJECT,                 /**< Used to reject the incoming call */
+       TEL_CALL_ANSWER_REPLACE,                /**< Release current active call and accept the incoming call */
+       TEL_CALL_ANSWER_HOLD_AND_ACCEPT,        /**< Hold the current active call, and accept the wating call */
+} TelCallAnswerType;
+
+/**
+ * @enum TelCallEndType
+ * Call End Types.
+ */
+typedef enum {
+       TEL_CALL_END,                           /**< Used to end single call with call handle */
+       TEL_CALL_END_ALL,                       /**< Used to end all calls */
+       TEL_CALL_END_ACTIVE_ALL,                /**< Used to end all active calls */
+       TEL_CALL_END_HOLD_ALL,                  /**< Used to end all hold calls */
+} TelCallEndType;
+
+/**
+ * @enum TelCallType
+ * Call Type.
+ */
+typedef enum {
+       TEL_CALL_TYPE_VOICE,    /**< Voice call type. */
+       TEL_CALL_TYPE_VIDEO,    /**< Video call type  */
+       TEL_CALL_TYPE_E911      /**< Emergency call type. */
+} TelCallType;
+
+/**
+ * @enum TelCallActiveState
+ * Current Call State.
+ */
+typedef enum {
+       TEL_CALL_CONNECT_IDLE,          /**< Call is in Idle state. */
+       TEL_CALL_CONNECT_ACTIVE,        /**< Call is in Active state.*/
+       TEL_CALL_CONNECT_HELD           /**< Call is in Held state. */
+} TelCallActiveState;
+
+/**
+ * @enum TelCallCliValidity
+ * CLI(Calling Line Identification) Validity.
+ */
+typedef enum {
+       TEL_CALL_CLI_VALIDITY_VALID,                            /**< CLI is valid */
+       TEL_CALL_CLI_VALIDITY_WITHHELD,                 /**< CLI is withheld ("Rejected by user")*/
+       TEL_CALL_CLI_VALIDITY_NOT_AVAILABLE,            /**< CLI is not available ("Interaction with other service" or "Unavailable")*/
+       TEL_CALL_CLI_VALIDITY_NOT_AVAILABLE_PAYPHONE,   /**< CLI is not available ("Coin line/payphone")*/
+} TelCallCliValidity;
+
+/**
+ * @enum TelCallCniValidity
+ * CNI(Calling Name Identification) Validity.
+ */
+typedef enum {
+       TEL_CALL_CNI_VALIDITY_VALID,                            /**< CLI is valid */
+       TEL_CALL_CNI_VALIDITY_WITHHELD,                 /**< CLI is withheld */
+       TEL_CALL_CNI_VALIDITY_NOT_AVAILABLE,            /**< CLI is not available */
+} TelCallCniValidity;
+
+/**
+ * @enum TelCallEmergencyCategory
+ * Emergency Call Category.
+ */
+typedef enum {
+       TEL_CALL_ECC_DEFAULT = 0x00,            /**< ECC is default */
+       TEL_CALL_ECC_POLICE = 0x01,             /**< ECC is police */
+       TEL_CALL_ECC_AMBULANCE = 0x02,  /**< ECC is ambulance */
+       TEL_CALL_ECC_FIREBRIGADE = 0x04,        /**< ECC is fire station */
+       TEL_CALL_ECC_MARINEGUARD = 0x08,        /**< ECC is marine gaurd */
+       TEL_CALL_ECC_MOUNTAINRESCUE = 0x10,     /**< ECC is mountaion rescue */
+       TEL_CALL_ECC_MANUAL_ECALL = 0x20,       /**< ECC is manual Ecall */
+       TEL_CALL_ECC_AUTO_ECALL = 0x40  /**< ECC is Auto Ecall */
+} TelCallEmergencyCategory;
+
+/**
+ * Call Dial Info.
+ */
+typedef struct {
+       TelCallType call_type;                                  /**< Sets type of call (voice, data, video, emergency) */
+       TelCallEmergencyCategory ecc;                   /**< In case of emergency call, may provide category instead of number */
+       char number[TEL_CALL_CALLING_NUMBER_LEN_MAX + 1];       /**< A string containing the destination phone number. This follows the dial number format.*/
+} TelCallDial;
+
+/**
+ * Call End Info.
+ */
+typedef struct {
+       unsigned int call_id;                   /**< Unique id for referring the call to release */
+       TelCallEndType end_type;                /**< End type used */
+} TelCallEnd;
+
+/**
+ * Call Status Info.
+ */
+typedef struct {
+       unsigned int call_id;                                   /**< Unique id for referring the call */
+
+       TelCallType call_type;                                  /**< Specifies type of call (voice, data, emergency) */
+       TelCallState call_state;                                        /**< Current Call state */
+
+       gboolean mo_call;                                       /**< TRUE for MO Call; FALSE if MT call*/
+       gboolean mpty;                                          /**< TRUE for Multi-party Call; FALSE if not Multi-party Call*/
+
+       TelCallCliValidity cli_validity;                                /**< Calling Line Identificatoin (only if mobile terminated call) */
+       char number[TEL_CALL_CALLING_NUMBER_LEN_MAX + 1];       /**< Mobile Number */
+
+       TelCallCniValidity cni_validity;                                /**< Calling Name Identification (only if mobile terminated call) */
+       char name[TEL_CALL_CALLING_NAME_LEN_MAX + 1];           /**< Caller name */
+
+       gboolean forward;                                       /**< TRUE if call is forwared (only if mobile terminated call) */
+
+       TelCallActiveLine active_line;                          /**< Active line */
+} TelCallStatus;
+
+/**
+ * All Call Status Info.
+ */
+typedef struct {
+       unsigned int count;     /**< Number of calls */
+       TelCallStatus status[TEL_CALL_MAX_CALLS_COUNT]; /**< Call Status Info */
+} TelCallStatusList;
+
+/**
+ * Incoming Call Info.
+ */
+typedef struct {
+       unsigned int call_id;                                   /**< Unique id for referring the call */
+
+       TelCallCliValidity cli_validity;                                /**< Calling Line Identificatoin (only if mobile terminated call) */
+       char number[TEL_CALL_CALLING_NUMBER_LEN_MAX + 1];       /**< Mobile Number */
+
+       TelCallCniValidity cni_validity;                                /**< Calling Name Identification (only if mobile terminated call) */
+       char name[TEL_CALL_CALLING_NAME_LEN_MAX + 1];           /**< Caller name */
+
+       gboolean forward;                                       /**< TRUE if call is forwared (only if mobile terminated call) */
+
+       TelCallActiveLine active_line;                          /**< Active line */
+}TelCallIncomingInfo;
+
+/**
+ * All Call Status idle notification.
+ */
+typedef struct {
+       unsigned int call_id;   /**< Unique id for referring the call */
+       TelCallEndCause cause;  /**< End cause for the call indicates whether the call is released normally or due to other cause*/
+} TelCallStatusIdleNoti;
+
+/**
+ * @enum TelCallSoundRecording
+ * Call Sound Recording status.
+ */
+typedef enum {
+       TEL_SOUND_RECORDING_STOP,       /**< Stop call recording */
+       TEL_SOUND_RECORDING_START,      /**< Start call recording */
+       TEL_SOUND_RECORDING_PAUSE       /**< Pause call recording */
+} TelCallSoundRecording;
+
+/**
+ * @enum TelCallSoundDevice
+ * Call Sound Device type.
+ */
+typedef enum {
+       TEL_SOUND_DEVICE_RECEIVER = 0x00,                       /**< Receiving the sound on receiver */
+       TEL_SOUND_DEVICE_SPEAKER_PHONE = 0x10,  /**< Receiving the sound on speaker phone */
+       TEL_SOUND_DEVICE_HFK = 0x20,                            /**< Receiving the sound on HFK */
+       TEL_SOUND_DEVICE_HEADSET = 0x30,                        /**< Receiving the sound on Headset */
+       TEL_SOUND_DEVICE_BLUETOOTH = 0x40,              /**< Receiving the sound on Bluetooth */
+       TEL_SOUND_DEVICE_EC = 0xA0,                             /**< Receiving the sound on Echo Cancellation device */
+} TelCallSoundDevice;
+
+/**
+ * Call Sound Volume Info.
+ */
+typedef struct {
+       TelCallSoundDevice device;              /**< Sound device */
+       unsigned int volume;            /**<Volume level(0 ~ 100)*/
+} TelCallVolumeInfo;
+
+/**
+ * @enum TelCallSoundPath
+ * Call Sound Path.
+ */
+typedef enum {
+       TEL_SOUND_PATH_HANDSET  ,               /**<Audio path is handset*/
+       TEL_SOUND_PATH_HEADSET,                 /**<Audio path is headset*/
+       TEL_SOUND_PATH_HANDSFREE,               /**<Audio path is Handsfree*/
+       TEL_SOUND_PATH_BLUETOOTH,               /**<Audio path is bluetooth*/
+       TEL_SOUND_PATH_STEREO_BLUETOOTH,        /**<Audio path is stereo bluetooth*/
+       TEL_SOUND_PATH_SPK_PHONE,               /**<Audio path is speaker phone*/
+       TEL_SOUND_PATH_HEADSET_3_5PI,           /**<Audio path is headset_3_5PI*/
+       TEL_SOUND_PATH_BT_NSEC_OFF,             /**<Audio path is bluetooth NSEC off*/
+       TEL_SOUND_PATH_MIC2,                            /**<Audio path is Mic 1*/
+       TEL_SOUND_PATH_MIC1,                            /**<Audio path is Mic 2*/
+       TEL_SOUND_PATH_HEADSET_HAC,             /**<Audio path is Hearing aid*/
+} TelCallSoundPath;
+
+/**
+ * Call Sound Path Info
+ */
+typedef struct {
+       TelCallSoundPath path;  /**< Sound path */
+       gboolean ex_volume;     /**< TEL_SOUND_EX_VOLUME_ OFF/ON*/
+} TelCallSoundPathInfo;
+
+/**
+ * @enum TelCallSoundEqualizationMode
+ * Call Sound Equalization Mode.
+ */
+typedef enum {
+       TEL_SOUND_EQUALIZATION_MODE_OFF,                /**< Sound Equalization is off */
+       TEL_SOUND_EQUALIZATION_MODE_ON,         /**< Sound Equalization is on */
+       TEL_SOUND_EQUALIZATION_MODE_FLAG_OFF,   /**< Sound Equalization mode flag is off */
+       TEL_SOUND_EQUALIZATION_MODE_FLAG_ON,    /**< Sound Equalization mode flag is on */
+       TEL_SOUND_EQUALIZATION_MODE_SOFT1,              /**< Sound Equalization is in soft1 mode */
+       TEL_SOUND_EQUALIZATION_MODE_SOFT2,              /**< Sound Equalization is in soft2 mode */
+} TelCallSoundEqualizationMode;
+
+/**
+ * @enum TelCallSoundDirection
+ * Call Sound Direction.
+ */
+typedef enum {
+       TEL_SOUND_DIRECTION_LEFT,       /**< Sound direction is left */
+       TEL_SOUND_DIRECTION_RIGHT,      /**< Sound direction is right */
+} TelCallSoundDirection;
+
+/**
+ * Call Sound Equalization Info
+ */
+typedef struct {
+       TelCallSoundEqualizationMode mode;      /**< Sound equalization mode */
+       TelCallSoundDirection direction;                /**< Sound direction */
+       unsigned short parameter[TEL_CALL_MAX_SOUND_EQ_PARAMETER_SIZE]; /**< Sound equalization parameter */
+} TelCallSoundEqualization;
+
+/**
+ * Call Volume Info
+ */
+typedef struct {
+       unsigned int record_num;        /**< Number of call records */
+       TelCallVolumeInfo record[TEL_CALL_MAX_VOLUME_INFO_RECORD];      /**< Call volume info records */
+} TelCallGetVolumeInfo;
+
+/**
+ * @enum TelCallSoundRingbackToneNoti
+ * Call Sound ring back tone.
+ */
+typedef enum {
+       TEL_CALL_SOUND_RINGBACK_TONE_START,     /**< Sound ringback tone start */
+       TEL_CALL_SOUND_RINGBACK_TONE_END,               /**< Sound ringback tone end */
+} TelCallSoundRingbackToneNoti;
+
+/**
+ * @enum TelCallSoundWbamrNoti
+ * Call AMR-WB Status
+ */
+typedef enum {
+       TEL_CALL_SOUND_WBAMR_STATUS_OFF,        /**< Call sound WBAMR is off */
+       TEL_CALL_SOUND_WBAMR_STATUS_ON, /**< Call sound WBAMR is on */
+} TelCallSoundWbamrNoti;
+
+/**
+ * Call Sound Equilization Notification Info.
+ */
+typedef struct {
+       TelCallSoundEqualizationMode mode;      /**< Call sound equalization mode */
+       TelCallSoundDirection direction;                /**< Call sound direction */
+} TelCallSoundEqualizationNoti;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_CALL Call Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief Voice Call status idle
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VOICE_CALL_STATUS_IDLE
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VOICE_CALL_STATUS_IDLE
+ *  @retval data \ref TelCallStatusIdleNoti
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VOICE_CALL_STATUS_IDLE                TELEPHONY_CALL_INTERFACE":VoiceCallStatusIdle"
+
+ /**
+ *  @hideinitializer
+ *  @brief Voice Call status active
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VOICE_CALL_STATUS_ACTIVE
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VOICE_CALL_STATUS_ACTIVE
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VOICE_CALL_STATUS_ACTIVE              TELEPHONY_CALL_INTERFACE":VoiceCallStatusActive"
+
+ /**
+ *  @hideinitializer
+ *  @brief Voice Call status held
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VOICE_CALL_STATUS_HELD
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VOICE_CALL_STATUS_HELD
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VOICE_CALL_STATUS_HELD                TELEPHONY_CALL_INTERFACE":VoiceCallStatusHeld"
+
+ /**
+ *  @hideinitializer
+ *  @brief Voice Call status dialing
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VOICE_CALL_STATUS_DIALING
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VOICE_CALL_STATUS_DIALING
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VOICE_CALL_STATUS_DIALING             TELEPHONY_CALL_INTERFACE":VoiceCallStatusDialing"
+
+/**
+ *  @hideinitializer
+ *  @brief Voice Call status alert
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VOICE_CALL_STATUS_ALERT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VOICE_CALL_STATUS_ALERT
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VOICE_CALL_STATUS_ALERT               TELEPHONY_CALL_INTERFACE":VoiceCallStatusAlert"
+
+/**
+ *  @hideinitializer
+ *  @brief Voice Call status incoming
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VOICE_CALL_STATUS_INCOMING
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VOICE_CALL_STATUS_INCOMING
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VOICE_CALL_STATUS_INCOMING    TELEPHONY_CALL_INTERFACE":VoiceCallStatusIncoming"
+
+/**
+ *  @hideinitializer
+ *  @brief Video Call status idle
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VIDEO_CALL_STATUS_IDLE
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VIDEO_CALL_STATUS_IDLE
+ *  @retval data reference to \ref TelCallStatusIdleNoti structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VIDEO_CALL_STATUS_IDLE                TELEPHONY_CALL_INTERFACE":VideoCallStatusIdle"
+
+/**
+ *  @hideinitializer
+ *  @brief Video Call status active
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE              TELEPHONY_CALL_INTERFACE":VideoCallStatusActive"
+
+ /**
+ *  @hideinitializer
+ *  @brief Video Call status dialing
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VIDEO_CALL_STATUS_DIALING
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VIDEO_CALL_STATUS_DIALING
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VIDEO_CALL_STATUS_DIALING             TELEPHONY_CALL_INTERFACE":VideoCallStatusDialing"
+
+ /**
+ *  @hideinitializer
+ *  @brief Video Call status alert
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VIDEO_CALL_STATUS_ALERT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VIDEO_CALL_STATUS_ALERT
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VIDEO_CALL_STATUS_ALERT               TELEPHONY_CALL_INTERFACE":VideoCallStatusAlert"
+
+ /**
+ *  @hideinitializer
+ *  @brief Video Call status incoming
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_VIDEO_CALL_STATUS_INCOMING
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_VIDEO_CALL_STATUS_INCOMING
+ *  @retval data \ref unsigned int call_id
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_VIDEO_CALL_STATUS_INCOMING    TELEPHONY_CALL_INTERFACE":VideoCallStatusIncoming"
+
+ /**
+ *  @hideinitializer
+ *  @brief MO Call wating
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MO_WAITING
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MO_WAITING
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MO_WAITING                  TELEPHONY_CALL_INTERFACE":MoWaiting"
+
+ /**
+ *  @hideinitializer
+ *  @brief MO Call forwarded
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MO_FORWARDED
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MO_FORWARDED
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MO_FORWARDED                TELEPHONY_CALL_INTERFACE":MoForwarded"
+
+ /**
+ *  @hideinitializer
+ *  @brief MO Incoming call barred
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING          TELEPHONY_CALL_INTERFACE":MoBarredIncoming"
+
+ /**
+ *  @hideinitializer
+ *  @brief MO Outgoing call barred
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING          TELEPHONY_CALL_INTERFACE":MoBarredOutgoing"
+
+ /**
+ *  @hideinitializer
+ *  @brief MO Call forward unconditional
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL    TELEPHONY_CALL_INTERFACE":MoForwardUnconditional"
+
+ /**
+ *  @hideinitializer
+ *  @brief MO Call forward conditional
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL      TELEPHONY_CALL_INTERFACE":MoForwardConditional"
+
+ /**
+ *  @hideinitializer
+ *  @brief MO Call deflected
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MO_DEFLECTED
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MO_DEFLECTED
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MO_DEFLECTED                        TELEPHONY_CALL_INTERFACE":MoDeflected"
+
+ /**
+ *  @hideinitializer
+ *  @brief MT Call forwarded
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MT_FORWARDED
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MT_FORWARDED
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MT_FORWARDED                        TELEPHONY_CALL_INTERFACE":MtForwarded"
+
+ /**
+ *  @hideinitializer
+ *  @brief MT Call deflected
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_MT_DEFLECTED
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_MT_DEFLECTED
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_MT_DEFLECTED                        TELEPHONY_CALL_INTERFACE":MtDeflected"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call Transfered
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_TRANSFERED
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_TRANSFERED
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_TRANSFERED          TELEPHONY_CALL_INTERFACE":Transfered"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call held
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_HELD
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_HELD
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_HELD                        TELEPHONY_CALL_INTERFACE":CallHeld"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call active
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_ACTIVE
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_ACTIVE
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_ACTIVE                      TELEPHONY_CALL_INTERFACE":CallActive"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call joined
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_INFO_JOINED
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_INFO_JOINED
+ *  @retval data none
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_INFO_JOINED                      TELEPHONY_CALL_INTERFACE":CallJoined"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call Sound Ringback Tone
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_SOUND_RINGBACK_TONE
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_SOUND_RINGBACK_TONE
+ *  @retval data \ref TelCallSoundRingbackToneNoti
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_SOUND_RINGBACK_TONE              TELEPHONY_CALL_INTERFACE":CallSoundRingbackToneControl"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call Sound WBAMR
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_SOUND_WBAMR
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_SOUND_WBAMR
+ *  @retval data \ref TelCallSoundWbamrNoti
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_SOUND_WBAMR                      TELEPHONY_CALL_INTERFACE":CallSoundWbamr"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call Sound Equalization
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_SOUND_EQUALIZATION
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_SOUND_EQUALIZATION
+ *  @retval data \ref TelCallSoundEqualizationNoti
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_SOUND_EQUALIZATION               TELEPHONY_CALL_INTERFACE":CallSoundEqualiztion"
+
+ /**
+ *  @hideinitializer
+ *  @brief Call Sound Clock Status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_CALL_SOUND_CLOCK_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_CALL_SOUND_CLOCK_STATUS
+ *  @retval data <b>TRUE</b>: Sound clock is ON\n <b>FALSE</b>: Sound clock is OFF
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_CALL_SOUND_CLOCK_STATUS               TELEPHONY_CALL_INTERFACE":CallSoundClockStatus"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+ #endif  /* __TEL_CALL_H__ */
diff --git a/include/common/tel_gps.h b/include/common/tel_gps.h
new file mode 100644 (file)
index 0000000..d84efbc
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_GPS_H__
+#define __TEL_GPS_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_GPS
+*  @{
+*
+*  @file tel_gps.h
+*  @brief TAPI GPS Interface
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TELEPHONY_GPS_INTERFACE TELEPHONY_SERVICE".Gps"
+
+/**
+ * @enum TelGpsResult
+ * Response (Return) values.
+ */
+typedef enum {
+       TEL_GPS_RESULT_SUCCESS,                                         /**< Operation completed successfully */
+       TEL_GPS_RESULT_FAILURE,                                         /**< Operation Failed */
+       TEL_GPS_RESULT_INVALID_PARAMETER,                       /**< Invalid input parameters */
+       TEL_GPS_RESULT_MEMORY_FAILURE,                          /**< Memory allocation failed */
+       TEL_GPS_RESULT_OPERATION_NOT_SUPPORTED, /**< Operation not supported */
+       TEL_GPS_RESULT_OPERATION_NOT_PERMITTED, /**< Operation not permitted */
+       TEL_GPS_RESULT_UNKNOWN_FAILURE                          /**< Unknown failure */
+} TelGpsResult;
+
+/**
+ * GPS info.
+ */
+typedef struct {
+       unsigned int data_len;          /**< Data length of GPS info */
+       unsigned char *data;            /**< GPS information */
+} TelGpsDataInfo;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_GPS GPS Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief GPS assist data
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_GPS_ASSIST_DATA
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_GPS_ASSIST_DATA
+ *  @retval data reference to GPS data (as a string)
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_GPS_ASSIST_DATA                       TELEPHONY_GPS_INTERFACE":AssistData"
+
+/**
+ *  @hideinitializer
+ *  @brief GPS position information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_GPS_MEASURE_POSITION
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_GPS_MEASURE_POSITION
+ *  @retval data reference to GPS data (as a string)
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_GPS_MEASURE_POSITION          TELEPHONY_GPS_INTERFACE":MeasurePosition"
+
+/**
+ *  @hideinitializer
+ *  @brief GPS reset assist data
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_GPS_RESET_ASSIST_DATA
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_GPS_RESET_ASSIST_DATA
+ *  @retval data None
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_GPS_RESET_ASSIST_DATA         TELEPHONY_GPS_INTERFACE":ResetAssistData"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+#endif /* __TEL_GPS_H__ */
diff --git a/include/common/tel_if.h b/include/common/tel_if.h
new file mode 100644 (file)
index 0000000..b159238
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_IF_H__
+#define __TEL_IF_H__
+
+/** Telephony service name */
+#define TELEPHONY_SERVICE      "org.tizen.telephony"
+
+/** Telephony object path */
+#define TELEPHONY_OBJECT_PATH "/org/tizen/telephony"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TEL_IF_H__ */
diff --git a/include/common/tel_modem.h b/include/common/tel_modem.h
new file mode 100644 (file)
index 0000000..de62261
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_MODEM_H__
+#define __TEL_MODEM_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_MODEM
+*  @{
+*
+*  @file tel_modem.h
+*  @brief TAPI Modem Interface
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TELEPHONY_MODEM_INTERFACE   TELEPHONY_SERVICE".Modem"
+
+#define TEL_MODEM_IMEI_LENGTH_MAX 15   /**< Maximum IMEI length */
+
+#define TEL_MODEM_VERSION_LENGTH_MAX 32        /**< Maximum version information length */
+
+/**
+ * @enum TelModemResult
+ * Response (Result) codes
+ */
+typedef enum {
+       TEL_MODEM_RESULT_SUCCESS,                                       /**< Operation completed successfully */
+       TEL_MODEM_RESULT_FAILURE,                                       /**< Operation Failed */
+       TEL_MODEM_RESULT_INVALID_PARAMETER,             /**< Invalid input parameters */
+       TEL_MODEM_RESULT_MEMORY_FAILURE,                        /**< Memory allocation failed */
+       TEL_MODEM_RESULT_OPERATION_NOT_SUPPORTED,/**< Operation not supported */
+       TEL_MODEM_RESULT_OPERATION_NOT_PERMITTED,       /**< Operation not permitted */
+       TEL_MODEM_RESULT_UNKNOWN_FAILURE                        /**< Unknown failure */
+} TelModemResult;
+
+/**
+ * @enum TelModemPowerStatus
+ * Power Status
+ */
+typedef enum {
+       TEL_MODEM_POWER_OFF, /**< Modem power off */
+       TEL_MODEM_POWER_ON, /**< Modem power on */
+       TEL_MODEM_POWER_ERROR /**< Modem power error */
+} TelModemPowerStatus;
+
+/**
+ * @enum TelModemFlightModeStatus
+ * Flight Mode Status
+ */
+typedef enum {
+       TEL_MODEM_FLIGHT_MODE_UNKNOWN, /**< Status is unknown at the moment */
+       TEL_MODEM_FLIGHT_MODE_OFF, /**< Flight mode is OFF. Device is Online */
+       TEL_MODEM_FLIGHT_MODE_ON /**< Flight mode is ON. Device is in Low Power */
+} TelModemFlightModeStatus;
+
+/**
+ * Version Information
+ */
+typedef struct {
+       char software_version[TEL_MODEM_VERSION_LENGTH_MAX + 1]; /**< Software Version */
+       char hardware_version[TEL_MODEM_VERSION_LENGTH_MAX + 1]; /**< Hardware Version */
+       char calibration_date[TEL_MODEM_VERSION_LENGTH_MAX + 1]; /**< Calibration Date */
+       char product_code[TEL_MODEM_VERSION_LENGTH_MAX + 1]; /**< Product Code */
+} TelModemVersion;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TAPI_EVENT_MODEM Modem Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief Power Status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_MODEM_POWER_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_MODEM_POWER_STATUS
+ *  @retval data \ref TelModemPowerStatus
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_MODEM_POWER_STATUS            TELEPHONY_MODEM_INTERFACE":power_status"
+
+/**
+ *  @hideinitializer
+ *  @brief Flight Mode Status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_MODEM_FLIGHT_MODE_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_MODEM_FLIGHT_MODE_STATUS
+ *  @retval data <b>TRUE</b>: Flight mode is ON\n <b>FALSE</b>: Flight mode is OFF
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_MODEM_FLIGHT_MODE_STATUS              TELEPHONY_MODEM_INTERFACE":flight_mode_status"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TEL_MODEM_H__ */
diff --git a/include/common/tel_network.h b/include/common/tel_network.h
new file mode 100644 (file)
index 0000000..e3120a9
--- /dev/null
@@ -0,0 +1,355 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_NETWORK_H__
+#define __TEL_NETWORK_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_NETWORK
+*  @{
+*
+*  @file tel_network.h
+*  @brief TAPI Network Interface
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TELEPHONY_NETWORK_INTERFACE TELEPHONY_SERVICE".Network"
+
+#define TEL_NETWORK_PLMN_LEN_MAX 6     /**< Maximum PLMN(MCCMNC) length */
+
+/**
+ * @enum TelNetworkResult
+ * Response (Return) values.
+ */
+typedef enum {
+       TEL_NETWORK_RESULT_SUCCESS,                                             /**< Operation completed successfully */
+       TEL_NETWORK_RESULT_FAILURE,                                             /**< Operation Failed */
+       TEL_NETWORK_RESULT_INVALID_PARAMETER,                   /**< Invalid input parameters */
+       TEL_NETWORK_RESULT_MEMORY_FAILURE,                              /**< Memory allocation failed */
+       TEL_NETWORK_RESULT_OPERATION_NOT_PERMITTED,     /**< Operation not permitted */
+       TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED      /**< Operation not supported */
+} TelNetworkResult;
+
+/**
+ * @enum TelNetworkMode
+ * Network Mode
+ */
+typedef enum {
+       TEL_NETWORK_MODE_AUTO, /**< auto select network mode or hybrid */
+       TEL_NETWORK_MODE_2G, /**< 2G: GSM, GPRS, EDGE etc */
+       TEL_NETWORK_MODE_3G,    /**< 3G: UMTS, HSDPA, HSUPA etc */
+       TEL_NETWORK_MODE_LTE, /**< LTE */
+} TelNetworkMode;
+
+/**
+ * @enum TelNetworkSelectionMode
+ * Network Selection Mode
+ */
+typedef enum {
+       TEL_NETWORK_SELECTION_MODE_AUTOMATIC, /**< Automatic selection mode*/
+       TEL_NETWORK_SELECTION_MODE_MANUAL, /**< Manual selection mode */
+} TelNetworkSelectionMode;
+
+/**
+ * @enum TelNetworkAct
+ * Network Access Technology
+ */
+typedef enum {
+       TEL_NETWORK_ACT_UNKNOWN, /**< ACT is not presented */
+       TEL_NETWORK_ACT_GSM, /**< GSM */
+       TEL_NETWORK_ACT_GPRS, /**< GPRS */
+       TEL_NETWORK_ACT_EGPRS, /**< EDGE */
+       TEL_NETWORK_ACT_UMTS, /**< 3G */
+       TEL_NETWORK_ACT_GSM_AND_UMTS, /**< Both GSM and UMTS available */
+       TEL_NETWORK_ACT_HSDPA, /**< HSDPA */
+       TEL_NETWORK_ACT_HSUPA, /**< HSUPA */
+       TEL_NETWORK_ACT_HSPA, /**< HSDPA & HSUPA */
+       TEL_NETWORK_ACT_LTE, /**< LTE */
+} TelNetworkAct;
+
+/**
+ * @enum TelNetworkRegStatus
+ * Network Registration Status
+ */
+typedef enum {
+       TEL_NETWORK_REG_STATUS_UNREGISTERED, /**< Not registered, not searching */
+       TEL_NETWORK_REG_STATUS_REGISTERED, /**< Registered, home network */
+       TEL_NETWORK_REG_STATUS_SEARCHING, /**< Not regsitered, searching */
+       TEL_NETWORK_REG_STATUS_DENIED, /**< Registration is denied */
+       TEL_NETWORK_REG_STATUS_UNKNOWN, /**< Unknown */
+       TEL_NETWORK_REG_STATUS_ROAMING, /**< Registered, roaming */
+} TelNetworkRegStatus;
+
+/**
+ * @enum TelNetworkPlmnStatus
+ * Network Plmn Status
+ */
+typedef enum
+{
+       TEL_NETWORK_STATUS_UNKNOWN, /**< Unknown Plmn */
+       TEL_NETWORK_STATUS_AVAILABLE, /**< Available Plmn */
+       TEL_NETWORK_STATUS_CURRENT, /**< Network currently registered */
+       TEL_NETWORK_STATUS_FORBIDDEN, /**< Forbidden Plmn  */
+} TelNetworkPlmnStatus;
+
+/**
+ * Network Registration Status Information
+ */
+typedef struct {
+       TelNetworkRegStatus cs_status; /**< CS domain registration status */
+       TelNetworkRegStatus ps_status; /**< PS domain registration status */
+       TelNetworkAct act; /**< Access technology */
+} TelNetworkRegStatusInfo;
+
+/**
+ * Network Cell Information
+ */
+typedef struct {
+       unsigned int lac; /**< Location Area Code */
+       unsigned int cell_id; /**< Cell id */
+       unsigned int rac; /**< Routing Area Code - PS network specific */
+} TelNetworkCellInfo;
+
+/**
+ * Network Registration Information
+ */
+typedef struct {
+       TelNetworkRegStatusInfo reg_status_info; /**< Registration Status Information */
+       TelNetworkCellInfo cell_info; /**< Cell Information */
+} TelNetworkRegistrationInfo;
+
+/**
+ * Network Identity Information
+ */
+typedef struct {
+       char *plmn; /**< numeric name (MCCMNC) */
+       char *short_name; /**< short alphanumeric operator name */
+       char *long_name; /**< long alphanumeric operator name */
+} TelNetworkIdentityInfo;
+
+/**
+ * Network Selection Manual Information
+ */
+typedef struct {
+       char *plmn; /**< numeric name (MCCMNC) */
+       TelNetworkAct act; /**< Access technology */
+} TelNetworkSelectManualInfo;
+
+/**
+ * Network Information
+ */
+typedef struct {
+       TelNetworkPlmnStatus plmn_status; /**< Plmn Status */
+       TelNetworkAct act; /**< Access technology */
+       TelNetworkIdentityInfo network_identity; /**< Network Identity Information */
+} TelNetworkInfo;
+
+/**
+ * Network Plmn List
+ */
+typedef struct {
+       unsigned int count; /**< Network Plmn count */
+       TelNetworkInfo *network_list; /**< Network list */
+} TelNetworkPlmnList;
+
+/**
+ * Network Preferred Plmn Information
+ */
+typedef struct {
+       unsigned int index; /**< Preferred Plmn list index, start from 1 */
+       char *plmn; /**< numeric operator name (MCCMNC) */
+       TelNetworkAct act; /**< Access technology */
+} TelNetworkPreferredPlmnInfo;
+
+/**
+ * Network Preferred Plmn List
+ */
+typedef struct {
+       unsigned int count; /**< Number of preferred plmns in the list */
+       TelNetworkPreferredPlmnInfo *list; /**< Preferred Plmns List */
+} TelNetworkPreferredPlmnList;
+
+/**
+ * Network Gsm Neighbour Cell Information
+ */
+typedef struct {
+       int cell_id; /**< Cell ID (-1 indicates cell ID not present)*/
+       int lac; /**< Location area code (ignored when cell_id not present) */
+       int bcch; /**< Broadcast Control Channel Frequency number */
+       int bsic; /**< Base Station Identification Code  */
+       int rxlev; /**< Received Signal Strength level. Valid values: (0-63,99)
+                               * Reference: 33GPP TS 45.008 [20] subclause 8.1.4
+                               - Rxlev 0 is a signal strength less than -110 dBm
+                               - Rxlev 1 is -110 dBm to -109 dBm
+                               - Rxlev 2 is -109 dBm to -108 dBm
+                                - ...
+                               - Rxlev 62 is -49 dBm to -48 dBm
+                               - Rxlev 63 is greater than -48 dBm
+                               - Rxlev 99 is not known or not detectable
+                       */
+} TelNetworkGsmNeighbourCellInfo;
+
+/**
+ * Network Umts Neighbour Cell Information
+ */
+typedef struct {
+       int cell_id; /**< Cell ID (-1 indicates cell ID not present)*/
+       int lac; /**< Location area code (ignored if cell_id not present)*/
+       int arfcn; /**< UTRA Absolute RF Channel Number */
+       int psc; /**< Primary scrambling Code   */
+       int rscp; /**< Received Signal Code Power. Valid values: (0-96, 255)
+                               * Reference : 3GPP TS 25.133 [95] subclause 9.1.1.3
+                                and 3GPP TS 25.123 [96] subclause 9.1.1.1.3)
+                               - Rscp 0 is a signal strength less than -120 dBm
+                               - Rscp 1 is -120 dBm to -119 dBm
+                               - Rscp 2 is -119 dBm to -118 dBm
+                               - ...
+                               - Rscp 95 is -26 dBm to -25 dBm
+                               - Rscp 96 is greater than -25 dBm
+                               - Rscp 255 is not known or not detectable
+                       */
+} TelNetworkUmtsNeighbourCellInfo;
+
+/**
+ * Network Neighbour Cell Information
+ */
+typedef struct {
+       unsigned int gsm_list_count; /**< GSM cells count */
+       TelNetworkGsmNeighbourCellInfo *gsm_list; /**< GSM cells information */
+       unsigned int umts_list_count; /**< UMTS cells count */
+       TelNetworkUmtsNeighbourCellInfo *umts_list; /**< UMTS cells information */
+} TelNetworkNeighbourCellInfo;
+
+/**
+ * Network Nitz Information
+ */
+typedef struct {
+       unsigned int year; /**< Last two digits of year */
+       unsigned int month; /**< Month */
+       unsigned int day; /**< Day */
+       unsigned int hour; /**< Hour */
+       unsigned int minute; /**< Minute */
+       unsigned int second; /**< Second */
+       int gmtoff; /**< GMT Offset */
+       gboolean isdst; /**< Daylight Saving Time Valid */
+       int dstoff; /**< Daylight Saving Time Offset */
+       char *plmn; /**< numeric name (MCCMNC) */
+} TelNetworkNitzInfoNoti;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TAPI_EVENT_NETWORK Network Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief Network registration status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_NETWORK_REGISTRATION_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_NETWORK_REGISTRATION_STATUS
+ *  @retval data reference to \ref TelNetworkRegStatusInfo structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_NETWORK_REGISTRATION_STATUS   TELEPHONY_NETWORK_INTERFACE":RegistrationStatus"
+
+/**
+ *  @hideinitializer
+ *  @brief Network cell information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_NETWORK_CELL_INFO
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_NETWORK_CELL_INFO
+ *  @retval data reference to \ref TelNetworkCellInfo structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_NETWORK_CELL_INFO                     TELEPHONY_NETWORK_INTERFACE":CellInfo"
+
+/**
+ *  @hideinitializer
+ *  @brief Network Identity information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_NETWORK_IDENTITY
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_NETWORK_IDENTITY
+ *  @retval data reference to \ref TelNetworkIdentityInfo structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_NETWORK_IDENTITY                      TELEPHONY_NETWORK_INTERFACE":Identity"
+
+/**
+ *  @hideinitializer
+ *  @brief Network RSSI
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_NETWORK_RSSI
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_NETWORK_RSSI
+ *  @retval data \ref unsigned int rssi
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_NETWORK_RSSI                          TELEPHONY_NETWORK_INTERFACE":Rssi"
+
+/**
+ *  @hideinitializer
+ *  @brief Network time information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_NETWORK_TIME_INFO
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_NETWORK_TIME_INFO
+ *  @retval data reference to \ref TelNetworkNitzInfoNoti structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_NETWORK_TIME_INFO                     TELEPHONY_NETWORK_INTERFACE":TimeInfo"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TEL_NETWORK_H__ */
+
diff --git a/include/common/tel_phonebook.h b/include/common/tel_phonebook.h
new file mode 100644 (file)
index 0000000..fc39db7
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_PHONEBOOK_H__
+#define __TEL_PHONEBOOK_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_PHONEBOOK
+*  @{
+*
+*  @file tel_phonebook.h
+*  @brief TAPI Phonebook Interface
+*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define TELEPHONY_PB_INTERFACE  TELEPHONY_SERVICE".Phonebook"
+
+#define TEL_PB_TEXT_MAX_LEN    255 /**< Phone book text maximum length */
+#define TEL_PB_NUMBER_MAX_LEN  82 /**< Phone book number maximum length */
+#define TEL_PB_ANR_MAX_COUNT   3 /**< Phone book ANR maximum count */
+#define TEL_PB_EMAIL_MAX_COUNT 4 /**< Phone book email maximum count */
+
+/**
+ * @enum TelPbResult
+ * Response (Return) values.
+ */
+typedef enum {
+       TEL_PB_RESULT_SUCCESS, /**< Operation completed successfully */
+       TEL_PB_RESULT_FAILURE, /**< Operation Failed */
+       TEL_PB_RESULT_INVALID_PARAMETER, /**< Invalid input parameters */
+       TEL_PB_RESULT_MEMORY_FAILURE, /**< Memory allocation failed */
+       TEL_PB_RESULT_OPERATION_NOT_SUPPORTED, /**< Operation not supported */
+       TEL_PB_RESULT_UNKNOWN_FAILURE, /**< Unknown failure */
+       TEL_PB_RESULT_INVALID_INDEX, /**< The index passed was not a valid index. */
+       TEL_PB_RESULT_NOT_INITIALIZED, /**< Phonebook not initialized */
+       TEL_PB_RESULT_PIN2_REQUIRED, /**< PIN2 Required */
+       TEL_PB_RESULT_PUK2_REQUIRED, /**< PUK2 Required */
+       TEL_PB_RESULT_ACCESS_RESTRICTED, /**< Access restricted */
+       TEL_PB_RESULT_OPERATION_NOT_PERMITTED   /**< Operation not permitted */
+} TelPbResult;
+
+/**
+ * @enum TelPbType
+ * This enumeration defines the Phonebook type.
+ */
+typedef enum {
+       TEL_PB_FDN, /**< Fixed Dialing Number */
+       TEL_PB_ADN, /**< Abbreviated dialling numbers */
+       TEL_PB_SDN, /**< Service Dialing Number */
+       TEL_PB_USIM, /**< USIM - 3G phone book */
+} TelPbType;
+
+/**
+ * This data structure gives the phone book availability of current SIM
+ */
+typedef struct {
+       gboolean fdn; /**< Availability of Fixed Dialing Number */
+       gboolean adn; /**< Availability of Abbreviated dialling numbers */
+       gboolean sdn; /**< Availability of Service Dialing Number */
+       gboolean usim; /**< Availability of USIM - 3G phone book */
+} TelPbList;
+
+/**
+ * @enum TelPbInitInfo
+ * This data structure gives the phonebook init information
+ */
+typedef struct {
+       gboolean init_status; /**< Phonebook init status */
+       TelPbList pb_list; /**< Phonebook availability of current SIM */
+} TelPbInitInfo;
+
+/**
+ *This data structure gives the phone book entry information(SIM).
+ */
+typedef struct {
+       unsigned int max_count; /**< Total number of locations in selected memory */
+       unsigned int used_count; /**< Number of used locations in selected memory */
+       unsigned int max_num_len; /**< maximum length of field "number" */
+       unsigned int max_text_len; /**< maximum length of field "text" */
+} TelPbSimInfo;
+
+/**
+ *This data structure gives the phone book entry information(USIM).
+ */
+typedef struct {
+       unsigned int max_count; /**< Total number of locations in selected memory */
+       unsigned int used_count; /**< Number of used locations in selected memory */
+       unsigned int max_num_len; /**< maximum length of field "number" */
+       unsigned int max_text_len; /**< maximum length of field "text" */
+
+       unsigned char max_anr_count; /**< Total number of locations for Additional Number */
+       unsigned int max_anr_len; /**< Maximun length for Additional Number */
+
+       unsigned char max_email_count; /**< Total number of locations for email */
+       unsigned int max_email_len; /**< Maximun length for email */
+
+       unsigned int max_sne_len; /**< Maximun length for second name*/
+
+       unsigned int max_gas_count; /**< Total number of locations for Grouping Alpha String */
+       unsigned int max_gas_len; /**< Maximun length for Grouping Alpha String */
+
+       unsigned int max_aas_count; /**< Total number of locations for Additional Alpha String */
+       unsigned int max_aas_len; /**< Maximun length for Additional Alpha String */
+} TelPbUsimInfo;
+
+/**
+ *This data structure gives SIM/USIM the phone book entry information.
+ */
+typedef struct {
+       TelPbType pb_type; /**< Type of Phone book */
+       union {
+               TelPbSimInfo sim; /**< 2G sim phone book info */
+               TelPbUsimInfo usim; /**< 3G sim phone book info */
+       } info_u; /**< union */
+} TelPbInfo;
+
+/**
+ *These data structures defines the phone book record fields.
+ */
+typedef char TelPbName[TEL_PB_TEXT_MAX_LEN + 1]; /**< Record of Phone book name */
+
+typedef char TelPbNumber[TEL_PB_NUMBER_MAX_LEN + 1]; /**< Record of Phone book number */
+
+typedef char TelPbEmail[TEL_PB_TEXT_MAX_LEN + 1]; /**< Record of Phone book email */
+
+/**
+ *These data structures defines the phone book Additional number information
+ */
+typedef struct {
+       TelPbNumber number; /**< Additional number */
+       gboolean description;   /**< TRUE if the ANR has an additional number description */
+       TelPbName aas;          /**< Additional number description   */
+} TelPbAnr;
+
+/**
+ *These data structures defines the USIM phone book records
+ */
+typedef struct {
+       TelPbName name; /**< USIM Phone book name */
+       TelPbNumber number; /**< USIM Phone book number */
+
+       TelPbName sne; /**< USIM Phone book second name */
+       TelPbName grp_name; /**< USIM Phone book group name */
+
+       unsigned char anr_count; /**< USIM Phone book Additional number count */
+       TelPbAnr anr[TEL_PB_ANR_MAX_COUNT]; /**< USIM Phone book Additional number description */
+
+       unsigned char email_count; /**< USIM Phone book email count */
+       TelPbEmail email[TEL_PB_EMAIL_MAX_COUNT]; /**< USIM Phone book email description */
+
+       gboolean hidden; /**< indicates if the entry is hidden or not - only available, if a UICC with an active USIM application is present */
+} TelPbUsimRecord;
+
+/**
+ *These data structures defines the SIM phone book records
+ */
+typedef struct {
+       TelPbName name; /**< SIM Phone book name */
+       TelPbNumber number; /**< SIM Phone book number */
+} TelPbSimRecord;
+
+/**
+ *These data structures defines the read record informations
+ */
+typedef struct {
+       unsigned int index; /**< Index of phonebook memory */
+       unsigned int next_index; /**< Next index of phonebook memory */
+
+       TelPbType pb_type; /**< Type of Phone book */
+       union {
+               TelPbSimRecord sim; /**< 2G sim phone book info */
+               TelPbUsimRecord usim; /**< 3G sim phone book info */
+       } rec_u; /**< union */
+} TelPbReadRecord;
+
+/**
+ *These data structures defines the update record informations
+ */
+typedef struct {
+       unsigned int index; /**< Index of phonebook memory */
+
+       TelPbType pb_type; /**< Type of Phone book */
+       union {
+               TelPbSimRecord sim; /**< 2G sim phone book info */
+               TelPbUsimRecord usim; /**< 3G sim phone book info */
+       } rec_u; /**< union */
+} TelPbUpdateRecord;
+
+/**
+ *These data structures defines the phone book record informations
+ */
+typedef struct {
+       TelPbType pb_type; /**< Type of Phone book */
+       unsigned int index; /**< Index of phonebook memory */
+} TelPbRecordInfo;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_PHONEBOOK Phonebook Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief Phonebook init status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_PB_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_PB_STATUS
+ *  #retval data \ref TelPbInitInfo
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_PB_STATUS                             TELEPHONY_PB_INTERFACE":Status"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TEL_PHONEBOOK_H__ */
diff --git a/include/common/tel_return.h b/include/common/tel_return.h
new file mode 100644 (file)
index 0000000..2dc87a6
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_RETURN_H__
+#define __TEL_RETURN_H__
+
+/**
+*  @addtogroup TAPI_COMMON
+*  @{
+*
+*  @file tel_return.h
+*  @brief TAPI return values
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @enum TelReturn
+ * TAPI return values
+ */
+typedef enum {
+       TEL_RETURN_SUCCESS, /**< Operation completed successfully */
+       TEL_RETURN_FAILURE, /**< Operation Failed */
+       TEL_RETURN_INVALID_PARAMETER, /**< Invalid input parameters */
+       TEL_RETURN_MEMORY_FAILURE, /**< Memory allocation failed */
+       TEL_RETURN_OPERATION_NOT_SUPPORTED, /**< Operation not supported */
+       TEL_RETURN_UNKNOWN_FAILURE /**< Unknown failure */
+} TelReturn;
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TEL_RETURN_H__ */
diff --git a/include/common/tel_sap.h b/include/common/tel_sap.h
new file mode 100644 (file)
index 0000000..d22d363
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __TEL_SAP_H__
+#define __TEL_SAP_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_SAP
+*  @{
+*
+*  @file tel_sap.h
+*  @brief TAPI SAP Interface
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TELEPHONY_SAP_INTERFACE         TELEPHONY_SERVICE".Sap"
+
+#define TEL_SAP_APDU_LEN_MAX           261     /**< APDU max command length */
+#define TEL_SAP_APDU_RESP_LEN_MAX      258     /**< APDU max response length */
+#define TEL_SAP_ATR_LEN_MAX            33      /**< Answer to Reset data max length */
+
+/**
+ * @enum TelSapResult
+ * This enum gives the SAP result information.
+ */
+
+typedef enum {
+       TEL_SAP_RESULT_SUCCESS,                 /**<  operation successfully completed*/
+       TEL_SAP_RESULT_FAILURE_NO_REASON,       /**<  no reason*/
+       TEL_SAP_RESULT_CARD_NOT_ACCESSIBLE,     /**<  not accessible*/
+       TEL_SAP_RESULT_CARD_ALREADY_POWERED_OFF,/**<  card already powered off*/
+       TEL_SAP_RESULT_CARD_REMOVED,            /**<  card removed*/
+       TEL_SAP_RESULT_CARD_ALREADY_POWERED_ON, /**<  card already powered on*/
+       TEL_SAP_RESULT_DATA_NOT_AVAILABLE,      /**<  data not available*/
+       TEL_SAP_RESULT_NOT_SUPPORTED,           /**<  not supported*/
+       TEL_SAP_RESULT_UNABLE_TO_ESTABLISH,     /**<  unable to establish connection*/
+       TEL_SAP_RESULT_NOT_SUPPORT_MAX_SIZE,    /**<  server does not support message length that client want send*/
+       TEL_SAP_RESULT_TOO_SMALL_MAX_SIZE,      /**<  client wants to connect with very small message length which is not supported by Server */
+       TEL_SAP_RESULT_ONGOING_CALL,            /**<  server cannot reset the SIM due to an ongoing call */
+       TEL_SAP_RESULT_OPERATION_NOT_PERMITTED  /** Operation not permitted */
+} TelSapResult;
+
+/**
+ * @enum TelSapPowerMode
+ * This enum gives the SAP message Ids between SAP client and SAP server.
+ */
+typedef enum {
+       TEL_SAP_SIM_POWER_ON_REQ,       /**< SAP Client request for Power ON SIM off in Server */
+       TEL_SAP_SIM_POWER_OFF_REQ,      /**< SAP Client request for Power OFF SIM off in Server */
+       TEL_SAP_SIM_RESET_REQ,          /**< SAP Client request for reset SIM in Server */
+} TelSapPowerMode;
+
+/**
+ * @enum TelSapDisconnectType
+ * This enum gives the SAP disconnect type information.
+ */
+typedef enum {
+       TEL_SAP_DISCONNECT_TYPE_GRACEFUL,       /**< disconnection procedure ends after finishing current work */
+       TEL_SAP_DISCONNECT_TYPE_IMMEDIATE       /**< disconnection procedure ends immediately */
+} TelSapDisconnectType;
+
+/**
+ * @enum TelSapCardStatus
+ * This enum gives the SIM card status if server`s status changed about connection with subscription module
+ */
+typedef enum {
+       TEL_SAP_CARD_STATUS_UNKNOWN,            /**<  SAP server status - unknown*/
+       TEL_SAP_CARD_STATUS_RESET,              /**<  SAP server status - reset*/
+       TEL_SAP_CARD_STATUS_NOT_ACCESSIBLE,     /**<  SAP server status - not accessible*/
+       TEL_SAP_CARD_STATUS_REMOVED,            /**<  SAP server status - removed*/
+       TEL_SAP_CARD_STATUS_INSERTED,           /**<  SAP server status - inserted*/
+       TEL_SAP_CARD_STATUS_RECOVERED           /**<  SAP server status - recovered*/
+} TelSapCardStatus;
+
+/**
+ * @enum TelSimSapProtocol
+ * This enum gives SAP transport protocol type
+ */
+typedef enum {
+       TEL_SIM_SAP_PROTOCOL_T0,        /**< T = 0, character*/
+       TEL_SIM_SAP_PROTOCOL_T1         /**< T = 1, block*/
+} TelSimSapProtocol;
+
+/**
+ * This data structure gives the SAP ATR response data information.
+ */
+typedef struct {
+       unsigned int atr_len; /**<  SAP ATR response data length */
+       unsigned char atr[TEL_SAP_ATR_LEN_MAX]; /**<  SAP ATR response data */
+} TelSapAtr;
+
+/**
+ * This data structure is used to transfer the SAP APDU command.
+ */
+typedef struct {
+       unsigned int apdu_len;  /**<  SAP APDU length */
+       unsigned char apdu[TEL_SAP_APDU_LEN_MAX];  /**<  SAP APDU data */
+} TelSapApdu;
+
+/**
+ * This data structure gives the SAP APDU response.
+ */
+typedef struct {
+       unsigned int apdu_resp_len; /**<  SAP APDU response data length */
+       unsigned char apdu_resp[TEL_SAP_APDU_RESP_LEN_MAX]; /**<  SAP APDU response data */
+} TelSapApduResp;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_SAP SAP Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief SAP status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAP_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAP_STATUS
+ *  @retval data \ref TelSapCardStatus
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAP_STATUS                            TELEPHONY_SAP_INTERFACE":Status"
+
+/**
+ *  @hideinitializer
+ *  @brief SAP disconnect type
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAP_DISCONNECT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAP_DISCONNECT
+ *  @retval data \ref TelSapDisconnectType
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAP_DISCONNECT                        TELEPHONY_SAP_INTERFACE":Disconnect"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TEL_SAP_H__ */
diff --git a/include/common/tel_sat.h b/include/common/tel_sat.h
new file mode 100644 (file)
index 0000000..58e819c
--- /dev/null
@@ -0,0 +1,1813 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_SAT_H__
+#define __TEL_SAT_H__
+
+#include <glib.h>
+#include <tel_if.h>
+#include <tel_call.h>
+#include <tel_ss.h>
+
+/**
+*  @addtogroup TAPI_SAT
+*  @{
+*
+*  @file tel_sat.h
+*  @brief TAPI sat Interface
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TELEPHONY_SAT_INTERFACE TELEPHONY_SERVICE".Sat"
+
+#define TEL_SAT_DEF_TEXT_STRING_LEN_MAX        500 /**< max length for Text String  */
+#define TEL_SAT_DEF_TITLE_LEN_MAX      50 /**< max length for Menu Title */
+#define TEL_SAT_DEF_ITEM_STR_LEN_MAX   50 /**< max length for default item string */
+#define TEL_SAT_TEXT_STRING_LEN_MAX            500 /**< max length for text string */
+#define TEL_SAT_DEF_BIT_MASK_CONTACT   0x01 /**< Bit Mask for Contact */
+#define TEL_SAT_DEF_BIT_MASK_MSG       0x02 /**< Bit Mask for Msg */
+#define TEL_SAT_DEF_BIT_MASK_OTHER     0x04 /**< Bit Mask for Psh */
+#define TEL_SAT_REFRESH_FILE_LIST              20 /**< Refresh File List */
+#define TEL_SAT_DEF_SS_LEN_MAX 250 /**< max length for SS */
+#define TEL_SAT_DEF_USSD_LEN_MAX       250 /**< max length for USSD */
+#define TEL_SAT_DIALING_NUMBER_LEN_MAX 200 /**< max length for dailing number */
+#define TEL_SAT_ALPHA_ID_LEN_MAX       255     /**< max length of  alpha identifier */
+#define TEL_SAT_SUB_ADDR_LEN_MAX       30 /**< max length for Sub address */
+#define TEL_SAT_CCP_DATA_LEN_MAX       30 /**< max length of ccp data */
+#define TEL_SAT_SS_STRING_LEN_MAX      160 /**< max length for SS string */
+#define TEL_SAT_USSD_STRING_LEN_MAX    255 /**< max length for USSD string */
+#define TEL_SAT_ITEM_TEXT_LEN_MAX      45 /**< max length of item text */
+#define TEL_SAT_SMS_TPDU_SMS_DATA_LEN_MAX      175 /**< max length for SMS TPDU SMS data */
+#define TEL_SAT_FILE_ID_LIST_MAX_COUNT 255 /**< max length for file id list */
+#define TEL_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT  50 /**< max count of items next action indication list */
+#define TEL_SAT_EVENT_LIST_MAX 17 /**< max count of event list */
+#define TEL_SAT_IMG_DATA_FILE_PATH_LEN_MAX     50 /**< max length of image data file name (Icon, CLUT) */
+#define TEL_SAT_ICON_LIST_MAX_COUNT    50 /**< max count of icon list */
+#define TEL_SAT_DTMF_STRING_LEN_MAX    30 /**< max length of dtmf string */
+#define TEL_SAT_URL_LEN_MAX    129 /**< max length of URL*/
+#define TEL_SAT_PROVISIONING_FILE_PATH_LEN_MAX 50 /**< max length of provisioning file path */
+#define TEL_SAT_CHANNEL_DATA_STRING_LEN_MAX    255 /**< max length for channel data string */
+#define TEL_SAT_OTHER_ADDR_LEN_MAX     30 /**< max length of other address */
+#define TEL_SAT_NET_ACC_NAM_LEN_MAX    30 /**< max length of net acc name */
+#define TEL_SAT_REMOTE_ENTITY_ADDR_LEN_MAX     50 /**< max length of remote entity address */
+#define TEL_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT    50 /**< max count of item text attributes list */
+#define TEL_SAT_MENU_ITEM_COUNT_MAX    40 /**< max count for Menu items */
+
+/**
+ * @enum TelSatResult
+ * Response (Result) codes
+*/
+typedef enum {
+       TEL_SAT_RESULT_SUCCESS, /**< Operation completed successfully */
+       TEL_SAT_RESULT_FAILURE, /**< Operation Failed */
+       TEL_SAT_RESULT_INVALID_PARAMETER, /**< Invalid input parameters */
+       TEL_SAT_RESULT_MEMORY_FAILURE, /**< Memory allocation failed */
+       TEL_SAT_RESULT_OPERATION_NOT_SUPPORTED, /**< Operation not supported */
+       TEL_SAT_RESULT_UNKNOWN_FAILURE, /**< Unknown failure */
+
+       TEL_SAT_RESULT_REQUIRED_VALUE_MISSING, /**< Required value missing */
+       TEL_SAT_RESULT_COMMAND_NOT_UNDERSTOOD, /**< Command not understood by ME */
+       TEL_SAT_RESULT_BEYOND_ME_CAPABILITY /**< Beyond ME capability */
+} TelSatResult;
+
+/**
+ * @enum TelSatUiUserConfirmType
+ * This enumeration defines UI user confirm types
+*/
+typedef enum {
+       TEL_SAT_USER_CONFIRM_YES, /**<This Enum Informs That user confirms yes */
+       TEL_SAT_USER_CONFIRM_NO_OR_CANCEL, /**<This enum informs that user confirms no/cancel */
+       TEL_SAT_USER_CONFIRM_HELP_INFO, /**<This enum informs that user wants help information */
+       TEL_SAT_USER_CONFIRM_END, /**<This enum informs that user confirms end */
+       TEL_SAT_USER_CONFIRM_TIMEOUT, /**<This enum informs that user did not respond */
+} TelSatUiUserConfirmType;
+
+/**
+ * @enum TelSatUiDisplayStatusType
+ * This enumeration defines the UI Display Status.
+ */
+typedef enum
+{
+       TEL_SAT_DISPLAY_SUCCESS = 0x00, /**< This enum informs  UI display success */
+       TEL_SAT_DISPLAY_FAIL = 0x01, /**< This enum informs  UI display failure */
+}TelSatUiDisplayStatusType;
+
+/**
+ * @enum TelSatRefreshAppType
+ * This enumeration defines the Refresh Application Type.
+ */
+ typedef enum
+{
+       TEL_SAT_REFRESH_CONTACT = 0x00,  /**< refresh application type - Phonebook */
+       TEL_SAT_REFRESH_MSG, /**< refresh application type - SMS */
+       TEL_SAT_REFRESH_OTHER, /**< refresh application type - other */
+       TEL_SAT_REFRESH_MAX      /**< Maximum Enumeration Value */
+}TelSatRefreshAppType;
+
+/**
+ * @enum TelSatCallCtrlType
+ * This enumeration defines Call Control Type.
+ */
+typedef enum
+{
+       TEL_SAT_CALL_CNF_NONE = 0x00, /**< call control confirm type - None */
+       TEL_SAT_CALL_CNF_CALL, /**< call control confirm type - call */
+       TEL_SAT_CALL_CNF_SS, /**< call control confirm type - ss */
+       TEL_SAT_CALL_CNF_USSD, /**< call control confirm type - ussd */
+       TEL_SAT_CALL_CNF_MAX /**< Maximum Enumeration Value */
+}TelSatCallCtrlType;
+
+/**
+ * @enum TelSatProactiveCmdType
+ * This enumeration defines Proactive command types
+*/
+typedef enum {
+       TEL_SAT_PROATV_CMD_NONE = 0x00, /**< command type - None */
+       TEL_SAT_PROATV_CMD_REFRESH = 0x01, /**< command type - refresh */
+       TEL_SAT_PROATV_CMD_MORE_TIME = 0x02, /**< command type - more time      */
+       TEL_SAT_PROATV_CMD_SETUP_EVENT_LIST = 0x05, /**< command type - setup event list */
+       TEL_SAT_PROATV_CMD_SETUP_CALL = 0x10, /**<      command type - setup call */
+       TEL_SAT_PROATV_CMD_SEND_SS = 0x11, /**< command type - send ss */
+       TEL_SAT_PROATV_CMD_SEND_USSD = 0x12, /**< command type - send ussd       */
+       TEL_SAT_PROATV_CMD_SEND_SMS = 0x13, /**< command type - send sms */
+       TEL_SAT_PROATV_CMD_SEND_DTMF = 0x14, /**< command type - send dtmf      */
+       TEL_SAT_PROATV_CMD_LAUNCH_BROWSER = 0x15, /**< command type - launch browser     */
+       TEL_SAT_PROATV_CMD_PLAY_TONE = 0x20, /**< command type - play tone */
+       TEL_SAT_PROATV_CMD_DISPLAY_TEXT = 0x21, /**< command type - display text */
+       TEL_SAT_PROATV_CMD_GET_INKEY = 0x22, /**< command type - get inkey */
+       TEL_SAT_PROATV_CMD_GET_INPUT = 0x23, /**< command type - get input */
+       TEL_SAT_PROATV_CMD_SELECT_ITEM = 0x24, /**< command type - select item */
+       TEL_SAT_PROATV_CMD_SETUP_MENU = 0x25, /**< command type - setup menu */
+       TEL_SAT_PROATV_CMD_PROVIDE_LOCAL_INFO = 0x26, /**< command type - provide local info */
+       TEL_SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT = 0x28, /**< command type - setup idle mode text */
+       TEL_SAT_PROATV_CMD_LANGUAGE_NOTIFICATION = 0x35, /**< command type - language notification */
+       TEL_SAT_PROATV_CMD_OPEN_CHANNEL = 0x40, /**< command type - open channel -class e */
+       TEL_SAT_PROATV_CMD_CLOSE_CHANNEL = 0x41, /**< command type - close channel - class e */
+       TEL_SAT_PROATV_CMD_RECEIVE_DATA = 0x42, /**< command type - receive data -class e */
+       TEL_SAT_PROATV_CMD_SEND_DATA = 0x43, /**< command type - send data */
+       TEL_SAT_PROATV_CMD_GET_CHANNEL_STATUS = 0x44, /**< command type - get channel status -class e */
+       TEL_SAT_PROATV_CMD_TYPE_END_PROACTIVE_SESSION = 0xFE, /**< command type - end proactive session */
+       TEL_SAT_PROATV_CMD_RESERVED = 0xFF /**< command type - reserved */
+} TelSatProactiveCmdType;
+
+/**
+ * @enum TelSatAlphabetFormatType
+ * This enumeration defines Alphabet format type
+*/
+typedef enum {
+       TEL_SAT_ALPHABET_FORMAT_SMS_DEFAULT = 0x00, /**< Alphabet type -SMS default format */
+       TEL_SAT_ALPHABET_FORMAT_8BIT_DATA = 0x01, /**< Alphabet type -8 bit format data */
+       TEL_SAT_ALPHABET_FORMAT_UCS2 = 0x02, /**< Alphabet type -UCS2 format */
+       TEL_SAT_ALPHABET_FORMAT_RESERVED = 0x03 /**< Alphabet type -format reserved */
+} TelSatAlphabetFormatType;
+
+/**
+ * @enum TelSatMsgClassType
+ * This enumeration defines message class types
+*/
+typedef enum {
+       TEL_SAT_MSG_CLASS_NONE = 0x00, /**< class none */
+       TEL_SAT_MSG_CLASS_0 = 0x01, /**< class 0 */
+       TEL_SAT_MSG_CLASS_1, /**< class 1 Default meaning:ME-specific */
+       TEL_SAT_MSG_CLASS_2, /**< class 2 SIM specific message */
+       TEL_SAT_MSG_CLASS_3, /**< class 3 Default meaning: TE specific */
+       TEL_SAT_MSG_CLASS_RESERVED = 0xFF /**< class reserved */
+} TelSatMsgClassType;
+
+/**
+ * @enum TelSatCallCtrlResultType
+ * This enum indicates the result of call control by SIM.
+ */
+typedef enum {
+       TEL_SAT_CALL_CTRL_R_ALLOWED_NO_MOD = 0, /**<    call control result type -  ALLOWED WITH NO MOD */
+       TEL_SAT_CALL_CTRL_R_NOT_ALLOWED = 1, /**< call control result type -  NOT ALLOWED */
+       TEL_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD = 2, /**< call control result type -  ALLOWED WITH MOD     */
+       TEL_SAT_CALL_CTRL_R_RESERVED = 0xFF /**< call control result type -  RESERVED */
+} TelSatCallCtrlResultType;
+
+/**
+ * @enum TelSatCallType
+ * This enum indicates the SAT call type
+ */
+typedef enum {
+       TEL_SAT_CALL_TYPE_MO_VOICE = 0X00,      /**<    call type -mo voice */
+       TEL_SAT_CALL_TYPE_MO_SMS, /**< call type - mo sms */
+       TEL_SAT_CALL_TYPE_SS, /**< call type -  ss */
+       TEL_SAT_CALL_TYPE_USSD, /**< call type -  ussd */
+       TEL_SAT_PDP_CNTXT_ACT, /**< call type -  pdp context action */
+       TEL_SAT_CALL_TYPE_MAX /**< call type -  max */
+}TelSatCallType;
+
+/**
+ * @enum TelSatUseInputAlphabetType
+ * This is associated with the command qualifier for get input.
+ */
+typedef enum {
+       TEL_SAT_USER_INPUT_ALPHABET_TYPE_SMS_DEFAULT = 1, /**< command qualifier for  ALPHABET TYPE SMS DEFAULT */
+       TEL_SAT_USER_INPUT_ALPHABET_TYPE_UCS2 = 2 /**< command qualifier for  ALPHABET TYPE UCS2 */
+} TelSatUseInputAlphabetType;
+
+/**
+ * @enum TelSatResultType
+ * This enumeration defines sat result types
+*/
+typedef enum {
+       TEL_SAT_RESULT_SUCCESS_RETURN = 0x0, /**< command performed successfully */
+       TEL_SAT_RESULT_SUCCESS_WITH_PARTIAL_COMPREHENSION = 0x01, /**< command performed with partial comprehension */
+       TEL_SAT_RESULT_SUCCESS_WITH_MISSING_INFO = 0x02, /**< command performed, with missing information */
+
+       TEL_SAT_RESULT_REFRESH_PERFORMED_WITH_ADDITIONAL_EFS_READ = 0x03, /**< REFRESH PERFORMED WITH ADDITIONAL EFS READ */
+       TEL_SAT_RESULT_SUCCESS_BUT_REQUESTED_ICON_NOT_DISPLAYED = 0x04, /**<     command performed but REQUESTED ICON NOT DISPLAYED */
+       TEL_SAT_RESULT_SUCCESS_BUT_MODIFIED_BY_CALL_CONTROL_BY_SIM = 0x05, /**< command performed but MODIFIED BY CALL CONTROL BY SIM */
+       TEL_SAT_RESULT_SUCCESS_LIMITED_SERVICE = 0x06, /**< command performed with LIMITED SERVICE */
+       TEL_SAT_RESULT_SUCCESS_WITH_MODIFICATION = 0x07, /**< command performed with MODIFICATION */
+       TEL_SAT_RESULT_REFRESH_PRFRMD_BUT_INDICATED_USIM_NOT_ACTIVE = 0x08, /**< REFRESH PERFORMED BUT INDICATED USIM NOT ACTIVE */
+       TEL_SAT_RESULT_SUCCESS_BUT_TONE_NOT_PLAYED = 0x09, /**< command performed successfully, tone not played */
+
+       TEL_SAT_RESULT_PROACTIVE_SESSION_TERMINATED_BY_USER = 0x10, /**< proactive sim application session terminated by user    */
+       TEL_SAT_RESULT_BACKWARD_MOVE_BY_USER = 0x11, /**< backward move in the proactive sim application session request by the user */
+       TEL_SAT_RESULT_NO_RESPONSE_FROM_USER = 0x12, /**< no response from user */
+
+       TEL_SAT_RESULT_HELP_INFO_REQUIRED_BY_USER = 0x13, /**< HELP INFO REQUIRED BY USER */
+       TEL_SAT_RESULT_USSD_OR_SS_TRANSACTION_TERMINATED_BY_USER = 0x14, /**< USSD OR SS TRANSACTION TERMINATED BY USER */
+
+       TEL_SAT_RESULT_ME_UNABLE_TO_PROCESS_COMMAND = 0x20, /**<        ME currently unable to process command  */
+       TEL_SAT_RESULT_NETWORK_UNABLE_TO_PROCESS_COMMAND = 0x21, /**< Network currently unable to process command */
+       TEL_SAT_RESULT_USER_DID_NOT_ACCEPT_CALL_SETUP_REQ = 0x22, /**< User did not accept call setup request */
+       TEL_SAT_RESULT_USER_CLEAR_DOWN_CALL_BEFORE_CONN = 0x23, /**< User cleared down call before connection or network released */
+
+       TEL_SAT_RESULT_INTERACTION_WITH_CC_BY_SIM_IN_TMP_PRBLM = 0x25, /**< INTERACTION WITH CALL CONTROL BY SIM IN TEMPORARY PROBLEM */
+       TEL_SAT_RESULT_LAUNCH_BROWSER_GENERIC_ERROR_CODE = 0x26, /**< LAUNCH BROWSER GENERIC ERROR CODE */
+
+       TEL_SAT_RESULT_BEYOND_ME_CAPABILITIES = 0x30, /**< command beyond ME's capabilities */
+       TEL_SAT_RESULT_COMMAND_TYPE_NOT_UNDERSTOOD_BY_ME = 0x31, /**< command type not understood by ME */
+       TEL_SAT_RESULT_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME = 0x32, /**< command data not understood by ME */
+       TEL_SAT_RESULT_COMMAND_NUMBER_NOT_KNOWN_BY_ME = 0x33, /**<      command number not known by ME */
+       TEL_SAT_RESULT_SS_RETURN_ERROR = 0x34, /**< SS return error */
+       TEL_SAT_RESULT_SMS_RP_ERROR = 0x35, /**< SMS rp-error */
+       TEL_SAT_RESULT_ERROR_REQUIRED_VALUES_ARE_MISSING = 0x36, /**< Error, required values are missing */
+
+       TEL_SAT_RESULT_USSD_RETURN_ERROR = 0x37, /**<   USSD_RETURN_ERROR */
+       TEL_SAT_RESULT_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM = 0x39, /**<     INTERACTION WITH CALL CONTROL OR SMS CONTROL PERMANENT PROBLEM */
+       TEL_SAT_RESULT_BEARER_INDEPENDENT_PROTOCOL_ERROR = 0x3A, /**< BEARER INDEPENDENT PROTOCOL ERROR */
+       TEL_SAT_RESULT_FRAMES_ERROR = 0x3C, /**< FRAMES ERROR */
+} TelSatResultType;
+
+/**
+ * @enum TelSatMeProblemType
+ * This enumeration defines ME problem types
+*/
+typedef enum {
+       TEL_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE = 0x0, /**< ME problem with NO SPECIFIC CAUSE */
+       TEL_SAT_ME_PROBLEM_SCREEN_BUSY = 0x01, /**< ME problem with SCREEN BUSY */
+       TEL_SAT_ME_PROBLEM_ME_BUSY_ON_CALL = 0x02, /**< ME problem with ME BUSY ON CALL */
+       TEL_SAT_ME_PROBLEM_ME_BUSY_ON_SS = 0x03, /**< ME problem with ME_BUSY ON SS */
+       TEL_SAT_ME_PROBLEM_NO_SERVICE = 0x04, /**<      ME problem with NO SERVICE */
+       TEL_SAT_ME_PROBLEM_ACCESS_CONTROL_CLASS_BAR = 0x05, /**< ME problem with ACCESS CONTROL CLASS BAR */
+       TEL_SAT_ME_PROBLEM_RADIO_RES_NOT_GRANTED = 0x06, /**< ME problem with RADIO RES NOT GRANTED */
+       TEL_SAT_ME_PROBLEM_NOT_IN_SPEECH_CALL = 0x07, /**< ME problem with NOT IN SPEECH CALL */
+       TEL_SAT_ME_PROBLEM_ME_BUSY_ON_USSD = 0x08, /**< ME problem with ME BUSY ON USSD */
+       TEL_SAT_ME_PROBLEM_ME_BUSY_ON_SEND_DTMF_CMD = 0x09, /**<        ME problem with ME BUSY ON SEND DTMF CMD */
+       TEL_SAT_ME_PROBLEM_NO_USIM_ACTIVE = 0x0A, /**< ME problem with NO USIM ACTIVE */
+       TEL_SAT_ME_PROBLEM_INVALID = 0xFF /**< ME problem with INVALID */
+} TelSatMeProblemType;
+
+/**
+ * @enum TelSatCallControlResult
+ * This enumeration defines call control result types
+*/
+typedef enum {
+       TEL_SAT_CALL_CTRL_RESULT_ALLOWED_NO_MOD = 0x00, /**< call control result type -ALLOWED NO MOD */
+       TEL_SAT_CALL_CTRL_RESULT_NOT_ALLOWED = 0x01, /**< call control result type -NOT ALLOWED */
+       TEL_SAT_CALL_CTRL_RESULT_ALLOWED_WITH_MOD = 0x02, /**< call control result type -ALLOWED WITH MOD */
+       TEL_SAT_CALL_CTRL_RESULT_RESERVED /**< call control result type -RESERVED */
+} TelSatCallControlResult;
+
+/**
+ * @enum TelSatTypeOfNum
+ * This enumeration defines sat type of number
+*/
+typedef enum {
+       TEL_SAT_TON_UNKNOWN = 0,                        /*< unknown */
+       TEL_SAT_TON_INTERNATIONAL = 1,          /*< international number */
+       TEL_SAT_TON_NATIONAL = 2,                       /*< national number */
+       TEL_SAT_TON_NETWORK_SPECIFIC = 3,       /*< network specific number */
+       TEL_SAT_TON_DEDICATED_ACCESS = 4,       /*< subscriber number */
+       TEL_SAT_TON_ALPHA_NUMERIC = 5,          /*< alphanumeric, GSM 7-bit default alphabet) */
+       TEL_SAT_TON_ABBREVIATED_NUMBER = 6,     /*< abbreviated number */
+       TEL_SAT_TON_RESERVED_FOR_EXT = 7        /*< reserved for extension */
+} TelSatTypeOfNum;
+
+/**
+ * @enum TelSatNumberingPlanIdentity
+ * This enumeration defines numbering plan identity
+*/
+typedef enum {
+       TEL_SAT_NPI_UNKNOWN = 0,                                /*< Unknown */
+       TEL_SAT_NPI_ISDN_TEL = 1,                               /*< ISDN Telephone numbering plan */
+       TEL_SAT_NPI_DATA_NUMBERING_PLAN = 3,    /*< Data numbering plan */
+       TEL_SAT_NPI_TELEX = 4,                                  /*< Telex numbering plan */
+       TEL_SAT_NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /*< Service Center Specific plan */
+       TEL_SAT_NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6,/*< Service Center Specific plan */
+       TEL_SAT_NPI_NATIONAL = 8,                               /*< National numbering plan */
+       TEL_SAT_NPI_PRIVATE = 9,                                /*< Private numbering plan */
+       TEL_SAT_NPI_ERMES_NUMBERING_PLAN = 10,  /*< ERMES numbering plan */
+       TEL_SAT_NPI_RESERVED_FOR_EXT = 0xF              /*< Reserved for extension */
+} TelSatNumberingPlanIdentity;
+
+/**
+ * @enum TelSatDeviceIdentitiesTagType
+ * This enumeration defines device identities tag types
+*/
+typedef enum {
+       TEL_SAT_DEVICE_ID_KEYPAD = 0x01, /**< device identities tag type -ID KEYPAD */
+       TEL_SAT_DEVICE_ID_DISPLAY = 0x02, /**< device identities tag type -ID DISPLAY */
+       TEL_SAT_DEVICE_ID_EARPIECE = 0x03, /**< device identities tag type -ID EARPIECE */
+       /* 21-27 for channel */
+       TEL_SAT_DEVICE_ID_SIM = 0x81, /**< device identities tag type -ID SIM */
+       TEL_SAT_DEVICE_ID_ME = 0x82, /**< device identities tag type -ID ME */
+       TEL_SAT_DEVICE_ID_NETWORK = 0x83, /**< device identities tag type -ID NETWORK */
+       TEL_SAT_DEVICE_ID_RESERVED = 0XFF /**< device identities tag type -ID RESERVED */
+} TelSatDeviceIdentitiesTagType;
+
+/**
+ * @enum TelSatTimeUnitType
+ * This enumeration defines time unit types
+*/
+typedef enum {
+       TEL_SAT_TIME_UNIT_MINUTES = 0x0, /**< Time unit type -MINUTES */
+       TEL_SAT_TIME_UNIT_SECONDS = 0x01, /**< Time unit type -SECONDS */
+       TEL_SAT_TIME_UNIT_TENTHS_OF_SECONDS     = 0x02, /**< Time unit type -TENTHS_OF_SECONDS */
+       TEL_SAT_TIME_UNIT_RESERVED       = 0xFF /**< Time unit type -RESERVED */
+} TelSatTimeUnitType;
+
+/**
+ * @enum TelSatSmsTpduType
+ * This enumeration defines SMS TPDU types
+*/
+typedef enum {
+       TEL_SAT_SMS_TPDU_TYPE_DELIVER_TPDU = 0, /**< SMS TPDU type -DELIVER TPDU */
+       TEL_SAT_SMS_TPDU_TYPE_DELIVER_RPT = 1, /**< SMS TPDU type -DELIVER RPT */
+       TEL_SAT_SMS_TPDU_TYPE_SUBMIT_TPDU = 2, /**< SMS TPDU type -SUBMIT TPDU */
+       TEL_SAT_SMS_TPDU_TYPE_SUBMIT_RPT        = 3, /**< SMS TPDU type -SUBMIT RPT */
+       TEL_SAT_SMS_TPDU_TYPE_STATUS_RPT        = 4, /**< SMS TPDU type -STATUS RPT */
+       TEL_SAT_SMS_TPDU_TYPE_TPDU_CMD = 5 /**< SMS TPDU type -TPDU CMD */
+} TelSatSmsTpduType;
+
+/**
+ * @enum TelSatEventListType
+ * This enumeration defines event list types
+*/
+typedef enum {
+       TEL_SAT_EVENT_MT_CALL = 0, /**< event type -MT CALL */
+       TEL_SAT_EVENT_CALL_CONNECTED = 1, /**< event type -CALL CONNECTED */
+       TEL_SAT_EVENT_CALL_DISCONNECTED = 2, /**< event type -CALL DISCONNECTED */
+       TEL_SAT_EVENT_LOCATION_STATUS = 3, /**< event type -LOCATION STATUS */
+       TEL_SAT_EVENT_USER_ACTIVITY = 4, /**< event type - USER_ACTIVITY */
+       TEL_SAT_EVENT_IDLE_SCREEN_AVAILABLE = 5, /**< event type - IDLE SCREEN AVAILABLE */
+       TEL_SAT_EVENT_CARD_READER_STATUS = 6, /**< event type -CARD READER STATUS */
+       TEL_SAT_EVENT_LANGUAGE_SELECTION = 7, /**<      event type - LANGUAGE SELECTION */
+       TEL_SAT_EVENT_BROWSER_TERMINATION = 8, /**< event type - BROWSER TERMINATION */
+       TEL_SAT_EVENT_DATA_AVAILABLE = 9, /**< event type -DATA AVAILABLE */
+       TEL_SAT_EVENT_CHANNEL_STATUS = 0x0A, /**< event type - CHANNEL STATUS    */
+       TEL_SAT_EVENT_ACCESS_TECHNOLOGY_CHANGED = 0x0B, /**< event type -TECHNOLOGY CHANGED */
+       TEL_SAT_EVENT_DISPLAY_PARAMETERS_CHANGED = 0x0C, /**< event type -PARAMETERS CHANGED */
+       TEL_SAT_EVENT_LOCAL_CONNECTION = 0x0D, /**< event type -LOCAL CONNECTION */
+       TEL_SAT_EVENT_NW_SEARCH_MODE_CHANGED = 0X0E, /**< event type -NW SEARCH MODE CHANGED */
+       TEL_SAT_EVENT_BROWSING_STATUS = 0X0F, /**< event type -BROWSING STATUS */
+       TEL_SAT_EVENT_FRAMES_INFORMATION_CHANGED = 0X10, /**< event type -FRAMES INFORMATION CHANGED */
+       TEL_SAT_EVENT_RESERVED_FOR_3GPP = 0X11, /**< event type -RESERVED FOR 3GPP */
+       TEL_SAT_EVENT_UNKNOWN = 0xFF /**< event type - UNKNOWN */
+} TelSatEventListType;
+
+/**
+ * @enum TelSatCallCtrlStringType
+ * This enumeration defines call control string type.
+ */
+typedef enum {
+       TEL_SAT_CC_VOICE = 0x00, /**< Call Control String Type - voice */
+       TEL_SAT_CC_SS = 0x01, /**< Call Control String Type - ss */
+       TEL_SAT_CC_USSD = 0x02, /**< Call Control String Type - ussd */
+       TEL_SAT_CC_NONE = 0xFF /**< Call Control String Type - none */
+} TelSatCallCtrlStringType;
+
+/**
+ * @enum TelSatInkeyType
+ * This enumeration defines inkey type
+*/
+typedef enum {
+       TEL_SAT_INKEY_TYPE_CHARACTER_SET_ENABLED = 0, /**< Display inkey type -character set enabled */
+       TEL_SAT_INKEY_TYPE_YES_NO_REQUESTED = 1 /**< Display inkey type -yes/No requested */
+} TelSatInkeyType;
+
+/**
+ * @enum TelSatToneType
+ * This enumeration defines tone types
+*/
+typedef enum {
+       /* standard supervisory tones */
+       TEL_SAT_DIAL_TONE = 0x01, /**<  TONE TYPE DIAL TONE */
+       TEL_SAT_CALLED_SUBSCRIBER_BUSY = 0x02, /**< TONE TYPE CALLED SUBSCRIBER BUSY */
+       TEL_SAT_CONGESTION = 0x03, /**< TONE TYPE CONGESTION */
+       TEL_SAT_RADIO_PATH_ACK = 0x04, /**< TONE TYPE RADIO PATH ACK */
+       TEL_SAT_RADIO_PATH_NOT_AVAILABLE_CALL_DROPPED = 0x05, /**< TONE TYPE RADIO PATH NOT AVAILABLE CALL DROPPED */
+       TEL_SAT_ERR_SPECIAL_INFO = 0x06, /**<   TONE TYPE ERR SPECIAL INFO */
+       TEL_SAT_CALL_WAITING_TONE = 0x07, /**< TONE TYPE CALL WAITING TONE */
+       TEL_SAT_RINGING_TONE = 0x08, /**< TONE TYPE RINGING TONE */
+
+       /* ME proprietary tones */
+       TEL_SAT_GENERAL_BEEP = 0x10, /**<       TONE TYPE GENERAL BEEP */
+       TEL_SAT_POSITIVE_ACK_TONE = 0x11, /**< TONE TYPE POSITIVE ACK TONE */
+       TEL_SAT_NEGATIVE_ACK_OR_ERROR_TONE = 0x12, /**< TONE TYPE NEGATIVE ACK OR ERROR TONE */
+       TEL_SAT_RINGING_TONE_SLCTD_BY_USR_FOR_INCOM_SPEECH_CALL = 0x13, /**<    TONE TYPE RINGING TONE SELECTED BY USER FOR INCOMING SPEECH CALL */
+       TEL_SAT_ALERT_TONE_SELECTED_BY_USER_FOR_INCOMING_SMS = 0x14, /**< TONE TYPE ALERT TONE SELECTED BY USER FOR INCOMING SMS */
+       TEL_SAT_CRITICAL_ALERT = 0x15, /**< TONE TYPE CRITICAL ALERT */
+
+       /* Themed tones */
+       TEL_SAT_HAPPY_TONE = 0x30, /**< TONE TYPE HAPPY TONE */
+       TEL_SAT_SAD_TONE = 0x31, /**< TONE TYPE SAD TONE */
+       TEL_SAT_URGENT_ACTION_TONE = 0x32, /**< TONE TYPE URGENT ACTION TONE */
+       TEL_SAT_QUESTION_TONE = 0x33, /**< TONE TYPE QUESTION TONE */
+       TEL_SAT_MESSAGE_RECEIVED_TONE = 0x34, /**< TONE TYPE MESSAGE RECEIVED TONE */
+
+       /* Melody tones */
+       TEL_SAT_MELODY_1 = 0x40, /**<   TONE TYPE MELODY 1 */
+       TEL_SAT_MELODY_2 = 0x41, /**<   TONE TYPE MELODY 2 */
+       TEL_SAT_MELODY_3 = 0x42, /**<   TONE TYPE MELODY 3 */
+       TEL_SAT_MELODY_4 = 0x43, /**<   TONE TYPE MELODY 4 */
+       TEL_SAT_MELODY_5 = 0x44, /**<   TONE TYPE MELODY 5 */
+       TEL_SAT_MELODY_6 = 0x45, /**<   TONE TYPE MELODY 6 */
+       TEL_SAT_MELODY_7 = 0x46, /**<   TONE TYPE MELODY 7 */
+       TEL_SAT_MELODY_8 = 0x47, /**<   TONE TYPE MELODY 8 */
+
+       TEL_SAT_TONE_TYPE_RESERVED = 0xFF /**< TONE TYPE RESERVED */
+} TelSatToneType;
+
+/**
+ * @enum TelSatBcRepeatIndicatorType
+ * This enumeration defines BC repeat indicator types
+*/
+typedef enum {
+       TEL_SAT_BC_REPEAT_INDI_ALTERNATE_MODE = 0x01, /**< BC REPEAT ALTERNATE MODE */
+       TEL_SAT_BC_REPEAT_INDI_SEQUENTIAL_MODE = 0x03, /**< BC REPEAT SEQUENTIAL MODE */
+       TEL_SAT_BC_REPEAT_INDI_RESERVED = 0xFF /**< RESERVED */
+} TelSatBcRepeatIndicatorType;
+
+/**
+ * @enum TelSatImageCodingSchemeType
+ * This enumeration defines image coding scheme types
+*/
+typedef enum {
+       TEL_SAT_SIM_IMAGE_CODING_SCHEME_BASIC = 0x11, /**< Image coding scheme type - BASIC */
+       TEL_SAT_SIM_IMAGE_CODING_SCHEME_COLOUR = 0x21, /**< Image coding scheme type - COLOUR */
+       TEL_SAT_SIM_IMAGE_CODING_SCHEME_RESERVED = 0xFF /**< Image coding scheme type - RESERVED */
+} TelSatImageCodingSchemeType;
+
+/**
+ * @enum TelSatIconQualifierType
+ * This enumeration defines icon qualifier types
+*/
+typedef enum {
+       TEL_SAT_ICON_QUALI_SELF_EXPLANATORY = 0, /**< Icon qualifier type - SELF EXPLANATORY */
+       TEL_SAT_ICON_QUALI_NOT_SELF_EXPLANATORY = 1, /**< Icon qualifier type - NOT SELF EXPLANATORY */
+       TEL_SAT_ICON_QUALI_RESERVED = 0xFF /**< Icon qualifier type - RESERVED */
+} TelSatIconQualifierType;
+
+/**
+ * @enum TelSatBrowserIdentityType
+ * This enumeration defines browser identity types
+*/
+typedef enum {
+       TEL_SAT_BROWSER_ID_DEFAULT = 0, /**< DEFAULT BROWSER */
+       TEL_SAT_BROWSER_ID_WML, /**< BROWSER WML */
+       TEL_SAT_BROWSER_ID_HTML, /**< BROWSER HTML */
+       TEL_SAT_BROWSER_ID_XHTML, /**< BROWSER XHTML */
+       TEL_SAT_BROWSER_ID_CHTML, /**<  BROWSER CHTML */
+       TEL_SAT_BROWSER_ID_RESERVED = 0xFF /**< RESERVED */
+} TelSatBrowserIdentityType;
+
+/**
+ * @enum TelSatBearerListType
+ * This enumeration defines bearer list types
+*/
+typedef enum {
+       TEL_SAT_BEARER_LIST_SMS = 0, /**<       BEARER SMS */
+       TEL_SAT_BEARER_LIST_CSD = 1, /**<       BEARER CSD */
+       TEL_SAT_BEARER_LIST_USSD = 2, /**< BEARER USSD  */
+       TEL_SAT_BEARER_LIST_GPRS = 3, /**< BEARER GPRS */
+       TEL_SAT_BEARER_LIST_RESERVED = 0xFF /**< BEARER RESERVED */
+} TelSatBearerListType;
+
+/**
+ * @enum TelSatChannelStatusType
+ * This enumeration defines channel status types
+*/
+typedef enum {
+       TEL_SAT_LINK_OR_PACKET_SERVICE_NOT_ACTIVATED, /**< channel status type -LINK OR PACKET SERVICE NOT ACTIVATED */
+       TEL_SAT_LINK_OR_PACKET_SERVICE_ACTIVATED /**< channel status type -LINK OR PACKET SERVICE ACTIVATED */
+} TelSatChannelStatusType;
+
+/**
+ * @enum TelSatChannelStatusInfoType
+ * This enumeration defines channel status info types
+*/
+typedef enum {
+       TEL_SAT_CHANNEL_STATUS_NO_FURTHER_INFO = 0x00, /**< channel status info type - NO FURTHER INFO */
+       TEL_SAT_CHANNEL_STATUS_LINK_DROPPED = 0x05 /**< channel status info type -LINK DROPPED */
+} TelSatChannelStatusInfoType;
+
+/**
+ * @enum TelSatAddressType
+ * This enumeration defines address types
+*/
+typedef enum {
+       TEL_SAT_ADDR_TYPE_IPv4 = 0x21, /**< address type - IPv4 */
+       TEL_SAT_ADDR_TYPE_IPv6 = 0x57, /**< address type - IPv6 */
+       TEL_SAT_ADDR_RESERVED = 0xFF /**< reserved */
+} TelSatAddressType;
+
+/**
+ * @enum TelSatTransportProtocolType
+ * This enumeration defines transport protocal types
+*/
+typedef enum {
+       TEL_SAT_TP_TYPE_UDP_UICC_CLIENT = 0x01, /**< transport protocol type- UDP UICC CLIENT */
+       TEL_SAT_TP_TYPE_TCP_UICC_CLIENT = 0x02, /**< transport protocol type-TCP UICC CLIENT */
+       TEL_SAT_TP_TYPE_TCP_UICC_SERVER = 0x03 /**< transport protocol type- TCP UICC SERVER    */
+} TelSatTransportProtocolType;
+
+/**
+ * @enum TelSatRemoteEntityAddrCodingType
+ * This enumeration defines remote entity address coding types
+*/
+typedef enum {
+       TEL_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IEEE802_48BIT = 0, /**<  remote entity address coding type- IEEE802 48BIT */
+       TEL_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IRDA_32BIT = 1, /**< remote entity address coding type- IRDA 32BIT */
+       TEL_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_RESERVED = 0xFF /**< reserved */
+} TelSatRemoteEntityAddrCodingType;
+
+/**
+ * @enum TelSatLanguageInfo
+ * This enumeration defines lists the language values.
+ */
+typedef enum {
+       TEL_SAT_LP_GERMAN = 0x00, /**< GERMAN */
+       TEL_SAT_LP_ENGLISH = 0x01, /**< ENGLISH */
+       TEL_SAT_LP_ITALIAN = 0x02, /**< ITALIAN */
+       TEL_SAT_LP_FRENCH = 0x03, /**< FRENCH */
+       TEL_SAT_LP_SPANISH = 0x04, /**< SPANISH */
+       TEL_SAT_LP_DUTCH = 0x05, /**<   DUTCH */
+       TEL_SAT_LP_SWEDISH = 0x06, /**< SWEDISH */
+       TEL_SAT_LP_DANISH = 0x07, /**<  DANISH  */
+       TEL_SAT_LP_PORTUGUESE = 0x08, /**< PORTUGUESE   */
+       TEL_SAT_LP_FINNISH = 0x09, /**< FINNISH */
+       TEL_SAT_LP_NORWEGIAN = 0x0A, /**< NORWEGIAN */
+       TEL_SAT_LP_GREEK = 0x0B, /**< GREEK */
+       TEL_SAT_LP_TURKISH = 0x0C, /**< TURKISH */
+       TEL_SAT_LP_HUNGARIAN = 0x0D, /**< HUNGARIAN */
+       TEL_SAT_LP_POLISH = 0x0E, /**<  POLISH  */
+       TEL_SAT_LP_LANG_UNSPECIFIED = 0x0F /**< LANGUAGE UNSPECIFIED */
+} TelSatLanguageInfo;
+
+/**
+ * @enum TelSatCmdQualifierLaunchBrowser
+ * This enumeration defines cmd qualifier for launch browser
+*/
+typedef enum {
+       TEL_SAT_LAUNCH_BROWSER_IF_NOT_ALREADY_LAUNCHED = 0, /**<        command qualifier for  LAUNCH BROWSER */
+       TEL_SAT_LAUNCH_BROWSER_NOT_USED = 1, /**< command qualifier for  NOT USED */
+       TEL_SAT_LAUNCH_BROWSER_USE_EXISTING_BROWSER = 2, /**< command qualifier for  USE EXISTING BROWSER if secure session, do not use it */
+       TEL_SAT_LAUNCH_BROWSER_CLOSE_AND_LAUNCH_NEW_BROWSER = 3, /**<   command qualifier for CLOSE AND LAUNCH NEW BROWSER      */
+       TEL_SAT_LAUNCH_BROWSER_NOT_USED2 = 4, /**< command qualifier for  NOT USED2 */
+       TEL_SAT_LAUNCH_BROWSER_RESERVED = 0xFF /**<     reserved        */
+} TelSatCmdQualifierLaunchBrowser;
+
+/**
+ * @enum TelSatCmdQualifierRefresh
+ * This enumeration defines cmd qualifier for refresh cmd
+*/
+typedef enum {
+       TEL_SAT_REFRESH_SIM_INIT_AND_FULL_FCN = 0, /**< command qualifier for REFRESH SIM INIT AND FULL FILE CHANGE_NOTIFICATION */
+       TEL_SAT_REFRESH_FCN = 1, /**<   command qualifier for REFRESH FILE CHANGE NOTIFICATION */
+       TEL_SAT_REFRESH_SIM_INIT_AND_FCN = 2, /**< command qualifier for REFRESH SIM INIT AND FILE CHANGE NOTIFICATION  */
+       TEL_SAT_REFRESH_SIM_INIT = 3, /**< command qualifier for REFRESH SIM INIT */
+       TEL_SAT_REFRESH_SIM_RESET = 4, /**< command qualifier for REFRESH SIM RESET */
+       TEL_SAT_REFRESH_3G_APPLICATION_RESET = 5, /**<  command qualifier for REFRESH 3G APPLICATION RESET */
+       TEL_SAT_REFRESH_3G_SESSION_RESET = 6, /**< command qualifier for REFRESH 3G SESSION RESET       */
+       TEL_SAT_REFRESH_RESERVED = 0xFF /**< command qualifier for REFRESH RESERVED */
+} TelSatCmdQualifierRefresh;
+
+/**
+ * @enum TelSatCmdQualifierProvideLocalInfo
+ * This enumeration defines cmd qualifier for local info
+*/
+typedef enum {
+       TEL_SAT_LOCAL_INFO_LOCATION = 0, /**< local info cmd qualifier -location */
+       TEL_SAT_LOCAL_INFO_IMEI = 1, /**< local info cmd qualifier -IMEI */
+       TEL_SAT_LOCAL_INFO_NMR = 2, /**< local info cmd qualifier -NMR */
+       TEL_SAT_LOCAL_INFO_DATE_TIME_AND_TIMEZONE = 3, /**< local info cmd qualifier -DATE TIME AND TIMEZONE */
+       TEL_SAT_LOCAL_INFO_LANGUAGE = 4, /**< local info cmd qualifier -LANGUAGE */
+       TEL_SAT_LOCAL_INFO_TIMING_ADVANCE = 5, /**< local info cmd qualifier -TIMING ADVANCE */
+       TEL_SAT_LOCAL_INFO_ACT = 6, /**< local info cmd qualifier -ACT */
+       TEL_SAT_LOCAL_INFO_ESN = 7, /**< local info cmd qualifier -ESN */
+       TEL_SAT_LOCAL_INFO_IMEISV = 8, /* *<local info cmd qualifier -IMEISV */
+       TEL_SAT_LOCAL_INFO_MEID = 0x0B, /**< local info cmd qualifier -MEID */
+       TEL_SAT_LOCAL_INFO_RESERVED = 0xFF /* local info cmd qualifier -RESERVED */
+} TelSatCmdQualifierProvideLocalInfo;
+
+/**
+ * @enum TelSatCmdQualifierSetupCall
+ * This enumeration defines cmd qualifier for setup call
+*/
+typedef enum {
+       TEL_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY = 0x00, /**< command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY       */
+       TEL_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL = 0x01, /**< command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY WITH REDIAL */
+       TEL_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD = 0x02, /**< command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD */
+       TEL_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 */
+       TEL_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS = 0x04, /**< command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS */
+       TEL_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS_WITH_REDIAL = 0x05, /**< command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS WITH REDIAL */
+       TEL_SAT_SETUP_CALL_RESERVED = 0xFF /**<  command qualifier for SETUP CALL RESERVED      */
+} TelSatCmdQualifierSetupCall;
+
+/**
+ * @enum TelSatCallCtrlProblemType
+ * This enumeration defines call control problem types
+*/
+typedef enum {
+       TEL_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**< Call Control problem with no specific cause */
+       TEL_SAT_CC_PROBLEM_ACTION_NOT_ALLOWED = 1, /**< Call Control problem with action not allowed */
+       TEL_SAT_CC_PROBLEM_REQUEST_TYPE_HAS_CHANGED = 2 /**< Call Control problem with request type has changed */
+} TelSatCallCtrlProblemType;
+
+/**
+ * @enum TelSatLaunchBrowserProblemType
+ * This enumeration defines launch browser problem types
+*/
+typedef enum {
+       TEL_SAT_BROWSER_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**<     Browser problem with no specific cause */
+       TEL_SAT_BROWSER_PROBLEM_BEARER_UNAVAILABLE = 1, /**< Browser problem with bearer unavailable */
+       TEL_SAT_BROWSER_PROBLEM_BROWSER_UNAVAILABLE = 2, /**<   Browser problem with browser unavailable */
+       TEL_SAT_BROWSER_PRBLM_ME_UNABLE_TO_READ_PROV_DATA = 3 /**< Browser problem with ME unable to read provisioning data */
+} TelSatLaunchBrowserProblemType;
+
+/**
+ * @enum TelSatBrowserTerminationCauseType
+ * This enumeration defines browser termination cause types
+*/
+typedef enum {
+       TEL_SAT_BROWSER_TERMINATED_BY_USER = 0, /**<    BROWSER TERMINATED BY USER */
+       TEL_SAT_BROWSER_TERMINATED_BY_ERROR = 1, /**< BROWSER TERMINATED BY ERROR */
+} TelSatBrowserTerminationCauseType;
+
+/**
+ * This structure defines Result data object.
+ */
+typedef struct {
+       TelSatResultType general_result; /**< general result */
+       TelSatMeProblemType me_problem; /**< additional information on general result */
+} TelSatResultInfo;
+
+/**
+ * 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;
+
+/**
+* This structure defines Address Info
+*/
+typedef struct {
+       TelSatTypeOfNum ton; /**< type of number */
+       TelSatNumberingPlanIdentity npi; /**< numbering plan identity */
+       unsigned int dialing_number_len; /**< Dialing Number length */
+       char dialing_number[TEL_SAT_DIALING_NUMBER_LEN_MAX]; /**< Dialing Number */
+} TelSatAddressInfo;
+
+/**
+* This structure defines Data Coding Scheme Info
+*/
+typedef struct {
+       gboolean is_compressed_format;          /**< if FALSE, unpacked format */
+       TelSatAlphabetFormatType a_format; /**< Alphabet format type */
+       TelSatMsgClassType m_class; /**< msg class type */
+       unsigned char raw_dcs; /**< raw dcs data */
+} TelSatDataCodingSchemeInfo;
+
+/**
+* This structure defines Alpha identifier Info
+*/
+typedef struct {
+       gboolean is_exist; /**< identifier check */
+       TelSatDataCodingSchemeInfo dcs; /**< data coding scheme */
+       unsigned char alpha_data_len; /**< alpha identifier length */
+       char alpha_data[TEL_SAT_ALPHA_ID_LEN_MAX]; /**< alpha identifier info */
+} TelSatAlphaIdentifierInfo;
+
+/**
+* This structure defines the Sub Address data object.
+*/
+typedef struct {
+       unsigned int subaddress_len; /**< sub address length */
+       char subaddress[TEL_SAT_SUB_ADDR_LEN_MAX]; /**< sub address data */
+} TelSatSubAddressInfo;
+
+/**
+* This structure defines Capability configuration parameters Info
+*/
+typedef struct {
+       unsigned int data_len; /**< ccp info data length */
+       char data[TEL_SAT_CCP_DATA_LEN_MAX]; /**< ccp info data */
+} TelSatCcpInfo;
+
+/**
+* This structure defines device identities tag Info
+*/
+typedef struct {
+       TelSatDeviceIdentitiesTagType src; /**< src device identities tag type */
+       TelSatDeviceIdentitiesTagType dest; /**< dest device identities tag type */
+} TelSatDeviceIdentitiesInfo;
+
+/**
+* This structure defines duration Info
+*/
+typedef struct {
+       TelSatTimeUnitType time_unit;  /**< duration info -time unit type */
+       unsigned char time_interval; /**< duration info -time interval type */
+} TelSatDurationInfo;
+
+/**
+* This structure defines menu item Info
+*/
+typedef struct {
+       unsigned char item_id; /**< menu item info -item id */
+       unsigned char text_len; /**< menu item info -text len */
+       unsigned char text[TEL_SAT_ITEM_TEXT_LEN_MAX + 1]; /**< menu item info -text */
+} TelSatMenuItemInfo;
+
+/**
+* This structure defines Response length Info
+*/
+typedef struct {
+       unsigned char min; /**< min Response length */
+       unsigned char max; /**< max Response length */
+} TelSatResponseLength;
+
+/**
+* This structure defines SMS TPDU Info
+*/
+typedef struct {
+       TelSatSmsTpduType tpdu_type;  /**< SMS TPDU info -tpdu type */
+       unsigned int data_len; /**< SMS TPDU info -data len */
+       char data[TEL_SAT_SMS_TPDU_SMS_DATA_LEN_MAX]; /**< SMS TPDU info -data */
+} TelSatSmsTpduInfo;
+
+/**
+* This structure defines SS string Info
+*/
+typedef struct {
+       TelSatTypeOfNum ton; /**< SS string info -type of number */
+       TelSatNumberingPlanIdentity npi; /**< SS string info -numbering plan identity */
+       unsigned char string_len; /**< SS string length */
+       char ss_string[TEL_SAT_SS_STRING_LEN_MAX];      /**< SS string */
+} TelSatSsStringInfo;
+
+/**
+* This structure defines Text string Info
+*/
+typedef struct {
+       gboolean is_digit_only; /**< text type is digit check */
+       TelSatDataCodingSchemeInfo dcs; /**< text data coding scheme */
+       unsigned int string_length; /**< text string length */
+       char string[TEL_SAT_TEXT_STRING_LEN_MAX+1]; /**< text string */
+} TelSatTextTypeInfo;
+
+/**
+* This structure defines USSD string Info
+*/
+typedef struct {
+       TelSatDataCodingSchemeInfo dsc; /**< USSD string data coding scheme */
+       unsigned char string_len; /**< USSD string length */
+       char ussd_string[TEL_SAT_USSD_STRING_LEN_MAX]; /**< USSD string */
+} TelSatUssdStringInfo;
+
+/**
+* This structure defines File List Info
+*/
+typedef struct {
+       int file_count; /**< file count */
+       int file_id[TEL_SAT_FILE_ID_LIST_MAX_COUNT]; /**< file id */
+} TelSatFileListInfo;
+
+/**
+* This structure defines Location information Info
+*/
+typedef struct {
+       char mcc[3+1]; /**< MCC */
+       char mnc[3+1]; /**< MNC */
+       char lac [4+1]; /**< LAC */
+       char cell_id[4+1]; /**< cell id */
+       char extended_cell_id[4+1]; /**< extended cell id */
+} TelSatLocationInformationInfo;
+
+/**
+* This structure defines Items next action indicator List Info
+*/
+typedef struct {
+       unsigned char cnt; /**< next action indicator items count */
+       unsigned char indicator_list[TEL_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT]; /**< next action indicator items list */
+} TelSatItemsNextActionIndiListInfo;
+
+/**
+* This structure defines Event List Info
+*/
+typedef struct {
+       int event_list_cnt; /**< event list count */
+       TelSatEventListType evt_list[TEL_SAT_EVENT_LIST_MAX]; /**< event list type */
+} TelSatEventListInfo;
+
+/**
+ * This structure defines call control strings.
+ */
+typedef struct {
+       TelSatCallCtrlStringType call_ctrl_string_type; /**< call control type  */
+       union {
+               TelSatAddressInfo voice_string; /**< voice call string */
+               TelSatSsStringInfo ss_string; /**< ss string */
+               TelSatUssdStringInfo ussd_string; /**< ussd string */
+       } call_ctrl_data; /**< call ctrl data Union */
+} TelSatCallCtrlAddressStringInfo;
+
+/**
+* This structure defines Call control requested action Info
+*/
+typedef struct {
+       TelSatCallCtrlAddressStringInfo call_ctrl_add_string; /**< Call control address string info */
+       TelSatCcpInfo ccp1; /**< Call control CCP info */
+       TelSatSubAddressInfo sub_address; /**< Call control sub address info */
+       TelSatAlphaIdentifierInfo alpha_id; /**< Call control alpha identifier info */
+       TelSatBcRepeatIndicatorType bc_repeat_type; /**< Call control bc repeat indicator type info */
+       TelSatCcpInfo ccp2; /**< Call control CCP info */
+} TelSatCallCtrlRequestedActionInfo;
+
+/**
+* This structure defines Item icon Info
+*/
+typedef struct {
+       unsigned char width; /**< icon info -width */
+       unsigned char height;  /**< icon info -height */
+       TelSatImageCodingSchemeType ics; /**< icon info -image coding scheme */
+       unsigned short icon_data_len; /**< icon info -data len */
+       unsigned short clut_data_len; /**< icon info -CLUT data len */
+       char icon_file[TEL_SAT_IMG_DATA_FILE_PATH_LEN_MAX]; /**< icon info -image data file data */
+       char clut_file[TEL_SAT_IMG_DATA_FILE_PATH_LEN_MAX]; /**< icon info -clut file data */
+} TelSatIconInfo;
+
+/**
+* This structure defines Item icon identifier Info
+*/
+typedef struct {
+       gboolean is_exist; /**< icon identifier check */
+       TelSatIconQualifierType icon_qualifer; /**< icon qualifer type */
+       unsigned char icon_identifier; /**< icon identifier data */
+       TelSatIconInfo icon_info; /**< icon info data */
+} TelSatIconIdentifierInfo;
+
+/**
+* This structure defines Item icon identifier list Info
+*/
+typedef struct {
+       gboolean is_exist; /**< icon identifier list present check */
+       TelSatIconQualifierType icon_qualifer; /**< icon qualifer type */
+       unsigned char icon_cnt; /**< icon count */
+       unsigned char icon_id_list[TEL_SAT_ICON_LIST_MAX_COUNT]; /**< icon id list data */
+       TelSatIconInfo icon_info[TEL_SAT_ICON_LIST_MAX_COUNT]; /**< icon info data */
+} TelSatIconIdentifierListInfo;
+
+/**
+* This structure defines date, time and timezone Info
+*/
+typedef struct {
+       unsigned char year; /**< year */
+       unsigned char month; /**<       month */
+       unsigned char day; /**< day */
+       unsigned char hour; /**< hour */
+       unsigned char minute; /**< minute */
+       unsigned char second; /**< second */
+       unsigned char time_zone; /**< timeZone  */
+} TelSatDateTimeZoneInfo;
+
+/**
+* This structure defines Dtmf String Info
+*/
+typedef struct {
+       unsigned int dtmf_length; /**< DTMF string length */
+       char dtmf_string[TEL_SAT_DTMF_STRING_LEN_MAX]; /**< DTMF string */
+} TelSatDtmfStringInfo;
+
+/**
+ * 8.48 URL
+ * URL shall be coded as defined in RFC 1738 on using the "SMS 7bit default alphabet" with bit 8 set to 0.
+ */
+typedef struct {
+       unsigned int url_length; /**< URL length */
+       char url[TEL_SAT_URL_LEN_MAX]; /**< URL data */
+} TelSatUrlInfo;
+
+/**
+* This structure defines Bearer List Info
+*/
+typedef struct {
+       int count; /**< Bearer List count */
+       TelSatBearerListType bear[6]; /**< Bearer List type */
+} TelSatBearerList;
+
+/**
+* This structure defines Provisioning file Info
+*/
+typedef struct {
+       unsigned int file_path_length; /**< Provisioning file path length */
+       char file_path[TEL_SAT_PROVISIONING_FILE_PATH_LEN_MAX]; /**< Provisioning file path data */
+} TelSatProvisioningFileRef;
+
+/**
+* This structure defines channel data Info
+*/
+typedef struct {
+       unsigned char data_string_len; /**< channel data string length */
+       char    data_string[TEL_SAT_CHANNEL_DATA_STRING_LEN_MAX]; /**< channel data string */
+} TelSatChannelDataInfo;
+
+/**
+* This structure defines Channel Status Info
+*/
+typedef struct {
+       unsigned char channel_id; /**< channel id */
+       TelSatChannelStatusType status; /**< channel Status Type */
+       TelSatChannelStatusInfoType status_info; /**< channel Status info Type */
+} TelSatChannelStatusInfo;
+
+/**
+* This structure defines Other Address Info
+*/
+typedef struct {
+       TelSatAddressType address_type; /**< channel address type */
+       unsigned char address_len; /**< channel address length */
+       char address[TEL_SAT_OTHER_ADDR_LEN_MAX]; /**< channel address */
+} TelSatOtherAddressInfo;
+
+/**
+* This structure defines Me Interface Transport Level Info
+*/
+typedef struct {
+       TelSatTransportProtocolType protocol_type; /**< Transport Protocol Type */
+       unsigned short port_number; /**< Transport Protocol port number */
+} TelSatSimMeInterfaceTransportLevelInfo;
+
+/**
+* This structure defines Remote Entity Address info
+*/
+typedef struct {
+       TelSatRemoteEntityAddrCodingType coding_type; /**< Remote Entity Addr Coding Type */
+       unsigned short length;  /**< Remote Entity Addr length */
+       unsigned char remote_entity_address[TEL_SAT_REMOTE_ENTITY_ADDR_LEN_MAX]; /**< Remote Entity Addr data */
+} TelSatRemoteEntityAddressInfo;
+
+/**
+* This structure defines Network access name info
+*/
+typedef struct {
+       unsigned short length; /**< Network access name length */
+       unsigned char network_access_name[TEL_SAT_NET_ACC_NAM_LEN_MAX]; /**< Network access name data */
+} TelSatNetworkAccessNameInfo;
+
+/**
+* This structure defines Item text attribute list
+*/
+typedef struct {
+       unsigned int list_cnt; /**< text attribute list count */
+       unsigned char text_attribute_list[TEL_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT]; /**< text attribute list data */
+} TelSatTextAttributeListInfo;
+
+
+/**
+ * This structure defines the call control result ind data.
+ */
+typedef struct {
+       TelSatCallControlResult cc_result; /**< Call Control Result */
+
+       TelSatAddressInfo address; /**< Address Info */
+       TelSatSsStringInfo ss_string; /**< Ss String Info  */
+
+       TelSatCcpInfo ccp1; /**< Ccp Info */
+       TelSatSubAddressInfo sub_address; /**< Sub Address Info */
+       TelSatAlphaIdentifierInfo alpha_id; /**< alpha id */
+       TelSatBcRepeatIndicatorType bc_repeat_type; /**< Bc Repeat Indicator Type */
+       TelSatCcpInfo ccp2; /**< Ccp Info */
+} TelSatNotiCallControlResultInd;
+
+/**
+ * This structure defines the mo sms control result ind data.
+ */
+typedef struct {
+       TelSatCallControlResult cc_result; /**< Call Control Result */
+
+       TelSatAddressInfo rp_dst_address; /**< Address Info */
+       TelSatAddressInfo tp_dst_address; /**< Address Info */
+       TelSatAlphaIdentifierInfo alpha_id; /**< Alpha Identifier Info */
+} TelSatNotiMoSmControlResultInd;
+
+/**
+ * This structure defines the user confirmation data.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatProactiveCmdType command_type; /**< Proactive Command Type */
+       TelSatUiUserConfirmType key_type; /**< User Response Type */
+       unsigned char* additional_data; /**< Additional Data */
+       unsigned int data_len; /**< Additional Data Length */
+} TelSatUiUserConfirmInfo;
+
+/**
+ * This structure defines the character data for sat engine data structure.
+ */
+typedef struct
+{
+       unsigned short string_len;      /**< character data length */
+       unsigned char string[TEL_SAT_DEF_TEXT_STRING_LEN_MAX+1]; /**< character data */
+} TelSatTextInfo;
+
+/**
+ * This structure defines the main menu title to check sat menu.
+ */
+typedef struct
+{
+       gboolean is_main_menu_present; /**<flag to check sat main menu existence */
+       TelSatTextInfo main_menu_title; /**< main menu title data */
+} TelSatMainMenuTitleInfo;
+
+/**
+ * This structure defines the display text proactive command for sat ui.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatTextInfo text; /**< character data to display on screen */
+       unsigned int duration; /**< the duration of display */
+       gboolean is_priority_high;       /**< indicates whether the text is to be displayed if some other app is using the screen */
+       gboolean is_user_resp_required; /**< indicates whether user response required or Not */
+       gboolean immediately_resp; /**< indicates whether response is immediate or not */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+} TelSatDisplayTextInd;
+
+/**
+ * This structure defines the get inkey proactive command data for sat ui.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatInkeyType key_type; /**< input Type:Character Set or Yes/No */
+       TelSatUseInputAlphabetType input_char_mode; /**< input character mode(SMS default, UCS2) */
+       gboolean is_numeric;    /**< is input character numeric(0-9, *, # and +) */
+       gboolean is_help_info_available; /**< help info request flag */
+       TelSatTextInfo text; /**< character data to display on screen */
+       unsigned int duration;   /**< the duration of display */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+} TelSatGetInkeyInd;
+
+/**
+ * This structure defines the get input proactive command data for sat ui.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatUseInputAlphabetType input_char_mode; /**< input character mode(SMS default, UCS2) */
+       gboolean is_numeric;    /**< is input character numeric(0-9, *, # and +) */
+       gboolean is_help_info_available; /**< flag for help info request */
+       gboolean is_echo_input; /**< indicates whether to show input data on screen or not */
+       TelSatTextInfo text; /**< character data to display on screen */
+       TelSatRespLenInfo resp_len; /**< input data min, max length */
+       TelSatTextInfo default_text; /**< default input character data */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+} TelSatGetInputInd;
+
+/**
+ * This structure defines the play tone proactive command data for application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatTextInfo text; /**< character data to display on screen */
+       TelSatToneType tone; /**< tone info */
+       unsigned int duration; /**< the duration for playing tone */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+} TelSatPlayToneInd;
+
+/**
+ * This structure defines the data for sat ui.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       int user_confirm; /**< user confirmation */
+       TelSatTextInfo text; /**< character data to display on screen */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+} TelSatSendUiInfo;
+
+/**
+ * This structure defines the menu item info for setup menu.
+ */
+typedef struct
+{
+       char item_string[TEL_SAT_DEF_ITEM_STR_LEN_MAX + 6]; /**< menu item character data */
+       char item_id; /**< identifies the item on the menu that user selected */
+} TelSatMenuInfo;
+
+/**
+ * This structure defines the sat main menu info.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       gboolean is_main_menu_present; /**< is main menu present check */
+       char sat_main_title[TEL_SAT_DEF_TITLE_LEN_MAX + 1]; /**< menu title text */
+       unsigned short sat_main_menu_item_count; /**< number of menu items */
+       TelSatMenuInfo sat_main_menu_item[TEL_SAT_MENU_ITEM_COUNT_MAX]; /**< menu items */
+       gboolean is_sat_main_menu_help_info; /**< flag for help information request */
+       gboolean is_updated_sat_main_menu; /**< check whether sat_main_menu is updated or not */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+       TelSatIconIdentifierListInfo icon_id_list; /**< List of Icon Identifiers */
+} TelSatSetupMenuInfo;
+
+/**
+ * This structure defines the select item proactive command data for sat ui.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       gboolean is_help_info_available; /**< flag for help information request */
+       TelSatTextInfo text; /**< menu title text */
+       char default_item_index; /**< selected default item - default value is 0 */
+       char menu_item_count; /**< number of menu items */
+       TelSatMenuItemInfo menu_item[TEL_SAT_MENU_ITEM_COUNT_MAX]; /**< menu items */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+       TelSatIconIdentifierListInfo icon_id_list; /**< List of Icon Identifiers */
+}TelSatSelectItemInd;
+
+/**
+ * This structure defines the setup idle mode text proactive command for idle application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatTextInfo text; /**< character data to display on screen */
+       TelSatIconIdentifierInfo icon_id; /**< Icon Identifier */
+} TelSatSetupIdleModeTextInd;
+
+/**
+ * This structure defines the refresh proactive command data for sat ui.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       unsigned int duration; /**< the duration of display */
+       TelSatCmdQualifierRefresh       refresh_type; /**< refresh mode */
+} TelSatRefreshIndUiInfo;
+
+/**
+ * This structure defines the refresh proactive command data for applications which are concerned with files resident on USIM .
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatRefreshAppType     app_type; /**< concerned application type */
+       TelSatCmdQualifierRefresh       refresh_mode; /**< refresh mode */
+       unsigned char file_count; /**< refresh file count */
+       int file_id[TEL_SAT_REFRESH_FILE_LIST]; /**< refresh file identifier */
+} TelSatRefreshInd;
+
+/**
+ * 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 command_id; /**< Proactive Command Number sent by USIM */
+       char command_type;      /**< Command Type */
+       gboolean result; /**< result of command execution by application */
+} TelSatProactiveCmdEndIndInfo;
+
+/**
+ * This structure defines the send sms proactive command data for sms application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       gboolean is_packing_required; /**< flag to check if packing required for sms tpdu */
+       TelSatAddressInfo address; /**< destination address */
+       TelSatSmsTpduInfo sms_tpdu; /**< SMS TPDU data */
+} TelSatSendSmsIndSmsData;
+
+/**
+ * This structure defines the send ss proactive command data for ss application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       unsigned short ss_string_len; /**< SS string data length */
+       unsigned char ss_string[TEL_SAT_DEF_SS_LEN_MAX+1]; /**< SS string data */
+} TelSatSendSsIndSsData;
+
+/**
+ * This structure defines the send ussd proactive command data for ussd application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       unsigned char raw_dcs; /**< data coding scheme */
+       unsigned short ussd_string_len; /**< USSD string data length */
+       unsigned char ussd_string[TEL_SAT_DEF_USSD_LEN_MAX+1]; /**< USSD string data */
+} TelSatSendUssdIndUssdData;
+
+/**
+ * This structure defines the send dtmf proactive command data for dtmf application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       gboolean is_hidden_mode; /**< hidden mode flag */
+       TelSatTextInfo dtmf_string; /**< dtmf string data */
+} TelSatSendDtmfIndDtmfData;
+
+/**
+ * This structure defines the setup call proactive command data for call application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatCmdQualifierSetupCall call_type; /**< call type */
+       TelSatTextInfo disp_text; /**< display data for calling */
+       TelSatTextInfo call_number; /**< call number */
+       unsigned int duration; /**< maximum repeat duration */
+       TelSatIconIdentifierInfo icon_id; /**< icon identifier for call application */
+} TelSatSetupCallIndCallData;
+
+/**
+ * This structure defines the launch browser proactive command data for browser application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       char url[TEL_SAT_URL_LEN_MAX + 1]; /**< url to connect */
+       TelSatCmdQualifierLaunchBrowser launch_type; /**< launch type */
+       TelSatBrowserIdentityType identity_type; /**< Browser Identity -default, html, etc */
+} TelSatLaunchBrowserIndBrowserData;
+
+/**
+ * This structure defines the provide local info proactive command data for application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       TelSatCmdQualifierProvideLocalInfo local_info_type; /**< Provide Local Information Type */
+} TelSatProvideLocalInfoInd;
+
+/**
+ * This structure defines the language notification proactive command data for application.
+ */
+typedef struct
+{
+       int command_id; /**< Proactive Command Number sent by USIM */
+       gboolean specific_language_notification;  /**< flag for checking specific language notification. if FALSE, non-specific language notification */
+       TelSatLanguageInfo language; /**< language info from USIM application */
+} TelSatLanguageNotiInfoInd;
+
+/**
+ * This structure defines the return result data for refresh proactive command.
+ */
+typedef struct
+{
+       TelSatRefreshAppType     app_type; /**< application type */
+       TelSatResultType resp; /**< result response value */
+} TelSatRefreshRetInfo;
+
+/**
+ * This structure defines the return result data for setup call proactive command.
+ */
+typedef struct
+{
+       TelSatResultType resp; /**< result response value */
+       gboolean is_tapi_cause_exist; /**< flag for checking tapi error cause */
+       TelCallResult call_cause; /**< call error(result) cause */
+       TelSsResult ss_cause; /**< ss error(result) cause */
+       TelSatMeProblemType me_problem; /**< me problem error cause */
+       gboolean is_other_info_exist; /**< call control result existence flag */
+       TelSatCallCtrlProblemType permanent_call_ctrl_problem; /**< call control problem type */
+       TelSatCallCtrlRequestedActionInfo call_ctrl_requested_action; /**< call control request data */
+       TelSatResultInfo result2; /**< call control envelope result value */
+       TelSatTextTypeInfo text; /**< call control envelope display data */
+} TelSatCallRetInfo;
+
+/**
+ * This structure defines the return result data for send ss proactive command.
+ */
+typedef struct
+{
+       TelSatResultType resp; /**< result response value */
+       TelSsResult ss_cause; /**< ss error(result) cause */
+       TelSatTextInfo ss_string; /**< ss result string */
+       TelSatMeProblemType me_problem; /**< error - me problem */
+       gboolean is_other_info_exist; /**< call control result exist flag */
+       TelSatCallCtrlProblemType additional_call_ctrl_problem_info; /**< call control problem */
+       TelSatCallCtrlRequestedActionInfo call_ctrl_requested_action; /**< call control request data */
+       TelSatResultInfo result2; /**< call control envelope result value */
+} TelSatSsRetInfo;
+
+/**
+ * This structure defines the return result data for send ussd proactive command.
+ */
+typedef struct
+{
+       TelSatResultType resp; /**< result response value */
+       TelSsResult ss_cause; /**< ss error(result) cause */
+       TelSatTextInfo ussd_string; /**< ussd result string */
+       TelSatDataCodingSchemeInfo dcs_ussd_string; /**< dcs of ussd result string */
+       TelSatMeProblemType me_problem; /**< error - me problem */
+       gboolean is_other_info_exist; /**< call control result exist flag */
+       TelSatCallCtrlProblemType additional_call_ctrl_problem_info; /**< call control problem */
+       gboolean is_call_ctrl_has_modification; /**< call control request modification flag */
+       TelSatCallCtrlRequestedActionInfo call_ctrl_requested_action; /**< call control request data */
+       TelSatResultInfo result2; /**< call control envelope result value */
+       TelSatTextTypeInfo text2; /**< cc envelope display data */
+} TelSatUssdRetInfo;
+
+/**
+ * This structure defines the return result data for launch browser proactive command.
+ */
+typedef struct
+{
+       TelSatResultType resp; /**< result response value */
+       TelSatLaunchBrowserProblemType browser_problem; /**< specific browser problem */
+} TelSatBrowserRetInfo;
+
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+{
+       TelSatResultType resp; /**< result response value */
+       gboolean other_info; /**< flag to check whether other information are required or not */
+       TelSatCmdQualifierProvideLocalInfo      info_type; /**< local info type - e.g. time zone or language info, etc */
+       union
+       {
+               TelSatDateTimeZoneInfo time_zone_info; /**< current time zone info */
+               TelSatLanguageInfo language_info; /**< current ME language setting info */
+       }local_info; /**< Union */
+} TelSatProvideLocalRetInfo;
+
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+{
+       TelSatResultType resp; /**< result response value */
+       TelSatMeProblemType      me_problem; /**< Me Problem Type */
+} TelSatDiplayTextRetInfo;
+
+/**
+ * This structure defines the common return result data for applications proactive command.
+ */
+typedef struct
+{
+       TelSatProactiveCmdType command_type; /**< Proactive Command type */
+       int command_id; /**< Proactive Command Number sent by USIM */
+       union
+               {
+                       TelSatResultType setup_menu_resp; /**< result response value for setup menu */
+                       TelSatRefreshRetInfo refresh; /**< result response value for refresh */
+                       TelSatCallRetInfo setup_call; /**< result response value for setup call */
+                       TelSatSsRetInfo send_ss; /**< result response value for send ss */
+                       TelSatUssdRetInfo send_ussd; /**< result response value for send ussd */
+                       TelSatResultType send_sms_resp; /**< result response value for send sms */
+                       TelSatResultType send_dtmf_resp; /**< result response value for send dtmf */
+                       TelSatBrowserRetInfo launch_browser; /**< result response value for launch browser */
+                       TelSatResultType setup_idle_mode_text_resp; /**< result response value for setup idle mode text */
+                       TelSatResultType language_noti_resp; /**< result response value for language notification */
+                       TelSatProvideLocalRetInfo provide_local_info; /**< result response value for provide local info */
+                       TelSatDiplayTextRetInfo display_text; /**< result response value for dsiplay text */
+                       TelSatResultType play_tone_resp; /**< result response value for play tone */
+               }apps_ret; /**< common union result value */
+}TelSatAppsRetInfo;
+
+/**
+ * This structure defines the call control confirm data for call.
+ */
+typedef struct
+{
+       TelSatTextInfo address; /**< call destination address */
+       TelSatTextInfo sub_address; /**< call SUB address */
+       TelSatBcRepeatIndicatorType bc_repeat_indicator; /**< bc repeat indicator*/
+       TelSatTextInfo ccp1; /**< Configuration Capability Parameter 1*/
+       TelSatTextInfo ccp2; /**< Configuration Capability Parameter 2*/
+} TelSatCallCtrlIndCallData;
+
+/**
+ * This structure defines the call control confirm data for ss.
+ */
+typedef struct
+{
+       TelSatTextInfo ss_string; /**< ss destination address */
+       TelSatTextInfo sub_address; /**< call SUB address */
+       TelSatBcRepeatIndicatorType bc_repeat_indicator; /**< bc repeat indicator */
+       TelSatTextInfo ccp1; /**< Configuration Capability Parameter 1 */
+       TelSatTextInfo ccp2; /**< Configuration Capability Parameter 2 */
+} TelSatCallCtrlIndSsData;
+
+/**
+ * This structure defines the common call control confirm data.
+ */
+typedef struct
+{
+       TelSatCallType call_ctrl_cnf_type; /**< call control confirm type - call, ss or ussd */
+       TelSatCallCtrlResultType call_ctrl_result; /**< call control result */
+       TelSatTextInfo disp_data; /**< call control display data */
+       gboolean is_user_info_display_enabled; /**< flag for checking existence of call control display */
+
+       union
+               {
+                       TelSatCallCtrlIndCallData call_ctrl_cnf_call_data; /**< call control call address */
+                       TelSatCallCtrlIndSsData call_ctrl_cnf_ss_data; /**< call control ss string */
+                       TelSatTextInfo call_ctrl_cnf_ussd_data; /**< call control ussd string */
+               }call_ctrl_data; /**< Union */
+} TelSatCallCtrlIndData;
+
+/**
+ * This structure defines the mo sms control confirm data.
+ */
+typedef struct
+{
+       TelSatCallCtrlResultType mo_sms_ctrl_result; /**< envelope result */
+       gboolean is_user_info_display_enabled; /**< display present flag */
+       TelSatTextTypeInfo disp_data; /**< display data for sending SMS */
+       TelSatTextTypeInfo rp_dest_addr; /**< the RP_Destination_Address of the Service Center */
+       TelSatTextTypeInfo tp_dest_addr; /**< the TP_Destination_Address */
+} TelSatMoSmCtrlIndData;
+
+/**
+ * This structure defines the Event List Info.
+ */
+typedef struct
+{
+       gboolean is_event_download_active; /**< Is Event Download Active */
+       gboolean is_mt_call_event; /**< Is Mt Call Event */
+       gboolean is_call_connected; /**< Is Call Connected */
+       gboolean is_call_disconnected; /**< Is Call Disconnected */
+       gboolean is_location_status; /**< Is Location Status */
+       gboolean is_user_activity;      /**< Is User Activity */
+       gboolean is_idle_screen_available;      /**< Is Idle Screen Available */
+       gboolean is_card_reader_status; /**< Is Card Reader Status */
+       gboolean is_language_selection; /**< Is Language Selection */
+       gboolean is_browser_termination;        /**< Is Browser Termination */
+       gboolean is_data_available; /**< Is Data Available */
+       gboolean is_channel_status; /**< Is Channel Status */
+} TelSatEventListData;
+
+/**
+ * This structure contains the data objects for MENU SELECTION envelope.
+ */
+typedef struct
+{
+       unsigned char item_identifier; /**< menu selection item identifier */
+       gboolean is_help_requested; /**< flag to check whether help information required or not */
+} TelSatMenuSelectionReqInfo;
+
+/**
+ * This struct contains the data objects for Call Control result data sent by USIM.
+ */
+typedef struct
+{
+       TelSatAddressInfo address; /**< call number */
+       TelSatSubAddressInfo sub_address; /**< call number sub address */
+       TelSatBcRepeatIndicatorType bc_repeat_indicator; /**< bc repeat indicator */
+       TelSatCcpInfo ccp1; /**< capability configuration parameter1 */
+       TelSatCcpInfo ccp2; /**< capability configuration parameter2 */
+}TelSatVoiceCallCtrlIndInfo;
+
+/**
+ * This struct contains SAT ss control result data sent by USIM.
+ */
+typedef struct
+{
+       TelSatSsStringInfo ss_string; /**< ss number */
+       TelSatSubAddressInfo sub_address; /**< ss sub address */
+       TelSatBcRepeatIndicatorType bc_repeat_indicator; /**< bc repeat indicator */
+       TelSatCcpInfo ccp1; /**< capability configuration parameter1 */
+       TelSatCcpInfo ccp2; /**< capability configuration parameter2 */
+}TelSatSsCtrlIndInfo;
+
+/**
+ * This struct contains SAT mo SMS control configuration data
+ */
+typedef struct
+{
+       TelSatAddressInfo rp_dest_address; /**< sms control rp destination address */
+       TelSatAddressInfo       tp_dest_address; /**<    sms control tp destination address */
+} TelSatMoSmsCtrlIndInfo;
+
+/**
+ * This struct contains SAT call control configuration data
+ */
+typedef struct
+{
+       TelSatCallType call_type; /**< call type */
+       TelSatCallCtrlResultType call_ctrl_result; /**< call control result     */
+       TelSatAlphaIdentifierInfo alpha_identifier; /**< alpha identifier */
+       unsigned char call_id; /**< call id */
+       TelSatCallType old_call_type; /**< old call type */
+       union
+       {
+               TelSatVoiceCallCtrlIndInfo      voice_call_data; /**< voice call control data */
+               TelSatSsCtrlIndInfo ss_data; /**< ss control data */
+               TelSatMoSmsCtrlIndInfo sms_data; /**< Mo Sms Ctrl Ind Info */
+       }call_ctrl_data; /**< Union */
+} TelSatCallCtrlIndInfo;
+
+/**
+ * This struct contains SAT mo ss control request data
+ */
+ typedef struct
+{
+       TelSatCallCtrlResultType call_ctrl_result; /**< call control result     */
+       TelSatAlphaIdentifierInfo alpha_identifier; /**< alpha identifier */
+       TelSatMoSmsCtrlIndInfo sms_data;        /**< sms control data */
+}TelSatMoSMCtrlResult;
+
+/**
+ * This struct contains SAT user activity event request data
+ */
+typedef struct
+{
+       TelSatEventListInfo event_list; /**< event List  */
+       TelSatDeviceIdentitiesInfo device_identities;   /**<    device identities info */
+
+} TelSatUserActivityEventReqInfo;
+
+/**
+ * This struct contains SAT data available event request data
+ */
+typedef struct
+{
+       TelSatEventListInfo event_list; /**< event List  */
+       TelSatDeviceIdentitiesInfo device_identities;   /**<    device identities info */
+       TelSatChannelStatusInfo channel_status; /**< channel status */
+       unsigned char channel_data_len; /**< channel data length */
+
+} TelSatDataAvailableEventReqInfo;
+
+/**
+ * This struct contains SAT channel status even request data
+ */
+typedef struct
+{
+       TelSatEventListInfo event_list; /**< event list */
+       TelSatDeviceIdentitiesInfo device_identities;   /**<    device identities info */
+       TelSatChannelStatusInfo channel_status; /**< channel Status */
+} TelSatChannelStatusEventReqInfo;
+
+/**
+ * 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
+{
+       TelSatEventListType event_download_type; /**< eventDownload Type */
+       union
+       {
+               gboolean is_idle_screen_available; /**< flag to specify whether Idle Screen is Available or not */
+               TelSatLanguageInfo language_selection_event_req_info; /**< Selected Language Information */
+               TelSatBrowserTerminationCauseType browser_termination_event_req_info; /**< BrowserTermination Event Information */
+               TelSatDataAvailableEventReqInfo data_available_event_req_info; /**< dataAvailableEventReqInfo */
+               TelSatChannelStatusEventReqInfo channel_status_event_req_info; /**< channelStatusEventReqInfo */
+       } event_download_data; /**< Union */
+} TelSatEventDownloadReqInfo;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_SAT SAT Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief Setup menu information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_SETUP_MENU
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_SETUP_MENU
+ *  @retval data reference to \ref TelSatSetupMenuInfo structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_SETUP_MENU                                        TELEPHONY_SAT_INTERFACE":SetupMenu"
+
+/**
+ *  @hideinitializer
+ *  @brief Display text information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_DISPLAY_TEXT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_DISPLAY_TEXT
+ *  @retval data reference to \ref TelSatDisplayTextInd structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_DISPLAY_TEXT                                      TELEPHONY_SAT_INTERFACE":DisplayText"
+
+/**
+ *  @hideinitializer
+ *  @brief Select item information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_SELECT_ITEM
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_SELECT_ITEM
+ *  @retval data reference to \ref TelSatSelectItemInd structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_SELECT_ITEM                                       TELEPHONY_SAT_INTERFACE":SelectItem"
+
+/**
+ *  @hideinitializer
+ *  @brief Get inkey information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_GET_INKEY
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_GET_INKEY
+ *  @retval data reference to \ref TelSatGetInkeyInd structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_GET_INKEY                                         TELEPHONY_SAT_INTERFACE":GetInkey"
+
+/**
+ *  @hideinitializer
+ *  @brief Get input information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_GET_INPUT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_GET_INPUT
+ *  @retval data reference to \ref TelSatGetInputInd structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_GET_INPUT                                         TELEPHONY_SAT_INTERFACE":GetInput"
+
+/**
+ *  @hideinitializer
+ *  @brief Refresh information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_REFRESH
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_REFRESH
+ *  @retval data reference to \ref TelSatRefreshInd structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_REFRESH                                           TELEPHONY_SAT_INTERFACE":Refresh"
+
+/**
+ *  @hideinitializer
+ *  @brief Send SMS information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_SEND_SMS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_SEND_SMS
+ *  @retval data reference to \ref TelSatSendSmsIndSmsData structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_SEND_SMS                                          TELEPHONY_SAT_INTERFACE":SendSMS"
+
+/**
+ *  @hideinitializer
+ *  @brief Setup event list information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_SETUP_EVENT_LIST
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_SETUP_EVENT_LIST
+ *  @retval data reference to \ref TelSatEventListData structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_SETUP_EVENT_LIST                          TELEPHONY_SAT_INTERFACE":SetupEventList"
+
+/**
+ *  @hideinitializer
+ *  @brief Send DTMF information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_SEND_DTMF
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_SEND_DTMF
+ *  @retval data reference to \ref TelSatSendDtmfIndDtmfData structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_SEND_DTMF                                         TELEPHONY_SAT_INTERFACE":SendDtmf"
+
+/**
+ *  @hideinitializer
+ *  @brief Session end event information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_SESSION_END_EVENT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_SESSION_END_EVENT
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_SESSION_END_EVENT                 TELEPHONY_SAT_INTERFACE":EndProactiveSession"
+
+/**
+ *  @hideinitializer
+ *  @brief Call control information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_CALL_CONTROL_RESULT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_CALL_CONTROL_RESULT
+ *  @retval data reference to \ref TelSatCallCtrlIndData structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_CALL_CONTROL_RESULT                       TELEPHONY_SAT_INTERFACE":CallControlResult"
+
+/**
+ *  @hideinitializer
+ *  @brief MO SM control information
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SAT_MO_SM_CONTROL_RESULT
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SAT_MO_SM_CONTROL_RESULT
+ *  @retval data reference to \ref TelSatMoSmCtrlIndData structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SAT_MO_SM_CONTROL_RESULT              TELEPHONY_SAT_INTERFACE":MoSmControlResult"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+ #endif /* __TEL_SAT_H_ */
diff --git a/include/common/tel_sim.h b/include/common/tel_sim.h
new file mode 100644 (file)
index 0000000..dc9082b
--- /dev/null
@@ -0,0 +1,703 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_SIM_H__
+#define __TEL_SIM_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_SIM
+*  @{
+*
+*  @file tel_sim.h
+*  @brief TAPI sim Interface
+*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define TELEPHONY_SIM_INTERFACE                 TELEPHONY_SERVICE".Sim"
+
+#define TEL_SIM_ICCID_LEN_MAX                  20      /**< Maximum ICCID Length */
+#define TEL_SIM_MSIN_LEN_MAX                   10      /**< Mobile Station Identification Number max length */
+#define TEL_SIM_MCC_MNC_LEN_MAX                        3       /**< MCC/MNC max length */
+
+#define TEL_SIM_PLMN_LEN_MAX                   6       /**< PLMN max length */
+#define TEL_SIM_SPN_LEN_MAX                    16      /**< Service Provider Name max length */
+
+#define TEL_SIM_ECC_NUMBER_LEN_MAX             6       /**< Emergency code max length */
+#define TEL_SIM_ECC_LIST_MAX                   16      /**< Emergency list max items */
+#define TEL_SIM_ECC_TEXT_MAX                   255     /**< Emergency alpha identifier max length */
+
+#define TEL_SIM_EXT_RECORD_CNT_MAX 15  /** EXT record count max length */
+#define TEL_SIM_OPL_PNN_RECORD_CNT_MAX 5 /* OPL PNN record count max  */
+#define TEL_SIM_NW_FULL_NAME_LEN_MAX 40 /* Full name length max */
+#define TEL_SIM_MBDN_NUM_LEN_MAX               20      /**< Max length of the Number supported*/
+#define TEL_SIM_ALPHA_ID_LEN_MAX               241     /**< Max length of the Alpha ID supported*/
+
+#define TEL_SIM_MSP_CNT_MAX                    4       /**< The Profile Identity shall be between 1and 4 as defined in TS 23.097 for MSP.*/
+
+#define TEL_SIM_AUTH_MAX_REQ_DATA_LEN          16      /**< Authentication code max length */
+#define TEL_SIM_AUTH_MAX_RESP_DATA_LEN         16      /**< Authentication response data max length */
+
+#define TEL_SIM_APDU_LEN_MAX                   261     /**< APDU max command length */
+#define TEL_SIM_APDU_RESP_LEN_MAX              258     /**< APDU max response length */
+#define TEL_SIM_ATR_LEN_MAX                    33      /**< Answer to Reset data max length */
+
+#define TEL_SIM_MAILBOX_TYPE_MAX               5       /**< Mailbox type count */
+#define TEL_SIM_CALL_FORWARDING_TYPE_MAX               5       /** Call forwarding type count */
+
+/**
+ * @enum TelSimResult
+ * Response (Return) values.
+ */
+typedef enum {
+       TEL_SIM_RESULT_SUCCESS, /**< Operation completed successfully */
+       TEL_SIM_RESULT_FAILURE, /**< Operation Failed */
+       TEL_SIM_RESULT_INVALID_PARAMETER, /**< Invalid input parameters */
+       TEL_SIM_RESULT_MEMORY_FAILURE, /**< Memory allocation failed */
+       TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED, /**< Operation not supported */
+
+       TEL_SIM_RESULT_CARD_ERROR,  /**< SIM card error - Permanently blocked and general errors   */
+       TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED, /**< SIM Incompatible pin operation that is in case when invalid SIM command is given or incorrect parameters are supplied to the SIM. */
+       TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION, /**< SIM PIN  Incorrect password */
+       TEL_SIM_RESULT_INCORRECT_PASSWORD, /**< SIM Incorrect password */
+       TEL_SIM_RESULT_PIN_REQUIRED, /**< PIN Required */
+       TEL_SIM_RESULT_PUK_REQUIRED, /**< PUK Required */
+       TEL_SIM_RESULT_PERM_BLOCKED, /**< Permanent block SIM */
+       TEL_SIM_RESULT_SQN_FAILURE, /**< status - SQN(SeQuenceNumber) failure */
+       TEL_SIM_RESULT_OPERATION_NOT_PERMITTED  /**< Operation not permitted */
+} TelSimResult;
+
+/**
+ * @enum TelSimCardType
+ * This enumeration defines the card type.
+ */
+typedef enum {
+       TEL_SIM_CARD_TYPE_UNKNOWN,      /**< Unknown card */
+       TEL_SIM_CARD_TYPE_GSM,          /**< 2G SIM(GSM) card */
+       TEL_SIM_CARD_TYPE_USIM,         /**< 3G USIM card */
+       TEL_SIM_CARD_TYPE_RUIM,         /**< CDMA based card */
+       TEL_SIM_CARD_TYPE_ISIM          /**< IMS based card */
+} TelSimCardType;
+
+typedef enum {
+       TEL_SIM_MWIS_NONE = 0x00, /**< MWIS none*/
+       TEL_SIM_MWIS_VOICE = 0x01, /**< MWIS voice*/
+       TEL_SIM_MWIS_FAX = 0x02, /**< MWIS FAX*/
+       TEL_SIM_MWIS_EMAIL = 0x04, /**< MWIS email*/
+       TEL_SIM_MWIS_OTHER = 0x08, /**< MWIS other*/
+       TEL_SIM_MWIS_VIDEO = 0x10, /**< MWIS video*/
+       TEL_SIM_MWIS_RFU = 0xff /**< MWIS RFU*/
+} TelSimMwisMask;
+
+/** * @enum TelSimFacilityStatus
+ * This enumeration defines the pin status.
+ */
+typedef enum {
+       TEL_SIM_FACILITY_STATUS_UNKNOWN = -1, /**< SIM facility UNKNOWN status*/
+       TEL_SIM_FACILITY_STATUS_DISABLED, /**< SIM facility DISABLED status*/
+       TEL_SIM_FACILITY_STATUS_ENABLED /**< SIM facility ENABLED status*/
+} TelSimFacilityStatus;
+
+/**
+ * @enum TelSimPinType
+ * This enumeration defines the pin type.
+ */
+typedef enum {
+       TEL_SIM_PIN_TYPE_PIN1, /**< PIN 1 code */
+       TEL_SIM_PIN_TYPE_PIN2 /**< PIN 2 code */
+} TelSimPinType;
+
+/**
+ * @enum TelSimPukType
+ * This enumeration defines the puk type.
+ */
+typedef enum {
+       TEL_SIM_PUK_TYPE_PUK1, /**< PUK 1 code */
+       TEL_SIM_PUK_TYPE_PUK2 /**< PUK 2 code */
+} TelSimPukType;
+
+/**
+ * @enum TelSimEccEmergencyServiceInfo
+ * This enumeration defines the emergency service type.
+ */
+typedef enum {
+       TEL_SIM_ECC_ESC_DEFAULT =               0x00, /**< DEFAULT */
+       TEL_SIM_ECC_ESC_POLICE =                0x01, /**< Police */
+       TEL_SIM_ECC_ESC_AMBULANCE =             0x02, /**< Ambulance */
+       TEL_SIM_ECC_ESC_FIREBRIGADE =           0x04, /**< Fire brigade */
+       TEL_SIM_ECC_ESC_MARINEGUARD =           0x08, /**< Marine guard */
+       TEL_SIM_ECC_ESC_MOUNTAINRESCUE =        0x10, /**< Mountain rescue */
+       TEL_SIM_ECC_ESC_MANUAL_ECALL =          0x20, /**< Manual Emergency call */
+       TEL_SIM_ECC_ESC_AUTO_ECALL =            0x40 /**< Automatic Emergency call */
+} TelSimEccEmergencyServiceInfo;
+
+/**
+ * @enum TelSimLanguagePreferenceCode
+ * This enumeration defines the language indication code.
+ */
+typedef enum {
+       TEL_SIM_LP_GERMAN =             0x00, /**< German */
+       TEL_SIM_LP_ENGLISH =            0x01, /**< English */
+       TEL_SIM_LP_ITALIAN =            0x02, /**< Italian */
+       TEL_SIM_LP_FRENCH =             0x03, /**< French */
+       TEL_SIM_LP_SPANISH =            0x04, /**< Spanish */
+       TEL_SIM_LP_DUTCH =              0x05, /**< Dutch */
+       TEL_SIM_LP_SWEDISH =            0x06, /**< Swedish */
+       TEL_SIM_LP_DANISH =             0x07, /**< Danish */
+       TEL_SIM_LP_PORTUGUESE =         0x08, /**< Portuguese */
+       TEL_SIM_LP_FINNISH =            0x09, /**< Finnish */
+       TEL_SIM_LP_NORWEGIAN =          0x0A, /**< Norwegian */
+       TEL_SIM_LP_GREEK =              0x0B, /**< Greek */
+       TEL_SIM_LP_TURKISH =            0x0C, /**< Turkish */
+       TEL_SIM_LP_HUNGARIAN =          0x0D, /**< Hungarian */
+       TEL_SIM_LP_POLISH =             0x0E, /**< Polish */
+       TEL_SIM_LP_KOREAN =             0x0F, /**< Korean */
+       TEL_SIM_LP_CHINESE =            0x10, /**< Chinese */
+       TEL_SIM_LP_RUSSIAN =            0x11, /**< Russian */
+       TEL_SIM_LP_JAPANESE =           0x12, /**< Japanese */
+       TEL_SIM_LP_LANG_UNSPECIFIED =   0xFF /**< Unspecified */
+} TelSimLanguagePreferenceCode;
+
+/**
+ * @enum TelSimCardStatus
+ * This enumeration defines the SIM card status
+ */
+typedef enum {
+       TEL_SIM_STATUS_UNKNOWN,                         /**<  Unknown status. It can be initial status **/
+       TEL_SIM_STATUS_CARD_ERROR,                      /**<  Bad card / On the fly SIM gone bad **/
+       TEL_SIM_STATUS_SIM_CARD_POWEROFF,       /**<  SIM Card Powered OFF **/
+       TEL_SIM_STATUS_CARD_NOT_PRESENT,        /**<  Card not present **/
+       TEL_SIM_STATUS_SIM_INITIALIZING,                /**<  SIM is Initializing state **/
+       TEL_SIM_STATUS_SIM_INIT_COMPLETED,      /**<  SIM Initialization COMPLETE **/
+       TEL_SIM_STATUS_SIM_PIN_REQUIRED,        /**<  PIN  required state **/
+       TEL_SIM_STATUS_SIM_PUK_REQUIRED,        /**<  PUK  required state **/
+       TEL_SIM_STATUS_CARD_BLOCKED,            /**<  PIN/PUK blocked(permanently blocked - All the attempts for PIN/PUK failed) **/
+       TEL_SIM_STATUS_SIM_NCK_REQUIRED,        /**<  Network Control Key required state **/
+       TEL_SIM_STATUS_SIM_NSCK_REQUIRED,       /**<  Network Subset Control Key required state **/
+       TEL_SIM_STATUS_SIM_SPCK_REQUIRED,       /**<  Service Provider Control Key required state **/
+       TEL_SIM_STATUS_SIM_CCK_REQUIRED,        /**<  Corporate Control Key required state **/
+       TEL_SIM_STATUS_CARD_REMOVED,            /**<  Card removed **/
+       TEL_SIM_STATUS_SIM_LOCK_REQUIRED        /**<  PH-SIM (phone-SIM) locked state **/
+} TelSimCardStatus;
+
+/**
+ * @enum TelSimCardChangeStatus
+ * This enumeration defines whether SIM card is changed or not
+ */
+typedef enum {
+       TEL_SIM_CHANGE_STATUS_UNKNOWN, /**< Unknown */
+       TEL_SIM_CHANGE_STATUS_SAME, /**< SIM card is same */
+       TEL_SIM_CHANGE_STATUS_CHANGED /**< SIM card is changed */
+} TelSimCardChangeStatus;
+
+/**
+ * @enum TelSimRefreshCommandType
+ * This enumeration defines the SIM card status
+ */
+typedef enum {
+       TEL_SIM_REFRESH_CMD_INIT_AND_FULL_FCN           = 0x00, /**<    command qualifier for REFRESH SIM INIT AND FULL FILE CHANGE_NOTIFICATION                */
+       TEL_SIM_REFRESH_CMD_FCN                                         = 0x01, /**<    command qualifier for REFRESH FILE CHANGE NOTIFICATION          */
+       TEL_SIM_REFRESH_CMD_INIT_AND_FCN                        = 0x02, /**<    command qualifier for REFRESH SIM INIT AND FILE CHANGE NOTIFICATION             */
+       TEL_SIM_REFRESH_CMD_INIT                                        = 0x03, /**<    command qualifier for REFRESH SIM INIT          */
+       TEL_SIM_REFRESH_CMD_RESET                                       = 0x04, /**<    command qualifier for REFRESH SIM RESET         */
+       TEL_SIM_REFRESH_CMD_3G_APPLICATION_RESET        = 0x05, /**<    command qualifier for REFRESH 3G APPLICATION RESET              */
+       TEL_SIM_REFRESH_CMD_3G_SESSION_RESET            = 0x06, /**<    command qualifier for REFRESH 3G SESSION RESET          */
+       TEL_SIM_REFRESH_CMD_UNSPECIFIED                         = 0xFF  /**<    command qualifier for REFRESH RESERVED          */
+}TelSimRefreshCommandType;
+
+/**
+ * @enum TelSimMailboxType
+ * This enum gives mailbox type.
+ */
+typedef enum {
+       TEL_SIM_MAILBOX_VOICE,  /**< Mailbox identifier voice */
+       TEL_SIM_MAILBOX_FAX,    /**< Mailbox identifier fax */
+       TEL_SIM_MAILBOX_EMAIL,  /**< Mailbox identifier email */
+       TEL_SIM_MAILBOX_OTHER,  /**< Mailbox identifier other */
+       TEL_SIM_MAILBOX_VIDEO   /**< Mailbox identifier video */
+} TelSimMailboxType;
+
+/**
+ * @enum TelSimCallForwardingType
+ * This enum gives Call forwarding type.
+ */
+typedef enum {
+       TEL_SIM_CALL_FORWARDING_VOICE,  /**< Call forwarding identifier voice */
+       TEL_SIM_CALL_FORWARDING_FAX,    /**< Call forwarding identifier fax */
+       TEL_SIM_CALL_FORWARDING_EMAIL,  /**< Call forwarding identifier email */
+       TEL_SIM_CALL_FORWARDING_OTHER,  /**< Call forwarding identifier other */
+       TEL_SIM_CALL_FORWARDING_VIDEO   /**< Call forwarding identifier video */
+} TelSimCallForwardingType;
+
+/**
+ * @enum TelSimAuthenticationType
+ * This is used for Authentication Procedure by using SIM.
+ */
+typedef enum {
+       TEL_SIM_AUTH_GSM, /**< GSM Authentication */
+       TEL_SIM_AUTH_GSM_CTX, /**< GSM CTX Authentication */
+       TEL_SIM_AUTH_3G_CTX, /**< 3G CTX Authentication */
+       TEL_SIM_AUTH_GBA, /**< GBA Authentication */
+       TEL_SIM_AUTH_GBA_NAF, /**< GBA NAF Authentication */
+       TEL_SIM_AUTH_IMS_AKA /**< IMS Authentication */
+} TelSimAuthenticationType;
+
+/**
+ * @enum TelSimLockType
+ *     This structure gives security lock type enum values
+ */
+typedef enum {
+       TEL_SIM_LOCK_PS,
+       /**< 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
+        */
+       TEL_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
+        */
+       TEL_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 */
+       TEL_SIM_LOCK_FD,
+       /**< FDN - SIM card or active application in the UICC (GSM or USIM)
+        *      fixed dialing memory feature */
+       TEL_SIM_LOCK_PN, /**< Network Personalization */
+       TEL_SIM_LOCK_PU, /**< Network subset Personalization */
+       TEL_SIM_LOCK_PP, /**< Service Provider Personalization */
+       TEL_SIM_LOCK_PC, /**< Corporate Personalization */
+} TelSimLockType;
+
+/**
+ * @enum TelSimLockStatus
+ * This structure gives security lock key information enum values
+ */
+typedef enum {
+       TEL_SIM_LOCK_KEY_NOT_NEED,      /**< key not need */
+       TEL_SIM_LOCK_KEY_PIN,           /**< PIN required */
+       TEL_SIM_LOCK_KEY_PUK,           /**< PUK required */
+       TEL_SIM_LOCK_KEY_PIN2,          /**< PIN2 required */
+       TEL_SIM_LOCK_KEY_PUK2,          /**< PUK2 required */
+       TEL_SIM_LOCK_PERM_BLOCKED       /**< Permanent block SIM */
+} TelSimLockStatus;
+
+/**
+ * @enum TelSimSpnDispCondition
+ * This enumeration defines Service Provider Name display condition type.
+ */
+typedef enum
+{
+       TEL_SIM_DISP_INVALID, /**< Invalid display condition */
+       TEL_SIM_DISP_SPN, /**< SPN display condition */
+       TEL_SIM_DISP_PLMN, /**< PLMN display condition */
+       TEL_SIM_DISP_SPN_PLMN /**< SPN/PLMN display condition */
+} TelSimSpnDispCondition;
+
+/**
+ * This data structure defines plmn informations
+ */
+typedef struct {
+       unsigned int index;     /**< Plmn list index */
+       char *plmn;             /**< numeric operator name (MCCMNC) */
+} TelSimSpPlmn;
+
+/**
+ * This data structure defines plmn list
+ */
+typedef struct {
+       unsigned int count;     /**< Number of service provider plmns in the list */
+       TelSimSpPlmn *list;     /**< service provider plmns list */
+} TelSimSpPlmnList;
+
+/**
+ * This data structure defines the status of sim initialization
+ */
+typedef struct {
+       TelSimCardStatus status; /**< Sim card status */
+       TelSimCardChangeStatus change_status; /**< Sim card change status */
+} TelSimCardStatusInfo;
+
+/**
+ * This data structure defines the data for the Imsi information.
+ */
+typedef struct {
+       char mcc[TEL_SIM_MCC_MNC_LEN_MAX + 1];  /**< mobile country code 3 digits*/
+       char mnc[TEL_SIM_MCC_MNC_LEN_MAX + 1];  /**< mobile network code 2 or 3 digits*/
+       char msin[TEL_SIM_MSIN_LEN_MAX + 1];    /**< Mobile Station Identification Number */
+} TelSimImsiInfo;
+
+/**
+ * This data structure defines the data for the SIM ECC information.
+ */
+typedef struct {
+       char number[TEL_SIM_ECC_NUMBER_LEN_MAX + 1];    /**< Emergency Call Code. null termination used*/
+       char name[TEL_SIM_ECC_TEXT_MAX + 1];            /**< Alpha identifier */
+       TelSimEccEmergencyServiceInfo category;         /**< ECC emergency service information */
+} TelSimEcc;
+
+/**
+ * This data structure defines the data for the SIM ECC lists.
+ */
+typedef struct {
+       unsigned int count; /**< Total count for ECC list */
+       TelSimEcc list[TEL_SIM_ECC_LIST_MAX];   /**< List of emergency numbers */
+} TelSimEccList;
+
+typedef struct {
+       int ext_len;
+       char ext[TEL_SIM_EXT_RECORD_CNT_MAX + 1];
+       unsigned short next_record;
+} TelSimExt;
+
+typedef struct {
+       unsigned char plmn[6+1];
+       unsigned short lac_from;
+       unsigned short lac_to;
+       unsigned char rec_identifier;
+} TelSimOpl;
+
+typedef struct {
+       int opl_count;
+       TelSimOpl list[TEL_SIM_OPL_PNN_RECORD_CNT_MAX];
+} TelSimOplList;
+
+typedef struct {
+       unsigned char full_name[TEL_SIM_NW_FULL_NAME_LEN_MAX + 1];
+       unsigned char short_name[TEL_SIM_NW_FULL_NAME_LEN_MAX + 1];
+} TelSimPnn;
+
+typedef struct {
+       int pnn_count;
+       TelSimPnn list[TEL_SIM_OPL_PNN_RECORD_CNT_MAX];
+} TelSimPnnList;
+
+typedef struct {
+       unsigned char profile_id;               /**< Profile Identity of the subscriber profile*/
+       TelSimMailboxType mb_type;      /**< Mailbox type */
+       unsigned int alpha_id_len; /**< Mailbox Alpha Identifier length */
+       char alpha_id[TEL_SIM_ALPHA_ID_LEN_MAX]; /**< Mailbox Alpha Identifier */
+       char number[TEL_SIM_MBDN_NUM_LEN_MAX]; /**< Dialing Number/SSC String */
+} TelSimMailBoxNumber;
+
+/**
+ * This data structure defines the data for the Mailbox lists.
+ */
+typedef struct {
+       unsigned int alpha_id_max_len;          /**< Alpha id max length in SIM */
+       unsigned int count;                                     /**< Number of mailbox count*/
+       TelSimMailBoxNumber list[TEL_SIM_MSP_CNT_MAX * TEL_SIM_MAILBOX_TYPE_MAX]; /**< Mailbox list info */
+} TelSimMailboxList;
+
+/**
+ * This data structure defines the data for the Call Forwarding.
+ */
+typedef struct {
+       unsigned char profile_id;       /**< Profile Identity of the subscriber profile*/
+       gboolean indication[TEL_SIM_CALL_FORWARDING_TYPE_MAX]; /**< 0: voice , 1 : fax, 2 : email, 3:other, 4 :video */
+} TelSimCfis;
+
+/**
+ * This data structure defines the data for the Call Forwarding lists.
+ */
+typedef struct {
+       unsigned int profile_count; /**< Call forwarding list count in SIM */
+       TelSimCfis cf[TEL_SIM_MSP_CNT_MAX]; /**< Call forwarding list info in SIM */
+} TelSimCfisList;
+
+/**
+ * This data structure defines indication status for the Message Waiting.
+ */
+ typedef struct {
+       gboolean indication; /**< indication status for the Message Waiting */
+       unsigned char count; /**< indication count for the Message Waiting */
+} TelSimMsgWaitingIndicator;
+
+/**
+ * This data structure defines the data for the Message Waiting.
+ */
+typedef struct {
+       unsigned char profile_id; /**< Profile Identity of the subscriber profile */
+       gboolean count_valid; /**< whether count is valid or not (in case of cphs, count is not valid) */
+       TelSimMsgWaitingIndicator msg_waiting[TEL_SIM_MAILBOX_TYPE_MAX]; /**< 0: voice , 1 : fax, 2 : email, 3:other, 4 :video */
+} TelSimMwis;
+
+/**
+ * This data structure defines the data for the Message Waiting lists.
+ */
+typedef struct {
+       unsigned int profile_count; /**< Message waiting list count in SIM */
+       TelSimMwis mw[TEL_SIM_MSP_CNT_MAX]; /**< Message waiting list info in SIM */
+} TelSimMwisList;
+
+/**
+ * This data structure defines the data for the MSISDN.
+ */
+typedef struct {
+       char *alpha_id; /**< MSISDN Alpha Identifier. If not exist, Null string will be returned */
+       char *num;  /**< MSISDN number. If not exist, Null string will be returned*/
+} TelSimSubscriberInfo;
+
+/**
+ * This data structure defines the data for the MSISDN lists.
+ */
+typedef struct {
+       unsigned int count; /**< MSISDN list count in SIM */
+       TelSimSubscriberInfo *list; /**< MSISDN list info in SIM */
+} TelSimMsisdnList;
+
+/**
+ * This data structure defines the data for the SPN.
+ */
+typedef struct {
+       TelSimSpnDispCondition display_condition;       /**< display condition */
+       char spn[TEL_SIM_SPN_LEN_MAX + 1];              /**< SPN */
+} TelSimSpn;
+
+/**
+ * This data structure defines the data for the CPHS Network Name.
+ */
+typedef struct {
+       char *full_name; /**< Short Network Operator Name */
+       char *short_name; /**< Long Network Operator Name */
+}TelSimCphsNetName;
+
+typedef struct {
+       TelSimResult result;
+       union {
+               TelSimEccList ecc;
+               TelSimLanguagePreferenceCode language;
+               char iccid[TEL_SIM_ICCID_LEN_MAX + 1];
+               TelSimMailboxList mb;
+               TelSimCfisList cf;
+               TelSimMwisList mw;
+               TelSimMsisdnList msisdn_list;
+               TelSimSpn spn;
+               TelSimOplList opl;
+               TelSimPnnList pnn;
+               TelSimSpPlmnList spdi;
+               TelSimCphsNetName cphs_net;
+       } data;
+} TelSimFileResult;
+
+typedef struct {
+       /*      '00' - no mailbox dialing number associated with message waiting indication group type.
+        'xx' - record number in EFMBDN associated with message waiting indication group type.
+        */
+       int voice_index;        /**< voice mailbox identifier*/
+       int fax_index;  /**< FAX mailbox identifier*/
+       int email_index;        /**< email mailbox identifier*/
+       int other_index;        /**< other mailbox identifier*/
+       int video_index;        /**< video mailbox identifier*/
+} TelSimMbi;
+
+/**
+ *This is used for authentication request procedure.
+ */
+typedef struct {
+       TelSimAuthenticationType auth_type;             /**< Authentication type */
+       unsigned int rand_length;                       /**< the length of RAND */
+       unsigned int autn_length;                       /**< the length of AUTN. it is not used in case of GSM AUTH */
+       char rand_data[TEL_SIM_AUTH_MAX_REQ_DATA_LEN];  /**< RAND data */
+       char autn_data[TEL_SIM_AUTH_MAX_REQ_DATA_LEN];  /**< AUTN data. it is not used in case of GSM AUTH */
+} TelSimAuthenticationData;
+
+/**
+ * @enum TelSimAuthenticationResult
+ * This is used to get detailed result for Authentication Procedure.
+ */
+typedef enum {
+       TEL_SIM_AUTH_NO_ERROR = 0x00, /**< ISIM no error */
+       TEL_SIM_AUTH_CANNOT_PERFORM, /**< status - can't perform authentication */
+       TEL_SIM_AUTH_SKIP_RESPONSE, /**< status - skip authentication response */
+       TEL_SIM_AUTH_MAK_CODE_FAILURE, /**< status - MAK(Multiple Activation Key) code failure */
+       TEL_SIM_AUTH_SQN_FAILURE, /**< status - SQN(SeQuenceNumber) failure */
+       TEL_SIM_AUTH_SYNCH_FAILURE, /**< status - synch failure */
+       TEL_SIM_AUTH_UNSUPPORTED_CONTEXT, /**< status - unsupported context */
+       TEL_SIM_AUTH_UNSPECIFIED /**< Unspecified error */
+} TelSimAuthenticationResult;
+
+/**
+ * This is used for result data of authentication.
+ */
+typedef struct {
+       TelSimAuthenticationType auth_type;                             /**< authentication type */
+       TelSimAuthenticationResult detailed_result;             /**<Detailed result for authentication procedure*/
+       unsigned int resp_length;                                       /**< response length. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
+       char resp_data[TEL_SIM_AUTH_MAX_RESP_DATA_LEN];                 /**< response data. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
+       unsigned int authentication_key_length;                         /**< the length of authentication key, Kc*/
+       char authentication_key[TEL_SIM_AUTH_MAX_RESP_DATA_LEN];        /**< the data of of authentication key, Kc*/
+       unsigned int cipher_length;                                     /**< the length of cipher key length */
+       char cipher_data[TEL_SIM_AUTH_MAX_RESP_DATA_LEN];               /**< cipher key */
+       unsigned int integrity_length;                                  /**< the length of integrity key length */
+       char integrity_data[TEL_SIM_AUTH_MAX_RESP_DATA_LEN];            /**< integrity key */
+} TelSimAuthenticationResponse;
+
+/**
+ * @enum TelSimPowerState
+ * This enumeration defines the power state of SIM.
+ */
+typedef enum {
+       TEL_SIM_POWER_OFF = 0x00, /**< OFF */
+       TEL_SIM_POWER_ON = 0x01, /**< ON */
+       TEL_SIM_POWER_UNSPECIFIED = 0xFF /**< Unspecified */
+} TelSimPowerState;
+
+/**
+ * This is used to verify PIN code.
+ */
+typedef struct {
+       TelSimPinType pin_type; /**< Specifies the PIN type */
+       char *pw;               /**< Pin password*/
+} TelSimSecPinPw;
+
+/**
+ * This is used to verify PUK code.
+ */
+typedef struct {
+       TelSimPukType puk_type; /**< Specifies the PUK type */
+       char *puk_pw;           /**< Puk password */
+       char *new_pin_pw;       /**< New corresponding pin password */
+} TelSimSecPukPw;
+
+/**
+ * This is used to change PIN code .
+ */
+typedef struct {
+       TelSimPinType pin_type; /**< Specifies the PIN type */
+       char *old_pw;           /**< Current password */
+       char *new_pw;           /**< New pin password */
+} TelSimSecChangePinPw;
+
+/**
+ * This is used to PIN code verification.
+ */
+typedef struct {
+       TelSimPinType pin_type;         /**< Specifies the PIN type */
+       unsigned int retry_count;       /**< Number of attempts remaining for PIN verification */
+} TelSimSecPinResult;
+
+/**
+ * This is used to PUK code verification.
+ */
+typedef struct {
+       TelSimPukType puk_type;         /**< Specifies the PUK type */
+       unsigned int retry_count;       /**< Number of attempts remaining for PUK verification */
+} TelSimSecPukResult;
+
+/**
+ * This structure is used to enable/disable facility
+ */
+typedef struct {
+       TelSimLockType lock_type;       /**< Facility type */
+       char *pw;                       /**< password */
+} TelSimFacilityPw;
+
+/**
+ * This structure is used to PIN/PUK verification
+ */
+typedef struct {
+       TelSimLockType type;            /**< Specifies the PIN or PUK type.*/
+       unsigned int retry_count;       /**< Number of attempts remaining for PIN/PUK verification.*/
+} TelSimFacilityResult;
+
+/**
+ * This structure is used to enable/disable facility
+ */
+typedef struct {
+       TelSimLockType type; /**< Security lock type */
+       TelSimFacilityStatus f_status; /**< Lock status (enable/disable) */
+}TelSimFacilityInfo;
+
+/**
+ *
+ * This structure is used to get information about LOCK_TYPE
+ */
+typedef struct {
+       TelSimLockType lock_type;       /**< Lock type */
+       TelSimLockStatus lock_status;   /**< Lock key */
+       unsigned int retry_count;       /**< retry counts */
+} TelSimLockInfo;
+
+/**
+ * This data structure defines the data for the apdu command.
+ */
+typedef struct {
+       unsigned int apdu_len; /**<  SIM APDU length */
+       unsigned char apdu[TEL_SIM_APDU_LEN_MAX]; /**<  SIM APDU data */
+} TelSimApdu;
+
+/**
+ * This data structure defines the data for the Response of sending apdu.
+ */
+typedef struct {
+       unsigned int apdu_resp_len; /**< Response apdu data length */
+       unsigned char apdu_resp[TEL_SIM_APDU_RESP_LEN_MAX]; /**< Response apdu data */
+} TelSimApduResp;
+
+/**
+ * This data structure defines the data for the Response of ATR request.
+ */
+typedef struct {
+       unsigned int atr_len; /**<  SIM ATR data length */
+       unsigned char atr[TEL_SIM_ATR_LEN_MAX]; /**<  SIM ATR data */
+} TelSimAtr;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_SIM SIM Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief SIM status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SIM_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SIM_STATUS
+ *  @retval data \ref TelSimCardStatus
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SIM_STATUS                            TELEPHONY_SIM_INTERFACE":card_status"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+#endif /* __TEL_SIM_H__ */
diff --git a/include/common/tel_sms.h b/include/common/tel_sms.h
new file mode 100644 (file)
index 0000000..18b93e0
--- /dev/null
@@ -0,0 +1,332 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_SMS_H__
+#define __TEL_SMS_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_SMS
+*  @{
+*
+*  @file tel_sms.h
+*  @brief TAPI sms Interface
+*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define TELEPHONY_SMS_INTERFACE         TELEPHONY_SERVICE".Sms"
+
+#define TEL_SMS_SCA_LEN_MAX            20      /**< Maximum length of SCA (in string format)*/
+
+#define TEL_SMS_CB_DATA_SIZE_MAX       88      /**< Maximum CB Message Size. Cell broadcast message data [Refer 3GPP TS 23.041 9.4.1] */
+#define TEL_SMS_ETWS_DATA_SIZE_MAX     1252 /**< Maximum ETWS Message Size */
+
+#define TEL_SMS_GSM_MSG_NUM_MAX                255     /**< Maximum GSM SMS message number*/
+#define TEL_SMS_GSM_CBMI_LIST_SIZE_MAX 50      /**< Maximum GSM SMS CBMI list size*/
+#define TEL_SMS_SMDATA_SIZE_MAX                164     /**< Maximum SMS data size that can be stored*/
+
+/**
+ * @enum TelSmsMsgStatus
+ * This enumeration defines the sms Response (Result) codes.
+ */
+typedef enum {
+       TEL_SMS_STATUS_MT_READ, /**< MT message, stored and read */
+       TEL_SMS_STATUS_MT_UNREAD,       /**< MT message, stored and unread */
+       TEL_SMS_STATUS_MO_SENT, /**< MO message, stored and  sent */
+       TEL_SMS_STATUS_MO_NOT_SENT,     /**< MO message, stored but not sent */
+       TEL_SMS_STATUS_MO_DELIVERED, /**< delivered destination */
+       TEL_SMS_STATUS_MO_DELIVERY_NOT_CONFIRMED, /**< Service centre forwarded message but is unable to confirm delivery*/
+       TEL_SMS_STATUS_REPLACED /**< Message has been replaced*/
+} TelSmsMsgStatus;
+
+
+/**
+* @enum TelSmsCbMsgType
+* This enumeration defines the different CB message types.
+*/
+typedef enum {
+       TEL_SMS_CB_MSG_GSM,     /**< GSM Cell broadcast message */
+       TEL_SMS_CB_MSG_UMTS     /**< UMTSCell broadcast message */
+} TelSmsCbMsgType;
+
+/**
+* @enum TelSmsEtwsMsgType
+* This enumeration defines the different ETWS message types.
+*/
+typedef enum {
+       TEL_SMS_ETWS_PRIMARY,    /**< Primary ETWS message */
+       TEL_SMS_ETWS_SECONDARY_GSM,     /**< GSM Secondary ETWS message  */
+       TEL_SMS_ETWS_SECONDARY_UMTS     /**< UMTS Secondary ETWS message  */
+} TelSmsEtwsMsgType;
+
+/**
+ * @enum TelSmsResult
+ * This enum defines the different SMS error causes that come in the
+ * sent status acknowledgement/notification after sending a message to the network
+ */
+typedef enum {
+       TEL_SMS_RESULT_SUCCESS, /**< Operation completed successfully */
+       TEL_SMS_RESULT_FAILURE, /**< Operation Failed */
+       TEL_SMS_RESULT_INVALID_PARAMETER,       /**< Invalid input parameters */
+       TEL_SMS_RESULT_MEMORY_FAILURE,   /**< Memory allocation failed */
+       TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED, /**< Operation not supported */
+       TEL_SMS_RESULT_UNKNOWN_FAILURE, /**< Unknown failure */
+
+       TEL_SMS_RESULT_INVALID_MANDATORY_INFO,  /**< Invalid format for some parameters passed in Data package information(TPDU)*/
+       TEL_SMS_RESULT_NETWORK_CONGESTION,      /**< SMS SIM operation cannot be performed due to Network Congestion */
+       TEL_SMS_RESULT_SIM_FAILURE,     /**< SMS SIM operation cannot be performed due to SIM failure */
+       TEL_SMS_RESULT_NETWORK_FAILURE, /**< SMS SIM operation cannot be performed due to Network failure */
+       TEL_SMS_RESULT_OPERATION_NOT_PERMITTED  /** Operation not permitted */
+} TelSmsResult;
+
+/**
+ * This structure defines the properties of a dialing number
+ * Type of Number, Numbering Plan Indicator and the actual number.
+ */
+typedef struct {
+       unsigned char ton; /**< Type of number*/
+       unsigned char npi; /**<Numbering plan identification*/
+       char number[TEL_SMS_SCA_LEN_MAX + 1]; /**< Destination address */
+} TelSmsSca;
+
+/**
+ * This structure defines the different parameters of  CB configuration
+ */
+typedef struct {
+       unsigned short from_msg_id; /**< Starting point of the range of CBS message ID */
+       unsigned short to_msg_id; /**< Ending point of the range of CBS message ID */
+       gboolean selected;      /**< 0x00 . Not selected. 0x01 . Selected */
+} TelSmsCbMsgInfo3gpp;
+
+/**
+ * This structure defines the different parameters of  CB configuration informations
+ */
+typedef struct {
+       gboolean cb_enabled; /**< CB service state. If cb_enabled is true then cell broadcast service will be enabled and
+                                               * underlying modem will enable CB Channel to receiving CB messages. Otherwise CB service
+                                               * will be disabled, underlying modem will deactivate the CB channel. (enabled/disabled) */
+       unsigned int msg_id_range_cnt;  /**< Range of CB message ID count */
+       TelSmsCbMsgInfo3gpp msg_ids[TEL_SMS_GSM_CBMI_LIST_SIZE_MAX]; /**< Range of CB message ID information */
+} TelSmsCbConfigInfo;
+
+/**
+ * This structure defines different fields involved in setting the parameters of
+ * a particular sms in EFsmsp.
+ */
+typedef struct {
+       unsigned int index; /**< Index */
+       TelSmsSca sca; /**< Service Centre Address info */
+       unsigned short vp; /**< Validity Period */
+} TelSmsParamsInfo;
+
+/**
+ * This structure defines different fields involved in getting the sms parameters
+ */
+typedef struct {
+       unsigned int count; /**< SMS parameter count */
+       TelSmsParamsInfo *params; /**< SMS parameter informations */
+} TelSmsParamsInfoList;
+
+/**
+ * This structure defines the fields related to an Sms like SIM index, TPDU
+ * and length.
+ */
+typedef struct {
+       TelSmsSca sca; /**< Service Centre Address info */
+       unsigned int tpdu_length; /**< Size of array tpdu (which is actual TPDU message) */
+       unsigned char tpdu[TEL_SMS_SMDATA_SIZE_MAX]; /**< SMS TPDU message */
+} TelSmsDatapackageInfo;
+
+/**
+ *This structure defines the data Related to MessageStatus and SMS Data Stored.
+ */
+typedef struct {
+       TelSmsMsgStatus status; /**< Message status.*/
+       TelSmsDatapackageInfo data; /**<SMS message data*/
+} TelSmsSimDataInfo;
+
+/**
+ *This structure defines the data Related to SMS Data to be send.
+ */
+typedef struct {
+       gboolean more_msgs; /**< More messages to be send exist */
+       TelSmsDatapackageInfo send_data; /**<SMS message data*/
+} TelSmsSendInfo;
+
+/**
+ *This structure defines the data Related to set message status
+ */
+typedef struct {
+       unsigned int index; /**< Index where message status to be set */
+       TelSmsMsgStatus status; /**< Message status.*/
+} TelSmsStatusInfo;
+
+/**
+ * @enum TelSmsDeliveryReport
+ * This enum defines the error causes for delivery report
+ */
+typedef enum {
+       TEL_SMS_DELIVERY_REPORT_SUCCESS,  /**<Message was sent successfully*/
+       TEL_SMS_DELIVERY_REPORT_MEMORY_ERROR,   /**< Memory capacity exceeded/memory full*/
+       TEL_SMS_DELIVERY_REPORT_UNSPECIFIED_ERROR       /**<Unspecified error */
+} TelSmsDeliveryReport;
+
+/**
+ *This structure defines the SMS delivery report information
+ */
+typedef struct {
+       TelSmsDeliveryReport report;    /**<Delivery report response types*/
+       TelSmsDatapackageInfo data;     /**<SMS data */
+} TelSmsDeliverReportInfo;
+
+/**
+ * This structure defines the different parameters that are related to the message count
+ * in a particular memory(Phone/SIM)
+ */
+typedef struct {
+       unsigned int total_count;       /**< Total count of messages stored in SIM*/
+       unsigned int used_count;        /**< Stored message count in SIM in SIM*/
+       unsigned int index_list[TEL_SMS_GSM_MSG_NUM_MAX]; /**< Message index list stored in SIM. And the maximum
+                                                                                                          *size of this array can be of totalCount.This array contains the
+                                                                                                          *list of index values in which the messages are stored.
+                                                                                                          *i.e. index_list[totalcount] = [2,3] denotes that indexs
+                                                                                                          *2 and 3 are stored(valid) and others not(empty).
+                                                                                                          */
+} TelSmsStoredMsgCountInfo;
+
+/**
+ * This structure defines a cell broadcast message.
+ */
+typedef struct {
+       TelSmsCbMsgType cb_type;        /**< Cell Broadcast  message type */
+       unsigned int length;    /**<Length of cb_data (which is actual TPDU message) */
+       unsigned char *cb_data;  /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
+} TelSmsCbMsgInfo;
+
+/**
+ * This structure defines a ETWS message.
+ */
+typedef struct {
+       TelSmsEtwsMsgType etws_type;    /**< Cell Broadcast  message type */
+       unsigned int length;    /**<Length of etws_data (which is actual TPDU message) */
+       unsigned char *etws_data;       /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
+} TelSmsEtwsMsgInfo;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_SMS SMS Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief Incoming Message
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SMS_INCOM_MSG
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SMS_INCOM_MSG
+ *  @retval data reference to \ref TelSmsDatapackageInfo structure
+ *  @retval user_data user data passed while registering the event
+ */
+ #define TEL_NOTI_SMS_INCOM_MSG                        TELEPHONY_SMS_INTERFACE":IncomingMsg"
+
+/**
+ *  @hideinitializer
+ *  @brief Incoming CB Message
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SMS_CB_INCOM_MSG
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SMS_CB_INCOM_MSG
+ *  @retval data reference to \ref TelSmsCbMsgInfo structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SMS_CB_INCOM_MSG                      TELEPHONY_SMS_INTERFACE":IncomingCbMsg"
+
+/**
+ *  @hideinitializer
+ *  @brief Incoming ETWS Message
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SMS_ETWS_INCOM_MSG
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SMS_ETWS_INCOM_MSG
+ *  @retval data reference to \ref TelSmsEtwsMsgInfo structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SMS_ETWS_INCOM_MSG            TELEPHONY_SMS_INTERFACE":IncomingEtwsMsg"
+
+/**
+ *  @hideinitializer
+ *  @brief SIM memory status for SMS
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SMS_SIM_MEMORY_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SMS_SIM_MEMORY_STATUS
+ *  @retval data <b>TRUE</b>: Memory available\n <b>FALSE</b>: Memory NOT available
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SMS_SIM_MEMORY_STATUS         TELEPHONY_SMS_INTERFACE":SimMemoryStatus"
+
+/**
+ *  @hideinitializer
+ *  @brief SMS init status
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SMS_INIT_STATUS
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SMS_INIT_STATUS
+ *  @retval data <b>TRUE</b>: SMS is Initialized\n <b>FALSE</b>: SMS is NOT initialized
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SMS_INIT_STATUS                       TELEPHONY_SMS_INTERFACE":InitStatus"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+
+#endif  /* __TEL_SMS_H__ */
diff --git a/include/common/tel_ss.h b/include/common/tel_ss.h
new file mode 100644 (file)
index 0000000..e2fafb2
--- /dev/null
@@ -0,0 +1,421 @@
+/*
+ * tel-headers
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TEL_SS_H__
+#define __TEL_SS_H__
+
+#include <tel_if.h>
+
+/**
+*  @addtogroup TAPI_SS
+*  @{
+*
+*  @file tel_ss.h
+*  @brief TAPI Ss Interface
+*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define TELEPHONY_SS_INTERFACE TELEPHONY_SERVICE".Ss"
+
+/** Maximum Barring Password length */
+#define TEL_SS_BARRING_PASSWORD_LEN_MAX 4      /**<Maximum length of barring password */
+
+/** Maximum Call Forwarding Number length */
+#define TEL_SS_NUMBER_LEN_MAX 82       /**<Maximum Call Forwarding Number length */
+
+ /**
+ * @enum TelSsResult
+ * This enumeration defines the ss Response (Result) codes
+ */
+ typedef enum {
+       TEL_SS_RESULT_SUCCESS,                                  /**< Operation completed successfully */
+       TEL_SS_RESULT_FAILURE,                                  /**< Operation failed */
+       TEL_SS_RESULT_INVALID_PARAMETER,                /**< Invalid input parameters */
+       TEL_SS_RESULT_MEMORY_FAILURE,                   /**< Memory allocation falied */
+       TEL_SS_RESULT_OPERATION_NOT_SUPPORTED,/**< Operation is not supported */
+       TEL_SS_RESULT_SERVICE_NOT_AVAILABLE,    /**< Service is not available */
+       TEL_SS_RESULT_OPERATION_NOT_ALLOWED,    /**< Operation is not allowed currently */
+       TEL_SS_RESULT_INCORRECT_OPERATION,              /**< Incorrect Operation */
+       TEL_SS_RESULT_INVALID_PASSWORD,                 /**< Password is invalid */
+       TEL_SS_RESULT_PASSWORD_BLOCKED,                 /**< Password blocked */
+       TEL_SS_RESULT_UNKONWN_ALPHABET,         /**< SS error indicating unknown SS data coding of alphabet */
+       TEL_SS_RESULT_OPERATION_NOT_PERMITTED   /**< Operation not permitted */
+} TelSsResult;
+
+/**
+ * @enum TelSsClass
+ * This enumeration defines the Ss Class Information.
+ */
+typedef enum {
+       TEL_SS_CLASS_ALL_TELE_BEARER = 0,
+       /* TELESERVICE */
+       TEL_SS_CLASS_ALL_TELE = 10,                     /**< 0x10 : All Teleservices */
+       TEL_SS_CLASS_VOICE = 11,                                /**< 0x11 : All Voice ( telephony ) */
+       TEL_SS_CLASS_ALL_DATA_TELE = 12,                /**< 0x12 : All Data Teleservices */
+       TEL_SS_CLASS_FAX = 13,                                  /**< 0x13 : All Fax Service */
+       TEL_SS_CLASS_SMS = 16,                                  /**< 0x16 : SMS service  */
+       TEL_SS_CLASS_VGCS = 17,                         /**< 0x17 : Voice Group Call Service */
+       TEL_SS_CLASS_VBS = 18,                                  /**< 0x18 : Voice Broadcast */
+       TEL_SS_CLASS_ALL_TELE_EXPT_SMS = 19,    /**< 0x19 : All teleservice except SMS */
+
+       /* BEARER SERVICE */
+       TEL_SS_CLASS_ALL_BEARER = 20,                   /**< 0X20 : all bearer services */
+       TEL_SS_CLASS_ALL_ASYNC = 21,                    /**< 0x21 : All Async services */
+       TEL_SS_CLASS_ALL_SYNC = 22,                     /**< 0x21 : All Async services */
+       TEL_SS_CLASS_ALL_CS_SYNC = 24,          /**< 0x24 : All Circuit switched sync */
+       TEL_SS_CLASS_ALL_CS_ASYNC = 25,         /**< 0x25 : All Circuit switched async */
+       TEL_SS_CLASS_ALL_DEDI_PS = 26,          /**< 0x26 : All Dedicated packet Access */
+       TEL_SS_CLASS_ALL_DEDI_PAD = 27,         /**< 0x27 : All Dedicated PAD Access */
+       TEL_SS_CLASS_ALL_DATA_CDA = 28,         /**< 0x28 : All Data CDA*/
+
+       /* CPHS - AUXILIARY SERVICE */
+       TEL_SS_CLASS_AUX_VOICE = 89,                    /**< 0x89 : All Auxiliary Voice ( Auxiliary telephony ) */
+
+       TEL_SS_CLASS_ALL_GPRS_BEARER = 99,      /**< 0x99 : All GPRS bearer services */
+} TelSsClass;
+
+/**
+ * @enum TelSsBarringType
+ * This enumeration defines the Call Barring Types
+ */
+typedef enum {
+       TEL_SS_CB_TYPE_BAOC, /**< All Outgoing calls */
+       TEL_SS_CB_TYPE_BOIC, /**< Outgoing international calls */
+       TEL_SS_CB_TYPE_BOIC_NOT_HC, /**< Outgoing international calls except
+                                       to Home Country */
+       TEL_SS_CB_TYPE_BAIC, /**< All Incoming Calls */
+       TEL_SS_CB_TYPE_BIC_ROAM, /**< Incoming Calls when roam */
+       TEL_SS_CB_TYPE_NS, /**< Incoming calls from numbers Not stored to SIM */
+       TEL_SS_CB_TYPE_AB,  /**< All barring services */
+       TEL_SS_CB_TYPE_AOB, /**< All outgoing barring services */
+       TEL_SS_CB_TYPE_AIB, /**< All incoming barring services */
+} TelSsBarringType;
+
+/**
+ * @enum TelSsForwardCondition
+ * This enumeration defines the Call Forwarding Condition
+ */
+typedef enum {
+       TEL_SS_CF_COND_CFU, /**< Unconditional */
+       TEL_SS_CF_COND_CFB,  /**< Mobile Subscriber Busy */
+       TEL_SS_CF_COND_CFNRY, /**< No Reply */
+       TEL_SS_CF_COND_CFNRC, /**< Not Reachable */
+       TEL_SS_CF_COND_ALL,   /**< All */
+       TEL_SS_CF_COND_ALL_CFC, /**< All Conditional */
+} TelSsForwardCondition;
+
+/**
+ * @enum TelSsForwardMode
+ * This enumeration defines the Call Forwarding Mode
+ */
+typedef enum {
+       TEL_SS_CF_MODE_DISABLE, /**< Deactivate call forwarding  */
+       TEL_SS_CF_MODE_ENABLE, /**< Activate call forwarding */
+       TEL_SS_CF_MODE_REGISTER, /**< Register Call forwarding  */
+       TEL_SS_CF_MODE_DEREGISTER, /**< De-register call forwarding */
+} TelSsForwardMode;
+
+/**
+ * @enum TelSsClirNetworkStatus
+ * This enumeration defines the Clir Network Status
+ */
+typedef enum {
+       TEL_CLIR_STATUS_NOT_PROVISIONED, /**<Service not provided by the service provider */
+       TEL_CLIR_STATUS_PROVISIONED, /**<Service is provided by the service provider */
+       TEL_CLIR_STATUS_UNKNOWN, /**<Service status is unknown*/
+       TEL_CLIR_STATUS_TEMP_RESTRICTED, /**<Service is temporarily restricted */
+       TEL_CLIR_STATUS_TEMP_ALLOWED, /**<Service is temporarily allowed */
+} TelSsClirNetworkStatus;
+
+/**
+ * @enum TelSsClirDeviceStatus
+ * This enumeration defines the Clir Device Status
+ * The device CLIR status overrides the CLIR subscription when temporary mode is provisioned
+ */
+typedef enum {
+       TEL_CLIR_STATUS_DEFAULT,  /**< According to the subscription of CLIR */
+       TEL_CLIR_STATUS_INVOCATION, /**< CLI presentation is restricted */
+       TEL_CLIR_STATUS_SUPPRESSION, /**< CLI presentation is allowed */
+} TelSsClirDeviceStatus;
+
+/**
+ * @enum TelSsCliNetworkStatus
+ * This enumeration defines the Cli Network Status
+ */
+typedef enum {
+       TEL_SS_CLI_NOT_PROVISIONED, /**<Service not provided by the service provider */
+       TEL_SS_CLI_PROVISIONED, /**<Service is provided by the service provider */
+       TEL_SS_CLI_UNKNOWN, /**<Service status is unknown*/
+} TelSsCliNetworkStatus;
+
+/**
+ * @enum TelSsCliDeviceStatus
+ * This enumeration defines the Cli Device Status
+ */
+typedef enum {
+       TEL_SS_CLI_DISABLE, /**<CLI is disabled */
+       TEL_SS_CLI_ENABLE, /**<<CLI is enabled */
+} TelSsCliDeviceStatus;
+
+/**
+ * @enum TelSsCliType
+ * This enumeration defines the Cli Service Types
+ */
+typedef enum {
+       TEL_SS_CLI_CLIP, /**< Calling Line Identification Presentation */
+       TEL_SS_CLI_CLIR, /**< Calling Line Identification Restriction */
+       TEL_SS_CLI_COLP, /**< Connected Line Identification Presentation */
+       TEL_SS_CLI_COLR, /**< Connected Line Identification Restriction */
+       TEL_SS_CLI_CDIP, /**< Called Line Identification Presentation */
+       TEL_SS_CLI_CNAP, /**< Calling Name Presentation */
+} TelSsCliType;
+
+/**
+ * @enum TelSsUssdStatus
+ * This enumeration defines the ussd Indication Type
+ */
+typedef enum {
+       TEL_SS_USSD_STATUS_NO_ACTION_REQUIRED, /**< No further user action required */
+       TEL_SS_USSD_STATUS_ACTION_REQUIRED, /**< Further user action required*/
+       TEL_SS_USSD_STATUS_TERMINATED_BY_NETWORK, /**< USSD terminated by network */
+       TEL_SS_USSD_STATUS_OTHER_CLIENT, /**< Other local client has responded */
+       TEL_SS_USSD_STATUS_NOT_SUPPORTED, /**< Operation not supported */
+       TEL_SS_USSD_STATUS_TIME_OUT, /**< Time out when there is no response from network */
+} TelSsUssdStatus;
+
+/**
+ * @enum TelSsUssdType
+ * This enum defines the values for USSD type
+ */
+typedef enum {
+       TEL_SS_USSD_TYPE_USER_INIT, /**< USSD request type User Initiated. */
+       TEL_SS_USSD_TYPE_USER_RSP, /**< USSD request type User Response. */
+       TEL_SS_USSD_TYPE_USER_REL, /**< USSD request type User Release. */
+} TelSsUssdType;
+
+/**
+ *  This structure  defines the different parameters related to call barring.
+ */
+ typedef struct {
+       TelSsClass class; /**< SS class */
+       gboolean enable; /**< Barring enable/disable */
+       TelSsBarringType type; /**< Barring type */
+       char pwd[TEL_SS_BARRING_PASSWORD_LEN_MAX + 1]; /**< Barring password */
+} TelSsBarringInfo;
+
+/**
+ *  This structure  defines the different parameters related to Call Barring Service Information to get Status.
+ */
+typedef struct {
+       TelSsClass class; /**< SS class */
+       TelSsBarringType type; /**< Call barring types providing various barring conditions on that basis call be barred */
+} TelSsBarringGetInfo;
+
+/**
+ * This structure defines the values for ss call barring record
+ */
+typedef struct {
+       TelSsClass class; /**< SS class */
+       gboolean enable; /**< Barring enable/disable */
+       TelSsBarringType type; /**< Call barring types providing various barring conditions on that basis call be barred */
+} TelSsBarringInfoRecord;
+
+/**
+ * This structure defines the values for ss Call Barring Service Response Information
+ */
+typedef struct {
+       unsigned int record_num; /**< Number of Call barring record */
+       TelSsBarringInfoRecord *records; /**< Call barring records */
+} TelSsBarringResp;
+
+/**
+ * This structure defines the values for ss Call Barring Password Change Information
+ */
+typedef struct {
+       char old_pwd[TEL_SS_BARRING_PASSWORD_LEN_MAX + 1]; /**< Call barring password(old) */
+       char new_pwd[TEL_SS_BARRING_PASSWORD_LEN_MAX + 1]; /**< Call barring password(new) */
+} TelSsBarringPwdInfo;
+
+/**
+ * This structure defines the values for ss Call Forwarding Service Setting Information
+ */
+typedef struct {
+       TelSsClass class; /**< SS class */
+       TelSsForwardMode mode; /**< Call Forwarding Mode */
+       TelSsForwardCondition condition; /**< Call Forwarding Condition */
+       char number[TEL_SS_NUMBER_LEN_MAX + 1]; /**< Call Forwarding Number*/
+       unsigned int wait_time; /**< No reply wait time 1-30 secs */
+} TelSsForwardInfo;
+
+/**
+ * This structure defines the values for ss Call Forwarding Service Information to get Forwarding Status
+ */
+typedef struct {
+       TelSsClass class; /**< SS class */
+       TelSsForwardCondition condition; /**< Call Forwarding Condition */
+} TelSsForwardGetInfo;
+
+/**
+ * This structure defines the values for ss Call Forwarding Service Information to set Forwarding
+ */
+typedef struct {
+       TelSsClass class; /**< SS class */
+       gboolean enable; /**< Call Forwarding enable/disable */
+       TelSsForwardCondition condition; /**< Call Forwarding Condition */
+       char number[TEL_SS_NUMBER_LEN_MAX + 1]; /**< Call forwarding number */
+       unsigned int wait_time; /**< Only be available when "no reply" is enabled
+                                       or queried, range: 1 - 30 */
+} TelSsForwardingInfoRecord;
+
+/**
+ * This structure defines the values for ss Call Forwarding Service Response data
+ */
+typedef struct {
+       unsigned int record_num; /**< Number of Call Forwarding record */
+       TelSsForwardingInfoRecord *records; /**< Call Forwarding records */
+} TelSsForwardingResp;
+
+/**
+ * This structure defines the values for ss Call Waiting Service Setting Information
+ */
+typedef struct {
+       TelSsClass class; /**< SS class */
+       gboolean enable; /**< Call waiting enable/disable */
+} TelSsWaitingInfo;
+
+/**
+ * This structure defines the values for ss Call Waiting Service Response data
+ */
+typedef struct {
+       unsigned int record_num; /**< Number of Call waiting record */
+       TelSsWaitingInfo *records; /**< Call waiting records */
+} TelSsWaitingResp;
+
+/**
+ * This structure defines the values for ss CLIR status Information
+ */
+typedef struct {
+       TelSsClirNetworkStatus net_status; /**< CLIR status (network side) */
+       TelSsClirDeviceStatus dev_status;  /**< CLIR status (device side) */
+} TelSsClirStatus;
+
+/**
+ * This structure defines the values for ss CLI status Information
+ */
+typedef struct {
+       TelSsCliNetworkStatus net_status; /**< CLI status (network side) */
+       TelSsCliDeviceStatus dev_status;  /**< CLI status (device side) */
+} TelSsCliStatus;
+
+/**
+ * This structure defines the values for ss CLI Service Response data
+ */
+typedef struct {
+       TelSsCliType type; /**< line identification service types */
+       union {
+               TelSsClirStatus clir; /**< CLIR status */
+               TelSsCliStatus clip; /**< CLIP status */
+               TelSsCliStatus colp; /**< COLP status */
+               TelSsCliStatus colr; /**< COLR status */
+               TelSsCliStatus cdip; /**< CDIP status */
+               TelSsCliStatus cnap; /**< CNAP status */
+       } status; /**< union */
+} TelSsCliResp;
+
+/**
+ * This structure defines the values for ss CLI Service(include CLIR) Setting Information
+ */
+typedef struct {
+       TelSsCliType type; /**< line identification service types */
+       union {
+               TelSsClirDeviceStatus clir; /**< CLIR status */
+               TelSsCliDeviceStatus clip; /**< CLIP status */
+               TelSsCliDeviceStatus colp; /**< COLP status */
+               TelSsCliDeviceStatus colr; /**< COLR status */
+               TelSsCliDeviceStatus cdip; /**< CDIP status */
+               TelSsCliDeviceStatus cnap; /**< CNAP status */
+       } status; /**< union */
+} TelSsCliInfo;
+
+/**
+ * This structure defines the values for ss USSD Request Information
+ */
+typedef struct {
+       TelSsUssdType type; /**< USSD type */
+       unsigned char *str; /**< NULL terminated UTF-8 USSD string */
+} TelSsUssdInfo;
+
+/**
+ * This structure defines the values for ss USSD Response data
+ */
+typedef struct {
+       TelSsUssdType type; /**< USSD type */
+       TelSsUssdStatus status; /**< USSD status */
+       unsigned char *str; /**< NULL terminated UTF-8 USSD string */
+} TelSsUssdResp;
+
+/**
+ * This structure defines the values for ss USSD Notification data
+ */
+typedef struct {
+       TelSsUssdStatus status; /**< USSD status */
+       unsigned char *str; /**< NULL terminated UTF-8 USSD string */
+} TelSsUssdNoti;
+
+/**
+ *  \defgroup TAPI_EVENT TAPI Event IDs
+ *  @{
+ */
+
+/**
+ *  \defgroup TEL_EVENT_SS SS Event IDs
+ *  @{
+ */
+
+/**
+ *  @hideinitializer
+ *  @brief USSD status and string
+ *  @section subscription Event Subscription
+ *  @details Event can be subscribed with event id TEL_NOTI_SS_USSD
+ *  @sa tapi_register_event_id
+ *  @section handling Event Handling
+ *  @details TAPI will invoke the registered callback (\ref TapiEvtCb) and return the following data:
+ *  @retval handle #TelHandle used for registering the event
+ *  @retval evt_id TEL_NOTI_SS_USSD
+ *  @retval data reference to \ref TelSsUssdNoti structure
+ *  @retval user_data user data passed while registering the event
+ */
+#define TEL_NOTI_SS_USSD                               TELEPHONY_SS_INTERFACE":NotifyUssd"
+
+/** @}*/
+/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+
+#endif /* __TEL_SS_H__ */
similarity index 55%
rename from src/tapi_log.h
rename to include/private/tapi_log.h
index e26216b..06859d9 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +20,9 @@
 #ifndef __TAPI_LOG_H__
 #define __TAPI_LOG_H__
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #ifdef FEATURE_DLOG_DEBUG
 
@@ -31,10 +32,10 @@ __BEGIN_DECLS
 #define TAPI_LOG_TAG "LIBTAPI"
 #endif
 
-#define msg(fmt,args...)  { RLOG(LOG_INFO, TAPI_LOG_TAG, fmt "\n", ##args); }
-#define dbg(fmt,args...)  { RLOG(LOG_DEBUG, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-#define warn(fmt,args...)  { RLOG(LOG_WARN, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-#define err(fmt,args...)  { RLOG(LOG_FATAL, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
+#define msg(fmt,args...) do { RLOG(LOG_INFO, TAPI_LOG_TAG, fmt "\n", ##args); } while (0)
+#define dbg(fmt,args...) do { RLOG(LOG_DEBUG, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } while (0)
+#define warn(fmt,args...) do { RLOG(LOG_WARN, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } while (0)
+#define err(fmt,args...) do { RLOG(LOG_FATAL, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } while (0)
 
 #else
 
@@ -45,6 +46,8 @@ __BEGIN_DECLS
 
 #endif
 
-__END_DECLS
-
+#ifdef __cplusplus
+}
 #endif
+
+#endif /* __TAPI_LOG_H__ */
diff --git a/include/private/tapi_private.h b/include/private/tapi_private.h
new file mode 100644 (file)
index 0000000..8c19a0e
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_PRIVATE_H__
+#define __TAPI_PRIVATE_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include "tapi_log.h"
+#include "tapi_events.h"
+
+#include "generated-code.h"
+
+#define TAPI_DBUS_TIMEOUT_DEFAULT              (60000)
+#define TAPI_DBUS_TIMEOUT_MAX                  (180000)
+
+#define TEL_RETURN_IF_CHECK_FAIL(expr, ret) \
+       do { \
+               if (!(expr)) \
+                       return ret; \
+       } while(0)
+
+#define MAKE_RESP_CB_DATA(data, handle, cb, user_data)  \
+       data = g_new0(TapiRespCbData, 1); \
+       data->handle = handle; \
+       data->resp_cb = cb; \
+       data->user_data = user_data
+
+#define MAKE_EVT_CB_DATA(data, cb, user_data)  \
+       data = g_new0(TapiEvtCbData, 1); \
+       data->evt_cb = cb; \
+       data->user_data = user_data
+
+#define RESP_CALLBACK_CALL(resp_cb_data, tel_result, result_data) \
+       if (resp_cb_data && resp_cb_data->resp_cb) \
+               resp_cb_data->resp_cb(resp_cb_data->handle, tel_result, \
+                                       result_data, resp_cb_data->user_data); \
+       g_free(resp_cb_data)
+
+#define CHECK_DEINIT(error, resp_cb_data, tel_result) \
+       if (error) { \
+               dbg("dbus error = %d (%s)", error->code, error->message); \
+                if (error->code == G_IO_ERROR_CANCELLED \
+                               && error->domain == G_IO_ERROR) { \
+                       g_error_free(error); \
+                       g_free(resp_cb_data); \
+                       return; \
+               } \
+               RESP_CALLBACK_CALL(resp_cb_data, tel_result, NULL); \
+               g_error_free(error); \
+               return; \
+       }
+
+#define EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, data) \
+       if (evt_cb_data->evt_cb) \
+               evt_cb_data->evt_cb(handle, evt_id, data, evt_cb_data->user_data)
+
+#define GET_TAPI_HANDLE(data) data->handle
+
+/**
+ *  @private
+ */
+struct tapi_handle {
+       TelephonyModem *modem_proxy;    /* Modem proxy created with GDBus helper */
+       TelephonyCall *call_proxy;
+       TelephonySms *sms_proxy;
+       TelephonySim *sim_proxy;
+       TelephonyNetwork *network_proxy;
+       TelephonySap *sap_proxy;
+       TelephonyGps *gps_proxy;
+       TelephonyPhonebook *phonebook_proxy;
+       TelephonySs *ss_proxy;
+       TelephonySat *sat_proxy;
+
+       int modem_property_handler;
+       int network_property_handler;
+       int sim_property_handler;
+       int sms_property_handler;
+
+       int network_signal_handler;
+       int phonebook_signal_handler;
+       int call_signal_handler;
+       int ss_signal_handler;
+       int sms_signal_handler;
+       int sat_signal_handler;
+       int sap_signal_handler;
+       int gps_signal_handler;
+
+       char *cp_name;
+       GHashTable *evt_table;
+};
+
+/**
+ * This structure defines the tapi response callback data
+ */
+typedef struct {
+       struct tapi_handle *handle; /**< Handle */
+       TapiResponseCb resp_cb; /**< Response Callback Type*/
+       void* user_data; /**< User Data */
+} TapiRespCbData;
+
+/**
+ * This structure defines the tapi event callback data
+ */
+typedef struct {
+       TapiEvtCb evt_cb; /**< Event Callback Type */
+       void *user_data; /**< User Data */
+} TapiEvtCbData;
+
+#endif /* __TAPI_PRIVATE_H__ */
diff --git a/include/tapi.h b/include/tapi.h
new file mode 100644 (file)
index 0000000..e843a4a
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_H__
+#define __TAPI_H__
+
+/**
+*  @addtogroup TAPI
+*  @{
+*
+*  @file tapi.h
+*  @brief TAPI Interface
+*/
+
+#include <tel_return.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * TAPI Handle
+ */
+typedef struct tapi_handle TelHandle;
+
+/**
+ * TAPI Response Callback Type
+ * @param handle #TelHandle obtained from tapi_init()
+ * @param result Result of operation of type TelResult<Module>
+ * @param data Response Data from operation
+ * @param user_data User Data
+ */
+typedef void (*TapiResponseCb)(TelHandle *handle, int result, void *data, void *user_data);
+
+/**
+ *  @brief Fetches the list of available CPs
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @param[out] cp_list List of available CP names
+ *
+ *  @return #TelReturn
+ */
+TelReturn tapi_get_cp_name_list(char ***cp_list);
+
+/**
+ *  @brief Acquires a TAPI Handle for specified CP name
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @param[in] cp_name CP Name against which TAPI handle is required \n
+ *  NULL CP Name will return TelHandle bound to the first CP in the list of available CPs
+ *
+ *  @return #TelHandle
+ */
+TelHandle *tapi_init(const char *cp_name);
+
+/**
+ *  @brief De-initializes the TAPI Handle
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *
+ *  @return #TelReturn
+ */
+TelReturn tapi_deinit(TelHandle *handle);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TAPI_H__ */
diff --git a/include/tapi_call.h b/include/tapi_call.h
new file mode 100644 (file)
index 0000000..7ac62b7
--- /dev/null
@@ -0,0 +1,617 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_CALL_H__
+#define __TAPI_CALL_H__
+
+/**
+*  @addtogroup TAPI_CALL
+*  @{
+*
+*  @file tapi_call.h
+*  @brief TAPI Call Interface
+*/
+
+#include "tapi.h"
+#include <tel_call.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ *  @brief Send a request to make outgoing calls
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] call_dial_info #TelCallDial Dialing call info
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_FDN_RESTRICTED</b>: FDN calls only\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_dial(TelHandle *handle, const TelCallDial *call_dial_info,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to answer incoming call
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] ans_type Call #TelCallAnswerType answering type. Example: accept,reject
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_answer(TelHandle *handle, TelCallAnswerType ans_type,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to end a particular active call
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] call_end_info #TelCallEnd Info to end a call
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_end(TelHandle *handle, const TelCallEnd *call_end_info,
+                       TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to send DTMF string
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] dtmf_str DTMF string to send
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_send_dtmf(TelHandle *handle, const char *dtmf_str,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to hold a call
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_hold(TelHandle *handle, TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to make the hold call active
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_active(TelHandle *handle, TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to swap calls
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_swap(TelHandle *handle, TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief send a request to join calls
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_join(TelHandle *handle, TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to split calls
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] call_id Call Id of the call to split
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_split(TelHandle *handle, unsigned int call_id,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to transfer a call
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_transfer(TelHandle *handle, TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to delflect a call
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] deflect_to Deflecting Number
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_deflect(TelHandle *handle, const char *deflect_to,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to set active line
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] active_line #TelCallActiveLine Active line info
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_set_active_line(TelHandle *handle, TelCallActiveLine active_line,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to get active line status
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data #TelCallActiveLine if result is TEL_CALL_RESULT_SUCCESS
+ */
+TelReturn tapi_call_get_active_line(TelHandle *handle, TapiResponseCb callback,
+                                       void *user_data);
+
+/**
+ *  @brief Sends a request to get the call status of a particular call
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] call_id Id of the call to know the status of that call
+ *  @param[out] call_status #TelCallStatus Status of the call
+ */
+TelReturn tapi_call_get_status(TelHandle *handle, unsigned int call_id,
+                                       TelCallStatus *call_status );
+
+/**
+ *  @brief Sends a request to get the call status of all ongoing calls
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] call_status_list #TelCallStatusList List of status of all calls
+ */
+TelReturn tapi_call_get_status_all(TelHandle *handle, TelCallStatusList *call_status_list);
+
+/**
+ *  @brief Sends a request to set volume level
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] volume_info #TelCallVolumeInfo Info to set Call Volume
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_set_volume_info(TelHandle *handle, const TelCallVolumeInfo *volume_info,
+                               TapiResponseCb callback, void *user_data );
+
+/**
+ *  @brief Sends a request to get volume level
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] sound_device #TelCallSoundDevice Device info to get volume info
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data (unsigned int volume_info) if result is TEL_CALL_RESULT_SUCCESS
+ */
+TelReturn tapi_call_get_volume_info(TelHandle *handle, TelCallSoundDevice sound_device,
+                               TapiResponseCb callback, void *user_data );
+
+/**
+ *  @brief Sends a request to set call sound path
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] sound_path_info #TelCallSoundPathInfo Info to set sound path
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_set_sound_path(TelHandle *handle, const TelCallSoundPathInfo *sound_path_info,
+                               TapiResponseCb callback, void *user_data );
+
+/**
+ *  @brief Sends a request to set a call to mute
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] mute <b>TRUE</b>: Mute is ON\n <b>FALSE</b>: Mute is OFF
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_set_mute(TelHandle *handle, gboolean mute,
+                               TapiResponseCb callback, void *user_data );
+
+/**
+ *  @brief Sends a request to get the status of call mute
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data (gboolean enable) is valid if result is TEL_CALL_RESULT_SUCCESS <b>TRUE</b>: Mute is ON\n <b>FALSE</b>: Mute is OFF
+ */
+TelReturn tapi_call_get_mute_status(TelHandle *handle,
+                               TapiResponseCb callback, void *user_data );
+
+/**
+ *  @brief Sends a request to set call sound recording
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] sound_rec #TelCallSoundRecording Sound Recording start/stop info
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_set_sound_recording(TelHandle *handle, TelCallSoundRecording sound_rec,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sends a request to set sound equailization
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] sound_eq #TelCallSoundEqualization Info to set sound equalization
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelCallResult values:\n
+ *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
+ *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
+ *  \em data NULL
+ */
+TelReturn tapi_call_set_sound_equalization(TelHandle *handle,
+                               const TelCallSoundEqualization *sound_eq,
+                               TapiResponseCb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TAPI_CALL_H__ */
+
+ /**
+* @}
+*/
diff --git a/include/tapi_common.h b/include/tapi_common.h
deleted file mode 100644 (file)
index 8b2cf34..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * libslp-tapi
- *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _TAPI_COMMON_H_
-#define _TAPI_COMMON_H_
-
-#include <stdio.h>
-#include <glib.h>
-
-#include <tapi_type.h>
-#include <tapi_event.h>
-
-__BEGIN_DECLS
-
-
-char**       tel_get_cp_name_list(void);
-
-TapiHandle*  tel_init(const char *cp_name);
-int          tel_deinit(TapiHandle *handle);
-
-int          tel_register_noti_event(TapiHandle *handle, const char *noti_id,
-                 tapi_notification_cb callback, void *user_data);
-int          tel_deregister_noti_event(TapiHandle *handle, const char *noti_id);
-
-int          tel_get_property_int(TapiHandle *h, const char *property, int *result);
-
-__END_DECLS
-
-#endif /* _TAPI_COMMON_H_ */
-
-/**
- *  @}
- */
diff --git a/include/tapi_event.h b/include/tapi_event.h
deleted file mode 100644 (file)
index 5510fb3..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * libslp-tapi
- *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_EVENT_H__
-#define __TAPI_EVENT_H__
-
-#include <tapi_type.h>
-
-__BEGIN_DECLS
-
-#define DBUS_TELEPHONY_CALL_INTERFACE                          DBUS_TELEPHONY_SERVICE".Call"
-
-#define TAPI_NOTI_VOICE_CALL_STATUS_IDLE                       DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusIdle"
-#define TAPI_NOTI_VOICE_CALL_STATUS_ACTIVE                     DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusActive"
-#define TAPI_NOTI_VOICE_CALL_STATUS_HELD                       DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusHeld"
-#define TAPI_NOTI_VOICE_CALL_STATUS_DIALING                    DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusDialing"
-#define TAPI_NOTI_VOICE_CALL_STATUS_ALERT                      DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusAlert"
-#define TAPI_NOTI_VOICE_CALL_STATUS_INCOMING           DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusIncoming"
-#define TAPI_NOTI_VOICE_CALL_STATUS_WAITING                    DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusWaiting"
-
-#define TAPI_NOTI_VIDEO_CALL_STATUS_IDLE                       DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusIdle"
-#define TAPI_NOTI_VIDEO_CALL_STATUS_ACTIVE                     DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusActive"
-#define TAPI_NOTI_VIDEO_CALL_STATUS_DIALING                    DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusDialing"
-#define TAPI_NOTI_VIDEO_CALL_STATUS_ALERT                      DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusAlert"
-#define TAPI_NOTI_VIDEO_CALL_STATUS_INCOMING           DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusIncoming"
-
-#define TAPI_NOTI_CALL_INFO_CALL_CONNECTED_LINE                DBUS_TELEPHONY_CALL_INTERFACE":CallConnectedLine"
-#define TAPI_NOTI_CALL_INFO_WAITING                                    DBUS_TELEPHONY_CALL_INTERFACE":Waiting"
-#define TAPI_NOTI_CALL_INFO_CUG                                                DBUS_TELEPHONY_CALL_INTERFACE":Cug"
-#define TAPI_NOTI_CALL_INFO_FORWARDED                          DBUS_TELEPHONY_CALL_INTERFACE":Forwarded"
-#define TAPI_NOTI_CALL_INFO_BARRED_INCOMING                    DBUS_TELEPHONY_CALL_INTERFACE":BarredIncoming"
-#define TAPI_NOTI_CALL_INFO_BARRED_OUTGOING                    DBUS_TELEPHONY_CALL_INTERFACE":BarredOutgoing"
-#define TAPI_NOTI_CALL_INFO_DEFLECTED                          DBUS_TELEPHONY_CALL_INTERFACE":Deflected"
-#define TAPI_NOTI_CALL_INFO_CLIR_SUPPRESSION_REJECT    DBUS_TELEPHONY_CALL_INTERFACE":ClirSuppressionReject"
-#define TAPI_NOTI_CALL_INFO_FORWARD_UNCONDITIONAL      DBUS_TELEPHONY_CALL_INTERFACE":ForwardUnconditional"
-#define TAPI_NOTI_CALL_INFO_FORWARD_CONDITIONAL                DBUS_TELEPHONY_CALL_INTERFACE":ForwardConditional"
-#define TAPI_NOTI_CALL_INFO_CALL_LINE_IDENTITY         DBUS_TELEPHONY_CALL_INTERFACE":CallLineIdentity"
-#define TAPI_NOTI_CALL_INFO_CALL_NAME_INFORMATION      DBUS_TELEPHONY_CALL_INTERFACE":CallNameInformation"
-#define TAPI_NOTI_CALL_INFO_FORWARDED_CALL                     DBUS_TELEPHONY_CALL_INTERFACE":ForwardedCall"
-#define TAPI_NOTI_CALL_INFO_CUG_CALL                           DBUS_TELEPHONY_CALL_INTERFACE":CugCall"
-#define TAPI_NOTI_CALL_INFO_DEFLECTED_CALL                     DBUS_TELEPHONY_CALL_INTERFACE":DeflectedCall"
-#define TAPI_NOTI_CALL_INFO_TRANSFERED_CALL                    DBUS_TELEPHONY_CALL_INTERFACE":TransferedCall"
-#define TAPI_NOTI_CALL_INFO_HELD                                       DBUS_TELEPHONY_CALL_INTERFACE":CallHeld"
-#define TAPI_NOTI_CALL_INFO_ACTIVE                                     DBUS_TELEPHONY_CALL_INTERFACE":CallActive"
-#define TAPI_NOTI_CALL_INFO_JOINED                                     DBUS_TELEPHONY_CALL_INTERFACE":CallJoined"
-#define TAPI_NOTI_CALL_INFO_RELEASED_ON_HOLD           DBUS_TELEPHONY_CALL_INTERFACE":ReleaseOnHold"
-#define TAPI_NOTI_CALL_INFO_TRANSFER_ALERT                     DBUS_TELEPHONY_CALL_INTERFACE":TransferAlert"
-#define TAPI_NOTI_CALL_INFO_TRANSFERED                         DBUS_TELEPHONY_CALL_INTERFACE":Transfered"
-#define TAPI_NOTI_CALL_INFO_CF_CHECK_MESSAGE           DBUS_TELEPHONY_CALL_INTERFACE":CfCheckMessage"
-
-#define TAPI_NOTI_CALL_SOUND_PATH                                      DBUS_TELEPHONY_CALL_INTERFACE":CallSoundPath"
-#define TAPI_NOTI_CALL_SOUND_RINGBACK_TONE                     DBUS_TELEPHONY_CALL_INTERFACE":CallSoundRingbackToneControl"
-#define TAPI_NOTI_CALL_SOUND_WBAMR                                     DBUS_TELEPHONY_CALL_INTERFACE":CallSoundWbamr"
-#define TAPI_NOTI_CALL_SOUND_EQUALIZATION                      DBUS_TELEPHONY_CALL_INTERFACE":CallSoundEqualiztion"
-#define TAPI_NOTI_CALL_SOUND_NOISE_REDUCTION           DBUS_TELEPHONY_CALL_INTERFACE":CallSoundNoiseReduction"
-#define TAPI_NOTI_CALL_SOUND_CLOCK_STATUS                      DBUS_TELEPHONY_CALL_INTERFACE":CallSoundClockStatus"
-
-
-#define DBUS_TELEPHONY_MODEM_INTERFACE                         DBUS_TELEPHONY_SERVICE".Modem"
-#define TAPI_NOTI_MODEM_POWER                                          DBUS_TELEPHONY_MODEM_INTERFACE":Power"
-#define TAPI_NOTI_MODEM_DUN_PIN_CTRL                           DBUS_TELEPHONY_MODEM_INTERFACE":DunPinCtrl"
-#define TAPI_NOTI_MODEM_DUN_EXTERNAL_CALL                      DBUS_TELEPHONY_MODEM_INTERFACE":DunExternalCall"
-#define TAPI_PROP_MODEM_POWER                                          DBUS_TELEPHONY_MODEM_INTERFACE":power"
-
-#define DBUS_TELEPHONY_SIM_INTERFACE                           DBUS_TELEPHONY_SERVICE".Sim"
-#define TAPI_NOTI_SIM_STATUS                                           DBUS_TELEPHONY_SIM_INTERFACE":Status"
-
-#define DBUS_TELEPHONY_SAP_INTERFACE                           DBUS_TELEPHONY_SERVICE".Sap"
-#define TAPI_NOTI_SAP_STATUS                                           DBUS_TELEPHONY_SAP_INTERFACE":Status"
-#define TAPI_NOTI_SAP_DISCONNECT                                       DBUS_TELEPHONY_SAP_INTERFACE":Disconnect"
-
-#define DBUS_TELEPHONY_SAT_INTERFACE                           DBUS_TELEPHONY_SERVICE".SAT"
-#define TAPI_NOTI_SAT_SETUP_MENU                                       DBUS_TELEPHONY_SAT_INTERFACE":SetupMenu"
-#define TAPI_NOTI_SAT_DISPLAY_TEXT                                     DBUS_TELEPHONY_SAT_INTERFACE":DisplayText"
-#define TAPI_NOTI_SAT_SELECT_ITEM                                      DBUS_TELEPHONY_SAT_INTERFACE":SelectItem"
-#define TAPI_NOTI_SAT_GET_INKEY                                                DBUS_TELEPHONY_SAT_INTERFACE":GetInkey"
-#define TAPI_NOTI_SAT_GET_INPUT                                                DBUS_TELEPHONY_SAT_INTERFACE":GetInput"
-#define TAPI_NOTI_SAT_REFRESH                                          DBUS_TELEPHONY_SAT_INTERFACE":Refresh"
-#define TAPI_NOTI_SAT_SEND_SMS                                         DBUS_TELEPHONY_SAT_INTERFACE":SendSMS"
-#define TAPI_NOTI_SAT_SETUP_EVENT_LIST                         DBUS_TELEPHONY_SAT_INTERFACE":SetupEventList"
-#define TAPI_NOTI_SAT_SEND_DTMF                                                DBUS_TELEPHONY_SAT_INTERFACE":SendDtmf"
-#define TAPI_NOTI_SAT_SESSION_END_EVENT                                DBUS_TELEPHONY_SAT_INTERFACE":EndProactiveSession"
-#define TAPI_NOTI_SAT_MO_SMS_CTRL                                      DBUS_TELEPHONY_SAT_INTERFACE":MoSmsCtrl"
-
-#define DBUS_TELEPHONY_PB_INTERFACE                                    DBUS_TELEPHONY_SERVICE".Phonebook"
-#define TAPI_NOTI_PB_STATUS                                                    DBUS_TELEPHONY_PB_INTERFACE":Status"
-
-// Network
-#define DBUS_TELEPHONY_NETWORK_INTERFACE                       DBUS_TELEPHONY_SERVICE".Network"
-#define TAPI_NOTI_NETWORK_REGISTRATION_STATUS          DBUS_TELEPHONY_NETWORK_INTERFACE":RegistrationStatus"
-#define TAPI_NOTI_NETWORK_CELLINFO                                     DBUS_TELEPHONY_NETWORK_INTERFACE":CellInfo"
-#define TAPI_NOTI_NETWORK_INFO                                         DBUS_TELEPHONY_NETWORK_INTERFACE":Info"
-#define TAPI_NOTI_NETWORK_CHANGE                                       DBUS_TELEPHONY_NETWORK_INTERFACE":Change"
-#define TAPI_NOTI_NETWORK_TIMEINFO                                     DBUS_TELEPHONY_NETWORK_INTERFACE":TimeInfo"
-#define TAPI_NOTI_NETWORK_IDENTITY                                     DBUS_TELEPHONY_NETWORK_INTERFACE":Identity"
-
-// SS
-#define DBUS_TELEPHONY_SS_INTERFACE                                    DBUS_TELEPHONY_SERVICE".Ss"
-#define TAPI_NOTI_SS_USSD                                                      DBUS_TELEPHONY_SS_INTERFACE":NotifyUSSD"
-#define TAPI_NOTI_SS_RELEASE_COMPLETE                          DBUS_TELEPHONY_SS_INTERFACE":ReleaseComplete"
-
-// PS
-#define TAPI_NOTI_PS_DUN_PIN_CONTROL "org.tizen.telephony.Ps.PinCtrl"
-
-// SMS
-#define DBUS_TELEPHONY_SMS_INTERFACE   DBUS_TELEPHONY_SERVICE".sms"
-#define TAPI_NOTI_SMS_INCOM_MSG                        DBUS_TELEPHONY_SMS_INTERFACE":IncommingMsg"     /* This is an unsolicited Incoming SMS Event*/
-#define TAPI_NOTI_SMS_CB_INCOM_MSG             DBUS_TELEPHONY_SMS_INTERFACE":IncommingCbMsg"   /* This is an unsolicited Incoming cell broadcast message*/
-#define TAPI_NOTI_SMS_ETWS_INCOM_MSG   DBUS_TELEPHONY_SMS_INTERFACE":IncommingEtwsMsg" /* This is an unsolicited Incoming cell broadcast message*/
-#if 0
-#define TAPI_NOTI_SMS_INCOM_EX_MSG "org.tizen.telephony. "             /* This is an extended unsolicited Incoming SMS Event*/
-#define TAPI_NOTI_SMS_CB_INCOM_EX_MSG "org.tizen.telephony. "  /* This is an extended unsolicited Incoming cell broadcast message*/
-#endif
-#define TAPI_NOTI_SMS_MEMORY_STATUS            DBUS_TELEPHONY_SMS_INTERFACE":MemoryStatus"     /* This event is an unsolicited event indicating SIM memory status */
-#define TAPI_NOTI_SMS_DEVICE_READY             DBUS_TELEPHONY_SMS_INTERFACE":SmsReady" /* Device Ready indication */
-
-// Gps
-#define DBUS_TELEPHONY_GPS_INTERFACE           DBUS_TELEPHONY_SERVICE".Gps"
-#define TAPI_NOTI_GPS_ASSIST_DATA                      DBUS_TELEPHONY_GPS_INTERFACE":AssistData"
-#define TAPI_IND_GPS_MEASURE_POSITION          DBUS_TELEPHONY_GPS_INTERFACE":MeasurePosition"
-#define TAPI_NOTI_GPS_RESET_ASSIST_DATA                DBUS_TELEPHONY_GPS_INTERFACE":ResetAssistData"
-#define TAPI_NOTI_GPS_FREQUENCY_AIDING         DBUS_TELEPHONY_GPS_INTERFACE":FrequencyAiding"
-
-__END_DECLS
-
-#endif /* __TAPI_EVENT_H__ */
diff --git a/include/tapi_events.h b/include/tapi_events.h
new file mode 100644 (file)
index 0000000..74c0cae
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_EVENTS_H__
+#define __TAPI_EVENTS_H__
+
+#include <tapi.h>
+
+/**
+*  @addtogroup TAPI_EVENT
+*  @{
+*
+*  @file tapi_events.h
+*  @brief Telephony Event IDs
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * TAPI Event Callback Type
+ * @param handle #TelHandle obtained from tapi_init()
+ * @param evt_id Event ID. Refer \ref TAPI_EVENT
+ * @param data Notification Data
+ * @param user_data User Data
+ */
+typedef void (*TapiEvtCb)(TelHandle *handle, const char *evt_id, void *data, void *user_data);
+
+/**
+ *  @brief Register to a Telephony Event
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *
+ *  @param[in] evt_id Event ID to register. Refer \ref TAPI_EVENT
+ *
+ *  @param[in] callback Callback to register for specified Event ID.
+ *
+ *  @param[in] user_data Callback user data
+ *
+ *  @return #TelReturn
+ *  @par Usage
+ *  @code
+ *    #include <tapi_events.h> //include header
+ *    TelReturn rv = tapi_register_event_id(handle, evt_id, callback, user_data); //Register Event
+ *    if (TEL_RETURN_SUCCESS != rv) //Check if registration success
+ *      DBG("Event Registration failed %d", rv);
+ *  @endcode
+ */
+TelReturn tapi_register_event_id(TelHandle *handle, const char *evt_id, TapiEvtCb callback, void *user_data);
+
+/**
+ *  @brief De-register from a Telephony Event
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *
+ *  @param[in] evt_id Event ID to deregister. Refer \ref TAPI_EVENT
+ *
+ *  @return #TelReturn
+ */
+TelReturn tapi_deregister_event_id(TelHandle *handle, const char *evt_id);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TAPI_EVENTS_H__ */
diff --git a/include/tapi_gps.h b/include/tapi_gps.h
new file mode 100644 (file)
index 0000000..ec5e874
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+*  @addtogroup TAPI_GPS
+*  @{
+*
+*  @file tapi_gps.h
+*  @brief Telephony GPS interface
+*/
+
+#ifndef __TAPI_GPS_H__
+#define __TAPI_GPS_H__
+
+#include <tapi.h>
+#include <tel_gps.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ *  @brief This function sends the confirmation data for measure position message
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] gps_data GPS data info
+ */
+TelReturn tapi_gps_confirm_measure_pos(TelHandle *handle, TelGpsDataInfo *gps_data);
+
+
+/**
+ *  @brief This function is invoked to set the gps frequency aiding and allows the underlying OEM provider to scan the set band
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] state <b>TRUE</b>: Frequency aiding ON\n <b>FALSE</b>: Frequency aiding OFF
+ *  @param[in] callback Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelModemResult values:\n
+ *  <b>TEL_GPS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_GPS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_GPS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_gps_set_frequency_aiding(TelHandle *handle, gboolean state, TapiResponseCb callback, void *user_data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TAPI_GPS_H__ */
+
+/**
+ * @}
+ */
diff --git a/include/tapi_modem.h b/include/tapi_modem.h
new file mode 100644 (file)
index 0000000..7eca14e
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_MODEM_H__
+#define __TAPI_MODEM_H__
+
+/**
+*  @addtogroup TAPI_MODEM
+*  @{
+*
+*  @file tapi_modem.h
+*  @brief TAPI Modem Interface
+*/
+
+#include "tapi.h"
+#include <tel_modem.h>
+#include <tel_return.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  @brief Changes modem power status
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] status Power status to set
+ *  @param[in] callback Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelModemResult values:\n
+ *  <b>TEL_MODEM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_MODEM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_MODEM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_modem_set_power_status(TelHandle *handle, TelModemPowerStatus status,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Toggles flight mode status
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] enable <b>TRUE</b>: Turn Flight mode ON\n <b>FALSE</b>: Turn Flight mode OFF
+ *  @param[in] callback Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelModemResult values:\n
+ *  <b>TEL_MODEM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_MODEM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_MODEM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_modem_set_flight_mode(TelHandle *handle, gboolean enable,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Fetches flight mode status
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] enable <b>TRUE</b>: Flight mode is ON\n <b>FALSE</b>: Flight mode is OFF
+ */
+TelReturn tapi_modem_get_flight_mode(TelHandle *handle, gboolean *enable);
+
+/**
+ *  @brief Fetches modem version information
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] version Version Information (\ref TelModemVersion)
+ */
+TelReturn tapi_modem_get_version(TelHandle *handle, TelModemVersion *version);
+
+/**
+ *  @brief Fetches device IMEI number
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] imei NULL terminated device IMEI number
+ */
+TelReturn tapi_modem_get_imei(TelHandle *handle, char imei[TEL_MODEM_IMEI_LENGTH_MAX + 1]);
+
+/**
+ *  @brief Fetches current modem status
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] status Modem status (\ref TelModemPowerStatus)
+ */
+TelReturn tapi_modem_get_power_status(TelHandle *handle, TelModemPowerStatus *status);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TAPI_MODEM_H__ */
diff --git a/include/tapi_network.h b/include/tapi_network.h
new file mode 100644 (file)
index 0000000..1765cbe
--- /dev/null
@@ -0,0 +1,342 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_NETWORK_H__
+#define __TAPI_NETWORK_H__
+
+/**
+*  @addtogroup TAPI_NETWORK
+*  @{
+*
+*  @file tapi_network.h
+*  @brief TAPI Network Interface
+*/
+
+#include "tapi.h"
+#include <tel_network.h>
+#include <tel_return.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ *  @brief Get network registration status
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation failed\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] reg_info Network Registration Information (#TelNetworkRegistrationInfo).
+ *  Out params are valid only when TelReturn is TEL_RETURN_SUCCESS.
+ */
+TelReturn tapi_network_get_registration_info(TelHandle *handle,
+                                       TelNetworkRegistrationInfo *reg_info);
+
+/**
+ *  @brief Get network identity information
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  \em data #TelNetworkIdentityInfo (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
+ */
+TelReturn tapi_network_get_identity_info(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Scan networks
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data #TelNetworkPlmnList (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
+ */
+TelReturn tapi_network_search(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Cancel the triggered network scanning.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  \em data NULL
+ */
+TelReturn tapi_network_cancel_search(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Register to network automatically
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_network_select_automatic(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Register to specified network
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] select_info Manual Selection Information (#TelNetworkSelectManualInfo)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_network_select_manual(TelHandle *handle,
+                       const TelNetworkSelectManualInfo *select_info,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Get network selection mode i.e. automatic or manual.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation failed
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  \em data #TelNetworkSelectionMode (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
+ */
+TelReturn tapi_network_get_selection_mode(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Set the network preferred plmn
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] info Preferred PLMN Information (#TelNetworkPreferredPlmnInfo)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_network_set_preferred_plmn(TelHandle *handle,
+                       TelNetworkPreferredPlmnInfo *info,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Get preferred plmn list
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data #TelNetworkPreferredPlmnList (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
+ */
+TelReturn tapi_network_get_preferred_plmn(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Set network mode.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] mode Network Mode (#TelNetworkMode)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_network_set_mode(TelHandle *handle,
+                       TelNetworkMode mode,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Get network mode.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  \em data #TelNetworkMode (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
+ */
+TelReturn tapi_network_get_mode(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Get neighboring cells info.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
+ *  \em data #TelNetworkNeighbourCellInfo (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
+ */
+TelReturn tapi_network_get_neighboring_cell_info(TelHandle *handle,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TAPI_NETWORK_H__ */
+
diff --git a/include/tapi_phonebook.h b/include/tapi_phonebook.h
new file mode 100644 (file)
index 0000000..5ebe347
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_PHONEBOOK_H__
+#define __TAPI_PHONEBOOK_H__
+
+/**
+*  @addtogroup TAPI_PHONEBOOK
+*  @{
+*
+*  @file tapi_phonebook.h
+*  @brief TAPI Phonebook Interface
+*/
+
+#include <tapi.h>
+#include <tel_phonebook.h>
+#include <tel_return.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ *  @brief Get SIM Phone book init status
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation failed\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] init_completed Phonebook init status. '0' is not init, '1' is init complete to use
+ *  @param[out] pb_list Available SIM phonebook list. This value is valid in phonebook init complete case (#TelPbList)
+ *  Out params are valid only when TelReturn is TEL_RETURN_SUCCESS.
+ */
+TelReturn tapi_pb_get_sim_pb_init_info(TelHandle *handle,
+                               gboolean *init_completed, TelPbList *pb_list);
+
+
+/**
+ *  @brief Get current inserted SIM phonebook informations
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] pb_type Different storage types to be selected in SIM (#TelPbType)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
+ *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
+ *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelPbInfo if result is TEL_PB_RESULT_SUCCESS
+ */
+TelReturn tapi_pb_get_sim_pb_info(TelHandle *handle, TelPbType pb_type,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Read SIM phone book entry information from given storage type
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] record Index for accessing the SIM data \n Different storage types to be selected in SIM (#TelPbRecordInfo)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
+ *  <b>TEL_PB_RESULT_INVALID_INDEX</b>: The index passed was not a valid index\n
+ *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
+ *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelPbReadRecord if result is TEL_PB_RESULT_SUCCESS
+ */
+TelReturn tapi_pb_read_sim_pb_record(TelHandle *handle, const TelPbRecordInfo *record,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Add or edit SIM phone book record entry information
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] req_data Phonebook data which will be updated or added (#TelPbUpdateRecord)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
+ *  <b>TEL_PB_RESULT_INVALID_INDEX</b>: The index passed was not a valid index\n
+ *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
+ *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data NULL
+ */
+TelReturn tapi_pb_update_sim_pb_record(TelHandle *handle, const TelPbUpdateRecord *req_data,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Delete a SIM phonebook record
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] record Index for accessing the SIM data \n Different storage types to be selected in SIM (#TelPbRecordInfo)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelNetworkResult values:\n
+ *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
+ *  <b>TEL_PB_RESULT_INVALID_INDEX</b>: The index passed was not a valid index\n
+ *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
+ *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
+ *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data NULL
+ */
+TelReturn tapi_pb_delete_sim_pb_record(TelHandle *handle, const TelPbRecordInfo *record,
+                               TapiResponseCb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+
+#endif /* __TAPI_PHONEBOOK_H__ */
diff --git a/include/tapi_sap.h b/include/tapi_sap.h
new file mode 100644 (file)
index 0000000..90f825b
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_SAP_H__
+#define __TAPI_SAP_H__
+
+/**
+*  @addtogroup TAPI_SAP
+*  @{
+*
+*  @file tapi_sap.h
+*  @brief TAPI SAP Interface
+*/
+
+#include "tapi.h"
+#include <tel_sap.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  @brief This API is used to request to connect sap.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] max_msg_size Maximum size of a message.
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSapResult values:\n
+ *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
+ *  <b>TEL_SAP_RESULT_UNABLE_TO_ESTABLISH</b>: Unable to Establish Connection\n
+ *  <b>TEL_SAP_RESULT_NOT_SUPPORT_MAX_SIZE</b>: Server Does Not Support Message Length That Client Want to Send\n
+ *  <b>TEL_SAP_RESULT_TOO_SMALL_MAX_SIZE</b>: Client wants to Connect with very Small Message Length which is Not Supported by Server\n
+ *  <b>TEL_SAP_RESULT_ONGOING_CALL</b>: Server cannot Reset the SIM due to an Ongoing Call \n
+ *  \em data unsigned char max_msg_size : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
+ */
+TelReturn tapi_sap_req_connect(TelHandle *handle, unsigned int max_msg_size,
+                                       TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief This API is used to request to disconnect sap.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSapResult values:\n
+ *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
+ *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
+ *  \em data NULL
+ */
+TelReturn tapi_sap_req_disconnect(TelHandle *handle, TapiResponseCb callback,
+                                       void *user_data);
+
+/**
+ *  @brief This API is used to request the ATR.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSapResult values:\n
+ *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
+ *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
+ *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_OFF</b>: Card Already Powered Off\n
+ *  <b>TEL_SAP_RESULT_CARD_REMOVED</b>: Card Removed\n
+ *  <b>TEL_SAP_RESULT_DATA_NOT_AVAILABLE</b>: Data Not Available\n
+ *  \em data #TelSapAtr : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
+ */
+TelReturn tapi_sap_get_atr(TelHandle *handle, TapiResponseCb callback,
+                                       void *user_data);
+
+/**
+ *  @brief This API is used to exchange an APDU command.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] apdu_data #TelSapApdu APDU command to forward to the SIM card
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSapResult values:\n
+ *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
+ *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
+ *  <b>TEL_SAP_RESULT_CARD_NOT_ACCESSIBLE</b>: Not Accessible\n
+ *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_OFF</b>: Card Already Powered Off\n
+ *  <b>TEL_SAP_RESULT_CARD_REMOVED</b>: Card Removed\n
+ *  \em data #TelSapApduResp : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
+ */
+TelReturn tapi_sap_req_transfer_apdu(TelHandle *handle, TelSapApdu *apdu_data,
+                                       TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief This API is used to set the transport protocol.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] protocol #TelSimSapProtocol Identifier of the protocol to be used
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSapResult values:\n
+ *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
+ *  <b>TEL_SAP_RESULT_NOT_SUPPORTED</b>: Not Supported\n
+ *  \em data NULL
+ */
+TelReturn tapi_sap_req_transport_protocol(TelHandle *handle, TelSimSapProtocol protocol,
+                                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief This API is used to power ON/OFF or reset the SIM card.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] power_mode #TelSapPowerMode Indicates the type of requested power mode
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSapResult values:\n
+ *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
+ *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
+ *  <b>TEL_SAP_RESULT_CARD_NOT_ACCESSIBLE</b>: Not Accessible\n
+ *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_OFF</b>: Card Already Powered Off\n
+ *  <b>TEL_SAP_RESULT_CARD_REMOVED</b>: Card Removed\n
+ *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_ON</b>: Card Already Powered On\n
+ *  \em data NULL
+ */
+TelReturn tapi_sap_req_power_operation(TelHandle *handle, TelSapPowerMode power_mode,
+                                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief This API is used to get the card reader status.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSapResult values:\n
+ *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
+ *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
+ *  <b>TEL_SAP_RESULT_DATA_NOT_AVAILABLE</b>: Data Not Available\n
+ *  \em data #TelSapCardStatus : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
+ */
+TelReturn tapi_sap_get_cardreader_status(TelHandle *handle, TapiResponseCb callback,
+                                               void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+* @}
+*/
+#endif /* __TAPI_SAP_H__ */
index a34832c..0265ba0 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#ifndef _TAPI_SAT_H_
-#define _TAPI_SAT_H_
+/**
+*  @addtogroup TAPI_SAT
+*  @{
+*
+*  @file tapi_sat.h
+*  @brief TAPI SAT Interface
+*/
+
+#ifndef __TAPI_SAT_H__
+#define __TAPI_SAT_H__
 
-#include <tapi_type.h>
+#include <tapi.h>
+#include <tel_sat.h>
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C"
+{
+#endif
 
-int tapi_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t* pMainMenu);
-int tapi_send_ui_display_status(TapiHandle *handle, int command_id, TelSatUiDisplayStatusType_t status);
-int tapi_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t * pUserConfirmData);
-int tapi_send_sat_app_exec_result(TapiHandle handle, TelSatAppsRetInfo_t* pAppRetInfo);
+ /**
+ * @brief Sends the user choice of the main menu options to the USIM.
+ *
+ * @par Notes:
+ * A set of possible menu options is supplied by the USIM
+ * using the proactive command SET UP MENU. Telephony server receives the command
+ * and publishes this information.SAT UI application should list the menu when it initially launched.
+ * If the user subsequently chooses an option, then SAT UI application replies
+ * the command with user's choice using this API.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @param [in] handle - #TelHandle obtained from tapi_init()
+ * @param [in] menu_select - #TelSatMenuSelectionReqInfo contains information like which SAT menu item has been selected or whether Help is required.
+ * @param [in] callback - Response callback
+ * @param [in] user_data - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * - The event associated is TEL_EVENT_SAT_MENU_SELECTION_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp.
+ *
+ * @pre
+ *  - This function supposed to be called after getting TEL_EVENT_SAT_SETUP_MENU_IND event from telephony server\n
+ *
+ * @post
+ *  - None
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see tapi_sat_get_main_menu_info
+ *
+ * @code
+ * #include <tapi_sat.h>
+ * TelHandle *handle;  //obtained from tapi_init()
+ * TapiResponseCb callback; //Response callback
+ * void *user_data; // user_data for user specification
+ * TelReturn ret_status = TEL_RETURN_SUCCESS;
+ * TelSatMenuSelectionReqInfo selected_menu;
+ * selected_menu.item_identifier = '1'; //selected menu num
+ * selected_menu.b_is_help_requested = 0;
+ * ret_status = tapi_sat_select_menu(handle, &selected_menu, callback, user_data);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+TelReturn tapi_sat_select_menu(TelHandle *handle, const TelSatMenuSelectionReqInfo* menu_select, TapiResponseCb callback, void *user_data);
 
-int tapi_sat_req_menu_selection(TapiHandle *handle, const TelSatMenuSelectionReqInfo_t *menu_select_data, tapi_response_cb callback, void *user_data);
-int tapi_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t *event_data, tapi_response_cb callback, void *user_data);
+ /**
+ * @brief  Download SAT events to USIM
+ *
+ * @par Notes:
+ * A set of events for the terminal to monitor can be supplied by the USIM using the proactive command SET UP EVENT
+ * LIST. If the USIM has sent this command, and an event which is part of the list subsequently occurs, the terminal
+ * informs the USIM using this function, relevant for that event.
+ * If USIM commands to monitor a browser termination event, the SAT-UI application has to call this function.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @param [in] handle - #TelHandle obtained from tapi_init()
+ * @param [in] event_data - #TelSatEventDownloadReqInfo contains the necessary parameters like event type and information associated with it.
+ * @param [in] callback - Response callback
+ * @param [in] user_data - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * - The event associated is TEL_EVENT_SAT_EVENT_DOWNLOAD_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp.
+ *
+ * @pre
+ *  - A SET UP EVENT LIST proactive command supplies a set of event to monitor.
+ *
+ * @post
+ *  - None.
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <tapi_sat.h>
+ * TelHandle *handle;  //obtained from tapi_init()
+ * TapiResponseCb callback; //Response callback
+ * void *user_data; // user_data for user specification
+ * TelReturn ret_status = TEL_RETURN_SUCCESS;
+ * TelSatEventDownloadReqInfo event_data;
+ * event_data.event_download_type = TEL_SAT_EVENT_IDLE_SCREEN_AVAILABLE;
+ * event_data.u.b_idle_screen_available = 1; //event occur or not
+ * ret_status = tapi_sat_download_event(handle, &event_data, callback, user_data);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+TelReturn tapi_sat_download_event(TelHandle *handle, const TelSatEventDownloadReqInfo*  event_data, TapiResponseCb callback, void *user_data);
 
-__END_DECLS
+/**
+ * @brief  Send the UI display status of the alpha identifier of a specific proactive command to Telephony Server.
+ *
+ * When SAT-UI receives a proactive command, SAT-UI should draw a UI for relevant command.
+ * As it completes , SAT-UI inform USIM with this function. Afterwards, USIM is getting ready to send another commands.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @param [in] handle - #TelHandle obtained from tapi_init()
+ * @param [in] command_id - Specific proactive command id from the Application
+ * @param [in] status - #TelSatUiDisplayStatusType contain display status(SUCCESS/FAIL).
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ *  - Display request for the alpha identifier of a Proactive Command should be sent by Telephony Server.
+ *
+ * @post
+ *  - If the display status is SUCCESS Telephony Server sends a request to application for Proactive Command Execution.
+ *  - If the display status is FAIL Telephony Server sends Terminal Response for the Proactive Command.
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <tapi_sat.h>
+ * TelHandle *handle;  //obtained from tapi_init()
+ * int command_id; //this value should be server given value
+ * TelReturn ret_status = TEL_RETURN_SUCCESS;
+ * ret_status = tapi_sat_send_ui_display_status(handle, command_id, TEL_SAT_DISPLAY_SUCCESS);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+TelReturn tapi_sat_send_ui_display_status(TelHandle *handle, int command_id, TelSatUiDisplayStatusType status);
 
-#endif /* _TAPI_SAT_H_ */
+ /**
+ * @brief  This function sends the UI User confirmation data for a specific Proactive Command to the Telephony Server.
+ *
+ * In case that the proactive commands need user response, SAT-UI can send it using this function.
+ * The response can be 'OK', 'Cancel', 'Move Back' and 'End Session'. Upon this response, USIM can send
+ * a proactive command subsequently to indicate next UI action.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * @param [in] handle - #TelHandle obtained from tapi_init()
+ * @param [in] pUserConfirmData -#TelSatUiUserConfirmInfo contains Specific user confirmation data.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User Confirmation request for a specific Proactive Command should be sent to application by Telephony Server.
+ *
+ * @post
+ *  - If the User Confirmation is positive Telephony Server sends a request to application for Proactive Command Execution.
+ *  - If the User Confirmation is negative Telephony Server sends Terminal Response for the Proactive Command.
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <tapi_sat.h>
+ * TelHandle *handle;  //obtained from tapi_init()
+ * TelReturn ret_status = TEL_RETURN_SUCCESS;
+ * TelSatUiUserConfirmInfo cfm_data;
+ * cfm_data.command_id = '1'; //this value should be server given value
+ * cfm_data.command_type = TEL_SAT_CMD_TYPE_SETUP_CALL;
+ * cfm_data.key_type = TEL_SAT_USER_CONFIRM_YES;
+ * ret_status = tapi_sat_send_ui_user_confirm(handle, &cfm_data);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+TelReturn tapi_sat_send_ui_user_confirm(TelHandle *handle, TelSatUiUserConfirmInfo *user_confirm_data);
+
+ /**
+ * @brief  This function provides SAT(Sim Application toolkit) Main Menu information for SAT-UI.
+ *
+ * Once the USIM supplies the SET UP MENU proactivae command, telephony server not only publish
+ * TAPI_EVENT_SAT_SETUP_MENU_IND event but also caches the menu information.
+ * The SAT-UI applicatoin can get the menu list using this function.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @param [in] handle - #TelHandle obtained from tapi_init()
+ * @param [out] main_menu - #TelSatSetupMenuInfo contain all menu related information which are required like menu title, icon, item count, etc.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - When SAT SIM is inserted. we can get meaningful data. without SAT SIM, Null is returned
+ *
+ * @post
+ *  - None.
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see tapi_sat_select_menu
+ *
+ * @code
+ * #include <tapi_sat.h>
+ * TelHandle *handle;  //obtained from tapi_init()
+ * TelReturn ret_status = TEL_RETURN_SUCCESS;
+ * TelSatSetupMenuInfo menu; //this struct will be pull up with SIM menu info
+ * ret_status = tapi_sat_get_main_menu_info(handle, &menu);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+TelReturn tapi_sat_get_main_menu_info(TelHandle *handle, TelSatSetupMenuInfo *main_menu);
+
+ /**
+ * @brief  This API provides the Operation result(s) for the Proactive Command execution by the Application(s) to the Telephony Server.
+ *
+ * The USIM commands the terminal to do some predefined action, such as sending short message,
+ * making a voice call, launching an Internet browser and so on. Those actions are defined by 3GPP TS31.111.
+ * Once a application executes the requested action by USIM, it reports the operation result to USIM using this function.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ **
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @param [in] handle - #TelHandle obtained from tapi_init()
+ * @param [out] app_ret_info - #TelSatAppsRetInfo contains execution result of a specific proactive command by application.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - Proactive Command execution request should be sent by Telephony Server to SAT related applications.
+ *
+ * @post
+ *  - None.
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
+ *
+ * @par Prospective Clients:
+ * Embeded applications which are predefined by 3GPP TS31.111
+ *
+ * @see None
+ *
+ * @code
+ * #include <tapi_sat.h>
+ * TelHandle *handle;  //obtained from tapi_init()
+ * TelReturn ret_status = TEL_RETURN_SUCCESS;
+ * TelSatAppsRetInfo app_ret;
+ * app_ret.command_type = TEL_SAT_CMD_TYPE_SETUP_CALL;
+ * app_ret.command_id = 1; //this value should be server given value
+ * app_ret.apps_ret.setup_call.resp = TEL_SAT_R_SUCCESS;
+ * ret_status = tapi_sat_send_app_exec_result(handle, &app_ret);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+TelReturn tapi_sat_send_app_exec_result(TelHandle *handle, TelSatAppsRetInfo *app_ret_info);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TAPI_SAT_H__ */
+
+/**
+ * @}
+ */
diff --git a/include/tapi_sim.h b/include/tapi_sim.h
new file mode 100644 (file)
index 0000000..355ee3d
--- /dev/null
@@ -0,0 +1,917 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+*  @addtogroup TAPI_SIM
+*  @{
+*
+*  @file tapi_sim.h
+*  @brief TAPI SIM Interface
+*/
+
+#ifndef __TAPI_SIM_H__
+#define __TAPI_SIM_H__
+
+#include <tapi.h>
+#include <tel_sim.h>
+#include <tel_return.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ *  @brief Get SIM Card Initialization status and SIM Card Identification
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] card_status SIM initialization status/Sim card identification value(#TelSimCardStatusInfo)
+ */
+TelReturn tapi_sim_get_init_info(TelHandle *handle, TelSimCardStatusInfo *card_status);
+
+/**
+ *  @brief Get the Card Type whether Card is a SIM or a USIM
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] card_type SIM card type information (#TelSimCardType)
+ */
+TelReturn tapi_sim_get_type(TelHandle *handle, TelSimCardType *card_type);
+
+/**
+ *  @brief Get the IMSI information
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] imsi IMSI information (#TelSimImsiInfo)
+ */
+TelReturn tapi_sim_get_imsi(TelHandle *handle, TelSimImsiInfo *imsi);
+
+/**
+ *  @brief Get sim ECC data
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] ecc SIM emergency call code information (#TelSimEccList)
+ */
+TelReturn tapi_sim_get_ecc(TelHandle *handle, TelSimEccList *ecc);
+
+/**
+ *  @brief Get a Unique identification number of the sim
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data unsigned char icc_id : Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_iccid(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the language preference(indication) information
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimLanguagePreferenceCode : Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_language(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Update the language preference information to SIM card
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] language Language preference information (#TelSimLanguagePreferenceCode)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+  *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data NULL
+ */
+TelReturn tapi_sim_set_language(TelHandle *handle, TelSimLanguagePreferenceCode language, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the SIM Call forwarding indication related data(EF-CFIS and CPHS case)
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimCfisList : Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_callforwarding_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the SIM message waiting indication related data(EF-MWIS and CPHS case)
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimMwisList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_messagewaiting_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Set the SIM message waiting indication related data(EF-MWIS and CPHS case)
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] req_mw Message Waiting related informations (#TelSimMwis)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data NULL
+ */
+TelReturn tapi_sim_set_messagewaiting_info(TelHandle *handle, TelSimMwis *req_mw, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the SIM mailbox related data(EF-MBDN, MBDI and CPHS case)
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimMailboxList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_mailbox_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Set the SIM mailbox related data(EF-MBDN, MBDI and CPHS case)
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] req_mb Mailbox related informations (#TelSimMailBoxNumber)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data NULL
+ */
+TelReturn tapi_sim_set_mailbox_info(TelHandle *handle, TelSimMailBoxNumber *req_mb, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the SIM MSISDN data
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimMsisdnList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_msisdn(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the the SIM SPN data
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimSpn: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_spn(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the SIM CPHS NETNAME data
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimCphsNetName: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_cphs_netname(TelHandle *handle, TapiResponseCb callback,        void *user_data);
+
+/**
+ *  @brief Get the Service Provider Display Information
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimSpPlmnList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_sp_display_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Execute the authentication procedure by using SIM
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] authentication_data Authentication code to be validated by ISIM,3G and GSM application in the SIM card (#TelSimAuthenticationData)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimAuthenticationResponse: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_req_authentication(TelHandle *handle, TelSimAuthenticationData *authentication_data, TapiResponseCb callback, void *user_data);
+
+
+/**
+ *  @brief This function performs PIN1/PIN2/SIM LOCK verification. This function performs PIN verification based on the pin type passed along with pin data
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] pin_data PIN code, entered by the user. you should make all parameters (#TelSimSecPinPw)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimSecPinResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_verify_pins(TelHandle *handle, TelSimSecPinPw  *pin_data, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief This function performs unblock PIN1/PIN2 operation based on PUK information passed along with
+ *  unblock information entered by the user
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] puk_data Specifies unblocking PIN password and Specifies PIN password which you want to use after unblocking operation (#TelSimSecPukPw)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimSecPukResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_verify_puks(TelHandle *handle, TelSimSecPukPw  *puk_data, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Changes PIN1/PIN2 code based on the pin type passed along with old pin data and new pin data
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] pin_data Pin types, old pin code and new pin code (#TelSimSecChangePinPw)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimSecPinResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_change_pins(TelHandle *handle, TelSimSecChangePinPw *pin_data, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Disable the SIM facility
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] pw Structure which contains facility type and password (#TelSimFacilityPw)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimFacilityResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_disable_facility(TelHandle *handle, TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Enable the SIM facility
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] pw Structure which contains facility type and password (#TelSimFacilityPw)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimFacilityResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_enable_facility(TelHandle *handle, TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data);
+
+
+/**
+ *  @brief Get the SIM facility
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] type Type of security lock type enum values (#TelSimLockType)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimFacilityInfo: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_facility(TelHandle *handle, TelSimLockType type, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Get the SIM LOCK TYPE information
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] type Type of security lock type enum values (#TelSimLockType)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimLockInfo: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_get_lock_info(TelHandle *handle, TelSimLockType type, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief  This function provides common interface for accessing SIM data based on USIM generic command in ETSI TS 102 221
+ * and 3GPP TS 31.102 Characteristics of the Universal Subscriber Identity Module (USIM) application.
+ * This API provides only interface to send APDU. User should know well APDU usage.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] apdu_data APDU data (#TelSimApdu)
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimApduResp: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_req_apdu(TelHandle *handle, TelSimApdu* apdu_data, TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief  This function provides common interface to get SIM ATR(Answer To Reset) value
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSimResult values:\n
+ *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
+ *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
+ *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
+ *                                                                                                                     when invalid SIM command is given or incorrect
+ *                                                                                                                     parameters are supplied to the SIM\n
+ *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
+ *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
+ *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
+ *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
+ *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
+ *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
+ *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
+ *  \em data #TelSimAtr: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
+ */
+TelReturn tapi_sim_req_atr(TelHandle *handle, TapiResponseCb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TAPI_SIM_H__ */
+
+/**
+* @}
+*/
diff --git a/include/tapi_sms.h b/include/tapi_sms.h
new file mode 100644 (file)
index 0000000..abb19ec
--- /dev/null
@@ -0,0 +1,468 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_SMS_H__
+#define __TAPI_SMS_H__
+
+/**
+*  @addtogroup TAPI_SMS
+*  @{
+*
+*  @file tapi_sms.h
+*  @brief TAPI SMS Interface
+*/
+
+#include "tapi.h"
+#include <tel_sms.h>
+#include <tel_return.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ *  @brief Sends an SMS message to the Network(UMTS).
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] send_info #TelSmsSendInfo Sms Information to be sent
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_NETWORK_CONGESTION</b>: Network Congestion\n
+ *  <b>TEL_SMS_RESULT_NETWORK_FAILURE</b>: Network Failure\n
+ *  <b>TEL_SMS_RESULT_INVALID_MANDATORY_INFO</b>: Invalid Mandatory Info\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_send(TelHandle *handle, const TelSmsSendInfo *send_info,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Reads an SMS message from the SIM Card storage.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] index Index of the Message to be Read
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data #TelSmsSimDataInfo
+ */
+TelReturn tapi_sms_read_sms_in_sim(TelHandle *handle, unsigned int index,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Writes an SMS message to the SIM Card storage.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] wdata #TelSmsSimDataInfo SMS Message structure to write on the SIM
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data unsigned int index
+ */
+TelReturn tapi_sms_write_sms_in_sim(TelHandle *handle, const TelSmsSimDataInfo *wdata,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Deletes an SMS message from the SIM Card storage.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] index Index of the Message to be Deleted
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_delete_sms_in_sim(TelHandle *handle, unsigned int index,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Fetches SIM card's SMS capacity and state.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data #TelSmsStoredMsgCountInfo
+ */
+TelReturn tapi_sms_get_count(TelHandle *handle, TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Sets SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] cb_conf #TelSmsCbConfigInfo Structure containing SMS CB configuration parameters to be set in (U)SIM
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_set_cb_config(TelHandle *handle, const TelSmsCbConfigInfo *cb_conf,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Retrieves SMS CB configuration parameters from EF-CBMI file in the (U)SIM.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data #TelSmsCbConfigInfo
+ */
+TelReturn tapi_sms_get_cb_config(TelHandle *handle, TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Fetches SMS parameters for a particular SIM.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data #TelSmsParamsInfoList
+ */
+TelReturn tapi_sms_get_parameters(TelHandle *handle, TapiResponseCb callback,
+                                       void *user_data);
+
+/**
+ *  @brief Set SMS parameters which are used in the origination of MO messages.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] params #TelSmsParamsInfo SMS Parameter information
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_set_parameters(TelHandle *handle,
+                                       const TelSmsParamsInfo *params,
+                                       TapiResponseCb callback,
+                                       void *user_data);
+
+/**
+ *  @brief Sends a deliver report (for the received incoming SMS) to the network.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] dr_info #TelSmsDeliverReportInfo SMS Data package and Report.
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_send_deliver_report(TelHandle *handle,
+                               const TelSmsDeliverReportInfo *dr_info,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Sets SMS Service Centre Address information (in order to send the SMS).
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] sca #TelSmsSca SCA address information
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_set_sca(TelHandle *handle, TelSmsSca *sca,
+                               TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Fetches the current SMS Service Centre Address information.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data #TelSmsSca
+ */
+TelReturn tapi_sms_get_sca(TelHandle *handle, TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief  Informs modem about  the memory status of PDA (whether FULL or AVAILABLE).
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] available Memory Status. <b>TRUE</b>: PDA Memory available\n <b>FALSE</b>: PDA Memory FULL\n
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_set_memory_status(TelHandle *handle, gboolean available,
+                                       TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief  Set the message status for an SMS.
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] status_info #TelSmsStatusInfo Status of the message to be set.
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSmsResult values:\n
+ *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
+ *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
+ *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
+ *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
+ *  \em data NULL
+ */
+TelReturn tapi_sms_set_message_status(TelHandle *handle, TelSmsStatusInfo *status_info,
+                                       TapiResponseCb callback, void *user_data);
+
+/**
+ *  @brief Fetches the Init Status of SMS service.
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] init_status <b>TRUE</b>: SMS service is ready\n <b>FALSE</b>: SMS service is NOT ready.
+ */
+TelReturn tapi_sms_get_init_status(TelHandle *handle, gboolean *init_status);
+
+/**
+ *  @brief Fetches the  SIM memory status.
+ *
+ *  @par Sync (or) Async:
+ *  Synchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[out] memory_full <b>TRUE</b>: Memory is available\n <b>FALSE</b>: Memory is NOT available.
+ */
+TelReturn tapi_sms_get_sim_memory_status(TelHandle *handle,
+                                       gboolean *memory_full);
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+* @}
+*/
+
+#endif /* __TAPI_SMS_H__ */
diff --git a/include/tapi_ss.h b/include/tapi_ss.h
new file mode 100644 (file)
index 0000000..b517fd5
--- /dev/null
@@ -0,0 +1,359 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_SS_H__
+#define __TAPI_SS_H__
+
+/**
+*  @addtogroup TAPI_SS
+*  @{
+*
+*  @file tapi_ss.h
+*  @brief TAPI SS Interface
+*/
+
+#include "tapi.h"
+#include <tel_ss.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ *  @brief Sends a request to activate/deactivate call barring
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] barring_info #TelSsBarringInfo Barring Info to set
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  <b>TEL_SS_RESULT_INVALID_PASSWORD</b>: Invalid Password\n
+ *  <b>TEL_SS_RESULT_PASSWORD_BLOCKED</b>: Password Blocked\n
+ *  \em data NULL
+ */
+ TelReturn tapi_ss_set_barring(TelHandle *handle,
+                       const TelSsBarringInfo *barring_info,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Sends a request to get call barring status
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] get_barring_info #TelSsBarringGetInfo Info to get Barring Status
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data #TelSsBarringResp if result is TEL_SS_RESULT_SUCCESS
+ */
+TelReturn tapi_ss_get_barring_status(TelHandle *handle,
+                       const TelSsBarringGetInfo *get_barring_info,
+                       TapiResponseCb callback,
+                       void *user_data);
+
+/**
+ *  @brief Sends a request to change call barring password
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] barring_pwd_info #TelSsBarringPwdInfo Barring Info to change password
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  <b>TEL_SS_RESULT_INVALID_PASSWORD</b>: Invalid Password\n
+ *  <b>TEL_SS_RESULT_PASSWORD_BLOCKED</b>: Password Blocked\n
+ *  \em data NULL
+ */
+TelReturn tapi_ss_change_barring_password(TelHandle *handle,
+                               const TelSsBarringPwdInfo *barring_pwd_info,
+                               TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to activate/deactivate call forwarding
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] forwarding_info #TelSsForwardInfo forwarding Info to set
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data NULL
+ */
+TelReturn tapi_ss_set_forwarding(TelHandle *handle,
+                               const TelSsForwardInfo *forwarding_info,
+                               TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to get call forwarding status
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] get_forwarding_info #TelSsForwardGetInfo Info to get Forwarding Status
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data #TelSsForwardingResp if result is TEL_SS_RESULT_SUCCESS
+ */
+TelReturn tapi_ss_get_forwarding_status(TelHandle *handle,
+                               const TelSsForwardGetInfo *get_forwarding_info,
+                               TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to activate/deactivate call waiting
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] waiting_info #TelSsWaitingInfo Waiting Info to set
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data NULL
+ */
+TelReturn tapi_ss_set_waiting(TelHandle *handle,
+                               const TelSsWaitingInfo *waiting_info,
+                               TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to get call waiting status
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] class #TelSsClass Class Info to get Forwarding Status
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data #TelSsWaitingResp if result is TEL_SS_RESULT_SUCCESS
+ */
+TelReturn tapi_ss_get_waiting_status(TelHandle *handle, TelSsClass class,
+                               TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to set CLI
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] cli_info #TelSsCliInfo CLI Info to set
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data NULL
+ */
+TelReturn tapi_ss_set_cli(TelHandle *handle,
+                               const TelSsCliInfo *cli_info,
+                               TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to get CLI status
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] type #TelSsCliType Type Info to get CLI Status
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data #TelSsCliResp if result is TEL_SS_RESULT_SUCCESS
+ */
+TelReturn tapi_ss_get_cli_status(TelHandle *handle, TelSsCliType type,
+                               TapiResponseCb callback,
+                               void *user_data);
+
+/**
+ *  @brief Sends a request to send USSD
+ *
+ *  @par Sync (or) Async:
+ *  Asynchronous API
+ *
+ *  @return Possible #TelReturn values:\n
+ *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
+ *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
+ *
+ *  @param[in] handle #TelHandle obtained from tapi_init()
+ *  @param[in] ussd_request #TelSsUssdInfo USSD Info to send request
+ *  @param[in] callback #TapiResponseCb Response callback
+ *  @param[in] user_data Callback user data
+ *
+ *  @par Async Response:
+ *  \em result Possible #TelSsResult values:\n
+ *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
+ *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
+ *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
+ *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
+ *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
+ *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
+ *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
+ *  \em data #TelSsUssdResp if result is TEL_SS_RESULT_SUCCESS
+ */
+TelReturn tapi_ss_send_ussd_request(TelHandle *handle,
+                                       const TelSsUssdInfo *ussd_request,
+                                       TapiResponseCb callback,
+                                       void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+* @}
+*/
+
+#endif /* __TAPI_SS_H__ */
diff --git a/include/tapi_type.h b/include/tapi_type.h
deleted file mode 100644 (file)
index 866c6b4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * libslp-tapi
- *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_TYPE_H__
-#define __TAPI_TYPE_H__
-
-__BEGIN_DECLS
-
-#define DBUS_TELEPHONY_SERVICE      "org.tizen.telephony"
-#define DBUS_TELEPHONY_DEFAULT_PATH "/org/tizen/telephony"
-
-typedef struct tapi_handle TapiHandle;
-
-typedef void (*tapi_notification_cb)(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
-typedef void (*tapi_response_cb)(TapiHandle *handle, int result, void *data, void *user_data);
-
-__END_DECLS
-
-#endif /* __TAPI_TYPE_H__ */
diff --git a/introspection/call.xml b/introspection/call.xml
new file mode 100644 (file)
index 0000000..5c2cbef
--- /dev/null
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+  <interface name="org.tizen.telephony.Call">
+
+    <!-- Refer to TAPI API: tapi_call_dial -->
+    <method name="Dial">
+      <arg direction="in" type="i" name="call_type"/>
+      <arg direction="in" type="i" name="ecc"/>
+      <arg direction="in" type="s" name="number"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_answer -->
+    <method name="Answer">
+      <arg direction="in" type="i" name="answer_type"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_end-->
+    <method name="End">
+      <arg direction="in" type="u" name="call_id"/>
+      <arg direction="in" type="i" name="end_type"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_send_dtmf -->
+    <method name="SendDtmf">
+      <arg direction="in" type="s" name="dtmf_str"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_hold -->
+    <method name="Hold">
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_active -->
+    <method name="Active">
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_swap -->
+    <method name="Swap">
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_join -->
+    <method name="Join">
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_split -->
+    <method name="Split">
+      <arg direction="in" type="u" name="call_id"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_transfer -->
+    <method name="Transfer">
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_deflect -->
+    <method name="Deflect">
+      <arg direction="in" type="s" name="deflect_to"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+     <!-- Refer to TAPI API: tapi_call_set_active_line -->
+    <method name="SetActiveLine">
+      <arg direction="in" type="i" name="active_line"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_get_active_line -->
+    <method name="GetActiveLine">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="i" name="active_line"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_get_status -->
+    <method name="GetStatus">
+      <arg direction="in" type="u" name="call_id"/>
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="call_id"/>
+      <arg direction="out" type="i" name="call_type"/>
+      <arg direction="out" type="i" name="call_state"/>
+      <arg direction="out" type="b" name="mo_call"/>
+      <arg direction="out" type="b" name="mpty"/>
+      <arg direction="out" type="i" name="cli_validity"/>
+      <arg direction="out" type="s" name="number"/>
+      <arg direction="out" type="i" name="cni_validity"/>
+      <arg direction="out" type="s" name="name"/>
+      <arg direction="out" type="b" name="forward"/>
+      <arg direction="out" type="i" name="active_line"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_get_status_all -->
+    <method name="GetStatusAll">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="count"/>
+      <arg direction="out" type="aa{sv}" name="status_list"/>
+    </method>
+
+    <!-- Refer to TAPI API: -->
+    <method name="SetVolumeInfo">
+      <arg direction="in" type="i" name="device"/>
+      <arg direction="in" type="u" name="volume"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_get_volume_info -->
+    <method name="GetVolumeInfo">
+      <arg direction="in" type="i" name="sound_device"/>
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="volume_info"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_set_sound_path -->
+    <method name="SetSoundPath">
+      <arg direction="in" type="i" name="path"/>
+      <arg direction="in" type="b" name="ex_volume"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_set_mute_status -->
+    <method name="SetMute">
+       <arg direction="in" type="b" name="mute"/>
+       <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_get_mute_status -->
+    <method name="GetMuteStatus">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="b" name="mute"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_set_sound_recording -->
+    <method name="SetSoundRecording">
+      <arg direction="in" type="i" name="sound_rec"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_call_set_sound_equalization -->
+    <method name="SetSoundEqualization">
+      <arg direction="in" type="i" name="mode"/>
+      <arg direction="in" type="i" name="direction"/>
+      <arg direction="in" type="aq" name="parameter"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TEL_NOTI_VOICE_CALL_STATUS_IDLE -->
+    <signal name="VoiceCallStatusIdle">
+      <arg type="u" name="call_id"/>
+      <arg type="i" name="cause"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VOICE_CALL_STATUS_ACTIVE -->
+    <signal name="VoiceCallStatusActive">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VOICE_CALL_STATUS_HELD -->
+    <signal name="VoiceCallStatusHeld">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VOICE_CALL_STATUS_DIALING -->
+    <signal name="VoiceCallStatusDialing">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VOICE_CALL_STATUS_ALERT -->
+    <signal name="VoiceCallStatusAlert">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VOICE_CALL_STATUS_INCOMING -->
+    <signal name="VoiceCallStatusIncoming">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VIDEO_CALL_STATUS_IDLE -->
+    <signal name="VideoCallStatusIdle">
+      <arg type="u" name="call_id"/>
+      <arg type="i" name="end_cause"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE -->
+    <signal name="VideoCallStatusActive">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VIDEO_CALL_STATUS_DIALING -->
+    <signal name="VideoCallStatusDialing">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VIDEO_CALL_STATUS_ALERT -->
+    <signal name="VideoCallStatusAlert">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_VIDEO_CALL_STATUS_INCOMING -->
+    <signal name="VideoCallStatusIncoming">
+      <arg type="u" name="call_id"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MO_WAITING -->
+    <signal name="MoWaiting">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MO_FORWARDED -->
+    <signal name="MoForwarded">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING -->
+    <signal name="MoBarredIncoming">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING -->
+    <signal name="MoBarredOutgoing">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL -->
+    <signal name="MoForwardUnconditional">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL -->
+    <signal name="MoForwardConditional">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MO_DEFLECTED -->
+    <signal name="MoDeflected">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_TRANSFERED -->
+    <signal name="Transfered">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MT_FORWARDED -->
+    <signal name="MtForwarded">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_MT_DEFLECTED -->
+    <signal name="MtDeflected">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_HELD -->
+    <signal name="CallHeld">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_ACTIVE -->
+    <signal name="CallActive">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_INFO_JOINED -->
+    <signal name="CallJoined">
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_SOUND_RINGBACK_TONE -->
+    <signal name="CallSoundRingbackTone">
+      <arg type="i" name="status"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_SOUND_WBAMR -->
+    <signal name="CallSoundWbamr">
+      <arg type="i" name="status"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_SOUND_EQUALIZATION -->
+    <signal name="CallSoundEqualization">
+      <arg type="i" name="mode"/>
+      <arg type="i" name="direction"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_CALL_SOUND_CLOCK_STATUS -->
+    <signal name="CallSoundClockStatus">
+       <arg type="b" name="status"/>
+    </signal>
+
+    </interface>
+</node>
diff --git a/introspection/gps.xml b/introspection/gps.xml
new file mode 100644 (file)
index 0000000..54523e5
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+  <interface name="org.tizen.telephony.Gps">
+
+    <!-- Refer to TAPI API: tapi_gps_confirm_measure_pos() -->
+    <method name="ConfirmMeasurePos">
+      <arg direction="in" type="s" name="data"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_gps_set_frequency_aiding() -->
+    <method name="SetFrequencyAiding">
+      <arg direction="in" type="b" name="state"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TEL_NOTI_GPS_ASSIST_DATA event -->
+    <signal name="AssistData">
+      <arg type="s" name="data"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_GPS_MEASURE_POSITION event -->
+    <signal name="MeasurePosition">
+      <arg type="s" name="data"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_GPS_RESET_ASSIST_DATA event -->
+    <signal name="ResetAssistData">
+    </signal>
+
+  </interface>
+</node>
diff --git a/introspection/modem.xml b/introspection/modem.xml
new file mode 100644 (file)
index 0000000..44df186
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+  <interface name="org.tizen.telephony.Modem">
+
+    <!-- Refer to TAPI API: tapi_modem_set_power_status() -->
+    <method name="SetPowerStatus">
+      <arg direction="in" type="i" name="status"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_modem_set_flight_mode() -->
+    <method name="SetFlightMode">
+      <arg direction="in" type="b" name="enable"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_modem_get_flight_mode() -->
+    <method name="GetFlightMode">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="b" name="enable"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_modem_get_version() -->
+    <method name="GetVersion">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="s" name="software_version"/>
+      <arg direction="out" type="s" name="hardware_version"/>
+      <arg direction="out" type="s" name="calibration_date"/>
+      <arg direction="out" type="s" name="product_code"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_modem_get_imei() -->
+    <method name="GetImei">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="s" name="imei"/>
+    </method>
+
+    <!-- Caches power status -->
+    <property name="status" type="i" access="read"/>
+
+    <!-- Caches flight mode status -->
+    <property name="flight_mode_status" type="i" access="read"/>
+
+    <!-- Caches IMEI value -->
+    <property name="imei" type="s" access="read"/>
+
+    <!--
+         Version information
+         @version: software_version, hardware_version, calibration_date, product_code
+    -->
+    <property name="version" type="a{sv}" access="read"/>
+
+  </interface>
+</node>
diff --git a/introspection/network.xml b/introspection/network.xml
new file mode 100644 (file)
index 0000000..edadd29
--- /dev/null
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+
+  <interface name="org.tizen.telephony.Network">
+
+    <!-- Refer to TAPI API: tapi_network_get_identity_info()-->
+    <method name="GetIdentityInfo">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="s" name="plmn"/>
+      <arg direction="out" type="s" name="short_name"/>
+      <arg direction="out" type="s" name="long_name"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_search()-->
+    <method name="Search">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="count"/>
+      <arg direction="out" type="aa{sv}" name="network_list"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_cancel_search()-->
+    <method name="CancelSearch">
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_select_automatic() -->
+    <method name="SelectAutomatic">
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API:tapi_network_select_manual() -->
+    <method name="SelectManual">
+      <arg direction="in" type="s" name="plmn"/>
+      <arg direction="in" type="i" name="act"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_get_selection_mode() -->
+    <method name="GetSelectionMode">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="i" name="selection_mode"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_set_preferred_plmn() -->
+    <method name="SetPreferredPlmn">
+      <arg direction="in" type="u" name="index"/>
+      <arg direction="in" type="s" name="plmn"/>
+      <arg direction="in" type="i" name="act"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_get_preferred_plmn()-->
+    <method name="GetPreferredPlmn">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="count"/>
+      <arg direction="out" type="aa{sv}" name="list"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_set_mode()-->
+    <method name="SetMode">
+      <arg direction="in" type="i" name="mode"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_get_mode()-->
+    <method name="GetMode">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="i" name="mode"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_network_get_neighboring_cell_info()-->
+    <method name="GetNgbrCellInfo">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="gsm_list_count"/>
+      <arg direction="out" type="aa{sv}" name="gsm_list"/>
+      <arg direction="out" type="u" name="umts_list_count"/>
+      <arg direction="out" type="aa{sv}" name="umts_list"/>
+    </method>
+
+    <!-- Refer to TEL_NOTI_NETWORK_REGISTRATION_STATUS -->
+    <signal name="RegistrationStatus">
+      <arg type="i" name="cs_status"/>
+      <arg type="i" name="ps_status"/>
+      <arg type="i" name="act"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_NETWORK_CELL_INFO -->
+    <signal name="CellInfo">
+      <arg type="u" name="lac"/>
+      <arg type="u" name="cell_id"/>
+      <arg type="u" name="rac"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_NETWORK_IDENTITY -->
+    <signal name="Identity">
+      <arg type="s" name="plmn"/>
+      <arg type="s" name="short_name"/>
+      <arg type="s" name="long_name"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_NETWORK_RSSI -->
+    <signal name="Rssi">
+      <arg type="u" name="rssi"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_NETWORK_TIME_INFO -->
+    <signal name="TimeInfo">
+      <arg type="u" name="year"/>
+      <arg type="u" name="month"/>
+      <arg type="u" name="day"/>
+      <arg type="u" name="hour"/>
+      <arg type="u" name="minute"/>
+      <arg type="u" name="second"/>
+      <arg type="i" name="gmtoff"/>
+      <arg type="b" name="isdst"/>
+      <arg type="i" name="dstoff"/>
+      <arg type="s" name="plmn"/>
+    </signal>
+
+     <!-- Caches rssi -->
+    <property name="rssi" type="u" access="read"/>
+
+    <!-- Caches lac  -->
+    <property name="lac" type="u" access="read"/>
+
+    <!-- Caches cell_id  -->
+    <property name="cell_id" type="u" access="read"/>
+
+    <!-- Caches rac  -->
+    <property name="rac" type="u" access="read"/>
+
+    <!-- Caches act -->
+    <property name="act" type="i" access="read"/>
+
+    <!-- Caches circuit_status  -->
+    <property name="cs_status" type="i" access="read"/>
+
+    <!-- Caches packet_status  -->
+    <property name="ps_status" type="i" access="read"/>
+
+  </interface>
+
+</node>
diff --git a/introspection/phonebook.xml b/introspection/phonebook.xml
new file mode 100644 (file)
index 0000000..c3da7f1
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+
+    <interface name="org.tizen.telephony.Phonebook">
+        <!-- Refer to TAPI API: tapi_pb_get_sim_pb_init_info () -->
+        <method name="GetInitInfo">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="b" name="init_completed"/>
+            <arg direction="out" type="b" name="fdn"/>
+            <arg direction="out" type="b" name="adn"/>
+            <arg direction="out" type="b" name="sdn"/>
+            <arg direction="out" type="b" name="usim"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_pb_get_sim_pb_info() -->
+        <method name="GetInfo">
+            <arg direction="in" type="i" name="pb_type"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="pb_type"/>
+            <arg direction="out" type="a{sv}" name="info_u"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_pb_read_sim_pb_record() -->
+        <method name="ReadRecord">
+            <arg direction="in" type="i" name="pb_type"/>
+            <arg direction="in" type="u" name="index"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="index"/>
+            <arg direction="out" type="u" name="next_index"/>
+            <arg direction="out" type="i" name="pb_type"/>
+            <arg direction="out" type="a{sv}" name="rec_u"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_pb_update_sim_pb_record() -->
+        <method name="UpdateRecord">
+            <arg direction="in" type="i" name="pb_type"/>
+            <arg direction="in" type="u" name="index"/>
+            <arg direction="in" type="a{sv}" name="rec_u"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_pb_delete_sim_pb_record() -->
+        <method name="DeleteRecord">
+            <arg direction="in" type="i" name="pb_type"/>
+            <arg direction="in" type="u" name="index"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TEL_NOTI_PB_STATUS event -->
+        <signal name="Status">
+            <arg type="b" name="init_status"/>
+            <arg type="b" name="fdn"/>
+            <arg type="b" name="adn"/>
+            <arg type="b" name="sdn"/>
+            <arg type="b" name="usim"/>
+        </signal>
+
+    </interface>
+
+</node>
diff --git a/introspection/sap.xml b/introspection/sap.xml
new file mode 100644 (file)
index 0000000..36f0b01
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+
+       <interface name="org.tizen.telephony.Sap">
+
+               <!-- Refer to TAPI API: tapi_sap_req_connect() -->
+               <method name="ReqConnect">
+                       <arg direction="in" type="u" name="max_msg_size"/>
+                       <arg direction="out" type="i" name="result"/>
+                       <arg direction="out" type="u" name="max_msg_size_resp"/>
+               </method>
+
+               <!-- Refer to TAPI API: tapi_sap_req_disconnect() -->
+               <method name="ReqDisconnect">
+                       <arg direction="out" type="i" name="result"/>
+               </method>
+
+               <!-- Refer to TAPI API: tapi_sap_get_atr() -->
+               <method name="GetAtr">
+                       <arg direction="out" type="i" name="result"/>
+                       <arg direction="out" type="s" name="atr"/>
+               </method>
+
+               <!-- Refer to TAPI API: tapi_sap_req_transfer_apdu() -->
+               <method name="ReqTransferApdu">
+                       <arg direction="in" type="s" name="apdu"/>
+                       <arg direction="out" type="i" name="result"/>
+                       <arg direction="out" type="s" name="apdu_resp"/>
+               </method>
+
+               <!-- Refer to TAPI API: tapi_sap_req_transport_protocol() -->
+               <method name="ReqTransportProtocol">
+                       <arg direction="in" type="i" name="protocol"/>
+                       <arg direction="out" type="i" name="result"/>
+               </method>
+
+               <!-- Refer to TAPI API: tapi_sap_req_power_operation() -->
+               <method name="ReqPowerOperation">
+                       <arg direction="in" type="i" name="power_mode"/>
+                       <arg direction="out" type="i" name="result"/>
+               </method>
+
+               <!-- Refer to TAPI API: tapi_sap_get_cardreader_status() -->
+               <method name="GetCardReaderStatus">
+                       <arg direction="out" type="i" name="result"/>
+                       <arg direction="out" type="i" name="status"/>
+               </method>
+
+               <signal name="Status">
+                       <arg type="i" name="status"/>
+               </signal>
+
+       </interface>
+
+</node>
diff --git a/introspection/sat.xml b/introspection/sat.xml
new file mode 100644 (file)
index 0000000..0515c1e
--- /dev/null
@@ -0,0 +1,265 @@
+<node>
+       <!--
+               org.tizen.telephony.Sat:
+               @short_description: Tizen Telephony SIM Application Toolkit interface
+
+               SAT interface.
+
+       -->
+       <interface name="org.tizen.telephony.Sat">
+
+               <method name="GetMainMenuInfo">
+                       <arg direction="out" type="i" name="result"/>
+                       <arg direction="out" type="i" name="command_id"/>
+                       <arg direction="out" type="b" name="menu_present"/>
+                       <arg direction="out" type="s" name="main_title"/>
+                       <arg direction="out" type="v" name="menu_item"/>
+                       <arg direction="out" type="i" name="menu_count"/>
+                       <arg direction="out" type="b" name="menu_help_info"/>
+                       <arg direction="out" type="b" name="menu_updated"/>
+               </method>
+
+               <method name="SendUiDisplayStatus">
+                       <arg direction="in" type="i" name="command_id"/>
+                       <arg direction="in" type="b" name="display_status"/>
+                       <arg direction="out" type="i" name="result"/>
+               </method>
+
+               <method name="SendUserConfirm">
+                       <arg direction="in" type="i" name="command_id"/>
+                       <arg direction="in" type="i" name="command_type"/>
+                       <arg direction="in" type="i" name="user_confirm_type"/>
+                       <arg direction="in" type="v" name="additional_data"/>
+                       <arg direction="out" type="i" name="result"/>
+               </method>
+
+               <method name="SelectMenu">
+                       <arg direction="in" type="i" name="item_identifier"/>
+                       <arg direction="in" type="b" name="help_request"/>
+                       <arg direction="out" type="i" name="result"/>
+                       <arg direction="out" type="i" name="envelop_rsp"/>
+               </method>
+
+               <method name="DownloadEvent">
+                       <arg direction="in" type="i" name="event_download_type"/>
+                       <arg direction="in" type="i" name="src_device"/>
+                       <arg direction="in" type="i" name="dest_device"/>
+                       <arg direction="in" type="v" name="download_data"/>
+                       <arg direction="out" type="i" name="result"/>
+                       <arg direction="out" type="i" name="envelop_rsp"/>
+               </method>
+
+               <method name="SendAppExecResult">
+                       <arg direction="in" type="i" name="command_id"/>
+                       <arg direction="in" type="i" name="command_type"/>
+                       <arg direction="in" type="v" name="exec_result"/>
+                       <arg direction="out" type="i" name="result"/>
+               </method>
+
+               <signal name="SetupMenu">
+                       <arg type="i" name="command_id"/>
+                       <arg type="b" name="menu_present"/>
+                       <arg type="s" name="main_title"/>
+                       <arg type="v" name="menu_item"/>
+                       <arg type="i" name="menu_count"/>
+                       <arg type="b" name="menu_help_info"/>
+                       <arg type="b" name="menu_updated"/>
+               </signal>
+
+               <signal name="DisplayText">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="duration"/>
+                       <arg type="b" name="priority_high"/>
+                       <arg type="b" name="user_rsp_required"/>
+                       <arg type="b" name="immediately_rsp"/>
+               </signal>
+
+               <signal name="SelectItem">
+                       <arg type="i" name="command_id"/>
+                       <arg type="b" name="help_info"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="default_item_index"/>
+                       <arg type="i" name="menu_count"/>
+                       <arg type="v" name="menu_item"/>
+               </signal>
+
+               <signal name="GetInkey">
+                       <arg type="i" name="command_id"/>
+                       <arg type="i" name="key_type"/>
+                       <arg type="i" name="input_alphabet_type"/>
+                       <arg type="b" name="numeric"/>
+                       <arg type="b" name="help_info"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="duration"/>
+               </signal>
+
+               <signal name="GetInput">
+                       <arg type="i" name="command_id"/>
+                       <arg type="i" name="input_alphabet_type"/>
+                       <arg type="b" name="numeric"/>
+                       <arg type="b" name="help_info"/>
+                       <arg type="b" name="echo_input"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="response_len_max"/>
+                       <arg type="i" name="response_len_min"/>
+                       <arg type="s" name="default_text"/>
+                       <arg type="i" name="default_text_len"/>
+               </signal>
+
+               <signal name="PlayTone">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="tone_type"/>
+                       <arg type="i" name="duration"/>
+               </signal>
+
+               <signal name="SendSMS">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="b" name="packing_required"/>
+                       <arg type="i" name="ton"/>
+                       <arg type="i" name="npi"/>
+                       <arg type="s" name="dialling_number"/>
+                       <arg type="i" name="number_len"/>
+                       <arg type="i" name="tpdu_type"/>
+                       <arg type="v" name="tpdu_data"/>
+                       <arg type="i" name="tpdu_data_len"/>
+               </signal>
+
+               <signal name="SendSS">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="ton"/>
+                       <arg type="i" name="npi"/>
+                       <arg type="s" name="ss_string"/>
+               </signal>
+
+               <signal name="SetupUSSD">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="s" name="ussd_string"/>
+               </signal>
+
+               <signal name="SetupCall">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="confirm_text"/>
+                       <arg type="i" name="confirm_text_len"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="call_type"/>
+                       <arg type="s" name="call_number"/>
+                       <arg type="i" name="duration"/>
+               </signal>
+
+               <signal name="SetupEventList">
+                       <arg type="i" name="event_cnt"/>
+                       <arg type="v" name="evt_list"/>
+               </signal>
+
+               <signal name="SetupIdleModeText">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+               </signal>
+
+               <signal name="OpenChannel">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="b" name="immediate_link"/>
+                       <arg type="b" name="auto_reconnection"/>
+                       <arg type="b" name="bg_mode"/>
+                       <arg type="i" name="bearer_type"/>
+                       <arg type="v" name="bearer_param"/>
+                       <arg type="i" name="buffer_size"/>
+                       <arg type="i" name="protocol_type"/>
+                       <arg type="i" name="port_number"/>
+                       <arg type="i" name="data_dest_address_type"/>
+                       <arg type="s" name="data_dest_address"/>
+                       <arg type="v" name="bearer_detail"/>
+               </signal>
+
+               <signal name="CloseChannel">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="channel_id"/>
+               </signal>
+
+               <signal name="ReceiveData">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="channel_id"/>
+                       <arg type="i" name="data_len"/>
+               </signal>
+
+               <signal name="SendData">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="i" name="channel_id"/>
+                       <arg type="b" name="send_data_immediately"/>
+                       <arg type="v" name="channel_data"/>
+                       <arg type="i" name="channel_data_len"/>
+               </signal>
+
+               <signal name="GetChannelStatus">
+                       <arg type="i" name="command_id"/>
+               </signal>
+
+               <signal name="Refresh">
+                       <arg type="i" name="command_id"/>
+                       <arg type="i" name="refresh_type"/>
+                       <arg type="v" name="file_list"/>
+               </signal>
+
+               <signal name="MoreTime">
+               </signal>
+
+               <signal name="SendDtmf">
+                       <arg type="i" name="command_id"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+                       <arg type="s" name="dtmf_str"/>
+                       <arg type="i" name="dtmf_str_len"/>
+               </signal>
+
+               <signal name="LaunchBrowser">
+                       <arg type="i" name="command_id"/>
+                       <arg type="i" name="launch_type"/>
+                       <arg type="i" name="browser_id"/>
+                       <arg type="s" name="url"/>
+                       <arg type="i" name="url_len"/>
+                       <arg type="s" name="gateway_proxy"/>
+                       <arg type="i" name="gateway_proxy_len"/>
+                       <arg type="s" name="text"/>
+                       <arg type="i" name="text_len"/>
+               </signal>
+
+               <signal name="ProvideLocalInfo">
+                       <arg type="i" name="info_type"/>
+               </signal>
+
+               <signal name="LanguageNotification">
+                       <arg type="i" name="command_id"/>
+                       <arg type="i" name="language"/>
+                       <arg type="b" name="b_specified"/>
+               </signal>
+
+               <signal name="EndProactiveSession">
+                       <arg type="i" name="command_type"/>
+               </signal>
+
+       </interface>
+
+</node>
diff --git a/introspection/sim.xml b/introspection/sim.xml
new file mode 100644 (file)
index 0000000..6cfa0eb
--- /dev/null
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+
+    <interface name="org.tizen.telephony.Sim">
+        <!-- Refer to TAPI API: tapi_sim_get_imsi () -->
+        <method name="GetImsi">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="s" name="mcc"/>
+            <arg direction="out" type="s" name="mnc"/>
+            <arg direction="out" type="s" name="msin"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_ecc () -->
+        <method name="GetEcc">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="count"/>
+            <arg direction="out" type="aa{sv}" name="ecc_list"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_iccid () -->
+        <method name="GetIccid">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="s" name="iccid"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_language () -->
+        <method name="GetLanguage">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="language"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_set_language () -->
+        <method name="SetLanguage">
+            <arg direction="in" type="i" name="language"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_callforwarding_info () -->
+        <method name="GetCallForwardingInfo">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="profile_count"/>
+            <arg direction="out" type="aa{sv}" name="cf"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_messagewaiting_info () -->
+        <method name="GetMessageWaitingInfo">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="profile_count"/>
+            <arg direction="out" type="aa{sv}" name="mw"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_set_messagewaiting_info () -->
+        <method name="SetMessageWaitingInfo">
+            <arg direction="in" type="y" name="profile_id"/>
+            <arg direction="in" type="b" name="count_valid"/>
+            <arg direction="in" type="a(by)" name="msg_waiting"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_mailbox_info () -->
+        <method name="GetMailboxInfo">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="alpha_id_max_len"/>
+            <arg direction="out" type="u" name="count"/>
+            <arg direction="out" type="aa{sv}" name="list"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_set_mailbox_info () -->
+        <method name="SetMailboxInfo">
+            <arg direction="in" type="y" name="profile_id"/>
+            <arg direction="in" type="i" name="mb_type"/>
+            <arg direction="in" type="u" name="alpha_id_len"/>
+            <arg direction="in" type="s" name="alpha_id"/>
+            <arg direction="in" type="s" name="number"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_msisdn () -->
+        <method name="GetMsisdn">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="count"/>
+            <arg direction="out" type="aa{sv}" name="list"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_spn () -->
+        <method name="GetSpn">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="display_condition"/>
+            <arg direction="out" type="s" name="spn"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_cphs_netname () -->
+        <method name="GetCphsNetName">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="s" name="full_name"/>
+            <arg direction="out" type="s" name="short_name"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_sp_display_info() -->
+        <method name="GetSpDisplayInfo">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="count"/>
+            <arg direction="out" type="aa{sv}" name="list"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_req_authentication () -->
+        <method name="ReqAuthentication">
+            <arg direction="in" type="i" name="auth_type"/>
+            <arg direction="in" type="s" name="rand_data"/>
+            <arg direction="in" type="s" name="autn_data"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="auth_type"/>
+            <arg direction="out" type="s" name="resp_data"/>
+            <arg direction="out" type="s" name="authentication_key"/>
+            <arg direction="out" type="s" name="cipher_data"/>
+            <arg direction="out" type="s" name="integrity_data"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_verify_pins () -->
+        <method name="VerifyPins">
+            <arg direction="in" type="i" name="pin_type"/>
+            <arg direction="in" type="s" name="pw"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="pin_type"/>
+            <arg direction="out" type="u" name="retry_count"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_verify_puks () -->
+        <method name="VerifyPuks">
+            <arg direction="in" type="i" name="puk_type"/>
+            <arg direction="in" type="s" name="puk_pw"/>
+            <arg direction="in" type="s" name="new_pin_pw"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="puk_type"/>
+            <arg direction="out" type="u" name="retry_count"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_change_pins () -->
+        <method name="ChangePins">
+            <arg direction="in" type="i" name="pin_type"/>
+            <arg direction="in" type="s" name="old_pw"/>
+            <arg direction="in" type="s" name="new_pw"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="pin_type"/>
+            <arg direction="out" type="u" name="retry_count"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_disable_facility () -->
+        <method name="DisableFacility">
+            <arg direction="in" type="i" name="lock_type"/>
+            <arg direction="in" type="s" name="pw"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="type"/>
+            <arg direction="out" type="u" name="retry_count"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_enable_facility () -->
+        <method name="EnableFacility">
+            <arg direction="in" type="i" name="lock_type"/>
+            <arg direction="in" type="s" name="pw"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="type"/>
+            <arg direction="out" type="u" name="retry_count"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_facility () -->
+        <method name="GetFacility">
+            <arg direction="in" type="i" name="type"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="type"/>
+            <arg direction="out" type="i" name="f_status"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_get_lock_info () -->
+        <method name="GetLockInfo">
+            <arg direction="in" type="i" name="type"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="lock_type"/>
+            <arg direction="out" type="i" name="lock_status"/>
+            <arg direction="out" type="u" name="retry_count"/>
+        </method>
+
+        <!--Refer to TAPI API: tapi_sim_req_apdu () -->
+        <method name="ReqApdu">
+            <arg direction="in" type="s" name="apdu"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="s" name="apdu_resp"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_sim_req_atr () -->
+        <method name="ReqAtr">
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="s" name="atr"/>
+        </method>
+
+       <!-- card_status: SIM Card Status -->
+       <property name="card_status" type="a{sv}" access="read"/>
+
+        <!-- sim_type: Type of SIM -->
+        <property name="sim_type" type="i" access="read"/>
+
+        <!-- mcc: Mobile Country Code -->
+        <property name="mcc" type="s" access="read"/>
+
+        <!-- mnc: Mobile Network Code -->
+        <property name="mnc" type="s" access="read"/>
+
+        <!-- msin: Mobile Subscriber Identification Number -->
+        <property name="msin" type="s" access="read"/>
+
+    </interface>
+
+</node>
diff --git a/introspection/sms.xml b/introspection/sms.xml
new file mode 100644 (file)
index 0000000..6928181
--- /dev/null
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+  <interface name="org.tizen.telephony.Sms">
+
+    <!-- Refer to TAPI API: tapi_sms_send() -->
+    <method name="Send">
+      <arg direction="in" type="b" name="more_msgs"/>
+      <arg direction="in" type="a{sv}" name="sca"/>
+      <arg direction="in" type="s" name="tpdu"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_read_sms_in_sim() -->
+    <method name="ReadInSim">
+      <arg direction="in" type="u" name="index"/>
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="i" name="status"/>
+      <arg direction="out" type="a{sv}" name="sca"/>
+      <arg direction="out" type="s" name="tpdu"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_write_sms_in_sim() -->
+    <method name="WriteInSim">
+      <arg direction="in" type="i" name="status"/>
+      <arg direction="in" type="a{sv}" name="sca"/>
+      <arg direction="in" type="s" name="tpdu"/>
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="index"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_delete_sms_in_sim() -->
+    <method name="DeleteInSim">
+      <arg direction="in" type="u" name="index"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_get_count() -->
+    <method name="GetCount">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="total_count"/>
+      <arg direction="out" type="u" name="used_count"/>
+      <arg direction="out" type="au" name="index_list"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_set_cb_config() -->
+    <method name="SetCbConfig">
+      <arg direction="in" type="b" name="cb_enabled"/>
+      <arg direction="in" type="u" name="msg_id_range_cnt"/>
+      <arg direction="in" type="aa{sv}" name="msg_ids"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_get_cb_config() -->
+    <method name="GetCbConfig">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="b" name="cb_enabled"/>
+      <arg direction="out" type="u" name="msg_id_range_cnt"/>
+      <arg direction="out" type="aa{sv}" name="msg_ids"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_get_parameters() -->
+    <method name="GetParameters">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="u" name="count"/>
+      <arg direction="out" type="aa{sv}" name="params"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_set_parameters() -->
+    <method name="SetParameters">
+      <arg direction="in" type="u" name="index"/>
+      <arg direction="in" type="a{sv}" name="sca"/>
+      <arg direction="in" type="q" name="vp"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_send_deliver_report() -->
+    <method name="SendDeliverReport">
+      <arg direction="in" type="i" name="report"/>
+      <arg direction="in" type="a{sv}" name="sca"/>
+      <arg direction="in" type="s" name="tpdu"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_set_sca() -->
+    <method name="SetSca">
+      <arg direction="in" type="a{sv}" name="sca"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_get_sca() -->
+    <method name="GetSca">
+      <arg direction="out" type="i" name="result"/>
+      <arg direction="out" type="a{sv}" name="sca"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_set_memory_status() -->
+    <method name="SetMemoryStatus">
+      <arg direction="in" type="b" name="available"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TAPI API: tapi_sms_set_message_status() -->
+    <method name="SetMessageStatus">
+      <arg direction="in" type="u" name="index"/>
+      <arg direction="in" type="i" name="status"/>
+      <arg direction="out" type="i" name="result"/>
+    </method>
+
+    <!-- Refer to TEL_NOTI_SMS_INCOM_MSG event -->
+    <signal name="IncomingMsg">
+      <arg type="a{sv}" name="sca"/>
+      <arg type="s" name="tpdu"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_SMS_CB_INCOM_MSG event -->
+    <signal name="IncomingCbMsg">
+      <arg type="i" name="cb_type"/>
+      <arg type="s" name="cb_data"/>
+    </signal>
+
+    <!-- Refer to TEL_NOTI_SMS_ETWS_INCOM_MSG event -->
+    <signal name="IncomingEtwsMsg">
+      <arg type="i" name="etws_type"/>
+      <arg type="s" name="etws_data"/>
+    </signal>
+
+    <!-- Caches memory available status -->
+    <property name="SimMemoryStatus" type="b" access="read"/>
+
+    <!-- Caches service init status -->
+    <property name="InitStatus" type="b" access="read"/>
+
+  </interface>
+</node>
diff --git a/introspection/ss.xml b/introspection/ss.xml
new file mode 100644 (file)
index 0000000..6ece3e5
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE node PUBLIC
+  "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+  "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+
+    <interface name="org.tizen.telephony.Ss">
+
+        <!-- Refer to TAPI API: tapi_ss_set_barring () -->
+        <method name="SetBarring">
+            <arg direction="in" type="i" name="class"/>
+            <arg direction="in" type="b" name="enable"/>
+            <arg direction="in" type="i" name="type"/>
+            <arg direction="in" type="s" name="pwd"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_get_barring_status () -->
+        <method name="GetBarringStatus">
+            <arg direction="in" type="i" name="class"/>
+            <arg direction="in" type="i" name="type"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="u" name="record_num"/>
+            <arg direction="out" type="aa{sv}" name="records"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_change_barring_password () -->
+        <method name="ChangeBarringPassword">
+            <arg direction="in" type="s" name="old_pwd"/>
+            <arg direction="in" type="s" name="new_pwd"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_set_forwarding () -->
+        <method name="SetForwarding">
+            <arg direction="in" type="i" name="class"/>
+            <arg direction="in" type="i" name="mode"/>
+            <arg direction="in" type="i" name="condition"/>
+            <arg direction="in" type="s" name="number"/>
+            <arg direction="in" type="u" name="wait_time"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_get_forwarding_status () -->
+        <method name="GetForwardingStatus">
+           <arg direction="in" type="i" name="class"/>
+           <arg direction="in" type="i" name="condition"/>
+           <arg direction="out" type="i" name="result"/>
+           <arg direction="out" type="u" name="record_num"/>
+           <arg direction="out" type="aa{sv}" name="records"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_set_waiting () -->
+        <method name="SetWaiting">
+           <arg direction="in" type="i" name="class"/>
+           <arg direction="in" type="b" name="enable"/>
+           <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_get_waiting_status () -->
+        <method name="GetWaitingStatus">
+           <arg direction="in" type="i" name="class"/>
+           <arg direction="out" type="i" name="result"/>
+           <arg direction="out" type="u" name="record_num"/>
+           <arg direction="out" type="aa{sv}" name="records"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_set_cli () -->
+        <method name="SetCli">
+            <arg direction="in" type="i" name="type"/>
+            <arg direction="in" type="i" name="status"/>
+            <arg direction="out" type="i" name="result"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_get_cli_status () -->
+        <method name="GetCliStatus">
+            <arg direction="in" type="i" name="type"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="type"/>
+            <arg direction="out" type="i" name="net_status"/>
+            <arg direction="out" type="i" name="dev_status"/>
+        </method>
+
+        <!-- Refer to TAPI API: tapi_ss_send_ussd_request () -->
+        <method name="SendUssdRequest">
+            <arg direction="in" type="i" name="type"/>
+            <arg direction="in" type="s" name="str"/>
+            <arg direction="out" type="i" name="result"/>
+            <arg direction="out" type="i" name="type"/>
+            <arg direction="out" type="i" name="status"/>
+            <arg direction="out" type="s" name="str"/>
+        </method>
+
+        <!-- Refer to TEL_NOTI_SS_USSD event -->
+        <signal name="NotifyUssd">
+            <arg type="i" name="status"/>
+            <arg type="s" name="str"/>
+        </signal>
+
+    </interface>
+
+</node>
diff --git a/packaging/libtapi.changes b/packaging/libtapi.changes
deleted file mode 100644 (file)
index b3d321a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-* Tue May 28 2013 Baptiste DURAND <baptiste.durand@eurogiciel.fr> accepted/tizen/20130520.103452@48ba921
-- Fix for 64 bits compatibility
-
-* Sat May 18 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130517.045240@00d7b71
-- do not use Werror on releases
-
index 017d22d..573257c 100644 (file)
@@ -1,5 +1,5 @@
 <manifest>
  <request>
-    <domain name="_"/>
+  <domain name="_"/>    
  </request>
 </manifest>
diff --git a/packaging/libtapi.spec b/packaging/libtapi.spec
deleted file mode 100644 (file)
index 26be4d7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-Name: libtapi
-Summary: Telephony dbus client library
-Version: 0.6.70
-Release:    2
-Group:      Telephony/Libraries
-License:    Apache-2.0
-Source0:    libtapi-%{version}.tar.gz
-Source1001:    libtapi.manifest
-BuildRequires:  cmake
-BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(gobject-2.0)
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(security-server)
-Obsoletes:      libslp-tapi <= 0.6.69
-Provides:       libslp-tapi
-%description
-Telephony client API library
-
-%package devel
-Summary:    Telephony client API (devel)
-Requires:   %{name} = %{version}-%{release}
-
-%description devel
-Telephony client API library (devel)
-
-
-%prep
-%setup -q
-cp %{SOURCE1001} .
-
-
-%build
-%cmake .
-
-make %{?jobs:-j%jobs}
-
-%install
-%make_install
-
-rm -rf %{buildroot}/usr/include/telephony/tapi/.gitignore
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE %{buildroot}/usr/share/license/%{name}
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-
-%files
-%manifest %{name}.manifest
-%defattr(-,root,root,-)
-%{_libdir}/*.so.*
-/usr/share/license/%{name}
-
-%files devel
-%manifest %{name}.manifest
-%defattr(-,root,root,-)
-%{_includedir}/telephony-client/*.h
-%{_libdir}/pkgconfig/*.pc
-%{_libdir}/*.so
diff --git a/packaging/libtapi3.spec b/packaging/libtapi3.spec
new file mode 100644 (file)
index 0000000..9b11e20
--- /dev/null
@@ -0,0 +1,60 @@
+%define major 3
+%define minor 0
+%define patchlevel 1
+
+Name:           libtapi3
+Version:    %{major}.%{minor}.%{patchlevel}
+Release:        1
+License:        Apache-2.0
+Summary:        Telephony client API library
+Group:          Telephony/Libraries
+Source0:        libtapi3-%{version}.tar.gz
+Source1001:     libtapi.manifest
+BuildRequires:  cmake
+BuildRequires:  python
+BuildRequires:  python-xml
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(security-server)
+
+%description
+Telephony client API library
+
+%package devel
+Summary:        Telephony client API (devel)
+Requires:       %{name} = %{version}
+
+%description devel
+Telephony client API library (devel)
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%cmake . -DTAPI_VERSION=%{version}
+
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest libtapi.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{_libdir}/*.so*
+%{_bindir}/tapitest
+
+%files devel
+%manifest libtapi.manifest
+%defattr(-,root,root,-)
+%{_includedir}/tapi-3.0/*.h
+%{_includedir}/tapi-3.0/common/*.h
+%{_includedir}/tapi-3.0/private/*.h
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/*.so
diff --git a/src/common.h b/src/common.h
deleted file mode 100644 (file)
index 61bb97c..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * libslp-tapi
- *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _COMMON_H_
-#define _COMMON_H_
-
-#include <stdio.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <gio/gio.h>
-
-__BEGIN_DECLS
-
-#define MAKE_RESP_CB_DATA(data,handle,cb,user_data)  \
-       if (!handle) { return TAPI_API_INVALID_INPUT; } \
-       data = g_new0(struct tapi_resp_data, 1); \
-       data->handle = handle; \
-       data->cb_fn = cb; \
-       data->user_data = user_data
-
-#define CHECK_DEINIT(error) \
-       if (error) { \
-               dbg("dbus error = %d (%s)", error->code, error->message); \
-               if (error->code == G_IO_ERROR_CANCELLED \
-                               && error->domain == G_IO_ERROR) { \
-                       g_error_free(error); \
-                       free(evt_cb_data); \
-                       return; \
-               } \
-       }
-
-struct tapi_handle {
-       gpointer dbus_connection;
-       char *path;
-       char *cp_name;
-       GHashTable *evt_list;
-       char cookie[20];
-       GCancellable *ca;
-};
-
-struct tapi_resp_data {
-       tapi_response_cb cb_fn;
-       void* user_data;
-       struct tapi_handle *handle;
-};
-
-struct tapi_evt_cb {
-       int evt_id;
-       tapi_notification_cb cb_fn;
-       void* user_data;
-       struct tapi_handle *handle;
-};
-
-__END_DECLS
-
-#endif /* _TAPI_COMMON_H_ */
-
-/**
- *  @}
- */
index d4ba04a..ffd4627 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "TelCall.h"
-#include "tapi_common.h"
-#include "TapiUtility.h"
+#include "tapi_private.h"
+#include "tapi.h"
+#include "tapi_call.h"
 
-#include "common.h"
-#include "tapi_log.h"
-#include "ITapiCall.h"
+#include <tel_call.h>
+#include <string.h>
 
-static void on_response_call_dial(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_call_type(TelCallType type)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-
-       GVariant *dbus_result;
-
-       dbg("Func Entrance");
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-
-       g_variant_get (dbus_result, "(i)", &result);
-       if (result != TAPI_CAUSE_SUCCESS)
-               dbg("Modem dialing failed");
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       switch (type) {
+       case TEL_CALL_TYPE_VOICE:
+       case TEL_CALL_TYPE_VIDEO:
+       case TEL_CALL_TYPE_E911:
+               return TRUE;
        }
-       dbg("Exit");
+
+       return FALSE;
 }
 
-static void on_response_call_answer(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_ecc(TelCallEmergencyCategory ecc)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallAnswerCnf_t data;
-
-       GVariant *dbus_result;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-
-       g_variant_get (dbus_result, "(ii)", &result, &data.id);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       switch (ecc) {
+       case TEL_CALL_ECC_DEFAULT:
+       case TEL_CALL_ECC_POLICE:
+       case TEL_CALL_ECC_AMBULANCE:
+       case TEL_CALL_ECC_FIREBRIGADE:
+       case TEL_CALL_ECC_MARINEGUARD:
+       case TEL_CALL_ECC_MOUNTAINRESCUE:
+       case TEL_CALL_ECC_MANUAL_ECALL:
+       case TEL_CALL_ECC_AUTO_ECALL:
+               return TRUE;
        }
+
+       return FALSE;
 }
 
-static void on_response_call_end(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_answer_type(TelCallAnswerType type)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallEndCnf_t data;
+       switch (type) {
+       case TEL_CALL_ANSWER_ACCEPT:
+       case TEL_CALL_ANSWER_REJECT:
+       case TEL_CALL_ANSWER_REPLACE:
+       case TEL_CALL_ANSWER_HOLD_AND_ACCEPT:
+               return TRUE;
+       }
 
-       GVariant *dbus_result;
+       return FALSE;
+}
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+static gboolean __tapi_check_end_type(TelCallEndType type)
+{
+       switch (type) {
+       case TEL_CALL_END:
+       case TEL_CALL_END_ALL:
+       case TEL_CALL_END_ACTIVE_ALL:
+       case TEL_CALL_END_HOLD_ALL:
+               return TRUE;
+       }
 
-       g_variant_get (dbus_result, "(iii)", &result, &data.id, &data.type);
+       return FALSE;
+}
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+static gboolean __tapi_check_active_line(TelCallActiveLine active_line)
+{
+       switch (active_line) {
+       case TEL_CALL_ACTIVE_LINE1:
+       case TEL_CALL_ACTIVE_LINE2:
+               return TRUE;
        }
+
+       return FALSE;
 }
 
-static void on_response_call_hold(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_sound_device(TelCallSoundDevice dev)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallHoldCnf_t data;
+       switch (dev) {
+       case TEL_SOUND_DEVICE_RECEIVER:
+       case TEL_SOUND_DEVICE_SPEAKER_PHONE:
+       case TEL_SOUND_DEVICE_HFK:
+       case TEL_SOUND_DEVICE_HEADSET:
+       case TEL_SOUND_DEVICE_BLUETOOTH:
+       case TEL_SOUND_DEVICE_EC:
+               return TRUE;
+       }
 
-       GVariant *dbus_result;
+       return FALSE;
+}
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+static gboolean __tapi_check_sound_rec(TelCallSoundRecording sound_rec)
+{
+       switch (sound_rec) {
+       case TEL_SOUND_RECORDING_STOP:
+       case TEL_SOUND_RECORDING_START:
+       case TEL_SOUND_RECORDING_PAUSE:
+               return TRUE;
+       }
 
-       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+       return FALSE;
+}
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+static gboolean __tapi_check_sound_direction(TelCallSoundDirection dir)
+{
+       switch (dir) {
+       case TEL_SOUND_DIRECTION_LEFT:
+       case TEL_SOUND_DIRECTION_RIGHT:
+               return TRUE;
        }
 
+       return FALSE;
 }
 
-static void on_response_call_active(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_sound_mode(TelCallSoundEqualizationMode mode)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallActiveCnf_t data;
+       switch (mode) {
+       case TEL_SOUND_EQUALIZATION_MODE_OFF:
+       case TEL_SOUND_EQUALIZATION_MODE_ON:
+       case TEL_SOUND_EQUALIZATION_MODE_FLAG_OFF:
+       case TEL_SOUND_EQUALIZATION_MODE_FLAG_ON:
+       case TEL_SOUND_EQUALIZATION_MODE_SOFT1:
+       case TEL_SOUND_EQUALIZATION_MODE_SOFT2:
+               return TRUE;
+       }
 
-       GVariant *dbus_result;
+       return FALSE;
+}
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+static gboolean __tapi_check_sound_path(TelCallSoundPath path)
+{
+       switch (path) {
+       case TEL_SOUND_PATH_HANDSET:
+       case TEL_SOUND_PATH_HEADSET:
+       case TEL_SOUND_PATH_HANDSFREE:
+       case TEL_SOUND_PATH_BLUETOOTH:
+       case TEL_SOUND_PATH_STEREO_BLUETOOTH:
+       case TEL_SOUND_PATH_SPK_PHONE:
+       case TEL_SOUND_PATH_HEADSET_3_5PI:
+       case TEL_SOUND_PATH_BT_NSEC_OFF:
+       case TEL_SOUND_PATH_MIC2:
+       case TEL_SOUND_PATH_MIC1:
+       case TEL_SOUND_PATH_HEADSET_HAC:
+               return TRUE;
+       }
 
-       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+       return FALSE;
+}
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+void on_call_signal_emit_handler(TelephonyCall *call, gchar *sender_name,
+       gchar *signal_name, GVariant *parameters, gpointer user_data)
+{
+       TapiEvtCbData *evt_cb_data;
+       TelHandle *handle = user_data;
+       char *evt_id;
+
+       if (handle == NULL)
+               return;
+
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_CALL_INTERFACE,
+                                       signal_name);
+
+       /*
+        * If an event callback is registered process
+        * g-signal event
+        */
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               g_free(evt_id);
+               return;
        }
 
-
+       if (!g_strcmp0(signal_name, "VoiceCallStatusIdle")
+                       || !g_strcmp0(signal_name, "VideoCallStatusIdle")) {
+               TelCallStatusIdleNoti idle_noti;
+
+               g_variant_get(parameters, "(ui)", &idle_noti.call_id,
+                               &idle_noti.cause);
+
+               dbg("%s call_id(%d), end_cause(0x%x)", signal_name,
+                       idle_noti.call_id, idle_noti.cause);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &idle_noti);
+       } else if (!g_strcmp0(signal_name, "VoiceCallStatusDialing")
+                       || !g_strcmp0(signal_name, "VideoCallStatusDialing")
+                       || !g_strcmp0(signal_name, "VoiceCallStatusAlert")
+                       || !g_strcmp0(signal_name, "VideoCallStatusAlert")
+                       || !g_strcmp0(signal_name, "VoiceCallStatusActive")
+                       || !g_strcmp0(signal_name, "VideoCallStatusActive")
+                       || !g_strcmp0(signal_name, "VoiceCallStatusHeld")
+                       || !g_strcmp0(signal_name, "VoiceCallStatusIncoming")
+                       || !g_strcmp0(signal_name, "VideoCallStatusIncoming")) {
+               guint call_id;
+               g_variant_get(parameters, "(u)", &call_id);
+
+               dbg("%s call_id(%d)", signal_name, call_id);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &call_id);
+       } else if (!g_strcmp0(signal_name, "MoWaiting")
+                       || !g_strcmp0(signal_name, "MoForwarded")
+                       || !g_strcmp0(signal_name, "MoBarredIncoming")
+                       || !g_strcmp0(signal_name, "MoBarredOutgoing")
+                       || !g_strcmp0(signal_name, "MoForwardConditional")
+                       || !g_strcmp0(signal_name, "MoForwardUnconditional")
+                       || !g_strcmp0(signal_name, "MtForwarded")
+                       || !g_strcmp0(signal_name, "MoDeflected")
+                       || !g_strcmp0(signal_name, "MtDeflected")
+                       || !g_strcmp0(signal_name, "Transfered")
+                       || !g_strcmp0(signal_name, "CallActive")
+                       || !g_strcmp0(signal_name, "CallHeld")
+                       || !g_strcmp0(signal_name, "CallJoined")) {
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, NULL);
+       } else if (!g_strcmp0(signal_name, "CallSoundRingbackTone")) {
+               TelCallSoundRingbackToneNoti rb_tone;;
+
+               g_variant_get(parameters, "(i)", &rb_tone);
+               dbg("%s (%d)", signal_name, rb_tone);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &rb_tone);
+       } else if (!g_strcmp0(signal_name, "CallSoundWbamr")) {
+               TelCallSoundWbamrNoti wbamr;
+
+               g_variant_get(parameters, "(i)", &wbamr);
+               dbg("%s (%d)", signal_name, wbamr);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &wbamr);
+       } else if (!g_strcmp0(signal_name, "CallSoundEqualization")) {
+               TelCallSoundEqualizationNoti equ_noti;
+
+               g_variant_get(parameters, "(ii)", &equ_noti.mode,
+                                       &equ_noti.direction);
+
+               dbg("%s mode(%d), direction(%d)", signal_name, equ_noti.mode,
+                                                       equ_noti.direction);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &equ_noti);
+       } else if (!g_strcmp0(signal_name, "CallSoundClockStatus")) {
+               gboolean clock_status;
+
+               g_variant_get(parameters, "(b)", &clock_status);
+               dbg("%s clock_status(%s)", signal_name, clock_status ? "TRUE":"FALSE");
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &clock_status);
+       } else
+               err("Unsupported signal %s", signal_name);
+
+       g_free(evt_id);
 }
 
-static void on_response_call_swap(GObject *source_object, GAsyncResult *res, gpointer user_data)
+
+static void on_response_call_dial(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallSwapCnf_t data;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_dial_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_call_join(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_call_dial(TelHandle *handle,
+       const TelCallDial *call_dial_info,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallJoinCnf_t data;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && call_dial_info && callback
+                       && __tapi_check_ecc(call_dial_info->ecc)
+                       && __tapi_check_call_type(call_dial_info->call_type),
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+       /* If call type is not Emergency number must not be NULL */
+       if (call_dial_info->call_type != TEL_CALL_TYPE_E911)
+               TEL_RETURN_IF_CHECK_FAIL(strlen(call_dial_info->number) != 0,
+                                               TEL_RETURN_INVALID_PARAMETER);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
-       }
-}
-
-static void on_response_call_split(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallSplitCnf_t data;
+       dbg("Destination Number : %s", call_dial_info->number);
 
-       GVariant *dbus_result;
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_dial(handle->call_proxy, call_dial_info->call_type,
+                               call_dial_info->ecc,
+                               call_dial_info->number, NULL,
+                               on_response_call_dial, rsp_cb_data);
 
-       g_variant_get (dbus_result, "(ii)", &result, &data.id);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
-       }
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_call_transfer(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_call_answer(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelCallTransferCnf_t data;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_answer_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_call_dtmf(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_call_answer(TelHandle *handle,
+                                       TelCallAnswerType ans_type,
+                                       TapiResponseCb callback,
+                                       void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+                                       && __tapi_check_answer_type(ans_type),
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       telephony_call_call_answer(handle->call_proxy, ans_type, NULL,
+                                       on_response_call_answer, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_call_deflect(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_call_end(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_end_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_get_call_volume_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_call_end(TelHandle *handle,
+                                       const TelCallEnd *call_end_info,
+                                       TapiResponseCb callback,
+                                       void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1, i = 0;
-       TelCallGetVolumeInfoResp_t resp;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result = 0, *value = 0;
-       GVariantIter *iter = 0;
-       GVariantIter *iter_row = 0;
-       const gchar *key = 0;
+       dbg("Entry");
 
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && call_end_info
+                               && __tapi_check_end_type(call_end_info->end_type),
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       memset(&resp, '\0', sizeof(TelCallGetVolumeInfoResp_t));
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_end(handle->call_proxy, call_end_info->call_id,
+                               call_end_info->end_type, NULL,
+                               on_response_call_end, rsp_cb_data);
 
-       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+       return TEL_RETURN_SUCCESS;
+}
 
-       resp.record_num = g_variant_iter_n_children(iter);
+static void on_response_call_send_dtmf(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
-               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+       dbg("Entry");
 
-                       if ( !g_strcmp0(key, "type") ) {
-                               int type = g_variant_get_int32(value);
+       telephony_call_call_send_dtmf_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-                               resp.record[i].device = (type & 0xf0);
-                               resp.record[i].type = (type & 0x0f);
-                       }
-
-                       if ( !g_strcmp0(key, "level") ) {
-                               resp.record[i].volume = g_variant_get_int32(value);
-                       }
-               }
-               i++;
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_set_call_volume_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_call_send_dtmf(TelHandle *handle,
+                                               const char *dtmf_str,
+                                               TapiResponseCb callback,
+                                               void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && dtmf_str,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       telephony_call_call_send_dtmf(handle->call_proxy, dtmf_str, NULL,
+                                       on_response_call_send_dtmf, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_set_call_sound_path(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_call_hold(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_hold_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_set_call_mute_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_call_hold(TelHandle *handle, TapiResponseCb callback,
+                                       void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       telephony_call_call_hold(handle->call_proxy, NULL,
+                                       on_response_call_hold, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_call_mute_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+
+static void on_response_call_active(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1, status = 0;
-       TelCallGetMuteStatusResp_t resp;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_active_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_variant_get (dbus_result, "(ii)", &result, &resp.status);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &status, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_set_call_sound_recording(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_call_active(TelHandle *handle,
+                                       TapiResponseCb callback,
+                                       void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       telephony_call_call_active(handle->call_proxy, NULL,
+                                       on_response_call_active, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_set_call_sound_equalization(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_call_swap(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_swap_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_set_call_sound_noise_reduction(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_call_swap(TelHandle *handle, TapiResponseCb callback,
+                                       void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       telephony_call_call_swap(handle->call_proxy, NULL,
+                                       on_response_call_swap, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_set_call_sound_clock_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_call_join(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       telephony_call_call_join_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-
-EXPORT_API int tel_dial_call(TapiHandle *handle, const TelCallDial_t *pParams, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_call_join(TelHandle *handle, TapiResponseCb callback,
+                                       void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
-       if (!pParams)
-               return TAPI_API_INVALID_INPUT;
+       dbg("Entry");
 
-       dbg("Destination Number : %s", pParams->szNumber);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       param = g_variant_new("(is)", pParams->CallType, pParams->szNumber);
+       telephony_call_call_join(handle->call_proxy, NULL,
+                                       on_response_call_join, rsp_cb_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Dial", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_dial, evt_cb_data );
-       dbg("Exit");
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-
-EXPORT_API int tel_answer_call(TapiHandle *handle, unsigned int CallHandle, TelCallAnswerType_t AnsType, tapi_response_cb callback, void *user_data )
+static void on_response_call_split(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_call_call_split_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       param = g_variant_new("(ii)", CallHandle, AnsType);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Answer", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_answer, evt_cb_data );
-
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_end_call(TapiHandle *handle, unsigned int CallHandle, TelCallEndType_t EndType, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_call_split(TelHandle *handle, unsigned int call_id,
+                                       TapiResponseCb callback,
+                                       void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(ii)", CallHandle, EndType);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "End", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_end, evt_cb_data );
+       telephony_call_call_split(handle->call_proxy, call_id, NULL,
+                                       on_response_call_split, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_hold_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+static void on_response_call_transfer(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-
-       dbg("Func Entrance ");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(i)", CallHandle);
+       telephony_call_call_transfer_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Hold", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_hold, evt_cb_data );
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_active_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_transfer(TelHandle *handle,
+                                               TapiResponseCb callback,
+                                               void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", CallHandle);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Active", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_active, evt_cb_data );
+       telephony_call_call_transfer(handle->call_proxy, NULL,
+                                       on_response_call_transfer, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_swap_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data )
+static void on_response_call_deflect(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_call_call_deflect_finish(handle->call_proxy, (int *)&result, res,
+                                               &error);
 
-       param = g_variant_new("(i)", CallHandle1, CallHandle2);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Swap", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_swap, evt_cb_data );
-
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_join_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_deflect(TelHandle *handle,
+                                       const char *deflect_to,
+                                       TapiResponseCb callback,
+                                       void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && deflect_to,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", CallHandle1, CallHandle2);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Join", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_join, evt_cb_data );
+       telephony_call_call_deflect(handle->call_proxy, deflect_to, NULL,
+                                       on_response_call_deflect, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_split_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+static void on_response_call_set_active_line(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-
-       dbg("Func Entrance ");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(i)", CallHandle);
+       telephony_call_call_set_active_line_finish(handle->call_proxy, (int *)&result,
+                                                       res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Split", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_split, evt_cb_data );
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_transfer_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_set_active_line(TelHandle *handle,
+                                               TelCallActiveLine active_line,
+                                               TapiResponseCb callback,
+                                               void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+                                       && __tapi_check_active_line(active_line),
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", CallHandle);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Transfer", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_transfer, evt_cb_data );
+       telephony_call_call_set_active_line(handle->call_proxy, active_line,
+                                       NULL, on_response_call_set_active_line,
+                                       rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
-}
-
-EXPORT_API int tel_activate_call_ccbs(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
-{
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_call_dtmf(TapiHandle *handle, const char *pDtmfString, tapi_response_cb callback, void *user_data )
+static void on_response_call_get_active_line(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallActiveLine active_line;
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_call_call_get_active_line_finish(handle->call_proxy, (int *)&result,
+                                                       (int *)&active_line, res,
+                                                       &error);
 
-       param = g_variant_new("(s)", pDtmfString);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Dtmf", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_dtmf, evt_cb_data );
-
-       return TAPI_API_SUCCESS;
+       if (result != TEL_CALL_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       } else {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &active_line);
+       }
 }
 
-EXPORT_API int tel_deflect_call(TapiHandle *handle, unsigned int CallHandle, const TelCallDeflectDstInfo_t *pInfo, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_get_active_line(TelHandle *handle,
+                                               TapiResponseCb callback,
+                                               void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(is)", CallHandle, pInfo->number);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "Deflect", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_call_deflect, evt_cb_data );
+       telephony_call_call_get_active_line(handle->call_proxy,
+               NULL, on_response_call_get_active_line, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_call_status(TapiHandle *handle, int call_id, TelCallStatus_t *out )
+static inline void __display_call_status(TelCallStatus *call_status)
 {
-       GVariant *gv = 0;
-       GVariant *param = 0;
-
-       GError *gerr = 0;
+       dbg("Call ID            %u", call_status->call_id);
+       dbg("####################");
+       dbg("Call type          %d", call_status->call_type);
+       dbg("Call state         %d", call_status->call_state);
+       dbg("Mobile %s", call_status->mo_call ? "Originated" : "Terminated");
+       dbg("Multiparty         %s", call_status->mpty ? "YES" : "NO");
+       dbg("Active line                %d", call_status->active_line);
+       dbg("Caller Information:");
+       dbg("CLI validity       %d", call_status->cli_validity);
+       dbg("Number             %s", call_status->number);
+       if (call_status->mo_call)
+               return;
+       dbg("CNI validity       %d", call_status->cni_validity);
+       dbg("Name               %s", call_status->name);
+       dbg("forward            %s", call_status->forward ? "YES" : "NO");
+}
 
-       gchar *call_number;
-       gint call_type = 0;
-       gboolean call_direction = FALSE;
-       gint call_state = 0;
-       gboolean call_multiparty_state = FALSE;
+static void __set_call_info(TelCallStatus *call_status,
+       unsigned int call_id, TelCallType call_type, TelCallState call_state,
+       gboolean mo_call, gboolean mpty, TelCallCliValidity cli_validity,
+       char *number, TelCallCniValidity cni_validity, char *name,
+       gboolean forward, TelCallActiveLine active_line)
+{
+       call_status->call_id = call_id;
+       call_status->call_type = call_type;
+       call_status->call_state = call_state;
+       call_status->mo_call = mo_call;
+       call_status->mpty = mpty;
+       call_status->active_line = active_line;
+       call_status->cli_validity = cli_validity;
+       if (number)
+               g_strlcpy(call_status->number, number, TEL_CALL_CALLING_NUMBER_LEN_MAX + 1);
+       /* Mobile terminated call */
+       if (mo_call == TRUE)
+               return;
+
+       call_status->cni_validity = cni_validity;
+
+       if (name)
+               g_strlcpy(call_status->name, name, TEL_CALL_CALLING_NAME_LEN_MAX + 1);
+
+       call_status->forward = forward;
+}
 
-       if ( !out ) {
-               dbg("[ error ] out : 0 ");
-               return TAPI_API_INVALID_INPUT;
+EXPORT_API TelReturn tapi_call_get_status(TelHandle *handle,
+       unsigned int call_id, TelCallStatus *call_status)
+{
+       TelReturn result = TEL_RETURN_FAILURE;
+       GError *error = NULL;
+       TelCallResult call_res;
+       unsigned int out_cid;
+       TelCallType call_type;
+       TelCallState call_state;
+       gboolean mo_call;
+       gboolean mpty;
+       TelCallCliValidity cli_validity;
+       char *number;
+       TelCallCniValidity cni_validity;
+       char *name;
+       gboolean forward;
+       TelCallActiveLine active_line;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && call_status,
+                                       TEL_RETURN_INVALID_PARAMETER);
+
+       telephony_call_call_get_status_sync(handle->call_proxy, call_id,
+               (int *)&call_res, &out_cid, (int *)&call_type,
+               (int *)&call_state, &mo_call, &mpty, (int *)&cli_validity,
+               &number, (int *)&cni_validity, &name, &forward,
+               (int *)&active_line, NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               goto exit;
        }
 
-       param = g_variant_new("(i)", call_id);
-
-       gv = g_dbus_connection_call_sync(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "GetStatus", param, 0, G_DBUS_CALL_FLAGS_NONE, -1, 0,   &gerr);
-
-       if ( gv ) {
-               g_variant_get(gv, "(isibib)", &call_id, &call_number, &call_type, &call_direction, &call_state, &call_multiparty_state);
-
-               out->CallHandle = (int)call_id;
-               out->bMoCall = (int)call_direction;
-               strncpy( out->pNumber, call_number, TAPI_CALL_DIALDIGIT_LEN_MAX );
-
-               dbg("[ check ] call_number : %s", call_number);
-               dbg("[ check ] out->pNumber : %s", out->pNumber);
+       if (call_res != TEL_CALL_RESULT_SUCCESS) {
+               err("GetStatus failed with error %d", call_res);
+               goto exit;
+       }
+       dbg("number[%s]", number);
 
-               out->CallType = (TelCallType_t)call_type;
-               out->CallState = (TelCallStates_t)call_state;
-               out->bConferenceState = (int)call_multiparty_state;
+       __set_call_info(call_status, out_cid, call_type, call_state, mo_call,
+               mpty, cli_validity, number, cni_validity,
+               name, forward, active_line);
 
-               g_free( call_number );
+       g_free(number);
+       g_free(name);
 
-       } else {
+       result = TEL_RETURN_SUCCESS;
 
-               dbg("[ error ] fail to get call status : (0x%x)", call_id);
-               return TAPI_API_OPERATION_FAILED;
-       }
+       __display_call_status(call_status);
 
-       return TAPI_API_SUCCESS;
+exit:
+       return result;
 }
 
-EXPORT_API int tel_get_call_status_all( TapiHandle *handle, TelCallStatusCallback cb, void *user_data )
+EXPORT_API TelReturn tapi_call_get_status_all(TelHandle *handle,
+       TelCallStatusList *call_status_list)
 {
-       GVariant *gv = 0;
-       GVariantIter *iter = 0, *iter_row = 0;  
-       GError *gerr = 0;
+       TelReturn result = TEL_RETURN_FAILURE;
+       GError *error = NULL;
+       int call_res;
+       unsigned int count;
+       GVariant *call_list;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && call_status_list,
+                                       TEL_RETURN_INVALID_PARAMETER);
+
+       telephony_call_call_get_status_all_sync(handle->call_proxy,
+               &call_res, &count, &call_list, NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               goto out_error;
+       }
 
-       if ( !cb ) {
-               dbg("[ error ] out : 0 ");
-               return TAPI_API_INVALID_INPUT;
+       if (call_res != TEL_CALL_RESULT_SUCCESS) {
+               err("GetStatusAll failed with error %d", call_res);
+               g_variant_unref(call_list);
+               goto out_error;
        }
 
-       gv = g_dbus_connection_call_sync(handle->dbus_connection,
-                                                                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                                                                       "GetStatusAll", 0, 0, G_DBUS_CALL_FLAGS_NONE, -1, 0, &gerr);
+       if ((count != 0) && (g_variant_n_children(call_list) == count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
 
-       if ( gv ) {
+               unsigned int call_id = 0;
+               TelCallType call_type = -1;
+               TelCallState call_state = -1;
+               gboolean mo_call = FALSE;
+               gboolean mpty = FALSE;
+               TelCallCliValidity cli_validity = -1;
+               char *number = NULL;
+               TelCallCniValidity cni_validity = -1;
+               char *name = NULL;
+               gboolean forward = FALSE;
+               TelCallActiveLine active_line = -1;
 
-               TelCallStatus_t data;
-               gchar *key = 0;
-               GVariant *value = 0;
+               guint i = 0;
 
-               g_variant_get(gv, "(aa{sv})", &iter);
+               dbg("Call status list count: [%d]", count);
 
+               g_variant_get(call_list, "aa{sv}", &iter);
                while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-
-                               if (!g_strcmp0(key, "call_id")) {
-                                       data.CallHandle = g_variant_get_int32(value);
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "call_id") == 0) {
+                                       call_id = g_variant_get_uint32(key_value);
                                }
-                               if (!g_strcmp0(key, "call_number")) {
-                                       strncpy(data.pNumber, g_variant_get_string(value, 0), TAPI_CALL_DIALDIGIT_LEN_MAX);
+                               else if (g_strcmp0(key, "call_type") == 0) {
+                                       call_type = g_variant_get_int32(key_value);
                                }
-                               if (!g_strcmp0(key, "call_type")) {
-                                       data.CallType = (int)g_variant_get_int32(value);
+                               else if (g_strcmp0(key, "call_state") == 0) {
+                                       call_state = g_variant_get_int32(key_value);
                                }
-                               if (!g_strcmp0(key, "call_direction")) {
-                                       data.bMoCall = (int)g_variant_get_boolean(value);
+                               else if (g_strcmp0(key, "mo_call") == 0) {
+                                       mo_call = g_variant_get_boolean(key_value);
                                }
-                               if (!g_strcmp0(key, "call_state")) {
-                                       data.CallState = (int)g_variant_get_int32(value);
+                               else if (g_strcmp0(key, "mpty") == 0) {
+                                       mpty = g_variant_get_boolean(key_value);
                                }
-                               if (!g_strcmp0(key, "call_multiparty_state")) {
-                                       data.bConferenceState = (int)g_variant_get_boolean(value);
+                               else if (g_strcmp0(key, "cli_validity") == 0) {
+                                       cli_validity = g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "num") == 0) {
+                                       number = g_strdup(g_variant_get_string(key_value, NULL));
+                               }
+                               else if (g_strcmp0(key, "cni_validity") == 0) {
+                                       cni_validity = g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "name") == 0) {
+                                       name = g_strdup(g_variant_get_string(key_value, NULL));
+                               }
+                               else if (g_strcmp0(key, "forward") == 0) {
+                                       forward = g_variant_get_boolean(key_value);
+                               }
+                               else if (g_strcmp0(key, "active_line") == 0) {
+                                       active_line = g_variant_get_int32(key_value);
                                }
-
                        }
-
                        g_variant_iter_free(iter_row);
 
-                       cb( &data, user_data );
+                       /* Update out parameter */
+                       __set_call_info(&call_status_list->status[i],
+                               call_id, call_type, call_state, mo_call,
+                               mpty, cli_validity, number, cni_validity,
+                               name, forward, active_line);
+
+                       /* Free and reset the variables */
+                       g_free(number);
+                       g_free(name);
+                       call_id = 0;
+                       call_type = -1;
+                       call_state = -1;
+                       mo_call = FALSE;
+                       mpty = FALSE;
+                       cli_validity = -1;
+                       number = NULL;
+                       cni_validity = -1;
+                       name = NULL;
+                       forward = FALSE;
+                       active_line = -1;
+
+                       /* Print data */
+                       __display_call_status(&call_status_list->status[i]);
+                       i++;
                }
                g_variant_iter_free(iter);
-       } else {
-
-               dbg("[ error ] fail to get call status");
-               return TAPI_API_OPERATION_FAILED;
 
+               call_status_list->count = count;
+               result = TEL_RETURN_SUCCESS;
        }
+       else {
+               call_status_list->count = 0;
+       }
+       g_variant_unref(call_list);
 
-       return TAPI_API_SUCCESS;
-}
+       dbg("Call count: [%d]", call_status_list->count);
 
-EXPORT_API int tel_get_call_act_line(TapiHandle *handle, tapi_response_cb callback, void *user_data )
-{
-       return TAPI_API_SUCCESS;
+out_error:
+       return result;
 }
 
-EXPORT_API int tel_set_call_act_line(TapiHandle *handle, TelCallActiveLine_t active_line, tapi_response_cb callback, void *user_data )
+static void on_response_call_set_volume_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       return TAPI_API_SUCCESS;
-}
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-/*================================================================================================*/
+       dbg("Entry");
 
-EXPORT_API int tel_get_call_duration(TapiHandle *handle, unsigned int CallHandle, unsigned int *pDurationInSecs)
-{
-       return TAPI_API_SUCCESS;
-}
+       telephony_call_call_set_volume_info_finish(handle->call_proxy, (int *)&result,
+                                                       res, &error);
 
-EXPORT_API int tel_get_call_conf_list(TapiHandle *handle, unsigned int CallHandle, unsigned int *pCallList, int *pNoOfCalls)
-{
-       return TAPI_API_SUCCESS;
-}
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-EXPORT_API int tel_get_call_privacy_mode(TapiHandle *handle, TelCallPrivacyType_t PrivacyType, tapi_response_cb callback, void *user_data )
-{
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_set_call_privacy_mode(TapiHandle *handle, TelCallVoicePrivacyInfo_t PrivacyInfo, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_set_volume_info(TelHandle *handle,
+                                       const TelCallVolumeInfo *volume_info,
+                                       TapiResponseCb callback,
+                                       void *user_data)
 {
-       return TAPI_API_SUCCESS;
-}
+       TapiRespCbData *rsp_cb_data;
 
-EXPORT_API int tel_exe_call_flash_info(TapiHandle *handle, const char *pDialNumber, tapi_response_cb callback, void *user_data )
-{
-       return TAPI_API_SUCCESS;
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && volume_info
+                               && __tapi_check_sound_device(volume_info->device)
+                               && (volume_info->volume <= 100),
+                               TEL_RETURN_INVALID_PARAMETER);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       telephony_call_call_set_volume_info(handle->call_proxy,
+                                       volume_info->device,
+                                       volume_info->volume,
+                                       NULL, on_response_call_set_volume_info,
+                                       rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_exit_call_emergency_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data )
+static void on_response_call_get_volume_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       return TAPI_API_SUCCESS;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       unsigned int volume;
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
+
+       dbg("Entry");
+
+       telephony_call_call_get_volume_info_finish(handle->call_proxy, (int *)&result,
+                                                       &volume, res, &error);
+
+       CHECK_DEINIT(error, rsp_cb_data, result);
+
+       if (result != TEL_CALL_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       } else {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &volume);
+       }
 }
 
-EXPORT_API int tel_get_call_time(TapiHandle *handle, unsigned short req_mask, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_get_volume_info(TelHandle *handle,
+                                       TelCallSoundDevice sound_device,
+                                       TapiResponseCb callback,
+                                       void *user_data)
 {
-       return TAPI_API_SUCCESS;
+       TapiRespCbData *rsp_cb_data;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && __tapi_check_sound_device(sound_device),
+                                       TEL_RETURN_INVALID_PARAMETER);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       telephony_call_call_get_volume_info(handle->call_proxy, sound_device,
+                                       NULL, on_response_call_get_volume_info,
+                                       rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_call_volume_info(TapiHandle *handle, TelSoundDevice_t device, TelSoundType_t type, tapi_response_cb callback, void *user_data )
+static void on_response_call_set_sound_path(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-
-       dbg("Func Entrance ");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(ii)", device, type);
+       telephony_call_call_set_sound_path_finish(handle->call_proxy, (int *)&result,
+                                                       res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "GetVolume", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_get_call_volume_info, evt_cb_data );
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_set_call_volume_info(TapiHandle *handle, TelCallVolumeInfo_t *info, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_set_sound_path(TelHandle *handle,
+                               const TelCallSoundPathInfo *sound_path_info,
+                               TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && sound_path_info
+                               && __tapi_check_sound_path(sound_path_info->path),
+                               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(iii)", info->device, info->type, info->volume);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "SetVolume", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_set_call_volume_info, evt_cb_data );
+       telephony_call_call_set_sound_path(handle->call_proxy,
+                                       sound_path_info->path,
+                                       sound_path_info->ex_volume, NULL,
+                                       on_response_call_set_sound_path,
+                                       rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_set_call_sound_path(TapiHandle *handle, TelCallSoundPathInfo_t *info, tapi_response_cb callback, void *user_data )
+static void on_response_call_set_mute(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_call_call_set_mute_finish(handle->call_proxy, (int *)&result,
+                                                       res, &error);
 
-       param = g_variant_new("(ib)", info->path, info->ex_volume);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "SetSoundPath", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_set_call_sound_path, evt_cb_data );
-
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_set_call_mute_status(TapiHandle *handle, TelSoundMuteStatus_t mute, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_set_mute(TelHandle *handle, gboolean mute,
+                               TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       char *method = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       if ( mute == TAPI_SOUND_MUTE_STATUS_ON ) 
-               method = "Mute";
-       else
-               method = "Unmute";
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       method, 0, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_set_call_mute_status, evt_cb_data );
+       telephony_call_call_set_mute(handle->call_proxy, mute,
+                                       NULL, on_response_call_set_mute,
+                                       rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_call_mute_status(TapiHandle *handle, tapi_response_cb callback, void *user_data )
+static void on_response_call_get_mute_status(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       gboolean mute;
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_call_call_get_mute_status_finish(handle->call_proxy, (int *)&result,
+                                                       &mute, res,
+                                                       &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "GetMuteStatus", 0, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_get_call_mute_status, evt_cb_data );
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       if (result != TEL_CALL_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       } else {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &mute);
+       }
 }
 
-EXPORT_API  int tel_set_call_sound_recording(TapiHandle *handle, TelSoundRecording_t *on, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_call_get_mute_status(TelHandle *handle,
+                                               TapiResponseCb callback,
+                                               void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       param = g_variant_new("(i)", on);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "SetSoundRecording", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_set_call_sound_recording, evt_cb_data );
+       telephony_call_call_get_mute_status(handle->call_proxy, NULL,
+                                       on_response_call_get_mute_status,
+                                       rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API  int tel_set_call_sound_equalization(TapiHandle *handle, TelCallSoundEqualization_t *eq, tapi_response_cb callback, void *user_data)
+static void on_response_call_set_sound_recording(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-       char *eq_param = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       eq_param = (char*)eq->parameter;
+       telephony_call_call_set_sound_recording_finish(handle->call_proxy,
+                                                       (int *)&result, res, &error);
 
-       param = g_variant_new("(iis)", eq->mode, eq->direction, eq_param);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "SetSoundEqualization", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_set_call_sound_equalization, evt_cb_data );
+EXPORT_API TelReturn tapi_call_set_sound_recording(TelHandle *handle,
+                                       TelCallSoundRecording sound_rec,
+                                       TapiResponseCb callback,
+                                       void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+                                       && __tapi_check_sound_rec(sound_rec),
+                                       TEL_RETURN_INVALID_PARAMETER);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
+       telephony_call_call_set_sound_recording(handle->call_proxy, sound_rec,
+                                       NULL,
+                                       on_response_call_set_sound_recording,
+                                       rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API  int tel_set_call_sound_noise_reduction(TapiHandle *handle, TelSoundNoiseReduction_t noise, tapi_response_cb callback, void *user_data)
+static void on_response_call_set_sound_equalization(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-
-       dbg("Func Entrance ");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelCallResult result = TEL_CALL_RESULT_FAILURE;
+       GError *error = NULL;
 
-       param = g_variant_new("(i)", noise);
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_call_call_set_sound_equalization_finish(handle->call_proxy,
+                                                               (int *)&result,
+                                                               res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "SetSoundNoiseReduction", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_set_call_sound_noise_reduction, evt_cb_data );
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_set_call_sound_clock_status(TapiHandle *handle, gboolean status, tapi_response_cb callback, void *user_data )
+EXPORT_API TelReturn tapi_call_set_sound_equalization(TelHandle *handle,
+                               const TelCallSoundEqualization *sound_eq,
+                               TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data;
+       GVariantBuilder *builder;
+       GVariant *parameter;
+       int i;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && sound_eq
+                               && __tapi_check_sound_direction(sound_eq->direction)
+                               && __tapi_check_sound_mode(sound_eq->mode),
+                               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(b)", status);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
-                       "SetSoundClockStatus", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
-                       on_response_set_call_sound_clock_status, evt_cb_data );
+       builder = g_variant_builder_new(G_VARIANT_TYPE("aq"));
+       for (i = 0; i < TEL_CALL_MAX_SOUND_EQ_PARAMETER_SIZE; i++)
+               g_variant_builder_add(builder, "q", sound_eq->parameter[i]);
 
-       return TAPI_API_SUCCESS;
-}
+       parameter = g_variant_new ("aq", builder);
+       g_variant_builder_unref (builder);
 
+       telephony_call_call_set_sound_equalization(handle->call_proxy,
+                               sound_eq->direction, sound_eq->mode, parameter,
+                               NULL, on_response_call_set_sound_equalization,
+                               rsp_cb_data);
 
-/*     EOF  */
+       g_variant_unref(parameter);
 
+       return TEL_RETURN_SUCCESS;
+}
index 27d160f..8700d9c 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#define _GNU_SOURCE
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <tel_modem.h>
+#include <tel_call.h>
 #include <string.h>
 
-#include <glib.h>
-#include <glib-object.h>
-#include <gio/gio.h>
-
-#include "tapi_common.h"
-#include "TapiUtility.h"
-
-//
-#include "ITapiPS.h"
-#include "TelNetwork.h"
-#include "TelSms.h"
-#include "TelSat.h"
-#include "TelSs.h"
-#include "TelCall.h"
-
-//
-#include "common.h"
-#include "tapi_log.h"
-
-#define CALLBACK_CALL(data) \
-       if (evt_cb_data->cb_fn) { \
-               evt_cb_data->cb_fn(handle, noti_id, (data), evt_cb_data->user_data); \
-       } \
-
-extern char *g_cookie_name;
-extern int g_cookie_size;
-
-TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT] = {-1};
-
-/*static void _cookie_deinit(void)
-{
-       if (g_cookie_name)
-               free(g_cookie_name);
-
-       g_cookie_name = NULL;
-       g_cookie_size = 0;
-}*/
-
-static void _process_network_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+#include "tapi_private.h"
+#include <tapi_events.h>
+#include <tel_modem.h>
+#include <tel_sim.h>
+#include <tel_network.h>
+#include <tel_call.h>
+#include <tel_ss.h>
+#include <tel_sms.h>
+#include <tel_phonebook.h>
+#include <tel_sat.h>
+#include <tel_sap.h>
+#include <tel_gps.h>
+
+/* Signal Callbacks */
+extern void on_network_signal_emit_handler(TelephonyNetwork *network, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+extern void on_phonebook_signal_emit_handler(TelephonyPhonebook *phonebook, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+extern void on_call_signal_emit_handler(TelephonyCall *call, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+extern void on_ss_signal_emit_handler(TelephonySs *ss, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+extern void on_sms_signal_emit_handler(TelephonySms *sms, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+extern void on_sat_signal_emit_handler(TelephonySat *sat, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+extern void on_sap_signal_emit_handler(TelephonySap *sap, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+extern void on_gps_signal_emit_handler(TelephonyGps *gps, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data);
+
+/* Property change Callbacks */
+extern void on_modem_property_change_handler(TelephonyModem *modem,
+       GVariant *changed_properties, const gchar *invalidated_properties, gpointer user_data);
+extern void on_sim_property_change_handler(TelephonySim *sim,
+       GVariant *changed_properties, const gchar *invalidated_properties, gpointer user_data);
+extern void on_sms_property_change_handler(TelephonySms *sms,
+       GVariant *changed_properties, const gchar *invalidated_properties, gpointer user_data);
+
+EXPORT_API TelReturn tapi_get_cp_name_list(char ***cp_list)
 {
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "RegistrationStatus")) {
-               struct tel_noti_network_registration_status noti;
-
-               g_variant_get(param, "(iiib)", &noti.cs, &noti.ps, &noti.type, &noti.is_roaming);
-
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "Info")) {
-               struct tel_noti_network_info noti;
-
-               memset(&noti, 0, sizeof(struct tel_noti_network_info));
-               g_variant_get(param, "(ii)", &noti.rssi, &noti.battery);
-
-               CALLBACK_CALL(&noti);
+       GDBusObjectManager *obj_manager = NULL;
+       GList *objects = NULL;
+       GList *iter = NULL;
+       GError *error = NULL;
+       unsigned int cp_count = 0;
+       unsigned int index = 0;
+
+       *cp_list = NULL;
+
+       obj_manager = telephony_object_manager_client_new_for_bus_sync(
+                                       G_BUS_TYPE_SYSTEM,
+                                       G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
+                                       TELEPHONY_SERVICE,
+                                       TELEPHONY_OBJECT_PATH,
+                                       NULL, &error);
+       if (error) {
+               err("Error getting object manager client: %s", error->message);
+               g_error_free (error);
+               return TEL_RETURN_FAILURE;
        }
-       else if (!g_strcmp0(sig, "CellInfo")) {
-               struct tel_noti_network_cell_info noti;
 
-               memset(&noti, 0, sizeof(struct tel_noti_network_cell_info));
-               g_variant_get(param, "(ii)", &noti.lac, &noti.cell_id);
+       objects = g_dbus_object_manager_get_objects(obj_manager);
 
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "Change")) {
-               struct tel_noti_network_change noti;
-               char *plmn = NULL;
-               int act;
-               memset(&noti, 0, sizeof(struct tel_noti_network_change));
-
-               g_variant_get(param, "(isi)", &act, &plmn, &noti.lac);
-
-               switch (act) {
-                       case 0x1:
-                               noti.act = TAPI_NETWORK_SYSTEM_GSM;
-                               break;
-                       case 0x2:
-                               noti.act = TAPI_NETWORK_SYSTEM_GPRS;
-                               break;
-                       case 0x3:
-                               noti.act = TAPI_NETWORK_SYSTEM_EGPRS;
-                               break;
-                       case 0x4:
-                               noti.act = TAPI_NETWORK_SYSTEM_UMTS;
-                               break;
-                       case 0x5:
-                               noti.act = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
-                               break;
-                       case 0x11:
-                               noti.act = TAPI_NETWORK_SYSTEM_IS95A;
-                               break;
-                       case 0x12:
-                               noti.act = TAPI_NETWORK_SYSTEM_IS95B;
-                               break;
-                       case 0x13:
-                               noti.act = TAPI_NETWORK_SYSTEM_CDMA_1X;
-                               break;
-                       case 0x14:
-                               noti.act = TAPI_NETWORK_SYSTEM_EVDO_REV_0;
-                               break;
-                       case 0x15:
-                               noti.act = TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID;
-                               break;
-                       case 0x16:
-                               noti.act = TAPI_NETWORK_SYSTEM_EVDO_REV_A;
-                               break;
-                       case 0x17:
-                               noti.act = TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID;
-                               break;
-                       case 0x18:
-                               noti.act = TAPI_NETWORK_SYSTEM_EVDV;
-                               break;
-                       case 0x21:
-                               noti.act = TAPI_NETWORK_SYSTEM_LTE;
-                               break;
-                       default:
-                               noti.act = TAPI_NETWORK_SYSTEM_NO_SRV;
-                               break;
-               }
+       cp_count = g_list_length(objects);
+       if (cp_count == 0)
+               goto out;
 
-               if (plmn) {
-                       snprintf(noti.plmn, 7, "%s", plmn);
-               }
+       /* This will be freed by caller. +1 for NULL str at the end */
+       *cp_list = calloc((cp_count + 1), sizeof(char*));
 
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "TimeInfo")) {
-               struct tel_noti_network_time_info noti;
-               char *plmn = NULL;
-
-               memset(&noti, 0, sizeof(struct tel_noti_network_time_info));
-               g_variant_get(param, "(iiiiiiiiibs)", &noti.year, &noti.month, &noti.day,
-                               &noti.hour, &noti.minute, &noti.second,
-                               &noti.wday, &noti.gmtoff, &noti.dstoff, &noti.isdst,
-                               &plmn);
-
-               if (plmn) {
-                       snprintf(noti.plmn, 7, "%s", plmn);
+       for (iter = objects, index = 0; iter != NULL; iter = iter->next, index++) {
+               TelephonyObject *object = TELEPHONY_OBJECT(iter->data);
+               const gchar *object_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
+               if (object_path) {
+                       (*cp_list)[index] = strdup(object_path); /* Will be freed up caller */
+                       if ((*cp_list)[index] == NULL)
+                               g_error ("%s: strdup failed", G_STRLOC);
                }
-
-               CALLBACK_CALL(&noti);
        }
-       else if (!g_strcmp0(sig, "Identity")) {
-               struct tel_noti_network_identity noti;
-               char *plmn = NULL, *s_name = NULL, *f_name = NULL;
-
-               memset(&noti, 0, sizeof(struct tel_noti_network_identity));
 
-               g_variant_get(param, "(sss)", &plmn, &s_name, &f_name);
+out:
+       if (objects != NULL)
+               g_list_free_full(objects, g_object_unref);
 
-               if (plmn) {
-                       snprintf(noti.plmn, 7, "%s", plmn);
-               }
-               if (s_name) {
-                       snprintf(noti.short_name, 17, "%s", s_name);
-               }
-               if (f_name) {
-                       snprintf(noti.full_name, 33, "%s", f_name);
-               }
+       if (obj_manager != NULL)
+               g_object_unref (obj_manager);
 
-               CALLBACK_CALL(&noti);
-       }
-       else {
-               dbg("not handled Network noti[%s]", sig);
-       }
+       return TEL_RETURN_SUCCESS;
 }
 
-static void _process_sms_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+EXPORT_API TelHandle *tapi_init(const char *cp_name)
 {
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "IncommingMsg")) {
-               struct tel_noti_sms_incomming_msg noti;
-
-               const char *sca = NULL;
-               const char *tpdu = NULL;
-               gsize length;
-               guchar *decoded_sca = NULL;
-               guchar *decoded_tpdu = NULL;
-
-               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_msg));
-
-               g_variant_get(param, "(sis)", &sca, &noti.MsgLength, &tpdu);
-
-               decoded_sca = g_base64_decode(sca, &length);
-               if (decoded_sca) {
-                       memcpy(&(noti.Sca[0]), decoded_sca, TAPI_SMS_ENCODED_SCA_LEN_MAX);
-                       g_free(decoded_sca);
+       #define HANDLE_GERROR(error, log_msg) \
+               if (error) { \
+                       err(log_msg": %s", error->message); \
+                       g_error_free(error); \
+                       goto fail; \
                }
 
-               decoded_tpdu = g_base64_decode(tpdu, &length);
-               if (decoded_tpdu) {
-                       memcpy(&(noti.szData[0]), decoded_tpdu, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
-                       g_free(decoded_tpdu);
-               }
-
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "IncommingCbMsg")) {
-               struct tel_noti_sms_incomming_cb_msg noti;
-
-               const char *cbMsg = NULL;
-               gsize length;
-               guchar *decoded_cbMsg = NULL;
-
-               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_cb_msg));
-               g_variant_get(param, "(iis)", &noti.CbMsgType, &noti.Length, &cbMsg);
-
-               decoded_cbMsg = g_base64_decode(cbMsg, &length);
-               if (decoded_cbMsg) {
-                       memcpy(&(noti.szMsgData[0]), decoded_cbMsg, TAPI_NETTEXT_CB_SIZE_MAX + 1);
-                       g_free(decoded_cbMsg);
-               }
-
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "IncommingEtwsMsg")) {
-               struct tel_noti_sms_incomming_etws_msg noti;
-
-               const char *etwsMsg = NULL;
-               gsize length;
-               guchar *decoded_etwsMsg = NULL;
-
-               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_etws_msg));
-               g_variant_get(param, "(iis)", &noti.EtwsMsgType, &noti.Length, &etwsMsg);
-
-               decoded_etwsMsg = g_base64_decode(etwsMsg, &length);
-               if (decoded_etwsMsg) {
-                       memcpy(&(noti.szMsgData[0]), decoded_etwsMsg, TAPI_NETTEXT_ETWS_SIZE_MAX + 1);
-                       g_free(decoded_etwsMsg);
-               }
-
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "MemoryStatus")) {
-               int noti = 0;
-
-               g_variant_get(param, "(i)", &noti);
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "SmsReady")) {
-               gboolean noti = 0;
-
-               g_variant_get(param, "(b)", &noti);
-               CALLBACK_CALL(&noti);
-       }
-       else {
-               dbg("not handled Sms noti[%s]", sig);
-       }
-}
-
-static void _process_call_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
-{
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "VoiceCallStatusIdle") || !g_strcmp0(sig, "VideoCallStatusIdle") ) {
-               TelCallStatusIdleNoti_t data;
-               int start_time = 0, end_time = 0;
-               g_variant_get(param, "(iiii)", &data.id, &data.cause, &start_time, &end_time);
-               dbg("[ check ] %s : call_id(%d), end_cause(0x%x)", "Status Idle noti", data.id, data.cause);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "VoiceCallStatusDialing") || !g_strcmp0(sig, "VideoCallStatusDialing")) {
-               TelCallStatusDialingNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : call_id(%d)", "Status Dialing noti", data.id);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "VoiceCallStatusAlert") || !g_strcmp0(sig, "VideoCallStatusAlert")) {
-               TelCallStatusAlertNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : call_id(%d)", "Status Alert noti", data.id);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "VoiceCallStatusActive") || !g_strcmp0(sig, "VideoCallStatusActive")) {
-               TelCallStatusActiveNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : call_id(%d)", "Status Active noti", data.id);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "VoiceCallStatusHeld") ) {
-               TelCallStatusHeldNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : call_id(%d)", "Status Held noti", data.id);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "VoiceCallStatusIncoming") || !g_strcmp0(sig, "VideoCallStatusIncoming")) {
-               TelCallStatusIncomingNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : call_id(%d)", "Status Incoming noti", data.id);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "Waiting")) {
-               TelCallInfoWaitingNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Waiting noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "Forwarded")) {
-               TelCallInfoForwardedNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Forwarded noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "BarredIncoming")) {
-               TelCallInfoBarredIncomingNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Barred Incoming noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "BarredOutgoing")) {
-               TelCallInfoBarredOutgoingNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Barred Outgoing noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "ForwardConditional")) {
-               TelCallInfoForwardConditionalNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Forward Conditional noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "ForwardUnconditional")) {
-               TelCallInfoForwardUnconditionalNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Forward Unconditional noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "CallActive")) {
-               TelCallInfoActiveNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Call Active noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "CallHeld")) {
-               TelCallInfoHeldNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Call Held noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "CallJoined")) {
-               TelCallInfoJoinedNoti_t data;
-               g_variant_get(param, "(i)", &data.id);
-               dbg("[ check ] %s : data.id(%d)", "Call Info Call Joined noti", data.id);
-               CALLBACK_CALL(&data.id);
-       }
-       else if (!g_strcmp0(sig, "CallSoundPath")) {
-               TelCallSoundPathNoti_t data;
-               g_variant_get(param, "(i)", &data.path);
-               dbg("[ check ] %s : path(%d)", "Call Sound Path noti", data.path);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "CallSoundRingbackTone")) {
-               TelCallSoundRingbackToneNoti_t status;
-               g_variant_get(param, "(i)", &status);
-               dbg("[ check ] %s : status(%d)", "Call Sound Ringbacktone noti", status);
-               CALLBACK_CALL(&status);
-       }
-       else if (!g_strcmp0(sig, "CallSoundWbamr")) {
-               TelCallSoundWbamrNoti_t status;
-               g_variant_get(param, "(i)", &status);
-               dbg("[ check ] %s : status(%d)", "Call Sound Wbamr noti", status);
-               CALLBACK_CALL(&status);
-       }
-       else if (!g_strcmp0(sig, "CallSoundEqualization")) {
-               TelCallSoundEqualizationNoti_t data;
-               g_variant_get(param, "(ii)", &data.mode, &data.direction);
-               dbg("[ check ] %s : mode(%d), direction(%d)", "Call Sound Equalization noti", data.mode, data.direction);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "CallSoundNoiseReduction")) {
-               TelCallSoundNoiseReductionNoti_t data;
-               g_variant_get(param, "(i)", &data.status);
-               dbg("[ check ] %s : status(%d)", "Call Sound Noise Reduction noti", data.status);
-               CALLBACK_CALL(&data);
-       }
-       else if (!g_strcmp0(sig, "CallSoundClockStatus")) {
-               gboolean data;
-               g_variant_get(param, "(b)", &data);
-               dbg("[ check ] %s : status(%d)", "Call Sound Clock Status noti", data);
-               CALLBACK_CALL(&data);
-       }
-       else {
-               dbg("not handled Call noti[%s]", sig);
-       }
-}
-
-static void _process_sat_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
-{
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "SetupMenu")) {
-               TelSatSetupMenuInfo_t setup_menu;
-
-               gchar *title;
-               gint command_id, item_cnt;
-               gboolean b_present, b_helpinfo, b_updated;
-               GVariant *items = NULL;
-
-               memset(&setup_menu, 0, sizeof(TelSatSetupMenuInfo_t));
-
-               g_variant_get(param, "(ibs@vibb)", &command_id, &b_present, &title, &items, &item_cnt,
-                                       &b_helpinfo, &b_updated);
-
-               setup_menu.commandId = command_id;
-               setup_menu.bIsMainMenuPresent = (b_present ? 1 : 0);
-               memcpy(setup_menu.satMainTitle, title, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
-               setup_menu.satMainMenuNum = item_cnt;
-               if(items && item_cnt > 0){
-                       int index = 0;
-                       GVariant *unbox;
-                       GVariantIter *iter;
-
-                       gchar *item_str;
-                       gint item_id;
-                       unbox = g_variant_get_variant(items);
-                       dbg("items(%p) items type_format(%s)", items, g_variant_get_type_string(unbox));
-
-                       g_variant_get(unbox, "a(si)", &iter);
-                       while(g_variant_iter_loop(iter,"(si)",&item_str, &item_id)){
-                               setup_menu.satMainMenuItem[index].itemId = item_id;
-                               memcpy(setup_menu.satMainMenuItem[index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
-                               dbg("item index(%d) id(%d) str(%s)",index, setup_menu.satMainMenuItem[index].itemId, setup_menu.satMainMenuItem[index].itemString);
-                               //dbg("item index(%d) id(%d) str(%s)",index, item_id, item_str);
-                               index++;
-                       }
-                       g_variant_iter_free(iter);
-               }
-               setup_menu.bIsSatMainMenuHelpInfo = (b_helpinfo ? 1 : 0);
-               setup_menu.bIsUpdatedSatMainMenu = (b_updated ? 1 : 0);
-
-               dbg("command id (%d)", setup_menu.commandId);
-               dbg("menu present (%d)", setup_menu.bIsMainMenuPresent);
-               dbg("menu title (%s)", setup_menu.satMainTitle);
-               dbg("item cnt (%d)", setup_menu.satMainMenuNum);
-               dbg("menu help info (%d)", setup_menu.bIsSatMainMenuHelpInfo);
-               dbg("menu updated (%d)", setup_menu.bIsUpdatedSatMainMenu);
-
-               CALLBACK_CALL(&setup_menu);
-       }
-       else if (!g_strcmp0(sig, "DisplayText")) {
-               TelSatDisplayTextInd_t display_text;
-
-               gchar* text;
-               gint command_id, text_len, duration;
-               gboolean high_priority, user_rsp_required, immediately_rsp;
-
-               memset(&display_text, 0, sizeof(TelSatDisplayTextInd_t));
-
-               g_variant_get(param, "(isiibbb)", &command_id, &text, &text_len, &duration,
-                       &high_priority, &user_rsp_required, &immediately_rsp);
-
-               display_text.commandId = command_id;
-               memcpy(display_text.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
-               display_text.text.stringLen = text_len;
-               display_text.duration = duration;
-               display_text.bIsPriorityHigh = (high_priority ? 1 : 0);
-               display_text.bIsUserRespRequired = (user_rsp_required ? 1 : 0);
-               display_text.b_immediately_resp = (immediately_rsp ? 1 : 0);
-
-               dbg("command id (%d)", display_text.commandId);
-               dbg("display text (%s)", display_text.text.string);
-               dbg("string len(%d)", display_text.text.stringLen);
-               dbg("duration (%d)", display_text.duration);
-               dbg("high priority (%d)", display_text.bIsPriorityHigh);
-               dbg("user response required(%d)", display_text.bIsUserRespRequired);
-               dbg("immediately response (%d)", display_text.b_immediately_resp);
-
-               CALLBACK_CALL(&display_text);
-       }
-       else if (!g_strcmp0(sig, "SelectItem")) {
-               TelSatSelectItemInd_t select_item;
-
-               gboolean help_info ;
-               gchar *selected_text;
-               gint command_id, default_item_id, menu_cnt, text_len =0;
-               GVariant *menu_items;
-
-               memset(&select_item, 0, sizeof(TelSatSelectItemInd_t));
-
-               g_variant_get(param, "(ibsiii@v)", &command_id, &help_info, &selected_text,
-                       &text_len, &default_item_id, &menu_cnt, &menu_items);
-
-               select_item.commandId = command_id;
-               select_item.bIsHelpInfoAvailable = (help_info ? 1 : 0);
-               memcpy(select_item.text.string, selected_text, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
-               select_item.text.stringLen = text_len;
-               select_item.defaultItemIndex = default_item_id;
-               select_item.menuItemCount = menu_cnt;
-               if(menu_items && menu_cnt > 0){
-                       int index = 0;
-                       GVariant *unbox;
-                       GVariantIter *iter;
-
-                       gchar *item_str;
-                       gint item_id, item_len;
-                       unbox = g_variant_get_variant(menu_items);
-                       dbg("items(%p) items type_format(%s)", menu_items, g_variant_get_type_string(unbox));
-
-                       g_variant_get(unbox, "a(iis)", &iter);
-                       while(g_variant_iter_loop(iter,"(iis)",&item_id, &item_len, &item_str)){
-                               select_item.menuItem[index].itemId = item_id;
-                               select_item.menuItem[index].textLen = item_len;
-                               memcpy(select_item.menuItem[index].text, item_str, TAPI_SAT_ITEM_TEXT_LEN_MAX + 1);
-                               dbg("item index(%d) id(%d) len(%d) str(%s)", index,
-                                               select_item.menuItem[index].itemId, select_item.menuItem[index].textLen, select_item.menuItem[index].text);
-                               index++;
-                       }
-                       g_variant_iter_free(iter);
-               }
-
-               dbg("command id (%d)", select_item.commandId);
-               dbg("help info(%d)", select_item.bIsHelpInfoAvailable);
-               dbg("selected item string(%s)", select_item.text.string);
-               dbg("string len(%d)", select_item.text.stringLen);
-               dbg("default item index(%d)", select_item.defaultItemIndex);
-               dbg("item count(%d)", select_item.menuItemCount);
-
-               CALLBACK_CALL(&select_item);
-       }
-       else if (!g_strcmp0(sig, "GetInkey")) {
-               TelSatGetInkeyInd_t get_inkey;
-
-               gint command_id, key_type, input_character_mode;
-               gint text_len, duration;
-               gboolean b_numeric, b_help_info;
-               gchar *text;
-
-               memset(&get_inkey, 0, sizeof(TelSatGetInkeyInd_t));
-
-               g_variant_get(param, "(iiibbsii)", &command_id, &key_type, &input_character_mode,
-                       &b_numeric,&b_help_info, &text, &text_len, &duration);
-
-               get_inkey.commandId = command_id;
-               get_inkey.keyType = key_type;
-               get_inkey.inputCharMode = input_character_mode;
-               get_inkey.bIsNumeric = (b_numeric ? 1 : 0);
-               get_inkey.bIsHelpInfoAvailable = (b_help_info ? 1 : 0);
-               memcpy(get_inkey.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
-               get_inkey.text.stringLen = text_len;
-               get_inkey.duration = duration;
-
-               dbg("command id(%d)", get_inkey.commandId);
-               dbg("key type(%d)", get_inkey.keyType);
-               dbg("input character mode(%d)", get_inkey.inputCharMode);
-               dbg("numeric(%d)", get_inkey.bIsNumeric);
-               dbg("help info available(%d)", get_inkey.bIsHelpInfoAvailable);
-               dbg("text (%s)", get_inkey.text.string);
-               dbg("text length", get_inkey.text.stringLen);
-               dbg("duration", get_inkey.duration);
-
-               CALLBACK_CALL(&get_inkey);
-       }
-       else if (!g_strcmp0(sig, "GetInput")) {
-               TelSatGetInputInd_t get_input;
-
-               gint command_id, input_character_mode;
-               gint text_len, def_text_len, rsp_len_min, rsp_len_max;
-               gboolean b_numeric, b_help_info, b_echo_input;
-               gchar *text, *def_text;
-
-               memset(&get_input, 0, sizeof(TelSatGetInputInd_t));
-
-               g_variant_get(param, "(iibbbsiiisi)", &command_id, &input_character_mode, &b_numeric, &b_help_info, &b_echo_input,
-                       &text, &text_len, &rsp_len_max, &rsp_len_min, &def_text, &def_text_len);
-
-               get_input.commandId = command_id;
-               get_input.inputCharMode = input_character_mode;
-               get_input.bIsNumeric = (b_numeric ? 1 : 0);
-               get_input.bIsHelpInfoAvailable = (b_help_info ? 1 : 0);
-               get_input.bIsEchoInput = (b_echo_input ? 1 : 0);
-               memcpy(get_input.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
-               get_input.text.stringLen = text_len;
-               get_input.respLen.max = rsp_len_max;
-               get_input.respLen.min = rsp_len_min;
-               memcpy(get_input.defaultText.string, def_text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
-               get_input.defaultText.stringLen = def_text_len;
-
-               dbg("command id(%d)", get_input.commandId);
-               dbg("input character mode(%d)", get_input.inputCharMode);
-               dbg("numeric(%d)", get_input.bIsNumeric);
-               dbg("help info avaiable(%d)", get_input.bIsHelpInfoAvailable);
-               dbg("echo input(%d)", get_input.bIsEchoInput);
-               dbg("text(%s)", get_input.text.string);
-               dbg("text length(%d)", get_input.text.stringLen);
-               dbg("response length max(%d)", get_input.respLen.max);
-               dbg("response length min(%d)", get_input.respLen.min);
-               dbg("default text(%s)", get_input.defaultText.string);
-               dbg("default text length(%d)", get_input.defaultText.stringLen);
-
-               CALLBACK_CALL(&get_input);
-       }
-       else if (!g_strcmp0(sig, "SendSMS")) {
-               TelSatSendSmsIndSmsData_t send_sms;
-
-               gint command_id, ton, npi, tpdu_type;
-               gboolean b_packing_required;
-               gint text_len, number_len, tpdu_data_len, tmp_data_len;
-               gchar* text, *dialling_number;
-               GVariant *tpdu_data;
-
-               memset(&send_sms, 0, sizeof(TelSatSendSmsIndSmsData_t));
-
-               g_variant_get(param, "(isibiisii@vi)", &command_id, &text, &text_len, &b_packing_required, &ton, &npi,
-                                       &dialling_number, &number_len, &tpdu_type, &tpdu_data, &tpdu_data_len);
-
-               send_sms.commandId = command_id;
-               send_sms.bIsPackingRequired = (b_packing_required ? 1 : 0);
-
-               send_sms.address.ton = ton;
-               send_sms.address.npi = npi;
-               send_sms.address.diallingNumberLen = number_len;
-               memcpy(send_sms.address.diallingNumber, dialling_number, TAPI_SAT_DIALLING_NUMBER_LEN_MAX);
-
-               send_sms.smsTpdu.tpduType = tpdu_type;
-               send_sms.smsTpdu.dataLen = tpdu_data_len;
-
-               if(tpdu_data){
-                       int index = 0;
-                       guchar data;
-                       GVariantIter *iter = NULL;
-                       GVariant *inner_gv = NULL;
-
-                       inner_gv = g_variant_get_variant(tpdu_data);
-                       dbg("tpdu data exist type_format(%s)", g_variant_get_type_string(inner_gv));
-
-                       g_variant_get(inner_gv, "ay", &iter);
-                       while( g_variant_iter_loop (iter, "y", &data)){
-                               dbg("index(%d) data(%c)", index, data);
-                               send_sms.smsTpdu.data[index] = data;
-                               index++;
-                       }
-                       g_variant_iter_free(iter);
-                       g_variant_unref(inner_gv);
-                       tmp_data_len = index - 1;
-               }
-
-               dbg("command id(%d)", send_sms.commandId);
-               dbg("packing required(%d)", send_sms.bIsPackingRequired);
-               dbg("address ton(%d)", send_sms.address.ton);
-               dbg("address npi(%d)", send_sms.address.npi);
-               dbg("address dialing number (%s)", send_sms.address.diallingNumber);
-               dbg("address number length (%d)", send_sms.address.diallingNumberLen);
-               dbg("tpdu type (%d)", send_sms.smsTpdu.tpduType);
-               dbg("tpdu length (%d)", send_sms.smsTpdu.dataLen);
-
-               CALLBACK_CALL(&send_sms);
-       }
-       else if (!g_strcmp0(sig, "SetupEventList")) {
-               int g_index = 0;
-               gint event_cnt;
-               GVariant *evt_list;
-               TelSatEventListData_t event_list;
-
-               memset(&event_list, 0, sizeof(TelSatEventListData_t));
-
-               g_variant_get(param, "(i@v)", &event_cnt, &evt_list);
-
-               if(evt_list){
-                       guchar data;
-                       GVariantIter *iter = NULL;
-                       GVariant *inner_gv = NULL;
-
-                       inner_gv = g_variant_get_variant(evt_list);
-                       dbg("event list exist type_format(%s)", g_variant_get_type_string(inner_gv));
-
-                       g_variant_get(inner_gv, "ai", &iter);
-                       while( g_variant_iter_loop (iter, "i", &data)){
-                               dbg("g_index(%d) event(%d)", g_index, data);
-                               g_event_list[g_index] = data;
-
-                               if(data == TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE){
-                                       event_list.bIsIdleScreenAvailable = 1;
-                               }
-                               else if(data == TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION){
-                                       event_list.bIsLanguageSelection = 1;
-                               }
-                               else if(data == TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION){
-                                       event_list.bIsBrowserTermination = 1;
-                               }
-                               else if(data == TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE){
-                                       event_list.bIsDataAvailable = 1;
-                               }
-                               else if(data == TAPI_EVENT_SAT_DW_TYPE_CHANNEL_STATUS){
-                                       event_list.bIsChannelStatus = 1;
-                               }
-
-                               g_index++;
-                       }
-                       //while end
-                       g_variant_iter_free(iter);
-                       g_variant_unref(inner_gv);
-               }
+       TelHandle *handle = NULL;
+       GDBusObjectManager *obj_manager = NULL;
+       GList *objects = NULL;
+       TelephonyObject *tel_object;
+       GList *interfaces = NULL;
+       GList *iter = NULL;
+       GError *error = NULL;
+       const gchar *cp_found = NULL;
+       dbg("Func Entrance");
 
-               dbg("event list cnt(%d)", event_cnt);
+#if !GLIB_CHECK_VERSION (2, 35, 3)
+       g_type_init();
+       dbg("g_type_init");
 
-               CALLBACK_CALL(&event_list);
+#endif
+       /* Find CP objects */
+       obj_manager = telephony_object_manager_client_new_for_bus_sync(
+                                       G_BUS_TYPE_SYSTEM,
+                                       G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
+                                       TELEPHONY_SERVICE,
+                                       TELEPHONY_OBJECT_PATH,
+                                       NULL, &error);
+       if (error) {
+               err("Error getting object manager client:%s", error->message);
+               g_error_free(error);
+               return NULL;
        }
-       else if (!g_strcmp0(sig, "Refresh")) {
-               TelSatRefreshInd_t refresh_info;
-
-               gint command_id = 0;
-               gint refresh_type =0;
-               gint file_cnt = 0;
-               GVariant *file_list = NULL;
-
-               memset(&refresh_info, 0, sizeof(TelSatRefreshInd_t));
 
-               g_variant_get(param, "(ii@v)", &command_id, &refresh_type, &file_list);
+       dbg("g_type_init");
 
-               refresh_info.commandId = command_id;
-               refresh_info.refreshMode = refresh_type;
+       objects = g_dbus_object_manager_get_objects(obj_manager);
 
-               if(file_list){
-                       int g_index = 0;
-                       guchar data;
-                       GVariantIter *iter = NULL;
-                       GVariant *inner_gv = NULL;
+       for (iter = objects; iter != NULL; iter = iter->next) {
+               tel_object = TELEPHONY_OBJECT(iter->data);
+               const gchar *object_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(tel_object));
 
-                       inner_gv = g_variant_get_variant(file_list);
-                       dbg("file list exist type_format(%s)", g_variant_get_type_string(inner_gv));
-
-                       g_variant_get(inner_gv, "ai", &iter);
-                       while( g_variant_iter_loop (iter, "i", &data)){
-                               dbg("g_index(%d) file id(%d)", g_index, data);
-                               refresh_info.fileId[g_index] = data;
-                               g_index++;
-                       }
-                       file_cnt = g_index;
-
-                       //while end
-                       g_variant_iter_free(iter);
-                       g_variant_unref(inner_gv);
+               /* NULL: First CP in list, else matching */
+               if ((cp_name == NULL) || (g_strcmp0(cp_name, object_path) == 0)) {
+                       cp_found = object_path;
+                       break;
                }
-               refresh_info.fileCount = file_cnt;
-
-               dbg("refresh event/file cnt(%d)", refresh_info.fileCount);
-
-               CALLBACK_CALL(&refresh_info);
        }
-       else if (!g_strcmp0(sig, "SendDtmf")) {
-               TelSatSendDtmfIndDtmfData_t send_dtmf;
-
-               gint command_id = 0;
-               gint text_len = 0, dtmf_str_len = 0;
-               gchar *text = NULL;
-               gchar *dtmf_str = NULL;
 
-               memset(&send_dtmf, 0, sizeof(TelSatSendDtmfIndDtmfData_t));
+       if (cp_found == NULL)
+               goto out;
 
-               g_variant_get(param, "(isisi)", &command_id, &text, &text_len, &dtmf_str, &dtmf_str_len);
+       dbg("cp_found: [%s]", cp_found);
 
-               send_dtmf.commandId = command_id;
-               if(text_len <= 0 || g_strcmp0(text,"") == 0 ){
-                       send_dtmf.bIsHiddenMode = 1;
+       /* Allocate new Handle */
+       handle = g_new0(struct tapi_handle, 1);
+
+       /* Find interfaces available for the given CP */
+       interfaces = g_dbus_object_get_interfaces(G_DBUS_OBJECT (tel_object));
+       for (iter = interfaces; iter != NULL; iter = iter->next) {
+               GDBusInterface *interface = G_DBUS_INTERFACE(iter->data);
+               const gchar *interface_name = g_dbus_interface_get_info(interface)->name;
+               /* Create proxies and register for Signals and Property change events */
+               if ((handle->modem_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_MODEM_INTERFACE) == 0)) {
+                       handle->modem_proxy = telephony_modem_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting modem proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->modem_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+
+                       handle->modem_property_handler = g_signal_connect(
+                                               handle->modem_proxy,
+                                               "g-properties-changed",
+                                               G_CALLBACK(on_modem_property_change_handler),
+                                               handle);
+               } else if ((handle->sim_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_SIM_INTERFACE) == 0)) {
+                       handle->sim_proxy = telephony_sim_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting sim proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sim_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->sim_property_handler = g_signal_connect(
+                                               handle->sim_proxy,
+                                               "g-properties-changed",
+                                               G_CALLBACK(on_sim_property_change_handler),
+                                               handle);
+               } else if ((handle->network_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_NETWORK_INTERFACE) == 0)) {
+                       handle->network_proxy = telephony_network_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting network proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->network_signal_handler = g_signal_connect(
+                                               handle->network_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_network_signal_emit_handler),
+                                               handle);
+               } else if ((handle->call_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_CALL_INTERFACE) == 0)) {
+                       handle->call_proxy = telephony_call_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting call proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->call_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->call_signal_handler = g_signal_connect(
+                                               handle->call_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_call_signal_emit_handler),
+                                               handle);
+               } else if ((handle->ss_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_SS_INTERFACE) == 0)) {
+                       handle->ss_proxy = telephony_ss_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting ss proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->ss_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->ss_signal_handler = g_signal_connect(
+                                               handle->ss_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_ss_signal_emit_handler),
+                                               handle);
+               } else if ((handle->sms_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_SMS_INTERFACE) == 0)) {
+                       handle->sms_proxy = telephony_sms_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting sms proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sms_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->sms_signal_handler = g_signal_connect(
+                                               handle->sms_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_sms_signal_emit_handler),
+                                               handle);
+
+                       handle->sms_property_handler = g_signal_connect(
+                                               handle->sms_proxy,
+                                               "g-properties-changed",
+                                               G_CALLBACK(on_sms_property_change_handler),
+                                               handle);
+               } else if ((handle->phonebook_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_PB_INTERFACE) == 0)) {
+                       handle->phonebook_proxy = telephony_phonebook_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting phonebook proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->phonebook_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->phonebook_signal_handler = g_signal_connect(
+                                               handle->phonebook_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_phonebook_signal_emit_handler),
+                                               handle);
+               } else if ((handle->sat_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_SAT_INTERFACE) == 0)) {
+                       handle->sat_proxy = telephony_sat_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting sat proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sat_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->sat_signal_handler = g_signal_connect(
+                                               handle->sat_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_sat_signal_emit_handler),
+                                               handle);
+               } else if ((handle->sap_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_SAP_INTERFACE) == 0)) {
+                       handle->sap_proxy = telephony_sap_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting sap proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sap_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->sap_signal_handler = g_signal_connect(
+                                               handle->sap_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_sap_signal_emit_handler),
+                                               handle);
+               } else if ((handle->gps_proxy == NULL)
+                       && (g_strcmp0(interface_name, TELEPHONY_GPS_INTERFACE) == 0)) {
+                       handle->gps_proxy = telephony_gps_proxy_new_for_bus_sync(
+                                               G_BUS_TYPE_SYSTEM,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               TELEPHONY_SERVICE,
+                                               cp_found, NULL, &error);
+                       HANDLE_GERROR(error, "Error getting gps proxy");
+
+                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
+                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->gps_proxy,
+                               TAPI_DBUS_TIMEOUT_DEFAULT);
+
+                       handle->gps_signal_handler = g_signal_connect(
+                                               handle->gps_proxy,
+                                               "g-signal",
+                                               G_CALLBACK(on_gps_signal_emit_handler),
+                                               handle);
                }
-
-               send_dtmf.dtmfString.stringLen = dtmf_str_len;
-               memcpy(send_dtmf.dtmfString.string, dtmf_str, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
-
-               dbg("dtmf event command id(%d)", send_dtmf.commandId);
-               dbg("dtmf event dtmf(%s)", send_dtmf.dtmfString.string);
-
-               CALLBACK_CALL(&send_dtmf);
        }
-       else if (!g_strcmp0(sig, "EndProactiveSession")) {
-               int command_type = 0;
 
-               g_variant_get(param, "(i)", &command_type);
-               dbg("end session evt : command type(%d)", command_type);
-               CALLBACK_CALL(&command_type);
-       }
-       else {
-               dbg("not handled Sat noti[%s]", sig);
-       }
-}
+       handle->cp_name = g_strdup(cp_found);
+       handle->evt_table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
 
-static void _process_sim_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
-{
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "Status")) {
-               int noti = 0;
-               g_variant_get(param, "(i)", &noti);
-               CALLBACK_CALL(&noti);
-       } else {
-               dbg("not handled SIM noti[%s]",sig );
-       }
-}
+       goto out;
 
-static void _process_pb_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
-{
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "Status")) {
-               int noti = 0;
-               g_variant_get(param, "(i)", &noti);
-               CALLBACK_CALL(&noti);
-       } else {
-               dbg("not handled Phonebook noti[%s]",sig );
-       }
-}
+fail:
+       (void) tapi_deinit(handle);
 
-static void _process_sap_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
-{
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "Status")) {
-               int noti = 0;
-               g_variant_get(param, "(i)", &noti);
-               CALLBACK_CALL(&noti);
-       } else if (!g_strcmp0(sig, "Disconnect")) {
-               int disconnect = 0;
-               g_variant_get(param, "(i)", &disconnect);
-               CALLBACK_CALL(&disconnect);
-       } else {
-               dbg("not handled SAP noti[%s]",sig );
-       }
-}
-
-static void _process_modem_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
-{
-       if (!evt_cb_data)
-               return;
+out:
+       if (interfaces != NULL)
+               g_list_free_full(interfaces, g_object_unref);
 
-       if (!g_strcmp0(sig, "Power")) {
-               int noti = 0;
+       if (objects != NULL)
+               g_list_free_full(objects, g_object_unref);
 
-               g_variant_get(param, "(i)", &noti);
+       if (obj_manager != NULL)
+               g_object_unref (obj_manager);
 
-               CALLBACK_CALL(&noti);
-       }
-       else if (!g_strcmp0(sig, "DunPinCtrl")) {
-               tapi_ps_btdun_pincontrol pin_ctrl;
-               int signal = 0, status = 0;
-
-               memset(&pin_ctrl, 0, sizeof(tapi_ps_btdun_pincontrol));
-               g_variant_get(param, "(ib)", &signal, &status);
-               pin_ctrl.signal = signal;
-               pin_ctrl.status = status;
-
-               CALLBACK_CALL(&pin_ctrl);
-       }
-       else if (!g_strcmp0(sig, "DunExternalCall")) {
-               gboolean external_call;
-
-               g_variant_get(param, "(b)", &external_call);
-
-               CALLBACK_CALL(&external_call);
-       }
-       else {
-               dbg("not handled Modem noti[%s]", sig);
-       }
-
-       return;
-}
-
-static void _process_ss_event(const gchar *sig, GVariant *param,
-       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
-{
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "NotifyUSSD")) {
-               TelSsUssdMsgInfo_t noti;
-               char *str = NULL;
-               memset(&noti, 0, sizeof(TelSsUssdMsgInfo_t));
-
-               g_variant_get(param, "(iis)", &noti.Type, &noti.Length, &str);
-
-               if (str) {
-                       g_strlcpy(noti.szString, str, TAPI_SS_USSD_DATA_SIZE_MAX);
-                       g_free(str);
-               }
-
-               CALLBACK_CALL(&noti);
-
-       } else if (!g_strcmp0(sig, "ReleaseComplete")) {
-               TelSsRelCompMsgInfo_t noti;
-               GVariant *msg = 0;
-               int len = 0;
-
-               memset ( &noti, 0, sizeof( TelSsRelCompMsgInfo_t ));
-
-               g_variant_get(param, "(i@v)", &len, &msg);
-
-               noti.RelCompMsgLen = (unsigned char)len;
-
-               if(msg){
-                       int i = 0;
-                       guchar data;
-                       GVariantIter *iter = NULL;
-                       GVariant *inner_gv = NULL;
-
-                       inner_gv = g_variant_get_variant(msg);
-                       dbg("[ check ] data exist type_format(%s)", g_variant_get_type_string(inner_gv));
-
-                       g_variant_get(inner_gv, "ay", &iter);
-                       while( g_variant_iter_loop (iter, "y", &data)){
-                               dbg("index(%d) data(%c)", index, data);
-                               noti.szRelCompMsg[i] = data;
-                               i++;
-                       }
-                       g_variant_iter_free(iter);
-                       g_variant_unref(inner_gv);
-               }
-
-               CALLBACK_CALL(&noti);
-
-       } else {
-               dbg("not handled SS noti[%s]", sig);
-       }
-
-       return;
+       return handle;
 }
 
-static void _process_gps_event(const gchar *sig, GVariant *param,
-               TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+EXPORT_API TelReturn tapi_deinit(TelHandle *handle)
 {
-       gboolean b_decode_data = FALSE;
-       guchar *decoded_data = NULL;
-
-       if (!evt_cb_data)
-               return;
-
-       if (!g_strcmp0(sig, "AssistData")) {
-               b_decode_data = TRUE;
-       }
-       else if (!g_strcmp0(sig, "MeasurePosition")) {
-               b_decode_data = TRUE;
-       }
-       else if (!g_strcmp0(sig, "ResetAssistData")) {
-               /* noting to decode */
-       }
-       else if (!g_strcmp0(sig, "FrequencyAiding")) {
-               b_decode_data = TRUE;
-       }
-       else {
-               dbg("not handled Gps noti[%s]", sig);
-       }
-
-       /* decoding data */
-       if(b_decode_data) {
-               gchar *data = NULL;
-               gsize length;
-               dbg("[%s] decoding start", sig);
-
-               g_variant_get(param, "(s)", &data);
-               decoded_data = g_base64_decode((const gchar *)data, &length);
-               if (decoded_data) {
-                       CALLBACK_CALL(decoded_data);
-               }
-
-               dbg("length=%d", length);
-       }
-
-       if (decoded_data)
-               g_free(decoded_data);
-}
+       if (handle == NULL)
+               return TEL_RETURN_INVALID_PARAMETER;
 
-static void on_signal_callback(GDBusConnection *conn, const gchar *name, const gchar *path, const gchar *interface,
-               const gchar *sig, GVariant *param, gpointer user_data)
-{
-       TapiHandle *handle = user_data;
-       struct tapi_evt_cb *evt_cb_data = NULL;
-       char *noti_id;
+       if (handle->modem_proxy) {
+               if (handle->modem_property_handler > 0)
+                       g_signal_handler_disconnect(handle->modem_proxy,
+                               handle->modem_property_handler);
 
-       if (!handle) {
-               dbg("handle is NULL");
-               return;
+               g_object_unref(handle->modem_proxy);
        }
 
-       noti_id = g_strdup_printf("%s:%s", interface, sig);
-
-       evt_cb_data = g_hash_table_lookup(handle->evt_list, noti_id);
-       if (!evt_cb_data) {
-               dbg("can't find noti_id(%s) callback info", noti_id);
-               g_free(noti_id);
-               return;
-       }
+       if (handle->sim_proxy) {
+               if (handle->sim_property_handler > 0)
+                       g_signal_handler_disconnect(handle->sim_proxy,
+                               handle->sim_property_handler);
 
-       if (!g_strcmp0(interface, DBUS_TELEPHONY_NETWORK_INTERFACE)) {
-               _process_network_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SMS_INTERFACE)) {
-               _process_sms_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_CALL_INTERFACE)) {
-               _process_call_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SAT_INTERFACE)) {
-               _process_sat_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SIM_INTERFACE)) {
-               _process_sim_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_PB_INTERFACE)) {
-               _process_pb_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SAP_INTERFACE)) {
-               _process_sap_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_MODEM_INTERFACE)) {
-               _process_modem_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SS_INTERFACE)) {
-               _process_ss_event(sig, param, handle, noti_id, evt_cb_data);
+               g_object_unref(handle->sim_proxy);
        }
-       else if (!g_strcmp0(interface, DBUS_TELEPHONY_GPS_INTERFACE)) {
-               _process_gps_event(sig, param, handle, noti_id, evt_cb_data);
-       }
-       else {
-               dbg("can't find interface(%s)", interface);
-       }
-       g_free(noti_id);
-}
 
-EXPORT_API char** tel_get_cp_name_list(void)
-{
-       GError *error = NULL;
-       GDBusProxy *proxy = NULL;
+       if (handle->network_proxy) {
+               if (handle->network_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->network_proxy,
+                               handle->network_signal_handler);
 
-       GVariantIter *iter = NULL;
-       GVariant *rst = NULL;
+               if (handle->network_property_handler > 0)
+                       g_signal_handler_disconnect(handle->network_proxy,
+                               handle->network_property_handler);
 
-       gchar *modem_path = NULL;
-       GSList *list = NULL;
-       GSList *l = NULL;
-
-       int i = 0, element_cnt = 0;
-       gchar **cp_list = NULL;
-
-       proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL,
-                               "org.tizen.telephony", "/org/tizen/telephony", "org.tizen.telephony.Manager",
-                               NULL, &error);
-       if (!proxy) {
-               dbg("g_dbus_proxy_new_for_bus_sycn() failed. (%s)", error->message);
-               g_error_free (error);
-               return NULL;
+               g_object_unref(handle->network_proxy);
        }
 
-       rst = g_dbus_proxy_call_sync (proxy, "GetModems", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
-       if (!rst) {
-               dbg( "GetModems() failed. (%s)", error->message);
-               g_error_free (error);
-               goto OUT;
-       }
-
-       g_variant_get (rst, "(as)", &iter);
-       while (g_variant_iter_next(iter, "s", &modem_path))
-               list = g_slist_append(list, modem_path);
 
-       g_variant_iter_free(iter);
-       g_variant_unref(rst);
+       if (handle->call_proxy) {
+               if (handle->call_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->call_proxy,
+                               handle->call_signal_handler);
 
-       if (!list) {
-               dbg( "No CP name");
-               goto OUT;
+               g_object_unref(handle->call_proxy);
        }
 
-       element_cnt = g_slist_length(list);
-       cp_list = g_new0(char*, element_cnt + 1);
-       if (!cp_list) {
-               goto OUT;
-       }
+       if (handle->ss_proxy) {
+               if (handle->ss_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->ss_proxy,
+                               handle->ss_signal_handler);
 
-       for (l = list; l; l = l->next, i++) {
-               cp_list[i] = g_strdup(l->data);
-               dbg("cp name[%d] = %s", i, cp_list[i]);
+               g_object_unref(handle->ss_proxy);
        }
-       cp_list[element_cnt] = NULL;
-
-OUT:
-       g_slist_free_full(list, g_free);
-       g_object_unref(proxy);
 
-       return cp_list;
-}
-
-EXPORT_API int tel_get_property_int(TapiHandle *handle, const char *property, int *result)
-{
-       char **dbus_info;
-       GDBusProxy *proxy = NULL;
-       GVariant *value = NULL;
-       GError *error = NULL;
-       int ret = TAPI_API_SUCCESS;
+       if (handle->sms_proxy) {
+               if (handle->sms_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->sms_proxy,
+                               handle->sms_signal_handler);
 
-       if (!handle || !property)
-               return TAPI_API_INVALID_INPUT;
+               if (handle->sms_property_handler > 0)
+                       g_signal_handler_disconnect(handle->sms_proxy,
+                               handle->sms_property_handler);
 
-       dbus_info = g_strsplit(property, ":", 2);
-       if (!dbus_info) {
-               dbg("invalid property");
-               return TAPI_API_INVALID_INPUT;
+               g_object_unref(handle->sms_proxy);
        }
 
-       if (!dbus_info[0] || !dbus_info[1]) {
-               dbg("invalid property");
-               ret = TAPI_API_INVALID_INPUT;
-               goto OUT;
-       }
-
-       proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL,
-                               DBUS_TELEPHONY_SERVICE, handle->path, dbus_info[0],
-                               NULL, &error);
-       if (!proxy) {
-               dbg("g_dbus_proxy_new_for_bus_sycn() failed. (%s)", error->message);
-               g_error_free (error);
-               ret = TAPI_API_OPERATION_FAILED;
-               goto OUT;
-       }
-
-       value = g_dbus_proxy_get_cached_property(proxy, dbus_info[1]);
-       if (!value) {
-               dbg("g_dbus_proxy_get_cached_property('power') failed.");
-               ret = TAPI_API_OPERATION_FAILED;
-               goto OUT;
-       }
-
-       g_variant_get(value, "i", result);
-       g_variant_unref(value);
-
-OUT:
-       if (proxy)
-               g_object_unref(proxy);
+       if (handle->phonebook_proxy) {
+               if (handle->phonebook_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->phonebook_proxy,
+                               handle->phonebook_signal_handler);
 
-       g_strfreev(dbus_info);
-
-       return ret;
-}
-
-EXPORT_API TapiHandle* tel_init(const char *cp_name)
-{
-       GError *error = NULL;
-       struct tapi_handle *handle = NULL;
-       gchar *addr;
-#if !GLIB_CHECK_VERSION (2, 35, 3)
-       g_type_init();
-#endif
-
-       dbg("process info: env: [%s] invocation: [%s]",
-                                               getenv("_"), program_invocation_name);
-
-       /* Get System BUS */
-       addr = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SYSTEM,
-                                                                               NULL,
-                                                                               &error);
-       if (addr == NULL) {
-               err("Error get dbus: [%s]", error->message);
-               goto ERROR;
+               g_object_unref(handle->phonebook_proxy);
        }
 
-       /* Allocate new Handle */
-       handle = g_try_new0(struct tapi_handle, 1);
-       if (handle == NULL) {
-               err("Failed to allocate handle");
-               goto ERROR;
-       }
-
-       /* Create DBUS connection */
-       handle->dbus_connection = g_dbus_connection_new_for_address_sync(addr,
-                                                       (G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
-                                                       G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION),
-                                                       NULL,
-                                                       NULL,
-                                                       &error);
-       if (handle->dbus_connection == NULL) {
-               err("Error creating DBUS connection: [%s]", error->message);
-               goto ERROR;
-       }
+       if (handle->sat_proxy) {
+               if (handle->sat_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->sat_proxy,
+                               handle->sat_signal_handler);
 
-       handle->ca = g_cancellable_new();
-       if (handle->ca == NULL) {
-               err("Error allocating cancellable object");
-               goto ERROR;
+               g_object_unref(handle->sat_proxy);
        }
 
-       /* Get CP name */
-       if (cp_name != NULL)
-               handle->cp_name = g_strdup(cp_name);
-       else {
-               char **list = NULL;
-               int i = 0;
-
-               /* Get CP Name list */
-               list = tel_get_cp_name_list();
-               if ((list == NULL) || (list[0] == NULL)) {
-                       err("Get CP name list failed");
-
-                       g_free(list);
-                       goto ERROR;
-               }
-
-               /*
-                * Presently, we would only be providing the 'default' CP name,
-                * it is the first CP name in the obtained list of CP names.
-                *
-                * We would evolve this logic in due course.
-                */
-               dbg("Use 'default' Plug-in: [%s]", list[0]);
-               handle->cp_name = g_strdup(list[0]);
+       if (handle->sap_proxy) {
+               if (handle->sap_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->sap_proxy,
+                               handle->sap_signal_handler);
 
-               /* Free CP name list */
-               while (list[i] != NULL)
-                       g_free(list[i++]);
-
-               g_free(list);
+               g_object_unref(handle->sap_proxy);
        }
 
-       /* Create Event list Hash Table */
-       handle->evt_list = g_hash_table_new_full(g_str_hash,
-                                                                               g_str_equal,
-                                                                               g_free,
-                                                                               g_free);
-
-       /* Set Path */
-       handle->path = g_strdup_printf("%s/%s",
-                                       DBUS_TELEPHONY_DEFAULT_PATH, handle->cp_name);
-       dbg("handle: [0x%x] Path: [%s]", handle, handle->path);
-
-       g_free(addr);
-       return handle;
-
-ERROR:
-       /* Free all resources */
-       g_free(addr);
-       g_error_free (error);
+       if (handle->gps_proxy) {
+               if (handle->gps_signal_handler > 0)
+                       g_signal_handler_disconnect(handle->gps_proxy,
+                               handle->gps_signal_handler);
 
-       if (handle != NULL) {
-               g_cancellable_cancel(handle->ca);
-               g_object_unref(handle->ca);
-
-               if (g_dbus_connection_close_sync(handle->dbus_connection,
-                                                                       NULL,
-                                                                       NULL) == FALSE) {
-                       err("Failed to close connection");
-               }
-               g_object_unref(handle->dbus_connection);
-               g_free(handle);
+               g_object_unref(handle->gps_proxy);
        }
 
-       return NULL;
-}
-
-static gboolean _unregister_noti(gpointer key, gpointer value, gpointer user_data)
-{
-       struct tapi_evt_cb *evt_cb_data = value;
-       TapiHandle *handle = user_data;
-
-       if (handle == NULL)
-               return TRUE;
-
-       g_dbus_connection_signal_unsubscribe(handle->dbus_connection, evt_cb_data->evt_id);
-
-       return TRUE;
-}
-
-EXPORT_API int tel_deinit(TapiHandle *handle)
-{
-       if (handle == NULL)
-               return TAPI_API_INVALID_INPUT;
+       if (handle->evt_table)
+               g_hash_table_destroy(handle->evt_table);
 
        g_free(handle->cp_name);
-       g_free(handle->path);
-
-       dbg("Remove all signals");
-       g_hash_table_foreach_remove(handle->evt_list, _unregister_noti, handle);
-       g_hash_table_destroy(handle->evt_list);
-
-       g_cancellable_cancel(handle->ca);
-       g_object_unref(handle->ca);
-
-       dbg("Close DBUS connection");
-       if (g_dbus_connection_close_sync(handle->dbus_connection,
-                                                                       NULL, NULL) == FALSE) {
-               err("Failed to close DBUS connection");
-       }
-       g_object_unref(handle->dbus_connection);
        g_free(handle);
 
-       dbg("deinit complete");
-       return TAPI_API_SUCCESS;
-}
-
-EXPORT_API int tel_register_noti_event(TapiHandle *handle, const char *noti_id,
-                                                               tapi_notification_cb callback, void *user_data)
-{
-       gchar **dbus_str = NULL;
-       gpointer tmp = NULL;
-       struct tapi_evt_cb *evt_cb_data = NULL;
-
-       if ((handle == NULL) || (handle->dbus_connection == NULL)
-                       || (callback == NULL) || (noti_id == NULL)) {
-               err("Invalid input parameters");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       tmp = g_hash_table_lookup(handle->evt_list, noti_id);
-       if (tmp != NULL) {
-               dbg("noti_id(%s) is already registered", noti_id);
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       dbus_str = g_strsplit(noti_id, ":", 2);
-       if (!dbus_str) {
-               dbg("invalid noti_id");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       if (!dbus_str[0] || !dbus_str[1]) {
-               g_strfreev(dbus_str);
-               dbg("invalid noti_id");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       evt_cb_data = g_try_new0(struct tapi_evt_cb, 1);
-       if (evt_cb_data == NULL) {
-               err("Failed to allocate memory");
-               g_strfreev(dbus_str);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
-
-       /* Assign callback and user_data */
-       evt_cb_data->cb_fn = callback;
-       evt_cb_data->user_data = user_data;
-       evt_cb_data->handle = handle;
-
-       dbg("path(%s) interface (%s) signal (%s)", handle->path, dbus_str[0], dbus_str[1]);
-
-       evt_cb_data->evt_id = g_dbus_connection_signal_subscribe(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, /* Sender */
-                       dbus_str[0], /* Interface */
-                       dbus_str[1], /* Member */
-                       handle->path, /* Object path */
-                       NULL, /* arg0 */
-                       G_DBUS_SIGNAL_FLAGS_NONE,
-                       on_signal_callback, handle,
-                       NULL);
-
-       g_hash_table_insert(handle->evt_list, g_strdup(noti_id), evt_cb_data);
-
-       g_strfreev(dbus_str);
-
-       return TAPI_API_SUCCESS;
-}
-
-EXPORT_API int tel_deregister_noti_event(TapiHandle *handle, const char *noti_id)
-{
-       struct tapi_evt_cb *evt_cb_data = NULL;
-       gboolean rv = FALSE;
-
-       if (!handle || !handle->dbus_connection){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       evt_cb_data = g_hash_table_lookup(handle->evt_list, noti_id);
-
-       if(!evt_cb_data){
-               dbg("event does not registered");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       g_dbus_connection_signal_unsubscribe(handle->dbus_connection, evt_cb_data->evt_id);
-
-       rv = g_hash_table_remove(handle->evt_list, noti_id);
-       if(!rv){
-               dbg("fail to deregister noti event(%s)", noti_id);
-               return TAPI_API_OPERATION_FAILED;
-       }
-
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
-/*     EOF     */
diff --git a/src/tapi_event.c b/src/tapi_event.c
new file mode 100644 (file)
index 0000000..58500ff
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "tapi_private.h"
+#include "tapi_events.h"
+
+EXPORT_API TelReturn tapi_register_event_id(TelHandle *handle,
+                                               const char *evt_id,
+                                               TapiEvtCb callback,
+                                               void *user_data)
+{
+       TapiEvtCbData *evt_cb_data;
+       gchar **dbus_str;
+
+       if (handle == NULL || callback == NULL || evt_id == NULL) {
+               err("Invalid input parameters");
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
+
+       dbus_str = g_strsplit(evt_id, ":", 2);
+       if (!dbus_str) {
+               dbg("invalid evt_id");
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
+
+       if (!dbus_str[0] || !dbus_str[1]) {
+               g_strfreev(dbus_str);
+               dbg("invalid evt_id");
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
+
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data != NULL) {
+               dbg("evt_id(%s) is already registered", evt_id);
+               g_strfreev(dbus_str);
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
+
+       MAKE_EVT_CB_DATA(evt_cb_data, callback, user_data);
+
+       dbg("path(%s) interface (%s) signal (%s)", handle->cp_name, dbus_str[0], dbus_str[1]);
+
+       g_hash_table_insert(handle->evt_table, g_strdup(evt_id), evt_cb_data);
+
+       g_strfreev(dbus_str);
+
+       return TEL_RETURN_SUCCESS;
+}
+
+EXPORT_API TelReturn tapi_deregister_event_id(TelHandle *handle, const char *evt_id)
+{
+       gboolean rv = FALSE;
+
+       if (handle == NULL) {
+               err("invalid parameter");
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
+
+       rv = g_hash_table_remove(handle->evt_table, evt_id);
+       if (!rv) {
+               err("fail to deregister noti event(%s)", evt_id);
+               return TEL_RETURN_FAILURE;
+       }
+
+       return TEL_RETURN_SUCCESS;
+}
index 1520ddd..e512edc 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <stdlib.h>
 #include <string.h>
 
-#include "tapi_common.h"
-#include "TapiUtility.h"
-
-#include "common.h"
 #include "tapi_log.h"
-#include "ITapiGps.h"
+#include "tapi.h"
+#include "tapi_private.h"
 
-static void on_response_default_set(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+#include "tapi_gps.h"
 
-       GVariant *dbus_result;
+void on_gps_signal_emit_handler(TelephonyGps *gps, gchar *sender_name,
+                                                       gchar *signal_name, GVariant *parameters,
+                                                       gpointer user_data)
+{
+       TapiEvtCbData *evt_cb_data = NULL;
+       TelHandle *handle = user_data;
+       char *evt_id = NULL;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("Entry");
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       if (handle == NULL)
+               return;
 
-               if (error)
-                       g_error_free(error);
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_GPS_INTERFACE,
+                                       signal_name);
 
-               free(evt_cb_data);
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               g_free(evt_id);
                return;
        }
 
+       if (!g_strcmp0(signal_name, "AssistData")
+               || !g_strcmp0(signal_name, "MeasurePosition")) {
+               TelGpsDataInfo gps_data = {0, };
+               char *data = NULL;
+
+               g_variant_get(parameters, "(s)", &data);
 
-       g_variant_get (dbus_result, "(i)", &result);
+               /* Decode data */
+               gps_data.data = g_base64_decode(data, &gps_data.data_len);
+               dbg("signal[%s] data_len[%s]", signal_name, gps_data.data_len);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &gps_data);
+
+               g_free(data);
+               g_free(gps_data.data);
+       } else if (!g_strcmp0(signal_name, "ResetAssistData")) {
+               dbg("signal[%s]", signal_name);
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, NULL);
+       } else {
+               err("Unhandled signal [%s]", signal_name);
        }
 
-       free(evt_cb_data);
+       g_free(evt_id);
 }
 
-
-EXPORT_API int tel_set_gps_frequency_aiding(TapiHandle *handle, unsigned char state, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_gps_confirm_measure_pos(TelHandle *handle,
+                       TelGpsDataInfo *gps_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TelGpsResult result;
+       GError *error = NULL;
+       gchar *encoded_data = NULL;
+
+       dbg("Entry");
+
+       g_return_val_if_fail(handle != NULL && gps_data != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       dbg("Func Entrance");
+       encoded_data = g_base64_encode((const guchar *)gps_data->data, gps_data->data_len);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_gps_call_confirm_measure_pos_sync(handle->gps_proxy, encoded_data,
+                       (int *)&result, NULL, &error);
 
-       param = g_variant_new("(y)", state);
+       g_free(encoded_data);
+
+       if (error != NULL) {
+               err("dbus error: %d (%s)", error->code, error->message);
+               g_error_free(error);
+               return TEL_RETURN_FAILURE;
+       }
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_GPS_INTERFACE,
-                       "SetFrequencyAiding", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       if (result != TEL_GPS_RESULT_SUCCESS) {
+               err("confirm gps measure pos fail: %d", result);
+               return TEL_RETURN_FAILURE;
+       }
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_confirm_gps_measure_pos(TapiHandle *handle, unsigned char *data, unsigned int data_len)
+static void on_response_gps_set_frequency_aiding(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
-       GVariant *param = NULL;
-       GVariant *rst = NULL;
-       GError *gerr = 0;
-       gchar *encoded_data = NULL;
-       gint result;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelGpsResult result = TEL_GPS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       if (!handle || !handle->dbus_connection || !data){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
+       telephony_gps_call_set_frequency_aiding_finish(handle->gps_proxy,
+                       (int *)&result, res, &error);
 
-       msg("call tel_confirm_gps_measure_pos(). data_len=%d", data_len);
-       encoded_data = g_base64_encode((const guchar*)data, data_len);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       param = g_variant_new("(s)", encoded_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
-                       DBUS_TELEPHONY_GPS_INTERFACE, "ConfirmMeasurePos", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1, 0, &gerr);
+EXPORT_API TelReturn tapi_gps_set_frequency_aiding(TelHandle *handle,
+                       gboolean state,
+                       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
 
-       g_free(encoded_data);
+       dbg("Entry");
 
-       if(!rst){
-               dbg( "error to gps measure pos confirm(%s)", gerr->message);
-               g_error_free (gerr);
-               return TAPI_API_OPERATION_FAILED;
-       }
-       dbg("send gps user confirm format(%s)", g_variant_get_type_string(rst));
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get(rst, "(i)", &result);
-       dbg("result (%d)", result);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
-}
+       telephony_gps_call_set_frequency_aiding(handle->gps_proxy, state, NULL,
+                       on_response_gps_set_frequency_aiding, rsp_cb_data);
 
+       return TEL_RETURN_SUCCESS;
+}
index 1b291c3..54f3568 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tapi_common.h"
-#include "TapiUtility.h"
+#include "tapi_private.h"
+#include "tapi.h"
+#include "tapi_modem.h"
 
-#include "TelMisc.h"
-#include "TelPower.h"
-#include "ITapiModem.h"
-#include "ITapiPS.h"
-
-#include "common.h"
-#include "tapi_log.h"
+#include <tel_modem.h>
+#include <string.h>
 
-static void on_response_default_set(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_power_status(TelModemPowerStatus status)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-
-       GVariant *dbus_result;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
+       switch (status) {
+       case TEL_MODEM_POWER_OFF:
+       case TEL_MODEM_POWER_ON:
+       case TEL_MODEM_POWER_ERROR:
+               return TRUE;
        }
 
-       g_variant_get (dbus_result, "(i)", &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       return FALSE;
 }
 
-static void on_response_get_version(GObject *source_object, GAsyncResult *res, gpointer user_data)
+void on_modem_property_change_handler(TelephonyModem *modem,
+       GVariant *changed_properties, const gchar *invalidated_properties,
+       gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelMiscVersionInformation data;
-       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL;
+       TapiEvtCbData *evt_cb_data;
+       TelHandle *handle = user_data;
+       GVariantIter *iter;
+       const gchar *key;
+       GVariant *value;
 
-       GVariant *dbus_result;
-
-       memset(&data, 0, sizeof(TelMiscVersionInformation));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
+       if (handle == NULL)
                return;
-       }
-
-       g_variant_get (dbus_result, "(issss)", &result,
-                       &sw, &hw, &rf, &product);
-
-       dbg("product code [%s]", product);
-
-       g_strlcpy((gchar *)data.szSwVersion, sw, MAX_VERSION_LEN);
-       g_strlcpy((gchar *)data.szHwVersion, hw, MAX_VERSION_LEN);
-       g_strlcpy((gchar *)data.szRfCalDate, rf, MAX_VERSION_LEN);
-       g_strlcpy((gchar *)data.szProductCode, product, TAPI_MISC_PRODUCT_CODE_LEN_MAX);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
-}
-
-static void on_response_get_serial_number(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       char *sn = NULL;
 
-       GVariant *dbus_result;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
+       if (g_variant_n_children(changed_properties) == 0)
                return;
-       }
-
-       g_variant_get (dbus_result, "(is)", &result, &sn);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, sn, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
-}
 
-static void on_response_get_imei(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       char *imei = NULL;
-
-       GVariant *dbus_result;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+       dbg("Properties Changed:");
+
+       g_variant_get(changed_properties, "a{sv}", &iter);
+       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+               char *evt_id;
+
+               dbg("%s", key);
+
+               evt_id = g_strdup_printf("%s:%s",
+                                       TELEPHONY_MODEM_INTERFACE,
+                                       key);
+               /*
+                * If an event callback is registered process
+                * g-properties-changed event
+                */
+               evt_cb_data = g_hash_table_lookup(handle->evt_table,
+                                                       evt_id);
+               if (!evt_cb_data) {
+                       dbg("Application not registered on event %s",
+                                                       evt_id);
+                       g_free(evt_id);
+                       continue;
                }
 
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get (dbus_result, "(is)", &result, &imei);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, imei, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
-}
-
-static void on_response_set_dun_pin_ctrl(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-
-       GVariant *dbus_result;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               if (g_strcmp0("status", key) == 0) {
+                       TelModemPowerStatus status = g_variant_get_int32(value);
+                       dbg("value: %d", status);
+                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id,
+                                               &status);
+               } else if (g_strcmp0("flight_mode_status", key) == 0) {
+                       int fm = g_variant_get_int32(value);
+                       gboolean enable;
+
+                       switch (fm) {
+                       case TEL_MODEM_FLIGHT_MODE_ON:
+                               enable = TRUE;
+                               break;
+                       case TEL_MODEM_FLIGHT_MODE_OFF:
+                               enable = FALSE;
+                               break;
+                       case TEL_MODEM_FLIGHT_MODE_UNKNOWN:
+                       default:
+                               err("flight mode status error");
+                               continue;
+                       }
+                       dbg("value: %d", enable);
+                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id,
+                                               &enable);
+
+               } else if (g_strcmp0("imei", key) == 0) {
+                       char *imei = (char *)g_variant_get_string(value, NULL);
+
+                       if (imei)
+                               if (strlen(imei) > TEL_MODEM_IMEI_LENGTH_MAX) {
+                                       err("Invalid IMEI length");
+                                       return;
+                               }
+
+                       dbg("value: %s", imei);
+                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, imei);
+
+               } else if (g_strcmp0("version", key) == 0) {
+                       TelModemVersion version = {{'\0'}, {'\0'}, {'\0'}, {'\0'}};
+                       GVariantIter *iter = NULL;
+                       GVariant *key_value;
+                       const gchar *key;
+
+                       g_variant_get(value, "a{sv}", &iter);
+                       while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "software_version") == 0) {
+                                       g_strlcpy(version.software_version,
+                                               g_variant_get_string(key_value, NULL),
+                                               TEL_MODEM_VERSION_LENGTH_MAX);
+                               }
+
+                               if (g_strcmp0(key, "hardware_version") == 0) {
+                                       g_strlcpy(version.hardware_version,
+                                               g_variant_get_string(key_value, NULL),
+                                               TEL_MODEM_VERSION_LENGTH_MAX);
+                               }
+
+                               if (g_strcmp0(key, "calibration_date") == 0) {
+                                       g_strlcpy(version.calibration_date,
+                                               g_variant_get_string(key_value, NULL),
+                                               TEL_MODEM_VERSION_LENGTH_MAX);
+                               }
+
+                               if (g_strcmp0(key, "product_code") == 0) {
+                                       g_strlcpy(version.product_code,
+                                               g_variant_get_string(key_value, NULL),
+                                               TEL_MODEM_VERSION_LENGTH_MAX);
+                               }
+                       }
+                       g_variant_iter_free(iter);
+
+                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id,
+                                               &version);
                }
 
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get (dbus_result, "(i)", &result);
-       dbg("dun pin ctrl result(%d)", result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+               g_variant_iter_free(iter);
+               g_free(evt_id);
        }
-
-       free(evt_cb_data);
 }
 
-static void on_response_get_flight_mode(GObject *source_object, GAsyncResult *res, gpointer user_data)
+
+static void on_response_modem_set_power_status(GObject *source_object,
+                                               GAsyncResult *res,
+                                               gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       int result = TEL_MODEM_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       gboolean mode = FALSE;
-
-       GVariant *dbus_result;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
 
-               free(evt_cb_data);
-               return;
-       }
+       telephony_modem_call_set_power_status_finish(handle->modem_proxy,
+                                               &result, res, &error);
 
-       g_variant_get (dbus_result, "(bi)", &mode, &result);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
-       }
+       if (result != TEL_MODEM_RESULT_SUCCESS)
+               err("Failed to set modem power status - result: [%d]", result);
+       else
+               dbg("set modem power status: [SUCCESS]");
 
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-/**
- *
- * Turn Off or Turn On the Modem.
- *
- * @param[in]  tapi_power_phone_cmd_t  Turn ON or OFF.
- * @param[out] NONE
- * @return             TapiResult_t API result code. Either Success or some Error Code.
- * @exception  In case of exceptions return value contains appropriate error code.
- * @remarks            None.
- * @see                        tapi_power_phone_cmd_t, TapiResult_t.
- */
-EXPORT_API int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data)
+/* Set modem power status to ON OFF or RESET */
+EXPORT_API TelReturn tapi_modem_set_power_status(TelHandle *handle,
+                                               TelModemPowerStatus status,
+                                               TapiResponseCb callback,
+                                               void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       if (cmd > TAPI_PHONE_POWER_RESET)
-               return TAPI_API_INVALID_INPUT;
+       TEL_RETURN_IF_CHECK_FAIL(handle && __tapi_check_power_status(status)
+                               && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       param = g_variant_new("(i)", cmd);
+       telephony_modem_call_set_power_status(handle->modem_proxy, status,
+                                       NULL,
+                                       on_response_modem_set_power_status,
+                                       rsp_cb_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "SetPower", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
-
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**
- *
- * Enter in to or Leave from Flight Mode.
- *
- * @param[in]  Enable (if 1, Enable and if 0, Disable)
- * @param[out] NONE
- * @return             TapiResult_t API result code. Either Success or some Error Code.
- * @exception  In case of exceptions return value contains appropriate error code.
- * @remarks            None
- * @see                        None.
- */
-EXPORT_API int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data)
+static void on_response_modem_set_flight_mode(GObject *source_object,
+                                               GAsyncResult *res,
+                                               gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       gboolean b_mode;
-
-       dbg("Func Entrance");
-
-       if (mode == TAPI_POWER_FLIGHT_MODE_ENTER) {
-               b_mode = TRUE;
-       }
-       else if (mode == TAPI_POWER_FLIGHT_MODE_LEAVE) {
-               b_mode = FALSE;
-       }
-       else {
-               return TAPI_API_INVALID_INPUT;
-       };
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       int result = TEL_MODEM_RESULT_FAILURE;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_modem_call_set_flight_mode_finish(handle->modem_proxy,
+                                                       &result, res, &error);
 
-       param = g_variant_new("(b)", b_mode);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "SetFlightMode", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       if (result != TEL_MODEM_RESULT_SUCCESS)
+               err("Failed to set modem flight mode - result: [%d]", result);
+       else
+               dbg("set modem flight mode: [SUCCESS]");
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_modem_set_flight_mode(TelHandle *handle,
+                                               gboolean enable,
+                                               TapiResponseCb callback,
+                                               void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance");
+       TapiRespCbData *rsp_cb_data;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "GetFlightMode", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_flight_mode, evt_cb_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
+                                       TEL_RETURN_INVALID_PARAMETER);
 
-       return TAPI_API_SUCCESS;
-}
-
-EXPORT_API int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance");
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "GetVersion", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_version, evt_cb_data);
+       telephony_modem_call_set_flight_mode(handle->modem_proxy, enable,
+                                       NULL,
+                                       on_response_modem_set_flight_mode,
+                                       rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle)
+EXPORT_API TelReturn tapi_modem_get_flight_mode(TelHandle *handle,
+                                               gboolean *enable)
 {
-       GVariant *dbus_result;
-       int result = -1;
-       TelMiscVersionInformation *data = NULL;
-       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL;
-
-       dbg("Func Entrance");
-
-       if (!handle)
-               return NULL;
-
-       dbus_result = g_dbus_connection_call_sync(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "GetVersion", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
-
-       g_variant_get (dbus_result, "(issss)", &result,
-                       &sw, &hw, &rf, &product);
-
-       dbg("product code[%s]", product);
+       int flight_mode_status;
+       GError *error = NULL;
+       TelReturn result = TEL_RETURN_SUCCESS;
+       int modem_res;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
+
+       flight_mode_status =
+               telephony_modem_get_flight_mode_status(handle->modem_proxy);
+
+       switch (flight_mode_status) {
+       case TEL_MODEM_FLIGHT_MODE_ON:
+               *enable = TRUE;
+               goto out;
+       case TEL_MODEM_FLIGHT_MODE_OFF:
+               *enable = FALSE;
+               goto out;
+       case TEL_MODEM_FLIGHT_MODE_UNKNOWN:
+               /*
+                * Need to read state from modem directly to update DBus cached
+                * property.
+                */
+               break;
+       default:
+               err("flight mode status error");
+               result = TEL_RETURN_FAILURE;
+               goto out;
+       }
 
-       data = calloc(sizeof(TelMiscVersionInformation), 1);
-       if (!data)
-               return NULL;
+       telephony_modem_call_get_flight_mode_sync(handle->modem_proxy,
+                                                       &modem_res, enable,
+                                                       NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               result = TEL_RETURN_FAILURE;
+               goto out;
+       }
 
-       g_strlcpy((gchar *)data->szSwVersion, sw, MAX_VERSION_LEN);
-       g_strlcpy((gchar *)data->szHwVersion, hw, MAX_VERSION_LEN);
-       g_strlcpy((gchar *)data->szRfCalDate, rf, MAX_VERSION_LEN);
-       g_strlcpy((gchar *)data->szProductCode, product, TAPI_MISC_PRODUCT_CODE_LEN_MAX);
+       if (modem_res != TEL_MODEM_RESULT_SUCCESS)
+               result = TEL_RETURN_FAILURE;
 
-       return data;
+out:
+       return result;
 }
 
-EXPORT_API int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_modem_get_version(TelHandle *handle,
+                                               TelModemVersion *version)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance");
+       GVariant *dbus_version;
+       TelReturn result = TEL_RETURN_SUCCESS;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
+
+       /* dbus_version doesn't need to be g_variant_unref() */
+       dbus_version = telephony_modem_get_version(handle->modem_proxy);
+       if (dbus_version != NULL) {
+               GVariantIter *iter = NULL;
+               GVariant *key_value;
+               const gchar *key;
+
+               g_variant_get(dbus_version, "a{sv}", &iter);
+               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "software_version") == 0) {
+                               g_strlcpy(version->software_version,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
+                       }
+                       else if (g_strcmp0(key, "hardware_version") == 0) {
+                               g_strlcpy(version->hardware_version,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
+                       }
+                       else if (g_strcmp0(key, "calibration_date") == 0) {
+                               g_strlcpy(version->calibration_date,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
+                       }
+                       else if (g_strcmp0(key, "product_code") == 0) {
+                               g_strlcpy(version->product_code,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
+                       }
+               }
+               g_variant_iter_free(iter);
+
+               if (strlen(version->software_version)
+                               || strlen(version->hardware_version)
+                               || strlen(version->calibration_date)
+                               || strlen(version->product_code)) {
+                       dbg("Version information - Software: [%s] "\
+                               "Hardware: [%s] Calibration date: [%d] "\
+                               "Product code: [%s]", version->software_version,
+                               version->hardware_version,
+                               version->calibration_date,
+                               version->product_code);
+                       return result;
+               }
+       }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Fetch version information from Modem */
+       {
+               gchar *soft, *hard, *cal_date, *prod_code;
+               gint modem_res;
+               GError *error = NULL;
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "GetIMEI", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_imei, evt_cb_data);
+               telephony_modem_call_get_version_sync(handle->modem_proxy,
+                       &modem_res, &soft, &hard, &cal_date, &prod_code, NULL, &error);
+               if (error) {
+                       dbg("dbus error = %d (%s)", error->code, error->message);
+                       g_error_free(error);
+                       result = TEL_RETURN_FAILURE;
+                       goto out;
+               }
 
-       return TAPI_API_SUCCESS;
-}
+               if (modem_res != TEL_MODEM_RESULT_SUCCESS) {
+                       result = TEL_RETURN_FAILURE;
+                       goto out;
+               }
 
-EXPORT_API char *tel_get_misc_me_imei_sync(TapiHandle *handle)
-{
-       GVariant *dbus_result;
-       char *imei = NULL;
-       int result = 0;
+               if (soft) {
+                       strncpy(version->software_version, soft,
+                               TEL_MODEM_VERSION_LENGTH_MAX);
+                       version->software_version[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
+               }
 
-       dbg("Func Entrance");
+               if (hard) {
+                       strncpy(version->hardware_version, hard,
+                               TEL_MODEM_VERSION_LENGTH_MAX);
+                       version->hardware_version[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
+               }
 
-       if (!handle)
-               return NULL;
+               if (cal_date) {
+                       strncpy(version->calibration_date, cal_date,
+                               TEL_MODEM_VERSION_LENGTH_MAX);
+                       version->calibration_date[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
+               }
 
-       dbus_result = g_dbus_connection_call_sync(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "GetIMEI", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+               if (prod_code) {
+                       strncpy(version->product_code, prod_code,
+                               TEL_MODEM_VERSION_LENGTH_MAX);
+                       version->product_code[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
+               }
 
-       g_variant_get (dbus_result, "(is)", &result, &imei);
+               g_free(soft);
+               g_free(hard);
+               g_free(cal_date);
+               g_free(prod_code);
+       }
 
-       return imei;
+out:
+       return result;
 }
 
-EXPORT_API int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_modem_get_imei(TelHandle *handle,
+                               char imei[TEL_MODEM_IMEI_LENGTH_MAX + 1])
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance");
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "GetSerialNumber", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_serial_number, evt_cb_data);
-
-       return TAPI_API_SUCCESS;
-}
+       GError *error = NULL;
+       char *dbus_imei;
+       TelReturn result = TEL_RETURN_FAILURE;
+       int modem_res;
+       unsigned int imei_len;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
+
+       /* dbus_imei doesn't need to be g_free() */
+       dbus_imei= (char *)telephony_modem_get_imei(handle->modem_proxy);
+       if (dbus_imei != NULL && strlen(dbus_imei) > 0) {
+               imei_len = strlen(dbus_imei);
+               if (imei_len > TEL_MODEM_IMEI_LENGTH_MAX)
+                       err("Invalid IMEI length %d", imei_len);
+               else {
+                       memcpy(imei, dbus_imei, imei_len + 1);
+                       result = TEL_RETURN_SUCCESS;
+               }
 
-EXPORT_API char *tel_get_misc_me_sn_sync(TapiHandle *handle)
-{
-       GVariant *dbus_result;
-       char *sn = NULL;
-       int result = 0;
+               goto out;
+       }
 
-       dbg("Func Entrance");
+       /*
+        * dbus_imei needs to be g_free() because this function is using
+        * g_variant_get() internally.
+        */
+       telephony_modem_call_get_imei_sync(handle->modem_proxy, &modem_res,
+                                               &dbus_imei, NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               goto out;
+       }
 
-       if (!handle)
-               return NULL;
+       if (modem_res != TEL_MODEM_RESULT_SUCCESS || dbus_imei == NULL)
+               goto out;
 
-       dbus_result = g_dbus_connection_call_sync(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "GetSerialNumber", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+       imei_len = strlen(dbus_imei);
+       if (imei_len > TEL_MODEM_IMEI_LENGTH_MAX)
+               err("Invalid IMEI length %d", imei_len);
+       else {
+               memcpy(imei, dbus_imei, imei_len + 1);
+               result = TEL_RETURN_SUCCESS;
+       }
 
-       g_variant_get (dbus_result, "(is)", &result, &sn);
+       g_free(dbus_imei);
 
-       return sn;
+out:
+       return result;
 }
 
-EXPORT_API int tel_check_modem_power_status(TapiHandle *handle, int *result)
-{
-       return tel_get_property_int(handle, TAPI_PROP_MODEM_POWER, result);
-}
 
-EXPORT_API int tel_control_modem_dun_pin_ctrl(TapiHandle *handle, tapi_ps_btdun_pincontrol *pincontrol, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_modem_get_power_status(TelHandle *handle,
+                                               TelModemPowerStatus *status)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance ");
-
-       if (!handle || !handle->dbus_connection || !pincontrol){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(ib)", pincontrol->signal, pincontrol->status);
+       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
-                       "SetDunPinCtrl", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_set_dun_pin_ctrl, evt_cb_data);
+       *status = telephony_modem_get_status(handle->modem_proxy);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
index 4367534..83e6678 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
-#include "tapi_common.h"
-#include "TapiUtility.h"
-#include "TelNetwork.h"
-
-#include "common.h"
 #include "tapi_log.h"
-#include "ITapiNetwork.h"
-
-static int _convert_systemtype_to_act(int type)
-{
-       switch (type) {
-               case TAPI_NETWORK_SYSTEM_GSM:
-                       return 0x1;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_GPRS:
-                       return 0x2;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_EGPRS:
-                       return 0x3;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_PCS1900:
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_UMTS:
-                       return 0x4;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS:
-                       return 0x5;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_IS95A:
-                       return 0x11;
-                       break;
+#include "tapi_private.h"
 
-               case TAPI_NETWORK_SYSTEM_IS95B:
-                       return 0x12;
-                       break;
+#include "tapi_network.h"
 
-               case TAPI_NETWORK_SYSTEM_CDMA_1X:
-                       return 0x13;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_EVDO_REV_0:
-                       return 0x14;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID:
-                       return 0x15;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_EVDO_REV_A:
-                       return 0x16;
-                       break;
-
-               case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID:
-                       return 0x17;
-                       break;
+static gboolean __tapi_check_plmn(char *plmn)
+{
+       if (plmn == NULL)
+               return FALSE;
 
-               case TAPI_NETWORK_SYSTEM_EVDV:
-                       return 0x18;
-                       break;
+       if (strlen(plmn) < 5 || strlen(plmn) > 6)
+               return FALSE;
 
-               case TAPI_NETWORK_SYSTEM_LTE:
-                       return 0x21;
-                       break;
+       return TRUE;
+}
 
-               default:
-                       break;
+static gboolean __tapi_check_act(TelNetworkAct act)
+{
+       switch(act) {
+       case TEL_NETWORK_ACT_UNKNOWN:
+       case TEL_NETWORK_ACT_GSM:
+       case TEL_NETWORK_ACT_GPRS:
+       case TEL_NETWORK_ACT_EGPRS:
+       case TEL_NETWORK_ACT_UMTS:
+       case TEL_NETWORK_ACT_GSM_AND_UMTS:
+       case TEL_NETWORK_ACT_HSDPA:
+       case TEL_NETWORK_ACT_HSUPA:
+       case TEL_NETWORK_ACT_HSPA:
+       case TEL_NETWORK_ACT_LTE:
+               return TRUE;
        }
 
-       return 0xFF;
+       return FALSE;
 }
 
-static int _convert_act_to_systemtype(int act)
+static gboolean __tapi_check_network_mode(TelNetworkMode mode)
 {
-       switch (act) {
-               case 0x1:
-                       return TAPI_NETWORK_SYSTEM_GSM;
-                       break;
+       switch(mode) {
+       case TEL_NETWORK_MODE_AUTO:
+       case TEL_NETWORK_MODE_2G:
+       case TEL_NETWORK_MODE_3G:
+       case TEL_NETWORK_MODE_LTE:
+               return TRUE;
+       }
 
-               case 0x2:
-                       return TAPI_NETWORK_SYSTEM_GPRS;
-                       break;
+       return FALSE;
+}
 
-               case 0x3:
-                       return TAPI_NETWORK_SYSTEM_EGPRS;
-                       break;
+void on_network_signal_emit_handler(TelephonyNetwork *network,
+       gchar *sender_name, gchar *signal_name,
+       GVariant *parameters, gpointer user_data)
+{
+       TapiEvtCbData *evt_cb_data;
+       TelHandle *handle = user_data;
+       char *evt_id;
 
-               case 0x4:
-                       return TAPI_NETWORK_SYSTEM_UMTS;
-                       break;
+       if (handle == NULL || signal_name == NULL)
+               return;
 
-               case 0x5:
-                       return TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
-                       break;
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_NETWORK_INTERFACE,
+                                       signal_name);
+
+       /*
+        * If an event callback is registered process
+        * g-signal event
+        */
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               dbg("Application not registered on event %s",
+                                                       evt_id);
+               g_free(evt_id);
+               return;
+       }
 
-               case 0x11:
-                       return TAPI_NETWORK_SYSTEM_IS95A;
-                       break;
+       if (!g_strcmp0(signal_name, "RegistrationStatus")) {
+               TelNetworkRegStatusInfo reg_status;
 
-               case 0x12:
-                       return TAPI_NETWORK_SYSTEM_IS95B;
-                       break;
+               g_variant_get(parameters, "(iii)", &reg_status.cs_status,
+                                       &reg_status.ps_status, &reg_status.act);
 
-               case 0x13:
-                       return TAPI_NETWORK_SYSTEM_CDMA_1X;
-                       break;
+               dbg("%s cs_status(%d), ps_status(%d), act(%d)", signal_name,
+                       reg_status.cs_status, reg_status.ps_status, reg_status.act);
 
-               case 0x14:
-                       return TAPI_NETWORK_SYSTEM_EVDO_REV_0;
-                       break;
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &reg_status);
+       } else if (!g_strcmp0(signal_name, "CellInfo")) {
+               TelNetworkCellInfo cell_info;
 
-               case 0x15:
-                       return TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID;
-                       break;
+               g_variant_get(parameters, "(uuu)", &cell_info.lac,
+                                       &cell_info.cell_id, &cell_info.rac);
 
-               case 0x16:
-                       return TAPI_NETWORK_SYSTEM_EVDO_REV_A;
-                       break;
+               dbg("%s lac(%d), cell_id(%d), rac(%d)", signal_name,
+                       cell_info.lac, cell_info.cell_id, cell_info.rac);
 
-               case 0x17:
-                       return TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID;
-                       break;
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &cell_info);
+       } else if (!g_strcmp0(signal_name, "Identity")) {
+               TelNetworkIdentityInfo identity = {NULL, NULL, NULL};
 
-               case 0x18:
-                       return TAPI_NETWORK_SYSTEM_EVDV;
-                       break;
+               g_variant_get(parameters, "(sss)", &identity.plmn,
+                                       &identity.short_name, &identity.long_name);
 
-               case 0x21:
-                       return TAPI_NETWORK_SYSTEM_LTE;
-                       break;
+               dbg("%s plmn(%s), short_name(%s), long_name(%s)", signal_name,
+                       identity.plmn, identity.short_name, identity.long_name);
 
-               default:
-                       break;
-       }
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &identity);
+               g_free(identity.plmn);
+               g_free(identity.short_name);
+               g_free(identity.long_name);
+       } else if (!g_strcmp0(signal_name, "Rssi")) {
+               unsigned int rssi;
+               g_variant_get(parameters, "(u)", &rssi);
 
-       return TAPI_NETWORK_SYSTEM_NO_SRV;
-}
+               dbg("%s rssi(%u)", signal_name, rssi);
 
-static void on_response_search_network(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       int i;
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &rssi);
+       } else if (!g_strcmp0(signal_name, "TimeInfo")) {
+               TelNetworkNitzInfoNoti time_info = {0, 0, 0, 0, 0, 0, 0, FALSE, 0, NULL};
 
-       TelNetworkPlmnList_t list;
+               g_variant_get(parameters, "(uuuuuuibis)", &time_info.year, &time_info.month,
+                       &time_info.day, &time_info.hour, &time_info.minute, &time_info.second,
+                       &time_info.gmtoff, &time_info.isdst, &time_info.dstoff, &time_info.plmn);
 
-       GVariant *dbus_result = NULL;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
+               dbg("%s year(%u), month(%u), day(%u), hour(%u), minute(%u), second(%u), \
+                       gmtoff(%d), isdst(%s), dstoff(%d), plmn(%s)", signal_name,
+                       time_info.year, time_info.month, time_info.day, time_info.hour,
+                       time_info.minute, time_info.second, time_info.gmtoff,
+                       time_info.isdst ? "TRUE":"FALSE", time_info.dstoff, time_info.plmn);
 
-       memset(&list, 0, sizeof(TelNetworkPlmnList_t));
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &time_info);
+               g_free(time_info.plmn);
+       } else
+               err("Unhandled Signal: %s", signal_name);
 
-       conn = G_DBUS_CONNECTION (source_object);
+       g_free(evt_id);
+}
 
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+EXPORT_API TelReturn tapi_network_get_registration_info(TelHandle *handle,
+       TelNetworkRegistrationInfo *reg_info)
+{
+       dbg("Entry");
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       g_return_val_if_fail(handle != NULL && reg_info != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-               if (error)
-                       g_error_free(error);
+       reg_info->reg_status_info.cs_status =
+                       telephony_network_get_cs_status(handle->network_proxy);
 
-               free(evt_cb_data);
-               return;
-       }
+       reg_info->reg_status_info.ps_status =
+                       telephony_network_get_ps_status(handle->network_proxy);
 
-       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+       reg_info->reg_status_info.act =
+                       telephony_network_get_act(handle->network_proxy);
 
-       list.networks_count = g_variant_iter_n_children(iter);
+       reg_info->cell_info.lac =
+                       telephony_network_get_lac(handle->network_proxy);
 
-       i = 0;
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "plmn")) {
-                               list.network_list[i].plmn_id = atoi(g_variant_get_string(value, NULL));
-                               strncpy(list.network_list[i].plmn, g_variant_get_string(value, NULL), TAPI_NETWORK_PLMN_LEN_MAX);
-                       }
-                       if (!g_strcmp0(key, "act")) {
-                               list.network_list[i].access_technology = _convert_act_to_systemtype(g_variant_get_int32(value));
-                       }
-                       if (!g_strcmp0(key, "type")) {
-                               list.network_list[i].type_of_plmn = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "name")) {
-                               strncpy(list.network_list[i].network_name, g_variant_get_string(value, NULL), 40);
-                       }
-               }
-               i++;
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
+       reg_info->cell_info.cell_id =
+                       telephony_network_get_cell_id(handle->network_proxy);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
-       }
+       reg_info->cell_info.rac =
+                       telephony_network_get_rac(handle->network_proxy);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_network_selection_mode(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_network_get_identity_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       TelNetworkIdentityInfo id_info;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-
-       GVariant *dbus_result;
-       int mode = 0;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       memset(&id_info, 0, sizeof(id_info));
+       telephony_network_call_get_identity_info_finish(handle->network_proxy,
+               (int *)&result, &id_info.plmn, &id_info.short_name,
+               &id_info.long_name, res, &error);
 
-       g_variant_get (dbus_result, "(ii)", &mode, &result);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
+       if (result != TEL_NETWORK_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       } else {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &id_info);
        }
 
-       free(evt_cb_data);
+       g_free(id_info.plmn);
+       g_free(id_info.short_name);
+       g_free(id_info.long_name);
 }
 
-static void on_response_default_set(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_network_get_identity_info(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-               if (error)
-                       g_error_free(error);
+       telephony_network_call_get_identity_info(handle->network_proxy,
+               NULL,
+               on_response_network_get_identity_info, rsp_cb_data);
 
-               free(evt_cb_data);
-               return;
-       }
-
-
-       g_variant_get (dbus_result, "(i)", &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_network_preferred_plmn(GDBusConnection *conn, GAsyncResult *res, gpointer user_data)
+static void on_response_network_search(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       int i;
-
-       TelNetworkPreferredPlmnList_t list;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       GVariant *dbus_result = NULL;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
+       GVariant *nw_list;
+       TelNetworkPlmnList plmn_list;
 
-       memset(&list, 0, sizeof(TelNetworkPreferredPlmnList_t));
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("Entry");
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, &list, evt_cb_data->user_data);
-               }
+       memset(&plmn_list, 0, sizeof(TelNetworkPlmnList));
 
-               if (error)
-                       g_error_free(error);
+       /* Setting back Proxy default timeout to DEFAULT value */
+       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
+               TAPI_DBUS_TIMEOUT_DEFAULT);
 
-               free(evt_cb_data);
-               return;
-       }
 
-       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+       telephony_network_call_search_finish(handle->network_proxy,
+                       (int *)&result, &plmn_list.count, &nw_list, res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       list.NumOfPrefPlmns = g_variant_iter_n_children(iter);
+       if (result != TEL_NETWORK_RESULT_SUCCESS) {
+               g_variant_unref(nw_list);
 
-       if (list.NumOfPrefPlmns == 0) {
-               dbg("num_of_.. = 0");
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
-               }
-
-               free(evt_cb_data);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
                return;
        }
 
-       i = 0;
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "plmn")) {
-                               strncpy(list.PrefPlmnRecord[i].Plmn, g_variant_get_string(value, NULL), 6);
-                       }
-                       if (!g_strcmp0(key, "act")) {
-                               list.PrefPlmnRecord[i].SystemType = _convert_act_to_systemtype(g_variant_get_int32(value));
-                       }
-                       if (!g_strcmp0(key, "index")) {
-                               list.PrefPlmnRecord[i].Index = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "name")) {
-                               strncpy(list.PrefPlmnRecord[i].network_name, g_variant_get_string(value, NULL), 40);
+       if ((plmn_list.count != 0)
+                       && (g_variant_n_children(nw_list) == plmn_list.count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("Network search list count: [%d]", plmn_list.count);
+               plmn_list.network_list =
+                       g_malloc0(sizeof(TelNetworkInfo)*plmn_list.count);
+
+               g_variant_get(nw_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "plmn_status") == 0) {
+                                       plmn_list.network_list[i].plmn_status =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "act") == 0) {
+                                       plmn_list.network_list[i].act =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "network_identity") == 0) {
+                                       GVariantIter *iter2 = NULL;
+                                       GVariant *key_value2;
+                                       const gchar *key2;
+
+                                       g_variant_get(key_value, "a{sv}", &iter2);
+                                       while (g_variant_iter_loop(iter2, "{sv}", &key2, &key_value2)) {
+                                               if (g_strcmp0(key2, "plmn") == 0) {
+                                                       plmn_list.network_list[i].network_identity.plmn =
+                                                               (gchar *)g_variant_get_string(key_value2, NULL);
+                                               }
+                                               else if (g_strcmp0(key2, "short_name") == 0) {
+                                                       plmn_list.network_list[i].network_identity.short_name =
+                                                               (gchar *)g_variant_get_string(key_value2, NULL);
+                                               }
+                                               else if (g_strcmp0(key2, "long_name") == 0) {
+                                                       plmn_list.network_list[i].network_identity.long_name =
+                                                               (gchar *)g_variant_get_string(key_value2, NULL);
+                                               }
+                                       }
+                                       g_variant_iter_free(iter2);
+                               }
                        }
+                       i++;
+                       g_variant_iter_free(iter_row);
                }
-               i++;
-               g_variant_iter_free(iter_row);
+               g_variant_iter_free(iter);
        }
-       g_variant_iter_free(iter);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       else {
+               warn("Network search list count is NOT valid - Count: [%d]",
+                       plmn_list.count);
+               plmn_list.count = 0;
        }
+       g_variant_unref(nw_list);
+
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &plmn_list);
 
-       free(evt_cb_data);
+       /* Free resource */
+       g_free(plmn_list.network_list);
 }
 
-static void on_response_get_network_band(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_network_search(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
-       int band = 0;
-       int mode = 0;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-               if (error)
-                       g_error_free(error);
+       /* Setting Proxy default timeout as 180 secs */
+       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
+               TAPI_DBUS_TIMEOUT_MAX);
 
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get (dbus_result, "(iii)", &band, &mode, &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &band, evt_cb_data->user_data);
-       }
+       telephony_network_call_search(handle->network_proxy,
+               NULL,
+               on_response_network_search, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_network_mode(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_network_cancel_search(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
 
-       GVariant *dbus_result;
-       int mode = 0;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_network_call_cancel_search_finish(handle->network_proxy,
+               (int *)&result, res, &error);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
-       }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       g_variant_get (dbus_result, "(ii)", &mode, &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-static void on_response_get_network_service_domain(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_network_cancel_search(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       TapiRespCbData *rsp_cb_data;
 
-       GVariant *dbus_result;
-       int domain = 0;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-               if (error)
-                       g_error_free(error);
+       telephony_network_call_cancel_search(handle->network_proxy,
+               NULL,
+               on_response_network_cancel_search, rsp_cb_data);
 
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get (dbus_result, "(ii)", &domain, &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &domain, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_network_serving(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_network_select_automatic(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
 
-       TelNetworkServing_t data;
+       dbg("Entry");
 
-       GVariant *dbus_result;
-       char *plmn;
+       /* Setting back Proxy default timeout to DEFAULT value */
+       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
+               TAPI_DBUS_TIMEOUT_DEFAULT);
 
-       memset(&data, 0, sizeof(TelNetworkServing_t));
+       telephony_network_call_select_automatic_finish(handle->network_proxy,
+               (int *)&result, res, &error);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-               if (error)
-                       g_error_free(error);
+EXPORT_API TelReturn tapi_network_select_automatic(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
 
-               free(evt_cb_data);
-               return;
-       }
+       dbg("Entry");
 
-       g_variant_get (dbus_result, "(isii)",
-                       &data.act,
-                       &plmn,
-                       &data.lac,
-                       &result);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       data.act = _convert_act_to_systemtype(data.act);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (plmn) {
-               snprintf(data.plmn, 7, "%s", plmn);
-               free(plmn);
-       }
+       /* Setting Proxy default timeout as 180 secs */
+       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
+               TAPI_DBUS_TIMEOUT_MAX);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
-       }
+       telephony_network_call_select_automatic(handle->network_proxy,
+               NULL,
+               on_response_network_select_automatic, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_neighboring_cell_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_network_select_manual(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       int geran_index=0, umts_index=0;
 
-       TelNetworkNeighboringCellInfo_t list;
+       dbg("Entry");
 
-       GVariant *dbus_result = NULL;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       gint v0, v1,v2,v3,v4;
+       /* Setting back Proxy default timeout to DEFAULT value */
+       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
+               TAPI_DBUS_TIMEOUT_DEFAULT);
 
-       memset(&list, 0, sizeof(TelNetworkNeighboringCellInfo_t));
+       telephony_network_call_select_manual_finish(handle->network_proxy,
+               (int *)&result, res, &error);
 
-       dbg("enter");
-       conn = G_DBUS_CONNECTION (source_object);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+EXPORT_API TelReturn tapi_network_select_manual(TelHandle *handle,
+       const TelNetworkSelectManualInfo *select_info,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       g_return_val_if_fail(handle != NULL && select_info != NULL
+               && __tapi_check_plmn(select_info->plmn)
+               && __tapi_check_act(select_info->act) && callback != NULL,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
-
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       g_variant_get(value, "(iiiii)", &v0,&v1,&v2,&v3,&v4);
-                       if (!g_strcmp0(key, "geran")) {
-                               list.geran_list[geran_index].cell_id    = v0;
-                               list.geran_list[geran_index].lac                = v1;
-                               list.geran_list[geran_index].bcch               = v2;
-                               list.geran_list[geran_index].bsic               = v3;
-                               list.geran_list[geran_index].rxlev              = v4;
-                               geran_index++;
-                       }
-                       else if (!g_strcmp0(key, "umts")) {
-                               list.umts_list[umts_index].cell_id      = v0;
-                               list.umts_list[umts_index].lac          = v1;
-                               list.umts_list[umts_index].arfcn        = v2;
-                               list.umts_list[umts_index].psc          = v3;
-                               list.umts_list[umts_index].rscp         = v4;
-                               umts_index++;
-                       }
-               }
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       list.geran_list_count = geran_index;
-       list.umts_list_count = umts_index;
-       dbg("geran_list_count=%d, umts_list_count=%d", geran_index, umts_index);
+       /* Setting Proxy default timeout as 180 secs */
+       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
+               TAPI_DBUS_TIMEOUT_MAX);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
-       }
+       telephony_network_call_select_manual(handle->network_proxy,
+               select_info->plmn, select_info->act, NULL,
+               on_response_network_select_manual, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_search_network(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+static void on_response_network_get_selection_mode(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       TelNetworkSelectionMode mode;
+       GError *error = NULL;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_network_call_get_selection_mode_finish(handle->network_proxy,
+               (int *)&result, (int *)&mode, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "Search", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, 180000, handle->ca,
-                       on_response_search_network, evt_cb_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       if (result != TEL_NETWORK_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       } else {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &mode);
+       }
 }
 
-EXPORT_API int tel_get_network_selection_mode(struct tapi_handle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_network_get_selection_mode(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "GetSelectionMode", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_network_selection_mode, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
+       telephony_network_call_get_selection_mode(handle->network_proxy,
+               NULL,
+               on_response_network_get_selection_mode, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_select_network_automatic(struct tapi_handle *handle, tapi_response_cb callback, void *user_data)
+static void on_response_network_set_preferred_plmn(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(isi)",
-                       0, /* Automatic */
-                       "",
-                       0);
+       telephony_network_call_set_preferred_plmn_finish(handle->network_proxy,
+               (int *)&result, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "SetSelectionMode", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, 180000, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_select_network_manual(struct tapi_handle *handle, const char *plmn, int type, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_network_set_preferred_plmn(TelHandle *handle,
+       TelNetworkPreferredPlmnInfo *info,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && info != NULL
+               && __tapi_check_plmn(info->plmn)
+               && __tapi_check_act(info->act)
+               && info->index > 0 && callback != NULL,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(isi)",
-                       1, /* Manual */
-                       plmn,
-                       _convert_systemtype_to_act(type));
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "SetSelectionMode", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, 180000, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       telephony_network_call_set_preferred_plmn(handle->network_proxy,
+               info->index, info->plmn, info->act, NULL,
+               on_response_network_set_preferred_plmn, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_set_network_preferred_plmn(
-               TapiHandle *handle,
-               TelNetworkPreferredPlmnOp_t operation,
-               TelNetworkPreferredPlmnInfo_t *info,
-               tapi_response_cb callback,
-               void *user_data)
+static void on_response_network_get_preferred_plmn(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       int act = 0;
-
-       dbg("Func Entrance");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       GVariant *pref_plmn_list;
+       TelNetworkPreferredPlmnList plmn_list;
 
-       switch (info->SystemType) {
-               case TAPI_NETWORK_SYSTEM_GSM:
-                       act = 1;
-                       break;
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       GError *error = NULL;
 
-               case TAPI_NETWORK_SYSTEM_UMTS:
-                       act = 4;
-                       break;
+       dbg("Entry");
 
-               case TAPI_NETWORK_SYSTEM_GPRS:
-                       act = 2;
-                       break;
+       memset(&plmn_list, 0, sizeof(TelNetworkPreferredPlmnList));
 
-               case TAPI_NETWORK_SYSTEM_EGPRS:
-                       act = 3;
-                       break;
+       telephony_network_call_get_preferred_plmn_finish(handle->network_proxy,
+               (int *)&result, &plmn_list.count, &pref_plmn_list, res, &error);
 
-               case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS:
-                       act = 4;
-                       break;
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               default:
-                       act = 4;
-                       break;
+       if (result != TEL_NETWORK_RESULT_SUCCESS) {
+               g_variant_unref(pref_plmn_list);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
        }
 
-       param = g_variant_new("(iiis)",
-                       operation,
-                       info->Index,
-                       act,
-                       info->Plmn);
-
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "SetPreferredPlmn", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
-
-       return TAPI_API_SUCCESS;
-}
-
-EXPORT_API int tel_get_network_preferred_plmn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance");
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       if ((plmn_list.count != 0)
+                       && (g_variant_n_children(pref_plmn_list) == plmn_list.count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("Preferred PLMN list count: [%d]", plmn_list.count);
+               plmn_list.list =
+                       g_malloc0(sizeof(TelNetworkPreferredPlmnInfo)*plmn_list.count);
+
+               g_variant_get(pref_plmn_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "index") == 0) {
+                                       plmn_list.list[i].index =
+                                               g_variant_get_uint32(key_value);
+                               }
+                               else if (g_strcmp0(key, "plmn") == 0) {
+                                       plmn_list.list[i].plmn =
+                                               (gchar *)g_variant_get_string(key_value, NULL);
+                               }
+                               else if (g_strcmp0(key, "act") == 0) {
+                                       plmn_list.list[i].act =
+                                               g_variant_get_int32(key_value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+       }
+       else {
+               warn("Preferred PLMN list count is NOT valid - Count: [%d]",
+                       plmn_list.count);
+               plmn_list.count = 0;
+       }
+       g_variant_unref(pref_plmn_list);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "GetPreferredPlmn", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       (GAsyncReadyCallback) on_response_get_network_preferred_plmn, evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &plmn_list);
 
-       return TAPI_API_SUCCESS;
+       /* Free resource */
+       g_free(plmn_list.list);
 }
 
-EXPORT_API int tel_set_network_band(TapiHandle *handle, TelNetworkBandPreferred_t mode, TelNetworkBand_t band, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_network_get_preferred_plmn(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(ii)",
-                       band,
-                       mode);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "SetBand", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       telephony_network_call_get_preferred_plmn(handle->network_proxy,
+               NULL,
+               on_response_network_get_preferred_plmn, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_network_band(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+static void on_response_network_set_mode(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_network_call_set_mode_finish(handle->network_proxy,
+               (int *)&result, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "GetBand", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_network_band, evt_cb_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_set_network_mode(TapiHandle *handle, int mode, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_network_set_mode(TelHandle *handle,
+       TelNetworkMode mode, TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL
+               && __tapi_check_network_mode(mode)
+               && callback != NULL,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)",
-                       mode);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "SetMode", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       telephony_network_call_set_mode(handle->network_proxy,
+               mode, NULL,
+               on_response_network_set_mode, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_network_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+static void on_response_network_get_mode(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       TelNetworkMode mode;
+       GError *error = NULL;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_network_call_get_mode_finish(handle->network_proxy,
+               (int *)&result, (int *)&mode, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "GetMode", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_network_mode, evt_cb_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       if (result != TEL_NETWORK_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       } else {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &mode);
+       }
 }
 
-EXPORT_API int tel_set_network_service_domain(TapiHandle *handle, TelNetworkServiceDomain_t domain, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_network_get_mode(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", domain);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "SetServiceDomain", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       telephony_network_call_get_mode(handle->network_proxy,
+               NULL,
+               on_response_network_get_mode, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_network_service_domain(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+static void on_response_network_get_neighboring_cell_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TelNetworkNeighbourCellInfo cell_info;
+       GVariant *gsm_var, *umts_var;
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "GetServiceDomain", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_network_service_domain, evt_cb_data);
 
-       return TAPI_API_SUCCESS;
-}
+       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+       GError *error = NULL;
 
-EXPORT_API int tel_cancel_network_manual_search(TapiHandle *handle, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
+       dbg("Entry");
 
-       dbg("Func Entrance");
+       memset(&cell_info, 0, sizeof(TelNetworkNeighbourCellInfo));
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_network_call_get_ngbr_cell_info_finish(handle->network_proxy,
+               (int *)&result, &cell_info.gsm_list_count, &gsm_var,
+               &cell_info.umts_list_count, &umts_var,
+               res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "SearchCancel", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_default_set, evt_cb_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
-}
+       if (result != TEL_NETWORK_RESULT_SUCCESS) {
+               g_variant_unref(gsm_var);
+               g_variant_unref(umts_var);
 
-EXPORT_API int tel_get_network_serving(TapiHandle *handle, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance");
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       if ((cell_info.gsm_list_count != 0)
+                       && (g_variant_n_children(gsm_var) == cell_info.gsm_list_count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("GSM Cell list count: [%d]", cell_info.gsm_list_count);
+               cell_info.gsm_list =
+                       g_malloc0(sizeof(TelNetworkGsmNeighbourCellInfo));
+
+               g_variant_get(gsm_var, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "cell_id") == 0) {
+                                       cell_info.gsm_list->cell_id =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "lac") == 0) {
+                                       cell_info.gsm_list->lac =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "bcch") == 0) {
+                                       cell_info.gsm_list->bcch =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "bsic") == 0) {
+                                       cell_info.gsm_list->bsic =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "rxlev") == 0) {
+                                       cell_info.gsm_list->rxlev =
+                                               g_variant_get_int32(key_value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+       }
+       else {
+               warn("GSM Cell list count is NOT valid - Count: [%d]",
+                       cell_info.gsm_list_count);
+               cell_info.gsm_list_count = 0;
+       }
+       g_variant_unref(gsm_var);
+
+       if ((cell_info.umts_list_count != 0)
+                       && (g_variant_n_children(gsm_var) == cell_info.umts_list_count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("GSM Cell list count: [%d]", cell_info.umts_list_count);
+               cell_info.umts_list =
+                       g_malloc0(sizeof(TelNetworkUmtsNeighbourCellInfo));
+
+               g_variant_get(umts_var, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "cell_id") == 0) {
+                                       cell_info.umts_list->cell_id =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "lac") == 0) {
+                                       cell_info.umts_list->lac =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "arfcn") == 0) {
+                                       cell_info.umts_list->arfcn =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "psc") == 0) {
+                                       cell_info.umts_list->psc =
+                                               g_variant_get_int32(key_value);
+                               }
+                               else if (g_strcmp0(key, "rscp") == 0) {
+                                       cell_info.umts_list->rscp =
+                                               g_variant_get_int32(key_value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+       }
+       else {
+               warn("GSM Cell list count is NOT valid - Count: [%d]",
+                       cell_info.umts_list_count);
+               cell_info.umts_list_count = 0;
+       }
+       g_variant_unref(umts_var);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "GetServingNetwork", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_network_serving, evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &cell_info);
 
-       return TAPI_API_SUCCESS;
+       /* Free resource */
+       g_free(cell_info.gsm_list);
+       g_free(cell_info.umts_list);
 }
 
-EXPORT_API int tel_get_network_neighboring_cell_info(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_network_get_neighboring_cell_info(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
-                       "GetNgbrCellInfo", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_neighboring_cell_info, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
-}
+       telephony_network_call_get_ngbr_cell_info(handle->network_proxy,
+               NULL,
+               on_response_network_get_neighboring_cell_info, rsp_cb_data);
 
+       return TEL_RETURN_SUCCESS;
+}
index 4f95971..92d64f9 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
+#include "tapi_private.h"
+#include "tapi.h"
+#include "tapi_phonebook.h"
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <tel_phonebook.h>
 #include <string.h>
 
-#include "tapi_common.h"
-#include "TapiUtility.h"
-#include "TelSim.h"
-
-#include "common.h"
-#include "tapi_log.h"
-#include "ITapiPhonebook.h"
-
-static int _tel_check_pb_state(TapiHandle *handle)
+static gboolean __tapi_check_pb_type(TelPbType pb_type)
 {
-       GError *gerr = NULL;
-       GVariant *sync_gv = NULL;
-       int api_err = TAPI_API_SUCCESS;
-       TelSimPbList_t pb_list;
-       int init_status = 0;
-
-       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
-                       handle->path, DBUS_TELEPHONY_PB_INTERFACE, "GetInitStatus", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &gerr);
-
-       if (sync_gv) {
-               g_variant_get(sync_gv, "(ibbbbbb)",
-                               &init_status,
-                               &pb_list.b_fdn,
-                               &pb_list.b_adn,
-                               &pb_list.b_sdn,
-                               &pb_list.b_3g,
-                               &pb_list.b_aas,
-                               &pb_list.b_gas);
-
-               if(init_status == 1)
-                       api_err = TAPI_API_SUCCESS;
-               else
-                       api_err = TAPI_API_INVALID_OPERATION;
-
-       } else {
-               dbg( "g_dbus_conn failed in _tel_check_pb_state. error (%s)", gerr->message);
-               g_error_free(gerr);
-               return TAPI_API_OPERATION_FAILED;
+       switch (pb_type) {
+       case TEL_PB_FDN:
+       case TEL_PB_ADN:
+       case TEL_PB_SDN:
+       case TEL_PB_USIM:
+               return TRUE;
        }
 
-       return api_err;
+       return FALSE;
 }
 
-static void on_response_get_sim_pb_count(GObject *source_object, GAsyncResult *res, gpointer user_data)
+void on_phonebook_signal_emit_handler(TelephonyPhonebook *phonebook,
+       gchar *sender_name, gchar *signal_name,
+       GVariant *parameters, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
-       TelSimPbStorageInfo_t pb_cnt ;
-       gint used = 0, total = 0;
-
-       memset(&pb_cnt, 0, sizeof(TelSimPbStorageInfo_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       TapiEvtCbData *evt_cb_data;
+       TelHandle *handle = user_data;
+       char *evt_id;
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       if (handle == NULL || signal_name == NULL)
+               return;
 
-               if (error)
-                       g_error_free(error);
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_PB_INTERFACE,
+                                       signal_name);
 
-               free(evt_cb_data);
+       /*
+        * If an event callback is registered process
+        * g-signal event
+        */
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               g_free(evt_id);
                return;
        }
 
-       g_variant_get (dbus_result, "(iiii)",
-                       &result,
-                       &pb_cnt.StorageFileType,
-                       &used,
-                       &total);
+       if (!g_strcmp0(signal_name, "Status")) {
+               TelPbInitInfo init_info;
 
-       pb_cnt.UsedRecordCount = used;
-       pb_cnt.TotalRecordCount = total;
+               g_variant_get(parameters, "(bbbbb)",
+                       &init_info.init_status,
+                       &init_info.pb_list.fdn, &init_info.pb_list.adn,
+                       &init_info.pb_list.sdn, &init_info.pb_list.usim);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_cnt, evt_cb_data->user_data);
-       }
+               dbg("%s pb_status(%s), FDN(%d), ADN(%d), SDN(%d), USIM(%d)",
+                       signal_name, init_info.init_status ? "TRUE" : "FALSE",
+                       init_info.pb_list.fdn, init_info.pb_list.adn,
+                       init_info.pb_list.sdn, init_info.pb_list.usim);
 
-       free(evt_cb_data);
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &init_info);
+       } else
+               err("Unhandled Signal: %s", signal_name);
+
+       g_free(evt_id);
 }
 
-static void on_response_get_sim_pb_meta_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
+
+EXPORT_API TelReturn tapi_pb_get_sim_pb_init_info(TelHandle *handle,
+       gboolean *init_completed, TelPbList *pb_list)
 {
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
-       TelSimPbEntryInfo_t pb_entry ;
+       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
 
-       gint imin = 0, imax = 0, nmax = 0, tmax = 0;
+       dbg("Entry");
 
-       memset(&pb_entry, 0, sizeof(TelSimPbEntryInfo_t));
+       TEL_RETURN_IF_CHECK_FAIL(handle
+               && init_completed && pb_list,
+               TEL_RETURN_INVALID_PARAMETER);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
+       telephony_phonebook_call_get_init_info_sync(handle->phonebook_proxy,
+               (gint *)&pb_result, init_completed, &pb_list->fdn, &pb_list->adn,
+               &pb_list->sdn, &pb_list->usim, NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               return TEL_RETURN_FAILURE;
        }
 
-       g_variant_get (dbus_result, "(iiiiii)",
-                       &result,
-                       &pb_entry.StorageFileType,
-                       &imin,
-                       &imax,
-                       &nmax,
-                       &tmax);
-
-       pb_entry.PbIndexMin = imin;
-       pb_entry.PbIndexMax = imax;
-       pb_entry.PbNumLenMax =nmax;
-       pb_entry.PbTextLenMax = tmax;
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_entry, evt_cb_data->user_data);
+       if (pb_result != TEL_PB_RESULT_SUCCESS) {
+               err("Failed to get SIM PB init info - pb_result: [%d]", pb_result);
+               return TEL_RETURN_FAILURE;
        }
 
-       free(evt_cb_data);
+       dbg("init_completed: [%d] pb_list->fdn: [%d] pb_list->adn:[%d] "\
+               "pb_list->sdn: [%d] pb_list->usim: [%d]", *init_completed,
+               pb_list->fdn, pb_list->adn, pb_list->sdn, pb_list->usim);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sim_pb_usim_meta_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_pb_get_sim_pb_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
+       int pb_type;
+       TelPbInfo pb_info = {0, };
+       GVariant *dbus_info;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-       GVariant *value = NULL;
        GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
-       TelSimPbCapabilityInfo_t list ;
-       int i = 0;
-
-       dbg("Func Entrance");
-       memset(&list, 0, sizeof(TelSimPbCapabilityInfo_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       GVariant *key_value;
+       const gchar *key;
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       telephony_phonebook_call_get_info_finish(handle->phonebook_proxy,
+               (gint *)&pb_result, &pb_type, &dbus_info, res, &error);
 
-       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
-       list.FileTypeCount = g_variant_iter_n_children(iter);
+       CHECK_DEINIT(error, rsp_cb_data, pb_result);
 
-       i = 0;
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "field_type")) {
-                               list.FileTypeInfo[i].field_type = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "index_max")) {
-                               list.FileTypeInfo[i].index_max = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "text_max")) {
-                               list.FileTypeInfo[i].text_max = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "used_count")) {
-                               list.FileTypeInfo[i].used_count = g_variant_get_int32(value);
-                       }
-               }
-               i++;
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       if (pb_result != TEL_PB_RESULT_SUCCESS) {
+               g_variant_unref(dbus_info);
+               err("Failed to get SIM PB info - pb_result: [%d]", pb_result);
+               RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
+               return;
        }
 
-       free(evt_cb_data);
-}
-
-static void on_response_read_sim_pb_record(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
-       TelSimPbRecord_t pb_rec ;
-
-       gint i = 0, ni = 0;
-       gchar *name = NULL;
-       gchar *number = NULL;
-       gchar *sne = NULL;
-       gchar *anr1 = NULL;
-       gchar *anr2 = NULL;
-       gchar *anr3 = NULL;
-       gchar *email1 = NULL;
-       gchar *email2 = NULL;
-       gchar *email3 = NULL;
-       gchar *email4 = NULL;
-
-       memset(&pb_rec, 0, sizeof(TelSimPbRecord_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+       pb_info.pb_type = pb_type;
+       g_variant_get(dbus_info, "a{sv}", &iter);
+       if (pb_info.pb_type == TEL_PB_USIM) {
+               TelPbUsimInfo *usim = (TelPbUsimInfo *)(&pb_info.info_u.usim);
+
+               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "max_count") == 0)
+                               usim->max_count = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "used_count") == 0)
+                               usim->used_count = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_num_len") == 0)
+                               usim->max_num_len = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_text_len") == 0)
+                               usim->max_text_len = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_anr_count") == 0)
+                               usim->max_anr_count = g_variant_get_byte(key_value);
+                       else if (g_strcmp0(key, "max_anr_len") == 0)
+                               usim->max_anr_len = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_email_count") == 0)
+                               usim->max_email_count = g_variant_get_byte(key_value);
+                       else if (g_strcmp0(key, "max_email_len") == 0)
+                               usim->max_email_len = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_sne_len") == 0)
+                               usim->max_sne_len = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_gas_count") == 0)
+                               usim->max_gas_count = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_gas_len") == 0)
+                               usim->max_gas_len = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_aas_count") == 0)
+                               usim->max_aas_count = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_aas_len") == 0)
+                               usim->max_aas_len = g_variant_get_uint32(key_value);
                }
 
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get (dbus_result, "(iiiisisisisisisissssi)",
-                       &result,
-                       &pb_rec.phonebook_type,
-                       &i,
-                       &ni,
-                       &name,
-                       &pb_rec.dcs,
-                       &number,
-                       &pb_rec.ton,
-                       &sne,
-                       &pb_rec.sne_dcs,
-                       &anr1,
-                       &pb_rec.anr1_ton,
-                       &anr2,
-                       &pb_rec.anr2_ton,
-                       &anr3,
-                       &pb_rec.anr3_ton,
-                       &email1,
-                       &email2,
-                       &email3,
-                       &email4,
-                       &pb_rec.group_index);
-
-       pb_rec.index = i;
-       pb_rec.next_index = ni;
-
-       if(strlen(name))
-               snprintf((char*)pb_rec.name, strlen(name) + 1, "%s", name);
-
-       if(strlen(number))
-               snprintf((char*)pb_rec.number, strlen(number) + 1, "%s", number);
-
-       if(strlen(sne))
-               snprintf((char*)pb_rec.sne, strlen(sne) + 1, "%s", sne);
-
-       if(strlen(anr1))
-               snprintf((char*)pb_rec.anr1, strlen(anr1) + 1, "%s", anr1);
-
-       if(strlen(anr2))
-               snprintf((char*)pb_rec.anr2, strlen(anr2) + 1, "%s", anr2);
-
-       if(strlen(anr3))
-               snprintf((char*)pb_rec.anr3, strlen(anr3) + 1, "%s", anr3);
-
-       if(strlen(email1))
-               snprintf((char*)pb_rec.email1, strlen(email1) + 1, "%s", email1);
-
-       if(strlen(email2))
-               snprintf((char*)pb_rec.email2, strlen(email2) + 1, "%s", email2);
-
-       if(strlen(email3))
-               snprintf((char*)pb_rec.email3, strlen(email3) + 1, "%s", email3);
-
-       dbg("pb_rec.phonebook_type[%d]",pb_rec.phonebook_type );
-       dbg("pb_rec.index[%d]",pb_rec.index );
-       dbg("pb_rec.next_index[%d]",pb_rec.next_index );
-       dbg("pb_rec.name[%s]",pb_rec.name );
-       dbg("pb_rec.dcs[%d]",pb_rec.dcs );
-       dbg("pb_rec.number[%s]",pb_rec.number );
-       dbg("pb_rec.ton[%d]",pb_rec.ton );
-
-       if(pb_rec.phonebook_type==TAPI_SIM_PB_3GSIM) {
-               dbg("pb_rec.sne[%s]",pb_rec.sne );
-               dbg("pb_rec.sne_dcs[%d]",pb_rec.sne_dcs );
-               dbg("pb_rec.anr1[%s]",pb_rec.anr1 );
-               dbg("pb_rec.anr1_ton[%d]",pb_rec.anr1_ton );
-               dbg("pb_rec.anr2[%s]",pb_rec.anr2 );
-               dbg("pb_rec.anr2_ton[%d]",pb_rec.anr2_ton );
-               dbg("pb_rec.anr3[%s]",pb_rec.anr3 );
-               dbg("pb_rec.anr3_ton[%d]",pb_rec.anr3_ton );
-               dbg("pb_rec.email1[%s]",pb_rec.email1 );
-               dbg("pb_rec.email2[%s]",pb_rec.email2 );
-               dbg("pb_rec.email3[%s]",pb_rec.email3 );
-               dbg("pb_rec.email4[%s]",pb_rec.email4 );
-               dbg("pb_rec.group_index[%d]",pb_rec.group_index );
-               dbg("pb_rec.pb_control[%d]",pb_rec.pb_control );
+               dbg("pb_type: [%d] max_count: [%d] used_count: [%d] max_num_len: [%d] " \
+                       "max_text_len: [%d] max_anr_count: [%d] max_anr_len: [%d] " \
+                       "max_email_count: [%d] max_email_len: [%d] max_sne_len: [%d] " \
+                       "max_gas_count: [%d] max_gas_len: [%d] "\
+                       "max_aas_count: [%d] max_aas_len: [%d]",
+                       pb_info.pb_type, usim->max_count,
+                       usim->used_count, usim->max_num_len,
+                       usim->max_text_len, usim->max_anr_count,
+                       usim->max_anr_len, usim->max_email_count,
+                       usim->max_email_len, usim->max_sne_len,
+                       usim->max_gas_count, usim->max_gas_len,
+                       usim->max_aas_count, usim->max_aas_len);
        }
+       else {
+               TelPbSimInfo *sim = (TelPbSimInfo *)(&pb_info.info_u.sim);
+
+               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "max_count") == 0)
+                               sim->max_count = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "used_count") == 0)
+                               sim->used_count = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_num_len") == 0)
+                               sim->max_num_len = g_variant_get_uint32(key_value);
+                       else if (g_strcmp0(key, "max_text_len") == 0)
+                               sim->max_text_len = g_variant_get_uint32(key_value);
+               }
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_rec, evt_cb_data->user_data);
+               dbg("pb_type: [%d] max_count: [%d] used_count: [%d] max_num_len: [%d]" \
+                       "max_text_len: [%d]",
+                       pb_info.pb_type, sim->max_count, sim->used_count,
+                       sim->max_num_len, sim->max_text_len);
        }
+       g_variant_iter_free(iter);
+       g_variant_unref(dbus_info);
 
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, &pb_info);
 }
 
-static void on_response_update_sim_pb_record(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_pb_get_sim_pb_info(TelHandle *handle,
+       TelPbType pb_type, TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       TapiRespCbData *rsp_cb_data;
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle
+               && callback && __tapi_check_pb_type(pb_type),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(i)", &result);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
+       telephony_phonebook_call_get_info(handle->phonebook_proxy,
+               pb_type,
+               NULL,
+               on_response_pb_get_sim_pb_info, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_delete_sim_pb_record(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_pb_read_sim_pb_record(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
+       TelPbReadRecord pb_rec;
+       int pb_type;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       GVariant *dbus_rec;
+       GVariantIter *iter = NULL;
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       GError *error = NULL;
+       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
 
-               if (error)
-                       g_error_free(error);
+       memset(&pb_rec, 0, sizeof(TelPbReadRecord));
 
-               free(evt_cb_data);
+       telephony_phonebook_call_read_record_finish(handle->phonebook_proxy,
+               (gint *)&pb_result, &pb_rec.index, &pb_rec.next_index, &pb_type, &dbus_rec,
+               res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, pb_result);
+
+       if (pb_result != TEL_PB_RESULT_SUCCESS) {
+               g_variant_unref(dbus_rec);
+               err("Failed to read SIM PB record - pb_result: [%d]", pb_result);
+               RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
                return;
        }
 
-       g_variant_get (dbus_result, "(i)", &result);
+       pb_rec.pb_type = pb_type;
+       g_variant_get(dbus_rec, "a{sv}", &iter);
+       if (pb_rec.pb_type == TEL_PB_USIM) {
+               GVariant *key_value;
+               const gchar *key;
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
+               TelPbUsimRecord *usim = (TelPbUsimRecord *)&(pb_rec.rec_u.usim);
 
-       free(evt_cb_data);
-}
-
-EXPORT_API int tel_get_sim_pb_init_info(TapiHandle *handle, int *init_completed, TelSimPbList_t *pb_list)
-{
-       GError *gerr = NULL;
-       GVariant *sync_gv = NULL;
-       int api_err = TAPI_API_SUCCESS;
-       int init_status = 0;
-
-       dbg("Func Entrance");
-
-       TAPI_RETURN_VAL_IF_FAIL(init_completed, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(pb_list, TAPI_API_INVALID_PTR);
-
-       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
-                       handle->path, DBUS_TELEPHONY_PB_INTERFACE, "GetInitStatus", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &gerr);
-
-       if (sync_gv) {
-               g_variant_get(sync_gv, "(ibbbbbb)",
-                               &init_status,
-                               &pb_list->b_fdn,
-                               &pb_list->b_adn,
-                               &pb_list->b_sdn,
-                               &pb_list->b_3g,
-                               &pb_list->b_aas,
-                               &pb_list->b_gas);
-               *init_completed = init_status;
+               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "name") == 0) {
+                               g_strlcpy(usim->name,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_PB_TEXT_MAX_LEN + 1);
+                       }
+                       else if (g_strcmp0(key, "number") == 0) {
+                               g_strlcpy(usim->number,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_PB_NUMBER_MAX_LEN + 1);
+                       }
+                       else if (g_strcmp0(key, "sne") == 0) {
+                               g_strlcpy(usim->sne,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_PB_TEXT_MAX_LEN + 1);
+                       }
+                       else if (g_strcmp0(key, "grp_name") == 0) {
+                               g_strlcpy(usim->grp_name,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_PB_TEXT_MAX_LEN + 1);
+                       }
+                       else if (g_strcmp0(key, "anr_count") == 0) {
+                               usim->anr_count = g_variant_get_byte(key_value);
+                       }
+                       else if (g_strcmp0(key, "anr") == 0) {
+                               GVariantIter *iter2 = NULL, *iter_row2= NULL;
+                               GVariant *key_value2;
+                               const gchar *key2;
+                               guint count = 0;
+
+                               g_variant_get(key_value, "aa{sv}", &iter2);
+                               while (g_variant_iter_next(iter2, "a{sv}", &iter_row2)) {
+                                       while (g_variant_iter_loop(iter_row2, "{sv}", &key2, &key_value2)) {
+                                               if (g_strcmp0(key2, "number") == 0) {
+                                                       g_strlcpy(usim->anr[count].number,
+                                                               g_variant_get_string(key_value2, NULL),
+                                                               TEL_PB_NUMBER_MAX_LEN + 1);
+                                               }
+                                               else if (g_strcmp0(key2, "description") == 0) {
+                                                       usim->anr[count].description =
+                                                               g_variant_get_boolean(key_value2);
+                                               }
+                                               else if (g_strcmp0(key2, "aas") == 0) {
+                                                       g_strlcpy(usim->anr[count].aas,
+                                                               g_variant_get_string(key_value2, NULL),
+                                                               TEL_PB_TEXT_MAX_LEN + 1);
+                                               }
+                                       }
+                                       count++;
+                                       g_variant_iter_free(iter_row2);
+                               }
+                               g_variant_iter_free(iter2);
+                       }
+                       else if (g_strcmp0(key, "email_count") == 0) {
+                               usim->email_count = g_variant_get_byte(key_value);
+                       }
+                       else if (g_strcmp0(key, "email") == 0) {
+                               GVariantIter *iter2 = NULL;
+                               GVariant *key_value2;
+                               const gchar *key2;
+                               guint count = 0;
+                               char *tmp;
+
+                               g_variant_get(key_value, "a{sv}", &iter2);
+                               while (g_variant_iter_loop(iter2, "{sv}", &key2, &key_value2)) {
+                                       for (count = 0; count < usim->email_count; count++) {
+                                               tmp = g_strdup_printf("%d", count);
+                                               if (g_strcmp0(key2, tmp) == 0) {
+                                                       gconstpointer email = g_variant_get_data(key_value2);
+                                                       g_strlcpy(usim->email[count], email, strlen(email)+1);
+                                               }
+                                               g_free(tmp);
+                                       }
+                               }
+                               g_variant_iter_free(iter2);
+                       }
+                       else if (g_strcmp0(key, "hidden") == 0) {
+                               usim->hidden = g_variant_get_boolean(key_value);
+                       }
+               }
        }
+       else {
+               GVariant *key_value;
+               const gchar *key;
 
-       dbg("pb_list->b_fdn[%d]", pb_list->b_fdn)
-       dbg("pb_list->b_adn[%d]", pb_list->b_adn)
-       dbg("pb_list->b_sdn[%d]", pb_list->b_sdn)
-       dbg("pb_list->b_3g[%d]", pb_list->b_3g)
-       dbg("pb_list->b_aas[%d]", pb_list->b_aas)
-       dbg("pb_list->b_gas[%d]", pb_list->b_gas)
-
-       return api_err;
-}
-
-EXPORT_API int tel_get_sim_pb_count(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int pb_ready = 0;
-
-       dbg("Func Entrance");
-       pb_ready = _tel_check_pb_state(handle);
-       if(pb_ready != 0)
-               return pb_ready;
-
-       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
-                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
-               return TAPI_API_INVALID_INPUT;
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       param = g_variant_new("(i)", pb_type);
+               TelPbSimRecord *sim = (TelPbSimRecord *)&(pb_rec.rec_u.sim);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
-                       "GetCount", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_sim_pb_count, evt_cb_data);
+               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "name") == 0) {
+                               g_strlcpy(sim->name,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_PB_TEXT_MAX_LEN + 1);
+                       }
+                       else if (g_strcmp0(key, "number") == 0) {
+                               g_strlcpy(sim->number,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_PB_NUMBER_MAX_LEN + 1);
+                       }
+               }
+       }
+       g_variant_iter_free(iter);
+       g_variant_unref(dbus_rec);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, &pb_rec);
 }
 
-EXPORT_API int tel_get_sim_pb_meta_info(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_pb_read_sim_pb_record(TelHandle *handle,
+       const TelPbRecordInfo *record,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int pb_ready = 0;
-
-       dbg("Func Entrance");
-       pb_ready = _tel_check_pb_state(handle);
-       if(pb_ready != 0)
-               return pb_ready;
+       TapiRespCbData *rsp_cb_data;
 
-       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
-                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
-               return TAPI_API_INVALID_INPUT;
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && record && callback
+               && __tapi_check_pb_type(record->pb_type)
+               && record->index, TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", pb_type);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
-                       "GetInfo", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_sim_pb_meta_info, evt_cb_data);
+       telephony_phonebook_call_read_record(handle->phonebook_proxy,
+               record->pb_type, record->index,
+               NULL,
+               on_response_pb_read_sim_pb_record, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_sim_pb_usim_meta_info(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+static void on_response_pb_update_sim_pb_record(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int pb_ready = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance");
-       pb_ready = _tel_check_pb_state(handle);
-       if(pb_ready != 0)
-               return pb_ready;
+       telephony_phonebook_call_update_record_finish(handle->phonebook_proxy,
+               (gint *)&pb_result, res, &error);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       CHECK_DEINIT(error, rsp_cb_data, pb_result);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
-                       "GetUsimMetaInfo", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_sim_pb_usim_meta_info, evt_cb_data);
+       if (pb_result != TEL_PB_RESULT_SUCCESS)
+               err("Failed to update SIM PB record - pb_result: [%d]", pb_result);
+       else
+               dbg("update SIM PB record: [SUCCESS]");
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
 }
 
-EXPORT_API int tel_read_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short index, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_pb_update_sim_pb_record(TelHandle *handle,
+       const TelPbUpdateRecord *record,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int pb_ready = 0;
-
-       dbg("Func Entrance");
-       pb_ready = _tel_check_pb_state(handle);
-       if(pb_ready != 0)
-               return pb_ready;
-
-       if (index == 0)
-               return TAPI_API_INVALID_INPUT;
-
-       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
-                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
-               return TAPI_API_INVALID_INPUT;
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TapiRespCbData *rsp_cb_data;
+
+       GVariantBuilder update_builder;
+       GVariant *var_update = NULL;
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && record && callback
+               && __tapi_check_pb_type(record->pb_type)
+               && record->index, TEL_RETURN_INVALID_PARAMETER);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       dbg("Phonebook Type: [%d] Index: [%d]", record->pb_type, record->index);
+
+       g_variant_builder_init(&update_builder, G_VARIANT_TYPE("a{sv}"));
+       if (record->pb_type == TEL_PB_USIM) {
+               GVariant *var_anr = NULL, *var_email = NULL;
+               GVariantBuilder anr_builder, email_builder;
+
+               TelPbUsimRecord *usim = (TelPbUsimRecord *)&(record->rec_u.usim);
+               guint count = 0;
+
+               dbg("Name: [%s] Number: [%s] SNE: [%s] Group Name: [%s]",
+                       usim->name, usim->number, usim->sne, usim->grp_name);
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "name", g_variant_new_string(usim->name));
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "number", g_variant_new_string(usim->number));
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "sne", g_variant_new_string(usim->sne));
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "grp_name", g_variant_new_string(usim->grp_name));
+
+               /* ANR */
+               dbg("ANR count: [%d]", usim->anr_count);
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "anr_count", g_variant_new_byte(usim->anr_count));
+
+               g_variant_builder_init(&anr_builder, G_VARIANT_TYPE("aa{sv}"));
+               if (usim->anr_count && usim->anr_count <= TEL_PB_ANR_MAX_COUNT) {
+                       for (count = 0; count < usim->anr_count; count++) {
+                               g_variant_builder_open(&anr_builder, G_VARIANT_TYPE("a{sv}"));
+
+                               dbg("ANR[%d] - Number: [%s] Description: [%s] AAS: [%s]",
+                                       count, usim->anr[count].number,
+                                       (usim->anr[count].description ? "YES" : "NO"),
+                                       usim->anr[count].aas);
+                               g_variant_builder_add(&anr_builder, "{sv}",
+                                       "number", g_variant_new_string(usim->anr[count].number));
+                               g_variant_builder_add(&anr_builder, "{sv}",
+                                       "description", g_variant_new_boolean(usim->anr[count].description));
+                               g_variant_builder_add(&anr_builder, "{sv}",
+                                       "aas", g_variant_new_string(usim->anr[count].aas));
+
+                               g_variant_builder_close(&anr_builder);
+                       }
+               }
+               var_anr = g_variant_builder_end(&anr_builder);
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "anr", var_anr);
+
+               /* e-mail */
+               dbg("e-mail count: [%d]", usim->email_count);
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "email_count", g_variant_new_byte(usim->email_count));
+
+               g_variant_builder_init(&email_builder, G_VARIANT_TYPE("a{sv}"));
+               if (usim->email_count && usim->email_count <= TEL_PB_EMAIL_MAX_COUNT) {
+                       for (count = 0; count < usim->email_count; count++) {
+                               char *tmp = g_strdup_printf("%d", count);
+
+                               dbg("e-mail[%s] - [%s]", tmp, usim->email[count]);
+                               g_variant_builder_add(&email_builder, "{sv}",
+                                       tmp,
+                                       g_variant_new_from_data(G_VARIANT_TYPE("ay"),
+                                               usim->email[count], strlen(usim->email[count]),
+                                               TRUE, NULL, NULL));
+                               g_free(tmp);
+                       }
+               }
+               var_email = g_variant_builder_end(&email_builder);
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "email", var_email);
 
-       param = g_variant_new("(ii)", pb_type, index);
+               dbg("Hidden: [%s]", usim->hidden ? "YES" : "NO");
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "hidden", g_variant_new_boolean(usim->hidden));
+       }
+       else {
+               TelPbSimRecord *sim = (TelPbSimRecord *)&(record->rec_u.sim);
+
+               dbg("Name: [%s] Number: [%s]",
+                       sim->name, sim->number);
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "name", g_variant_new_string(sim->name));
+               g_variant_builder_add(&update_builder, "{sv}",
+                       "number", g_variant_new_string(sim->number));
+       }
+       var_update = g_variant_builder_end(&update_builder);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
-                       "ReadRecord", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_read_sim_pb_record, evt_cb_data);
+       telephony_phonebook_call_update_record(handle->phonebook_proxy,
+               record->pb_type, record->index, var_update,
+               NULL,
+               on_response_pb_update_sim_pb_record, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_update_sim_pb_record(TapiHandle *handle, const TelSimPbRecord_t *req_data, tapi_response_cb callback, void *user_data)
+static void on_response_pb_delete_sim_pb_record(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int pb_ready = 0;
-
-       dbg("Func Entrance");
-       pb_ready = _tel_check_pb_state(handle);
-       if(pb_ready != 0)
-               return pb_ready;
-
-       TAPI_RETURN_VAL_IF_FAIL((req_data != NULL) , TAPI_API_INVALID_PTR);
-
-       if (req_data->index == 0) {
-               return TAPI_API_INVALID_INPUT;
-       }
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
+       GError *error = NULL;
 
-       if ((req_data->phonebook_type != TAPI_SIM_PB_FDN)
-                       && (req_data->phonebook_type != TAPI_SIM_PB_ADN) && (req_data->phonebook_type != TAPI_SIM_PB_SDN)
-                       && (req_data->phonebook_type != TAPI_SIM_PB_3GSIM) && (req_data->phonebook_type != TAPI_SIM_PB_AAS)
-                       && (req_data->phonebook_type != TAPI_SIM_PB_GAS)) {
-               return TAPI_API_INVALID_INPUT;
-       }
+       telephony_phonebook_call_delete_record_finish(handle->phonebook_proxy,
+               (gint *)&pb_result, res, &error);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       dbg("req_data->phonebook_type[%d]",req_data->phonebook_type );
-       dbg("req_data->index[%d]",req_data->index );
-       dbg("req_data->name[%s]",req_data->name );
-       dbg("req_data->dcs[%d]",req_data->dcs );
-       dbg("req_data->number[%s]",req_data->number );
-       dbg("req_data->ton[%d]",req_data->ton );
-
-       if(req_data->phonebook_type == TAPI_SIM_PB_3GSIM) {
-               dbg("req_data->sne[%s]",req_data->sne );
-               dbg("req_data->sne_dcs[%d]",req_data->sne_dcs );
-               dbg("req_data->anr1[%s]",req_data->anr1 );
-               dbg("req_data->anr1_ton[%d]",req_data->anr1_ton );
-               dbg("req_data->anr2[%s]",req_data->anr2 );
-               dbg("req_data->anr2_ton[%d]",req_data->anr2_ton );
-               dbg("req_data->anr3[%s]",req_data->anr3 );
-               dbg("req_data->anr3_ton[%d]",req_data->anr3_ton );
-               dbg("req_data->email1[%s]",req_data->email1 );
-               dbg("req_data->email2[%s]",req_data->email2 );
-               dbg("req_data->email3[%s]",req_data->email3 );
-               dbg("req_data->email4[%s]",req_data->email4 );
-               dbg("req_data->group_index[%d]",req_data->group_index );
-               dbg("req_data->pb_control[%d]",req_data->pb_control );
-       }
+       CHECK_DEINIT(error, rsp_cb_data, pb_result);
 
-       param = g_variant_new("(iisisisisisisissssi)",
-                       req_data->phonebook_type,
-                       req_data->index,
-                       req_data->name,
-                       req_data->dcs,
-                       req_data->number,
-                       req_data->ton,
-                       req_data->sne,
-                       req_data->sne_dcs,
-                       req_data->anr1,
-                       req_data->anr1_ton,
-                       req_data->anr2,
-                       req_data->anr2_ton,
-                       req_data->anr3,
-                       req_data->anr3_ton,
-                       req_data->email1,
-                       req_data->email2,
-                       req_data->email3,
-                       req_data->email4,
-                       req_data->group_index);
-
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
-                       "UpdateRecord", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_update_sim_pb_record, evt_cb_data);
-
-       return TAPI_API_SUCCESS;
+       if (pb_result != TEL_PB_RESULT_SUCCESS)
+               err("Failed to delete SIM PB record - pb_result: [%d]", pb_result);
+       else
+               dbg("delete SIM PB record: [SUCCESS]");
 
+       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
 }
 
-EXPORT_API int tel_delete_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short index, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_pb_delete_sim_pb_record(TelHandle *handle,
+       const TelPbRecordInfo *record,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int pb_ready = 0;
-
-       dbg("Func Entrance");
-       pb_ready = _tel_check_pb_state(handle);
-       if(pb_ready != 0)
-               return pb_ready;
+       TapiRespCbData *rsp_cb_data = user_data;
 
-       if (index == 0)
-               return TAPI_API_INVALID_INPUT;
+       dbg("Entry");
 
-       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
-                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
-               return TAPI_API_INVALID_INPUT;
+       TEL_RETURN_IF_CHECK_FAIL(handle && record && callback
+               && __tapi_check_pb_type(record->pb_type)
+               && record->index, TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       param = g_variant_new("(ii)", pb_type, index);
+       dbg("Delete SIM record - Phonebook type: [%d] Index: [%d] index",
+               record->pb_type, record->index);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
-                       "DeleteRecord", param, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_delete_sim_pb_record, evt_cb_data);
+       telephony_phonebook_call_delete_record(handle->phonebook_proxy,
+               record->pb_type, record->index,
+               NULL,
+               on_response_pb_delete_sim_pb_record, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
index eede90d..4a8f736 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "tapi_common.h"
-#include "TapiUtility.h"
-#include "TelSim.h"
-
-#include "common.h"
 #include "tapi_log.h"
-#include "ITapiSap.h"
-
-static void on_response_sap_connect(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapConnectionStatus_t result = TAPI_SIM_SAP_CONNECTION_STATUS_OK;
-       gint max_msg_size = 0;
-
-       dbg("Func Entrance");
+#include "tapi.h"
+#include "tapi_private.h"
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+#include "tel_sap.h"
+#include "tapi_sap.h"
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+void on_sap_signal_emit_handler(TelephonySap *sap, gchar *sender_name,
+                                                       gchar *signal_name, GVariant *parameters,
+                                                       gpointer user_data)
+{
+       TapiEvtCbData *evt_cb_data = NULL;
+       TelHandle *handle = user_data;
+       char *evt_id = NULL;
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
+       if (handle == NULL) {
+               err("handle is null");
                return;
        }
 
-       g_variant_get(dbus_result, "(ii)", &result, &max_msg_size);
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SAP_INTERFACE,
+                                       signal_name);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&max_msg_size, evt_cb_data->user_data);
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               warn("evt_cb_data is null for the signal[%s]", signal_name);
+               g_free(evt_id);
+               return;
        }
 
-       free(evt_cb_data);
-}
-
-EXPORT_API int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-
-       dbg("Func Entrance w/ max_msg_size[%d]",max_msg_size);
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       if (!g_strcmp0(signal_name, "Status")) {
+               TelSapCardStatus status;
 
-       param = g_variant_new("(i)", max_msg_size);
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "Connect", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_connect, evt_cb_data);
+               g_variant_get(parameters, "(i)", &status);
+               dbg("signal[%s] status[%d]", signal_name, status);
 
-       return TAPI_API_SUCCESS;
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &status);
+       } else {
+               err("Unsupported signal %s", signal_name);
+       }
+       g_free(evt_id);
 }
 
-static void on_response_sap_disconnect(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sap_req_connect(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
+       unsigned int max_msg_size;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_sap_call_req_connect_finish(handle->sap_proxy,
+                       (int *)&result, &max_msg_size, res, &error);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get(dbus_result, "(i)", &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &max_msg_size);
 }
 
-EXPORT_API int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sap_req_connect(TelHandle *handle,
+                       unsigned int max_msg_size,
+                       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-               g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "Disconnect", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_disconnect, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
+       telephony_sap_call_req_connect(handle->sap_proxy, max_msg_size, NULL,
+                       on_response_sap_req_connect, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_sap_connection_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sap_req_disconnect(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapStatusInfo_t result = TAPI_SIM_SAP_STATUS_UNKNOWN;
-
-       dbg("Func Entrance");
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       dbg("Entry");
 
-               if (error)
-                       g_error_free(error);
+       telephony_sap_call_req_disconnect_finish(handle->sap_proxy,
+                       (int *)&result, res, &error);
 
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get(dbus_result, "(i)", &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sap_req_disconnect(TelHandle *handle,
+                       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "GetStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_connection_status, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
+       telephony_sap_call_req_disconnect(handle->sap_proxy, NULL,
+                       on_response_sap_req_disconnect, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_sap_transfer_atr(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sap_get_atr(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
+       TelSapAtr atr;
+       char *content = NULL;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       GVariantIter *iter = NULL;
-       GVariant *param_gv = NULL;
-       GVariant *inner_gv = NULL;
-       guchar rt_i;
-       int i = 0;
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
-       TelSapAtrInfo_t r_atr;
+       guchar *binary_content;
 
-       dbg("Func Entrance");
-       memset(&r_atr, 0, sizeof(TelSapAtrInfo_t));
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_sap_call_get_atr_finish(handle->sap_proxy,
+                       (int *)&result, &content, res, &error);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
+       if (result != TEL_SAP_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               g_free(content);
                return;
        }
 
-       /*      dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));*/
-       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
-       inner_gv = g_variant_get_variant(param_gv);
+       binary_content = g_base64_decode(content, &atr.atr_len);
 
-       g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               r_atr.atr_data[i] = rt_i;
-               i++;
-       }
-       r_atr.atr_len = (int) i;
-       g_variant_iter_free(iter);
-       g_variant_unref(inner_gv);
-       g_variant_unref(param_gv);
-       /*              for(i=0; i < (int)r_atr.atr_len; i++)
-        dbg("r_atr[%d][0x%02x]",i, r_atr.atr_data[i]);*/
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&r_atr, evt_cb_data->user_data);
+       if (atr.atr_len > TEL_SAP_ATR_LEN_MAX) {
+               err("ATR length is too long");
+               RESP_CALLBACK_CALL(rsp_cb_data,
+                               TEL_SAP_RESULT_FAILURE_NO_REASON, NULL);
+               g_free(content);
+               g_free(binary_content);
+               return;
        }
 
-       free(evt_cb_data);
+       memcpy(atr.atr, binary_content, atr.atr_len);
+
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &atr);
+       g_free(content);
+       g_free(binary_content);
 }
 
-EXPORT_API int tel_req_sap_transfer_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sap_get_atr(TelHandle *handle,
+                       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
+
+       dbg("Entry");
 
-       dbg("Func Entrance");
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "GetATR", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_transfer_atr, evt_cb_data);
+       telephony_sap_call_get_atr(handle->sap_proxy, NULL,
+                       on_response_sap_get_atr, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_sap_transfer_apdu(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sap_req_transfer_apdu(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
+       TelSapApduResp rsp;
+       char *pdu = NULL;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       GVariantIter *iter = NULL;
-       GVariant *param_gv = NULL;
-       GVariant *inner_gv = NULL;
-       guchar rt_i;
-       int i = 0;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
-       TelSapApduData_t r_apdu;
 
-       dbg("Func Entrance");
-       memset(&r_apdu, 0, sizeof(TelSapApduData_t));
+       guchar *binary_pdu;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("Entry");
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       telephony_sap_call_req_transfer_apdu_finish(handle->sap_proxy,
+                       (int *)&result, &pdu, res, &error);
 
-               if (error)
-                       g_error_free(error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               free(evt_cb_data);
+       if (result != TEL_SAP_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               g_free(pdu);
                return;
        }
 
-       /*      dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));*/
-       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
-       inner_gv = g_variant_get_variant(param_gv);
+       binary_pdu = g_base64_decode(pdu, &rsp.apdu_resp_len);
 
-       g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               r_apdu.apdu_data[i] = rt_i;
-               i++;
-       }
-       r_apdu.apdu_len = (int) i;
-       g_variant_iter_free(iter);
-       g_variant_unref(inner_gv);
-       g_variant_unref(param_gv);
-       /*              for(i=0; i < (int)r_apdu.apdu_len; i++)
-        dbg("apdu[%d][0x%02x]",i, r_apdu.apdu_data[i]);*/
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&r_apdu, evt_cb_data->user_data);
+       if (rsp.apdu_resp_len > TEL_SAP_APDU_RESP_LEN_MAX) {
+               err("Req Transfer APDU response pdu length is too long");
+               RESP_CALLBACK_CALL(rsp_cb_data,
+                               TEL_SAP_RESULT_FAILURE_NO_REASON, NULL);
+               g_free(pdu);
+               g_free(binary_pdu);
+               return;
        }
 
-       free(evt_cb_data);
+       memcpy(rsp.apdu_resp, binary_pdu, rsp.apdu_resp_len);
+
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &rsp);
+       g_free(pdu);
+       g_free(binary_pdu);
 }
 
-EXPORT_API int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sap_req_transfer_apdu(TelHandle *handle,
+                       TelSapApdu *apdu, TapiResponseCb callback,
+                       void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariantBuilder *builder = NULL;
-       GVariant *param = NULL;
-       GVariant *inner_gv = NULL;
-       int i = 0;
+       TapiRespCbData *rsp_cb_data;
+       char *encoded_apdu;
 
-       dbg("Func Entrance");
-       TAPI_RETURN_VAL_IF_FAIL(apdu_data, TAPI_API_INVALID_PTR);
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && apdu != NULL &&
+                       apdu->apdu_len < TEL_SAP_APDU_LEN_MAX &&
+                       callback != NULL, TEL_RETURN_INVALID_PARAMETER);
 
-       builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
-       for (i = 0; i < apdu_data->apdu_len; i++) {
-               dbg("apdu_data->apdu_data[%d][0x%02x]", i,apdu_data->apdu_data[i]);
-               g_variant_builder_add(builder, "y", apdu_data->apdu_data[i]);
-       }
-       inner_gv = g_variant_builder_end(builder);
-       param = g_variant_new("(v)", inner_gv);
-       /*g_variant_builder_unref (builder);*/
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "TransferAPDU", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_transfer_apdu, evt_cb_data);
+       encoded_apdu = g_base64_encode(apdu->apdu, apdu->apdu_len);
+       telephony_sap_call_req_transfer_apdu(handle->sap_proxy,
+                       encoded_apdu, NULL,
+                       on_response_sap_req_transfer_apdu, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       g_free(encoded_apdu);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_sap_transport_protocol(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sap_req_transport_protocol(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_sap_call_req_transport_protocol_finish(handle->sap_proxy,
+                       (int *)&result, res, &error);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get(dbus_result, "(i)", &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sap_req_transport_protocol(TelHandle *handle,
+                       TelSimSapProtocol protocol,
+                       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance w/ protocol[%d]", protocol);
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL &&
+                       protocol <= TEL_SIM_SAP_PROTOCOL_T1 && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", protocol);
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "SetProtocol", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_transport_protocol, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
+       telephony_sap_call_req_transport_protocol(handle->sap_proxy, protocol,
+                       NULL, on_response_sap_req_transport_protocol, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_sap_power_operation(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sap_req_power_operation(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
 
-       dbg("Func Entrance");
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_sap_call_req_power_operation_finish(handle->sap_proxy,
+                       (int *)&result, res, &error);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               if (error)
-                       g_error_free(error);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-               free(evt_cb_data);
-               return;
-       }
+EXPORT_API TelReturn tapi_sap_req_power_operation(TelHandle *handle,
+                       TelSapPowerMode mode,
+                       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
 
-       g_variant_get(dbus_result, "(i)", &result);
+       dbg("Entry");
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
+       g_return_val_if_fail(handle != NULL && mode <= TEL_SAP_SIM_RESET_REQ &&
+                       callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       free(evt_cb_data);
-}
-
-EXPORT_API int tel_req_sap_power_operation(TapiHandle *handle, TelSimSapPowerMode_t power_mode, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       gint mode = 0;
-       dbg("Func Entrance w/ power_mode[%d]", power_mode);
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       switch (power_mode) {
-               case TAPI_SIM_SAP_POWER_SIM_ON_REQ:
-                       mode = 0;
-                       break;
-               case TAPI_SIM_SAP_POWER_SIM_OFF_REQ:
-                       mode =1;
-                       break;
-               case TAPI_SIM_SAP_RESET_SIM_REQ:
-                       mode = 2;
-                       break;
-               default:
-                       dbg("not handed value[%d]", power_mode);
-                       break;
-       }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       param = g_variant_new("(i)", mode);
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "SetPower", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_power_operation, evt_cb_data);
+       telephony_sap_call_req_power_operation(handle->sap_proxy, mode,
+                       NULL, on_response_sap_req_power_operation, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_sap_cardreader_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sap_get_card_reader_status(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
+       int status;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
-       TelSimSapCardStatus_t reader_status = TAPI_SIM_SAP_CARD_STATUS_UNKNOWN;
+       dbg("Entry");
 
-       dbg("Func Entrance");
+       telephony_sap_call_get_card_reader_status_finish(handle->sap_proxy,
+                       (int *)&result, (int *)&status, res, &error);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get(dbus_result, "(ii)", &result, &reader_status);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&reader_status, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &status);
 }
 
-EXPORT_API int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sap_get_cardreader_status(TelHandle *handle,
+                       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
+
+       dbg("Entry");
 
-       dbg("Func Entrance ");
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAP_INTERFACE, "GetCardReaderStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_sap_cardreader_status, evt_cb_data);
+       telephony_sap_call_get_card_reader_status(handle->sap_proxy, NULL,
+                       on_response_sap_get_card_reader_status, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
index 19a387b..805d003 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
+#include "tapi_private.h"
+#include "tapi.h"
+#include "tapi_sat.h"
+
 #include <string.h>
 
-#include "tapi_common.h"
-#include "TapiUtility.h"
-#include "TelSat.h"
+#define TEL_SAT_EVENT_LIST_MAX_COUNT   17 /**< max count of sat event list */
+
+TelSatEventListType g_event_list[TEL_SAT_EVENT_LIST_MAX_COUNT];
+
+void on_sat_signal_emit_handler(TelephonySat *sat, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data)
+{
+       TapiEvtCbData *evt_cb_data;
+       TelHandle *handle = user_data;
+       char *evt_id;
+
+       if (handle == NULL)
+       return;
+
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SAT_INTERFACE,
+                               signal_name);
+       /*
+        * If an event callback is registered process
+        * g-signal event
+        */
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               g_free(evt_id);
+               return;
+       }
+
+       if (!g_strcmp0(signal_name, "SetupMenu")) {
+               TelSatSetupMenuInfo setup_menu;
+               gint item_cnt;
+               GVariant *items = NULL;
+
+               memset(&setup_menu, 0, sizeof(TelSatSetupMenuInfo));
+
+               g_variant_get(parameters, "(ibs@vibb)", &setup_menu.command_id, &setup_menu.is_main_menu_present, &setup_menu.sat_main_title, &items, &item_cnt,
+                                       &setup_menu.is_sat_main_menu_help_info, &setup_menu.is_updated_sat_main_menu);
+
+               setup_menu.sat_main_menu_item_count = item_cnt;
+               if (items && item_cnt > 0) {
+                       int index = 0;
+                       GVariant *unbox;
+                       GVariantIter *iter;
+
+                       gchar *item_str;
+                       gint item_id;
+                       unbox = g_variant_get_variant(items);
+                       dbg("items(%p) items type_format(%s)", items, g_variant_get_type_string(unbox));
+
+                       g_variant_get(unbox, "a(si)", &iter);
+                       while (g_variant_iter_loop(iter,"(si)",&item_str, &item_id)) {
+                               setup_menu.sat_main_menu_item[index].item_id = item_id;
+                               memcpy(setup_menu.sat_main_menu_item[index].item_string, item_str, TEL_SAT_DEF_ITEM_STR_LEN_MAX + 6);
+                               dbg("item index(%d) id(%d) str(%s)",index, setup_menu.sat_main_menu_item[index].item_id, setup_menu.sat_main_menu_item[index].item_string);
+                               index++;
+                       }
+                       g_variant_iter_free(iter);
+               }
+
+               dbg("command id (%d)", setup_menu.command_id);
+               dbg("menu present (%d)", setup_menu.is_main_menu_present);
+               dbg("menu title (%s)", setup_menu.sat_main_title);
+               dbg("item cnt (%d)", setup_menu.sat_main_menu_item_count);
+               dbg("menu help info (%d)", setup_menu.is_sat_main_menu_help_info);
+               dbg("menu updated (%d)", setup_menu.is_updated_sat_main_menu);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &setup_menu);
+       }
+       else if (!g_strcmp0(signal_name, "DisplayText")) {
+               TelSatDisplayTextInd display_text;
+
+               memset(&display_text, 0, sizeof(TelSatDisplayTextInd));
+
+               g_variant_get(parameters, "(isiibbb)", &display_text.command_id, &display_text.text.string, &display_text.text.string_len, &display_text.duration,
+                       &display_text.is_priority_high, &display_text.is_user_resp_required, &display_text.immediately_resp);
+
+               dbg("command id (%d)", display_text.command_id);
+               dbg("display text (%s)", display_text.text.string);
+               dbg("string len(%d)", display_text.text.string_len);
+               dbg("duration (%d)", display_text.duration);
+               dbg("high priority (%d)", display_text.is_priority_high);
+               dbg("user response required(%d)", display_text.is_user_resp_required);
+               dbg("immediately response (%d)", display_text.immediately_resp);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &display_text);
+       }
+       else if (!g_strcmp0(signal_name, "SelectItem")) {
+               TelSatSelectItemInd select_item;
+               gint menu_cnt;
+               GVariant *menu_items;
+
+               memset(&select_item, 0, sizeof(TelSatSelectItemInd));
+
+               g_variant_get(parameters, "(ibsiii@v)", &select_item.command_id, &select_item.is_help_info_available, &select_item.text.string,
+                       &select_item.text.string_len, &select_item.default_item_index, &menu_cnt, &menu_items);
+
+               select_item.menu_item_count = menu_cnt;
+               if (menu_items && menu_cnt > 0) {
+                       int index = 0;
+                       GVariant *unbox;
+                       GVariantIter *iter;
+
+                       gchar *item_str;
+                       gint item_id, item_len;
+                       unbox = g_variant_get_variant(menu_items);
+                       dbg("items(%p) items type_format(%s)", menu_items, g_variant_get_type_string(unbox));
+
+                       g_variant_get(unbox, "a(iis)", &iter);
+                       while (g_variant_iter_loop(iter,"(iis)",&item_id, &item_len, &item_str)) {
+                               select_item.menu_item[index].item_id = item_id;
+                               select_item.menu_item[index].text_len = item_len;
+                               memcpy(select_item.menu_item[index].text, item_str, TEL_SAT_ITEM_TEXT_LEN_MAX + 1);
+                               dbg("item index(%d) id(%d) len(%d) str(%s)", index,
+                                               select_item.menu_item[index].item_id, select_item.menu_item[index].text_len, select_item.menu_item[index].text);
+                               index++;
+                       }
+                       g_variant_iter_free(iter);
+               }
+
+               dbg("command id (%d)", select_item.command_id);
+               dbg("help info(%d)", select_item.is_help_info_available);
+               dbg("selected item string(%s)", select_item.text.string);
+               dbg("string len(%d)", select_item.text.string_len);
+               dbg("default item index(%d)", select_item.default_item_index);
+               dbg("item count(%d)", select_item.menu_item_count);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &select_item);
+       }
+       else if (!g_strcmp0(signal_name, "GetInkey")) {
+               TelSatGetInkeyInd get_inkey;
+
+               memset(&get_inkey, 0, sizeof(TelSatGetInkeyInd));
+
+               g_variant_get(parameters, "(iiibbsii)", &get_inkey.command_id, &get_inkey.key_type, &get_inkey.input_char_mode,
+                       &get_inkey.is_numeric, &get_inkey.is_help_info_available, &get_inkey.text.string, &get_inkey.text.string_len, &get_inkey.duration);
+
+               dbg("command id(%d)", get_inkey.command_id);
+               dbg("key type(%d)", get_inkey.key_type);
+               dbg("input character mode(%d)", get_inkey.input_char_mode);
+               dbg("numeric(%d)", get_inkey.is_numeric);
+               dbg("help info available(%d)", get_inkey.is_help_info_available);
+               dbg("text (%s)", get_inkey.text.string);
+               dbg("text length", get_inkey.text.string_len);
+               dbg("duration", get_inkey.duration);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &get_inkey);
+       }
+       else if (!g_strcmp0(signal_name, "GetInput")) {
+               TelSatGetInputInd get_input;
+
+               memset(&get_input, 0, sizeof(TelSatGetInputInd));
+
+               g_variant_get(parameters, "(iibbbsiiisi)", &get_input.command_id, &get_input.input_char_mode, &get_input.is_numeric, &get_input.is_help_info_available, &get_input.is_echo_input,
+                       &get_input.text.string, &get_input.text.string_len, &get_input.resp_len.max, &get_input.resp_len.min, &get_input.default_text.string, &get_input.default_text.string_len);
+
+               dbg("command id(%d)", get_input.command_id);
+               dbg("input character mode(%d)", get_input.input_char_mode);
+               dbg("numeric(%d)", get_input.is_numeric);
+               dbg("help info avaiable(%d)", get_input.is_help_info_available);
+               dbg("echo input(%d)", get_input.is_echo_input);
+               dbg("text(%s)", get_input.text.string);
+               dbg("text length(%d)", get_input.text.string_len);
+               dbg("response length max(%d)", get_input.resp_len.max);
+               dbg("response length min(%d)", get_input.resp_len.min);
+               dbg("default text(%s)", get_input.default_text.string);
+               dbg("default text length(%d)", get_input.default_text.string_len);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &get_input);
+       }
+       else if (!g_strcmp0(signal_name, "SendSMS")) {
+               TelSatSendSmsIndSmsData send_sms;
+               GVariant *tpdu_data;
+               gchar* text;
+               gint text_len;
+
+               memset(&send_sms, 0, sizeof(TelSatSendSmsIndSmsData));
+
+               g_variant_get(parameters, "(isibiisii@vi)", &send_sms.command_id, &text, &text_len, &send_sms.is_packing_required, &send_sms.address.ton, &send_sms.address.npi,
+                                       &send_sms.address.dialing_number, &send_sms.address.dialing_number_len, &send_sms.sms_tpdu.tpdu_type, &tpdu_data, &send_sms.sms_tpdu.data_len);
+
+               if (tpdu_data) {
+                       int index = 0;
+                       guchar data;
+                       GVariantIter *iter = NULL;
+                       GVariant *inner_gv = NULL;
+
+                       inner_gv = g_variant_get_variant(tpdu_data);
+                       dbg("tpdu data exist type_format(%s)", g_variant_get_type_string(inner_gv));
+
+                       g_variant_get(inner_gv, "ay", &iter);
+                       while ( g_variant_iter_loop (iter, "y", &data)) {
+                               dbg("index(%d) data(%c)", index, data);
+                               send_sms.sms_tpdu.data[index] = data;
+                               index++;
+                       }
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
+               }
+
+               dbg("command id(%d)", send_sms.command_id);
+               dbg("packing required(%d)", send_sms.is_packing_required);
+               dbg("address ton(%d)", send_sms.address.ton);
+               dbg("address npi(%d)", send_sms.address.npi);
+               dbg("address dialing number (%s)", send_sms.address.dialing_number);
+               dbg("address number length (%d)", send_sms.address.dialing_number_len);
+               dbg("tpdu type (%d)", send_sms.sms_tpdu.tpdu_type);
+               dbg("tpdu length (%d)", send_sms.sms_tpdu.data_len);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &send_sms);
+       }
+       else if (!g_strcmp0(signal_name, "SetupEventList")) {
+               int g_index = 0;
+               gint event_cnt;
+               GVariant *evt_table;
+               TelSatEventListData event_list;
+
+               memset(&event_list, 0, sizeof(TelSatEventListData));
+
+               g_variant_get(parameters, "(i@v)", &event_cnt, &evt_table);
+
+               if (evt_table) {
+                       guchar data;
+                       GVariantIter *iter = NULL;
+                       GVariant *inner_gv = NULL;
+
+                       inner_gv = g_variant_get_variant(evt_table);
+                       dbg("event list exist type_format(%s)", g_variant_get_type_string(inner_gv));
+
+                       g_variant_get(inner_gv, "ai", &iter);
+                       while ( g_variant_iter_loop (iter, "i", &data)) {
+                               dbg("g_index(%d) event(%d)", g_index, data);
+                               g_event_list[g_index] = data;
+
+                               if (data == TEL_SAT_EVENT_IDLE_SCREEN_AVAILABLE) {
+                                       event_list.is_idle_screen_available = 1;
+                               }
+                               else if (data == TEL_SAT_EVENT_LANGUAGE_SELECTION) {
+                                       event_list.is_language_selection = 1;
+                               }
+                               else if (data == TEL_SAT_EVENT_BROWSER_TERMINATION) {
+                                       event_list.is_browser_termination = 1;
+                               }
+                               else if (data == TEL_SAT_EVENT_DATA_AVAILABLE) {
+                                       event_list.is_data_available = 1;
+                               }
+                               else if (data == TEL_SAT_EVENT_CHANNEL_STATUS) {
+                                       event_list.is_channel_status = 1;
+                               }
+                               g_index++;
+                       }
+                       //while end
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
+               }
+
+               dbg("event list cnt(%d)", event_cnt);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &event_list);
+       }
+       else if (!g_strcmp0(signal_name, "Refresh")) {
+               TelSatRefreshInd refresh_info;
+               gint file_cnt = 0;
+               GVariant *file_list = NULL;
+
+               memset(&refresh_info, 0, sizeof(TelSatRefreshInd));
+
+               g_variant_get(parameters, "(ii@v)", &refresh_info.command_id, &refresh_info.refresh_mode, &file_list);
+
+               if (file_list) {
+                       int g_index = 0;
+                       guchar data;
+                       GVariantIter *iter = NULL;
+                       GVariant *inner_gv = NULL;
+
+                       inner_gv = g_variant_get_variant(file_list);
+                       dbg("file list exist type_format(%s)", g_variant_get_type_string(inner_gv));
+
+                       g_variant_get(inner_gv, "ai", &iter);
+                       while ( g_variant_iter_loop (iter, "i", &data)) {
+                               dbg("g_index(%d) file id(%d)", g_index, data);
+                               /* TODO: Use TelSimFileID from tel_sim.h */
+                               //refresh_info.file_id[g_index] = data;
+                               g_index++;
+                       }
+                       file_cnt = g_index;
+
+                       //while end
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
+               }
+               refresh_info.file_count = file_cnt;
+
+               dbg("refresh event/file cnt(%d)", refresh_info.file_count);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &refresh_info);
+       }
+       else if (!g_strcmp0(signal_name, "SendDtmf")) {
+               TelSatSendDtmfIndDtmfData send_dtmf;
+
+               gint command_id = 0;
+               gint text_len = 0;
+               gchar *text = NULL;
+
+               memset(&send_dtmf, 0, sizeof(TelSatSendDtmfIndDtmfData));
 
-#include "common.h"
-#include "tapi_log.h"
-#include "ITapiSat.h"
+               g_variant_get(parameters, "(isisi)", &send_dtmf.command_id, &text, &text_len, &send_dtmf.dtmf_string.string, &send_dtmf.dtmf_string.string_len);
 
-extern TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT];
+               send_dtmf.command_id = command_id;
+               if (text_len <= 0 || g_strcmp0(text,"") == 0 ) {
+                       send_dtmf.is_hidden_mode = 1;
+               }
+
+               dbg("dtmf event command id(%d)", send_dtmf.command_id);
+               dbg("dtmf event dtmf(%s)", send_dtmf.dtmf_string.string);
+
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &send_dtmf);
+       }
+       else if (!g_strcmp0(signal_name, "EndProactiveSession")) {
+               int command_type = 0;
+
+               g_variant_get(parameters, "(i)", &command_type);
+               dbg("end session evt : command type(%d)", command_type);
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &command_type);
+       }
+       else {
+               dbg("not handled Sat noti[%s]", signal_name);
+       }
+}
 
-static GVariant* _tapi_sat_gen_app_exec_result_data(TelSatAppsRetInfo_t *result_info)
+static GVariant* generate_event_download_data(const TelSatEventDownloadReqInfo *event_data)
 {
        GVariant *result = NULL;
 
-       switch(result_info->commandType)
+       switch(event_data->event_download_type)
        {
-               case TAPI_SAT_CMD_TYPE_SETUP_MENU:{
+               case TEL_SAT_EVENT_IDLE_SCREEN_AVAILABLE:{
+                       gboolean idle_screen;
+                       dbg("idle screen available (%d)", event_data->event_download_data.is_idle_screen_available);
+
+                       idle_screen = event_data->event_download_data.is_idle_screen_available;
+                       result = g_variant_new("(b)", idle_screen);
+               } break;
+               case TEL_SAT_EVENT_LANGUAGE_SELECTION:{
+                       gint selected_language;
+                       dbg("selected language (%d)", event_data->event_download_data.language_selection_event_req_info);
+
+                       selected_language = event_data->event_download_data.language_selection_event_req_info;
+                       result = g_variant_new("(i)", selected_language);
+               } break;
+               case TEL_SAT_EVENT_BROWSER_TERMINATION:{
+                       gint browser_termination_cause;
+                       dbg("Cause of browser termination (%d)", event_data->event_download_data.browser_termination_event_req_info);
+
+                       browser_termination_cause = event_data->event_download_data.browser_termination_event_req_info;
+                       result = g_variant_new("(i)", browser_termination_cause);
+               } break;
+               case TEL_SAT_EVENT_DATA_AVAILABLE:
+               case TEL_SAT_EVENT_CHANNEL_STATUS:
+               default :
+                       dbg("not support download event (%d)", event_data->event_download_type);
+                       result = g_variant_new("()");
+                       break;
+       }
+
+       return result;
+}
+
+static GVariant* generate_app_exec_result_data(TelSatAppsRetInfo *result_info)
+{
+       GVariant *result = NULL;
+
+       switch(result_info->command_type)
+       {
+               case TEL_SAT_PROATV_CMD_SETUP_MENU:{
                        gint exec_result;
                        dbg("setup menu : result format (i)");
 
-                       exec_result = result_info->appsRet.setupMenu.resp;
+                       exec_result = result_info->apps_ret.setup_menu_resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_REFRESH:{
+               case TEL_SAT_PROATV_CMD_REFRESH:{
                        gint app_type, exec_result;
                        dbg("refresh : result format (ii)");
 
-                       app_type = result_info->appsRet.refresh.appType;
-                       exec_result = result_info->appsRet.refresh.resp;
+                       app_type = result_info->apps_ret.refresh.app_type;
+                       exec_result = result_info->apps_ret.refresh.resp;
                        result = g_variant_new("(ii)", app_type, exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_SETUP_CALL:{
+               case TEL_SAT_PROATV_CMD_SETUP_CALL:{
                        gint exec_result, me_problem, call_ctrl_problem, call_cause;
                        dbg("setup call : result format (iiii)");
 
-                       exec_result = result_info->appsRet.setupCall.resp;
-                       me_problem = result_info->appsRet.setupCall.meProblem;
-                       call_ctrl_problem = result_info->appsRet.setupCall.permanentCallCtrlProblem;
-                       call_cause = result_info->appsRet.setupCall.tapiCause;
+                       exec_result = result_info->apps_ret.setup_call.resp;
+                       me_problem = result_info->apps_ret.setup_call.me_problem;
+                       call_ctrl_problem = result_info->apps_ret.setup_call.permanent_call_ctrl_problem;
+                       /* TODO: need to confirm call_cause */
+                       //call_cause = result_info->apps_ret.setup_call.call_cause;
+                       call_cause = 0;
                        result = g_variant_new("(iiii)", exec_result, me_problem, call_ctrl_problem, call_cause);
                } break;
-               case TAPI_SAT_CMD_TYPE_SEND_SS:{
+               case TEL_SAT_PROATV_CMD_SEND_SS:{
                        gint exec_result, me_problem, ss_cause, call_ctrl_problem, ss_str_len;
                        gchar *ss_string = NULL;
                        dbg("send ss : result format (iiisii)");
 
-                       exec_result = result_info->appsRet.sendSs.resp;
-                       me_problem = result_info->appsRet.sendSs.meProblem;
-                       ss_cause = result_info->appsRet.sendSs.ssCause;
-                       call_ctrl_problem = result_info->appsRet.sendSs.additionalCallCtrlProblemInfo;
-                       ss_str_len = result_info->appsRet.sendSs.ssString.stringLen;
-                       ss_string = g_strdup((gchar*)result_info->appsRet.sendSs.ssString.string);
+                       exec_result = result_info->apps_ret.send_ss.resp;
+                       me_problem = result_info->apps_ret.send_ss.me_problem;
+                       /* TODO: need to confirm ss_cause */
+                       //ss_cause = result_info->apps_ret.send_ss.ss_cause;
+                       ss_cause = 0;
+                       call_ctrl_problem = result_info->apps_ret.send_ss.additional_call_ctrl_problem_info;
+                       ss_str_len = result_info->apps_ret.send_ss.ss_string.string_len;
+                       ss_string = g_strdup((gchar*)result_info->apps_ret.send_ss.ss_string.string);
 
                        result = g_variant_new("(iiisii)", exec_result, me_problem, ss_cause, ss_string, ss_str_len, call_ctrl_problem);
                } break;
-               case TAPI_SAT_CMD_TYPE_SEND_USSD:{
+               case TEL_SAT_PROATV_CMD_SEND_USSD:{
                        int index;
                        gint exec_result, me_problem, ss_cause, ussd_str_len;
                        GVariantBuilder *builder = NULL;
@@ -85,424 +445,332 @@ static GVariant* _tapi_sat_gen_app_exec_result_data(TelSatAppsRetInfo_t *result_
 
                        dbg("send ussd : result format (iiivi)");
 
-                       exec_result = result_info->appsRet.sendUssd.resp;
-                       me_problem = result_info->appsRet.sendUssd.meProblem;
-                       ss_cause = result_info->appsRet.sendUssd.ssCause;
-                       ussd_str_len = result_info->appsRet.sendUssd.ussdString.stringLen;
+                       exec_result = result_info->apps_ret.send_ussd.resp;
+                       me_problem = result_info->apps_ret.send_ussd.me_problem;
+                       /* TODO: need to confirm ss_cause */
+                       //ss_cause = result_info->apps_ret.send_ussd.ss_cause;
+                       ss_cause = 0;
+                       ussd_str_len = result_info->apps_ret.send_ussd.ussd_string.string_len;
 
                        builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
                        for (index = 0; index < ussd_str_len; index++) {
-                               dbg("index(%d) data(%d)", index, result_info->appsRet.sendUssd.ussdString.string[index]);
-                               g_variant_builder_add(builder, "y", result_info->appsRet.sendUssd.ussdString.string[index]);
+                               dbg("index(%d) data(%d)", index, result_info->apps_ret.send_ussd.ussd_string.string[index]);
+                               g_variant_builder_add(builder, "y", result_info->apps_ret.send_ussd.ussd_string.string[index]);
                        }
                        ussd_str = g_variant_builder_end(builder);
 
                        result = g_variant_new("(iiivi)", exec_result, me_problem, ss_cause, ussd_str, ussd_str_len);
                } break;
-               case TAPI_SAT_CMD_TYPE_SEND_SMS:{
+               case TEL_SAT_PROATV_CMD_SEND_SMS:{
                        gint exec_result;
                        dbg("send sms: result format (i)");
 
-                       exec_result = result_info->appsRet.sendSms.resp;
+                       exec_result = result_info->apps_ret.send_sms_resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_SEND_DTMF:{
+               case TEL_SAT_PROATV_CMD_SEND_DTMF:{
                        gint exec_result;
                        dbg("send DTMF: result format (i)");
 
-                       exec_result = result_info->appsRet.sendDtmf.resp;
+                       exec_result = result_info->apps_ret.send_dtmf_resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER:{
+               case TEL_SAT_PROATV_CMD_LAUNCH_BROWSER:{
                        gint exec_result, browser_problem;
                        dbg("launch browser: result format (ii)");
 
-                       exec_result = result_info->appsRet.launchBrowser.resp;
-                       browser_problem = result_info->appsRet.launchBrowser.browserProblem;
+                       exec_result = result_info->apps_ret.launch_browser.resp;
+                       browser_problem = result_info->apps_ret.launch_browser.browser_problem;
                        result = g_variant_new("(ii)", exec_result, browser_problem);
                } break;
-               case TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT:{
+               case TEL_SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT:{
                        gint exec_result;
                        dbg("setup idle mode text: result format (i)");
 
-                       exec_result = result_info->appsRet.setupIdleModeText.resp;
+                       exec_result = result_info->apps_ret.setup_idle_mode_text_resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_LANGUAGE_NOTIFICATION:{
+               case TEL_SAT_PROATV_CMD_LANGUAGE_NOTIFICATION:{
                        gint exec_result;
                        dbg("language notification: result format (i)");
 
-                       exec_result = result_info->appsRet.languageNoti.resp;
+                       exec_result = result_info->apps_ret.language_noti_resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_PROVIDE_LOCAL_INFO:{
+               case TEL_SAT_PROATV_CMD_PROVIDE_LOCAL_INFO:{
                        gint exec_result;
                        dbg("provide local info: result format (i)");
 
-                       exec_result = result_info->appsRet.provideLocalInfo.resp;
+                       exec_result = result_info->apps_ret.provide_local_info.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_PLAY_TONE:{
+               case TEL_SAT_PROATV_CMD_PLAY_TONE:{
                        gint exec_result;
                        dbg("play tone: result format (i)");
 
-                       exec_result = result_info->appsRet.playTone.resp;
+                       exec_result = result_info->apps_ret.play_tone_resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TAPI_SAT_CMD_TYPE_DISPLAY_TEXT:{
+               case TEL_SAT_PROATV_CMD_DISPLAY_TEXT:{
                        gint exec_result, me_problem;
                        dbg("display text: result format (ii)");
 
-                       exec_result = result_info->appsRet.displayText.resp;
-                       me_problem = result_info->appsRet.displayText.meProblem;
+                       exec_result = result_info->apps_ret.display_text.resp;
+                       me_problem = result_info->apps_ret.display_text.me_problem;
                        result = g_variant_new("(ii)", exec_result, me_problem);
                } break;
                default:
-                       dbg("unhandled command type(0x%x", result_info->commandType);
+                       dbg("unhandled command type(0x%x", result_info->command_type);
                        break;
        }
 
        return result;
 }
 
-static GVariant* _tapi_sat_gen_event_download_data(const TelSatEventDownloadReqInfo_t *pEventData)
-{
-       GVariant *result = NULL;
-
-       switch(pEventData->eventDownloadType)
-       {
-               case TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE:{
-                       gboolean idle_screen;
-                       dbg("idle screen available (%d)", pEventData->u.bIdleScreenAvailable);
-
-                       idle_screen = pEventData->u.bIdleScreenAvailable;
-                       result = g_variant_new("(b)", idle_screen);
-               } break;
-               case TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION:{
-                       gint selected_language;
-                       dbg("selected language (%d)", pEventData->u.languageSelectionEventReqInfo.language);
-
-                       selected_language = pEventData->u.languageSelectionEventReqInfo.language;
-                       result = g_variant_new("(i)", selected_language);
-               } break;
-               case TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION:{
-                       gint browser_termination_cause;
-                       dbg("Cause of browser termination (%d)", pEventData->u.browserTerminationEventReqInfo.browserTerminationCause);
-
-                       browser_termination_cause = pEventData->u.browserTerminationEventReqInfo.browserTerminationCause;
-                       result = g_variant_new("(i)", browser_termination_cause);
-               } break;
-               case TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE:
-               case TAPI_EVENT_SAT_DW_TYPE_CHANNEL_STATUS:
-               default :
-                       dbg("not support download event (%d)", pEventData->eventDownloadType);
-                       break;
-       }
-
-       return result;
-}
-
-static void on_response_menu_selection_envelop(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sat_select_menu(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSatResult result = TEL_SAT_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-
-       GVariant *rst;
-       struct tapi_resp_data *evt_cb_data = user_data;
+       gint envelop_rsp;
 
-       int result = -1;
-       int envelop_rsp = 0;
+       /* Finish and extract the response data */
+       telephony_sat_call_select_menu_finish(handle->sat_proxy,
+                                               (gint *)&result, &envelop_rsp, res, &error);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       rst = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if(!rst){
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
+       if (result != TEL_SAT_RESULT_SUCCESS) {
+               err("Failed to select menu item - result: [%d] envelop response: [%d]", result, envelop_rsp);
 
-               g_error_free (error);
-               g_free(evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
                return;
        }
 
-       g_variant_get (rst, "(ii)", &result, &envelop_rsp);
-       dbg("menu selection envelop result(%d) envelop response(%d)", result, envelop_rsp);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
-       }
-
-       g_variant_unref(rst);
-       g_free(evt_cb_data);
-}
-
-static void on_response_download_event_envelop(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-
-       GVariant *rst;
-       struct tapi_resp_data *evt_cb_data = user_data;
-
-       int result = -1;
-       int envelop_rsp = 0;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       rst = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if(!rst){
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
-
-               g_error_free (error);
-               g_free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get (rst, "(ii)", &result, &envelop_rsp);
-       dbg("download event envelop result(%d) envelop response(%d)", result, envelop_rsp);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
-       }
-
-       g_variant_unref(rst);
-       g_free(evt_cb_data);
+       dbg("menu selection: [SUCCESS]");
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &envelop_rsp);
 }
 
 /**
  *
  * To send envelope command (MENU SELECTION) to USIM.
  *
- * @return             values in enum TapiResult_t.
- * @param[in]          TelSatMenuSelectionReqInfo_t    menu selection evelope data.
+ * @return             values in enum TelReturn.
+ * @param[in]          TelSatMenuSelectionReqInfo menu selection evelope data.
  * @Interface          Asynchronous.
  * @remark
- * @Refer              TelSatMenuSelectionReqInfo_t
+ * @Refer              TelSatMenuSelectionReqInfo
  */
-
-EXPORT_API int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelectionReqInfo_t *pMenuSelect, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sat_select_menu(TelHandle *handle, const TelSatMenuSelectionReqInfo *menu_select, TapiResponseCb callback, void *user_data)
 {
-       gint item_id;
-       gboolean help_req;
-       GVariant *inparam = NULL;
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       if (!handle || !handle->dbus_connection || !pMenuSelect){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("item_identifier: [%d] is_help_requested: [%s]",
+               menu_select->item_identifier, menu_select->is_help_requested ? "HELP" : "NO HELP");
 
-       item_id = pMenuSelect->itemIdentifier;
-       help_req = ( (pMenuSelect->bIsHelpRequested != 0) ? TRUE : FALSE);
-       dbg("item id(%d) help request(%d)", item_id, help_req);
-       inparam = g_variant_new("(ib)", item_id, help_req);
+       telephony_sat_call_select_menu(handle->sat_proxy, menu_select->item_identifier,
+                                       menu_select->is_help_requested,
+                                       NULL,
+                                       on_response_sat_select_menu,
+                                       rsp_cb_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAT_INTERFACE, "SelectMenu", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_menu_selection_envelop, evt_cb_data);
+       return TEL_RETURN_SUCCESS;
+}
+
+static void on_response_sat_download_event(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSatResult result = TEL_SAT_RESULT_FAILURE;
+       GError *error = NULL;
+       gint envelop_rsp;
+
+       /* Finish and extract the response data */
+       telephony_sat_call_download_event_finish(handle->sat_proxy,
+                                               (gint *)&result, &envelop_rsp, res, &error);
 
-       g_variant_unref(inparam);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       if (result != TEL_SAT_RESULT_SUCCESS) {
+               err("Failed to download event - result: [%d] envelop response: [%d]", result, envelop_rsp);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
+
+       dbg("download event: [SUCCESS]");
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &envelop_rsp);
 }
 
 /**
  *
  * API to send event download to SIM.
  *
- * @return             values in enum TapiResult_t.
- * @param[in]          TelSatEventDownloadReqInfo_t    event download data.
+ * @return             values in enum TelReturn.
+ * @param[in]          TelSatEventDownloadReqInfo      event download data.
  * @Interface          Asynchronous.
  * @remark
- * @Refer              TelSatEventDownloadReqInfo_t
+ * @Refer              TelSatEventDownloadReqInfo
  */
-EXPORT_API int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t *pEventData, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sat_download_event(TelHandle *handle,
+       const TelSatEventDownloadReqInfo *event_data,
+       TapiResponseCb callback, void *user_data)
 {
+       TapiRespCbData *rsp_cb_data;
+       GVariant *download_data = NULL;
        gboolean evt_check = FALSE;
        int g_index = 0;
-       gint event_download_type, src_dev, dest_dev;
-       GVariant *download_data = NULL;
-
-       GVariant *inparam = NULL;
-       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       if (!handle || !handle->dbus_connection || !pEventData){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && event_data && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       for(g_index = 0; g_event_list[g_index] > 0; g_index++){
-               if(g_event_list[g_index] == pEventData->eventDownloadType ){
-                       dbg("event (%d) shoud be passed to sim");
-                       evt_check = TRUE;
+       if (event_data->event_download_type != TEL_SAT_EVENT_BROWSER_TERMINATION) {
+               for (g_index = 0; g_event_list[g_index] > 0; g_index++) {
+                       if (g_event_list[g_index] == event_data->event_download_type) {
+                               dbg("event (%d) shoud be passed to sim", event_data->event_download_type);
+                               evt_check = TRUE;
+                               break;
+                       }
                }
        }
+       else
+               evt_check = TRUE;
 
-       if(!evt_check){
-               dbg("sim does not request event(%d)", pEventData->eventDownloadType);
-               return TAPI_API_SAT_EVENT_NOT_REQUIRED_BY_USIM;
+       if (!evt_check) {
+               dbg("Request (%d) not initiated from SIM", event_data->event_download_type);
+               return TEL_RETURN_OPERATION_NOT_SUPPORTED;
        }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       event_download_type = pEventData->eventDownloadType;
-       src_dev = TAPI_SAT_DEVICE_ID_ME;
-       dest_dev = TAPI_SAT_DEVICE_ID_SIM;
-       download_data = _tapi_sat_gen_event_download_data(pEventData);
-       dbg("event type(%d)", event_download_type);
-       inparam = g_variant_new("(iiiv)", event_download_type, src_dev, dest_dev, download_data);
+       download_data = generate_event_download_data(event_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SAT_INTERFACE, "DownloadEvent", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_download_event_envelop, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_variant_unref(inparam);
+       telephony_sat_call_download_event(handle->sat_proxy,
+               event_data->event_download_type, TEL_SAT_DEVICE_ID_ME,
+               TEL_SAT_DEVICE_ID_SIM, download_data, NULL,
+               on_response_sat_download_event, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
 /**
  *
  * API to get main menu information.
  *
- * @return             values in enum TapiResult_t.
- * @param[out]         TelSatSetupMenuInfo_t   main menu data.
+ * @return             values in enum TelReturn.
+ * @param[out] TelSatSetupMenuInfo     main menu data.
  * @Interface          Synchronous.
  * @remark
- * @Refer              TelSatSetupMenuInfo_t
+ * @Refer              TelSatSetupMenuInfo
  */
-EXPORT_API int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t *pMainMenu)
+EXPORT_API TelReturn tapi_sat_get_main_menu_info(TelHandle *handle, TelSatSetupMenuInfo *main_menu)
 {
-       GError *error;
-       GVariant *rst = NULL;
-
+       GError *error = NULL;
+       TelReturn result = TEL_RETURN_SUCCESS;
+       gint sat_res;
        gchar *title;
-       gint result, command_id, item_cnt;
-       gboolean b_present, b_helpinfo, b_updated;
        GVariant *items = NULL;
+       GVariant *unbox;
+       GVariantIter *iter;
+       gchar *item_str;
+       gint item_id;
+       int index = 0;
 
-       dbg("Func Entrance ");
-
-       if (!handle || !handle->dbus_connection || !pMainMenu){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       memset(pMainMenu, 0, sizeof(TelSatSetupMenuInfo_t));
+       dbg("Entry");
 
-       error = NULL;
-       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
-                       DBUS_TELEPHONY_SAT_INTERFACE, "GetMainMenuInfo", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
 
-       if(!rst){
-               dbg( "error to get main menu(%s)", error->message);
-               g_error_free (error);
-               return TAPI_API_OPERATION_FAILED;
+       telephony_sat_call_get_main_menu_info_sync(handle->sat_proxy,
+               &sat_res, &main_menu->command_id, &main_menu->is_main_menu_present,
+               (gchar **)&title, &items, (gint *)&main_menu->sat_main_menu_item_count,
+               &main_menu->is_sat_main_menu_help_info, &main_menu->is_updated_sat_main_menu,
+               NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               result = TEL_RETURN_FAILURE;
+               goto out;
        }
-
-       dbg("menu_info type_format(%s)", g_variant_get_type_string(rst));
-
-       g_variant_get(rst, "(iibs@vibb)", &result, &command_id, &b_present, &title, &items, &item_cnt,
-                       &b_helpinfo, &b_updated);
-
-       pMainMenu->commandId = command_id;
-       pMainMenu->bIsMainMenuPresent = (b_present ? 1 : 0);
-       memcpy(pMainMenu->satMainTitle, title, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
-       pMainMenu->satMainMenuNum = item_cnt;
-       if(items && item_cnt > 0){
-               int index = 0;
-               GVariant *unbox;
-               GVariantIter *iter;
-
-               gchar *item_str;
-               gint item_id;
+       memcpy(main_menu->sat_main_title, title, TEL_SAT_DEF_TITLE_LEN_MAX);
+       dbg("Command ID: [%d] Menu: [%s] Title: [%s] count: [%d]",
+               main_menu->command_id, main_menu->is_main_menu_present ? "PRESENT" : "NOT PRESENT",
+               main_menu->sat_main_title, main_menu->sat_main_menu_item_count);
+       if (items && main_menu->sat_main_menu_item_count > 0) {
                unbox = g_variant_get_variant(items);
                dbg("items(%p) items type_format(%s)", items, g_variant_get_type_string(unbox));
 
                g_variant_get(unbox, "a(si)", &iter);
-               while(g_variant_iter_loop(iter,"(si)",&item_str, &item_id)){
-                       pMainMenu->satMainMenuItem[index].itemId = item_id;
-                       memcpy(pMainMenu->satMainMenuItem[index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
-                       dbg("item index(%d) id(%d) str(%s)",index, pMainMenu->satMainMenuItem[index].itemId, pMainMenu->satMainMenuItem[index].itemString);
-                       //dbg("item index(%d) id(%d) str(%s)",index, item_id, item_str);
+               while (g_variant_iter_loop(iter,"(si)",&item_str, &item_id)) {
+                       main_menu->sat_main_menu_item[index].item_id = item_id;
+
+                       if (strlen(item_str) > TEL_SAT_DEF_ITEM_STR_LEN_MAX + 6) {
+                               memcpy(main_menu->sat_main_menu_item[index].item_string, item_str, TEL_SAT_DEF_ITEM_STR_LEN_MAX + 6);
+                       }
+                       else {
+                               memcpy(main_menu->sat_main_menu_item[index].item_string, item_str, strlen(item_str));
+                       }
+
+                       dbg("item index(%d) id(%d) str(%s)",index, main_menu->sat_main_menu_item[index].item_id, main_menu->sat_main_menu_item[index].item_string);
                        index++;
                }
                g_variant_iter_free(iter);
        }
-       pMainMenu->bIsSatMainMenuHelpInfo = (b_helpinfo ? 1 : 0);
-       pMainMenu->bIsUpdatedSatMainMenu = (b_updated ? 1 : 0);
-
-       dbg("result (%d)", result);
-       dbg("command id (%d)", pMainMenu->commandId);
-       dbg("menu present (%d)", pMainMenu->bIsMainMenuPresent);
-       dbg("menu title (%s)", pMainMenu->satMainTitle);
-       dbg("item cnt (%d)", pMainMenu->satMainMenuNum);
-       dbg("menu help info (%d)", pMainMenu->bIsSatMainMenuHelpInfo);
-       dbg("menu updated (%d)", pMainMenu->bIsUpdatedSatMainMenu);
-
-       return TAPI_API_SUCCESS;
+
+       if (sat_res != TEL_SAT_RESULT_SUCCESS)
+               result = TEL_RETURN_FAILURE;
+
+out:
+       return result;
 }
 
 /**
  *
  * API to send UI display status.
  *
- * @return             values in enum TapiResult_t.
- * @param[in]          TelSatUiDisplayStatusType_t     display status data.
command_id    command identifier
- * @Interface          Asynchronous.
+ * @return             values in enum TelReturn.
+ * @param[in]          TelSatUiDisplayStatusType       display status data.
*  command_id command identifier
+ * @Interface          Synchronous.
  * @remark
- * @Refer              TelSatUiDisplayStatusType_t
+ * @Refer              TelSatUiDisplayStatusType
  */
-EXPORT_API int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, TelSatUiDisplayStatusType_t status)
+EXPORT_API TelReturn tapi_sat_send_ui_display_status(TelHandle *handle, int command_id, TelSatUiDisplayStatusType status)
 {
-       GError *error;
-       GVariant *rst = NULL;
-
-       gint result, command_id;
-       gboolean display_status;
-       GVariant *inparam = NULL;
-
-       dbg("Func Entrance ");
-
-       if (!handle || !handle->dbus_connection){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
+       GError *error = NULL;
+       TelReturn result = TEL_RETURN_SUCCESS;
+       gint sat_res;
 
-       command_id = commandId;
-       display_status = ( (status == TAPI_SAT_DISPLAY_SUCCESS) ? TRUE : FALSE);
-       dbg("command id(%d) display status(%d)", command_id, display_status);
-       inparam = g_variant_new("(ib)", command_id, display_status);
+       dbg("Entry");
 
-       error = NULL;
-       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
-                       DBUS_TELEPHONY_SAT_INTERFACE, "SendUiDisplayStatus", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && command_id && status , TEL_RETURN_INVALID_PARAMETER);
 
-       if(!rst){
-               dbg( "error to send ui display status(%s)", error->message);
-               g_error_free (error);
-               return TAPI_API_OPERATION_FAILED;
+       telephony_sat_call_send_ui_display_status_sync(handle->sat_proxy,
+                                                       command_id, status, &sat_res,
+                                                       NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               result = TEL_RETURN_FAILURE;
+               goto out;
        }
 
-       dbg("send ui display status format(%s)", g_variant_get_type_string(rst));
-
-       g_variant_get(rst, "(i)", &result);
-       if(result){
-               result = TAPI_API_SUCCESS;
-       }
-       else{
-               result = TAPI_API_OPERATION_FAILED;
-       }
-       dbg("result (%d)", result);
+       if (sat_res != TEL_SAT_RESULT_SUCCESS)
+               result = TEL_RETURN_FAILURE;
 
+out:
        return result;
 }
 
@@ -510,73 +778,56 @@ EXPORT_API int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId,
  *
  * API to send UI user confirmation data.
  *
- * @return             values in enum TapiResult_t.
+ * @return             values in enum TelReturn.
  * @param[in]          command_id      command identifier
command_type          command type
key_type                      user confirmation value
addtional_data                addtional data
data_len                      data length
- * @Interface          Asynchronous.
* command_type        command type
* key_type            user confirmation value
* addtional_data      addtional data
* data_len            data length
+ * @Interface          Synchronous.
  * @remark
  * @Refer
  */
-EXPORT_API int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t *pUserConfirmData)
+EXPORT_API TelReturn tapi_sat_send_ui_user_confirm(TelHandle *handle, TelSatUiUserConfirmInfo *user_confirm_data)
 {
-       GError *error;
-       GVariant *rst = NULL;
+       GError *error = NULL;
+       TelReturn result = TEL_RETURN_SUCCESS;
+       gint sat_res, data_len;
        GVariantBuilder *builder = NULL;
-       GVariant *inner_gv = NULL;
-
+       GVariant *add_data_var =  NULL;
        int index = 0;
        gchar *data;
-       gint result, command_id, command_type, key_type, data_len;
-       GVariant *inparam = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       if (!handle || !handle->dbus_connection || !pUserConfirmData){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && user_confirm_data->command_id && user_confirm_data->command_type
+                                                                  && user_confirm_data->key_type && user_confirm_data->additional_data, TEL_RETURN_INVALID_PARAMETER);
 
-       command_id = pUserConfirmData->commandId;
-       command_type = pUserConfirmData->commandType;
-       key_type = pUserConfirmData->keyType;
-       data = (gchar *)pUserConfirmData->pAdditionalData;
-       data_len = pUserConfirmData->dataLen;
+       data = (gchar *)user_confirm_data->additional_data;
+       data_len = user_confirm_data->data_len;
 
        builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
        for (index = 0; index < data_len; index++) {
                dbg("index(%d) data(%d)", index, data[index]);
                g_variant_builder_add(builder, "y", data[index]);
        }
-       inner_gv = g_variant_builder_end(builder);
-
-       dbg("command id(%d) command type(%d) key type(%d) data len(%d)",
-                       command_id, command_type, key_type, data_len);
-       inparam = g_variant_new("(iiiv)", command_id, command_type, key_type, inner_gv);
-
-       error = NULL;
-       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
-                       DBUS_TELEPHONY_SAT_INTERFACE, "SendUserConfirm", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
-
-       if(!rst){
-               dbg( "error to send ui user confirm(%s)", error->message);
-               g_error_free (error);
-               return TAPI_API_OPERATION_FAILED;
+       add_data_var = g_variant_builder_end(builder);
+
+       telephony_sat_call_send_user_confirm_sync(handle->sat_proxy,
+                                                       user_confirm_data->command_id, user_confirm_data->command_type,
+                                                       user_confirm_data->key_type, add_data_var, &sat_res,
+                                                       NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               result = TEL_RETURN_FAILURE;
+               goto out;
        }
 
-       dbg("send ui user confirm format(%s)", g_variant_get_type_string(rst));
-
-       g_variant_get(rst, "(i)", &result);
-       if(result){
-               result = TAPI_API_SUCCESS;
-       }
-       else{
-               result = TAPI_API_OPERATION_FAILED;
-       }
-       dbg("result (%d)", result);
+       if (sat_res != TEL_SAT_RESULT_SUCCESS)
+               result = TEL_RETURN_FAILURE;
 
+out:
        return result;
 }
 
@@ -584,56 +835,38 @@ EXPORT_API int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConf
  *
  * API to send application excution result.
  *
- * @return             values in enum TapiResult_t.
- * @param[in]          TelSatAppsRetInfo_t     application result information data.
- * @Interface          Asynchronous.
+ * @return             values in enum TelReturn.
+ * @param[in]          TelSatAppsRetInfo       application result information data.
+ * @Interface          Synchronous.
  * @remark
- * @Refer              TelSatAppsRetInfo_t
+ * @Refer              TelSatAppsRetInfo
  */
-EXPORT_API int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInfo_t *pAppRetInfo)
+EXPORT_API TelReturn tapi_sat_send_app_exec_result(TelHandle *handle, TelSatAppsRetInfo *app_ret_info)
 {
-       GError *error;
-       GVariant *rst = NULL;
-
-       gint result, command_id, command_type;
+       GError *error = NULL;
+       TelReturn result = TEL_RETURN_SUCCESS;
+       gint sat_res;
        GVariant *app_exec_result = NULL;
-       GVariant *inparam = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       if (!handle || !handle->dbus_connection || !pAppRetInfo){
-               dbg("invalid parameter");
-               return TAPI_API_INVALID_INPUT;
-       }
+       app_exec_result = generate_app_exec_result_data(app_ret_info);
 
-       command_id = pAppRetInfo->commandId;
-       command_type = pAppRetInfo->commandType;
-       app_exec_result = _tapi_sat_gen_app_exec_result_data(pAppRetInfo);
+       TEL_RETURN_IF_CHECK_FAIL(handle && app_ret_info->command_id && app_ret_info->command_type && app_exec_result, TEL_RETURN_INVALID_PARAMETER);
 
-       dbg("command id(%d) command type(%d) exec_result(%s)", command_id, command_type, g_variant_get_type_string(app_exec_result));
-       inparam = g_variant_new("(iiv)", command_id, command_type, app_exec_result);
-
-       error = NULL;
-       dbg("test (%s)", g_variant_get_type_string(inparam));
-       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
-                       DBUS_TELEPHONY_SAT_INTERFACE, "SendAppExecResult", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
-
-       if(!rst){
-               dbg( "error to send app execution result(%s)", error->message);
-               g_error_free (error);
-               return TAPI_API_OPERATION_FAILED;
+       telephony_sat_call_send_app_exec_result_sync(handle->sat_proxy,
+                                                       app_ret_info->command_id, app_ret_info->command_type, app_exec_result, &sat_res,
+                                                       NULL, &error);
+       if (error) {
+               dbg("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+               result = TEL_RETURN_FAILURE;
+               goto out;
        }
 
-       dbg("send app execution result format(%s)", g_variant_get_type_string(rst));
-
-       g_variant_get(rst, "(i)", &result);
-       if(result){
-               result = TAPI_API_SUCCESS;
-       }
-       else{
-               result = TAPI_API_OPERATION_FAILED;
-       }
-       dbg("result (%d)", result);
+       if (sat_res != TEL_SAT_RESULT_SUCCESS)
+               result = TEL_RETURN_FAILURE;
 
+out:
        return result;
 }
index be5f693..106d5dd 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tapi_common.h"
-#include "TapiUtility.h"
-#include "TelSim.h"
-
-#include "common.h"
+#include "tapi_private.h"
 #include "tapi_log.h"
-#include "ITapiSim.h"
 
-static int _tel_check_tapi_state()
+#include "tapi_sim.h"
+
+#define CHECK_IF_SIM_PRESENT(status) \
+do { \
+       switch (status) { \
+       case TEL_SIM_STATUS_UNKNOWN: \
+       case TEL_SIM_STATUS_CARD_ERROR: \
+       case TEL_SIM_STATUS_CARD_NOT_PRESENT: \
+       case TEL_SIM_STATUS_CARD_REMOVED: \
+               err("SIM NOT present"); \
+               return TEL_RETURN_FAILURE; \
+       default: \
+               break; \
+       } \
+} while (0)
+
+#define CHECK_IF_SIM_INITIALIZED(status) \
+do { \
+       if (status != TEL_SIM_STATUS_SIM_INIT_COMPLETED) { \
+               err("SIM init NOT completed!!!"); \
+               return TEL_RETURN_FAILURE; \
+       } \
+} while (0)
+
+#define CHECK_LANGUAGE_VALID(language) \
+do { \
+       switch (language) { \
+               case TEL_SIM_LP_GERMAN: \
+               case TEL_SIM_LP_ENGLISH: \
+               case TEL_SIM_LP_ITALIAN: \
+               case TEL_SIM_LP_FRENCH: \
+               case TEL_SIM_LP_SPANISH: \
+               case TEL_SIM_LP_DUTCH: \
+               case TEL_SIM_LP_SWEDISH: \
+               case TEL_SIM_LP_DANISH: \
+               case TEL_SIM_LP_PORTUGUESE: \
+               case TEL_SIM_LP_FINNISH: \
+               case TEL_SIM_LP_NORWEGIAN: \
+               case TEL_SIM_LP_GREEK: \
+               case TEL_SIM_LP_TURKISH: \
+               case TEL_SIM_LP_HUNGARIAN: \
+               case TEL_SIM_LP_POLISH: \
+               case TEL_SIM_LP_KOREAN: \
+               case TEL_SIM_LP_CHINESE: \
+               case TEL_SIM_LP_RUSSIAN: \
+               case TEL_SIM_LP_JAPANESE: \
+                       break; \
+               default: \
+                       return TEL_RETURN_INVALID_PARAMETER; \
+       } \
+} while (0)
+
+static void __get_sim_status_info(TelephonySim *sim_proxy,
+       TelSimCardStatusInfo *status_info)
 {
-       return 0;
-}
-
-static int _tel_check_sim_state(TapiHandle *handle)
-{
-       GError *gerr = NULL;
-       GVariant *sync_gv = NULL;
-       int api_err = TAPI_API_SUCCESS;
-       TelSimCardStatus_t init_status = 0;
-       int changed = FALSE;
-
-       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
-                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetInitStatus", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &gerr);
-
-       if (sync_gv) {
-               g_variant_get(sync_gv, "(ib)", &init_status, &changed);
-               dbg("init_status[%d]",init_status);
-
-               switch(init_status){
-                       case TAPI_SIM_STATUS_CARD_NOT_PRESENT :
-                       case TAPI_SIM_STATUS_CARD_REMOVED :
-                               api_err = TAPI_API_SIM_NOT_FOUND;
-                               break;
-                       case TAPI_SIM_STATUS_CARD_BLOCKED :
-                       case TAPI_SIM_STATUS_CARD_ERROR :
-                               api_err = TAPI_API_SIM_CARD_ERROR;
-                               break;
-                       case TAPI_SIM_STATUS_SIM_INITIALIZING :
-                               api_err = TAPI_API_SIM_NOT_INITIALIZED;
-                               break;
-                       case TAPI_SIM_STATUS_SIM_INIT_COMPLETED :
-                               api_err = TAPI_API_SUCCESS;
-                               break;
-                       case TAPI_SIM_STATUS_SIM_PIN_REQUIRED :
-                       case TAPI_SIM_STATUS_SIM_PUK_REQUIRED :
-                       case TAPI_SIM_STATUS_SIM_NCK_REQUIRED :
-                       case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED :
-                       case TAPI_SIM_STATUS_SIM_SPCK_REQUIRED :
-                       case TAPI_SIM_STATUS_SIM_CCK_REQUIRED :
-                       case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED :
-                               api_err = TAPI_API_SIM_LOCKED;
-                               break;
-                       case TAPI_SIM_STATUS_UNKNOWN:
-                               api_err = TAPI_API_SERVICE_NOT_READY;
-                               break;
-                       default:
-                               dbg("not handled status[%d] in here",init_status);
-                               break;
+       GVariant *var = telephony_sim_get_card_status(sim_proxy);
+       if (var) {
+               GVariantIter *iter = NULL;
+               GVariant *key_value;
+               const gchar *key;
+
+               g_variant_get(var, "a{sv}", &iter);
+               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "status") == 0) {
+                               status_info->status = g_variant_get_int32(key_value);
+                       }
+                       else if (g_strcmp0(key, "change_status") == 0) {
+                               status_info->change_status = g_variant_get_int32(key_value);
+                       }
                }
-       } else {
-               dbg( "g_dbus_conn failed in _tel_check_sim_state. error (%s)", gerr->message);
-               g_error_free(gerr);
-               return TAPI_API_OPERATION_FAILED;
+               g_variant_iter_free(iter);
+       }
+       else {
+               err("var is NULL");
+               status_info->status = TEL_SIM_STATUS_UNKNOWN;
+               status_info->change_status = TEL_SIM_CHANGE_STATUS_UNKNOWN;
        }
-       dbg("api_err[%d]", api_err);
-       return api_err;
 }
 
-static void on_response_get_sim_iccid(GObject *source_object, GAsyncResult *res, gpointer user_data)
+void on_sim_property_change_handler(TelephonySim *sim,
+       GVariant *changed_properties, const gchar *invalidated_properties,
+       gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimIccIdInfo_t iccid_info;
-       gchar *iccid = NULL;
-
-       dbg("Func Entrance");
-       memset(&iccid_info, 0, sizeof(TelSimIccIdInfo_t));
+       TapiEvtCbData *evt_cb_data;
+       TelHandle *handle = user_data;
+       GVariantIter *iter;
+       const gchar *key;
+       GVariant *value;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       if (handle == NULL)
+               return;
 
-       CHECK_DEINIT(error);
+       if (g_variant_n_children(changed_properties) == 0)
+               return;
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+       dbg("Properties Changed:");
+
+       g_variant_get(changed_properties, "a{sv}", &iter);
+       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+               char *evt_id;
+
+               dbg("%s", key);
+
+               evt_id = g_strdup_printf("%s:%s",
+                                       TELEPHONY_SIM_INTERFACE,
+                                       key);
+               /*
+                * If an event callback is registered process
+                * g-properties-changed event
+                */
+               evt_cb_data = g_hash_table_lookup(handle->evt_table,
+                                                       evt_id);
+               if (!evt_cb_data) {
+                       dbg("Application not registered on event %s",
+                                                       evt_id);
+                       g_free(evt_id);
+                       continue;
                }
 
-               if (error)
-                       g_error_free(error);
+               if (g_strcmp0("card_status", key) == 0) {
+                       TelSimCardStatusInfo status_info = {0, };
 
-               free(evt_cb_data);
-               return;
-       }
+                       __get_sim_status_info(sim, &status_info);
+                       dbg("SIM status changed!! SIM status: [%d], Card changed: [%d]",
+                               status_info.status, status_info.change_status);
 
-       g_variant_get(dbus_result, "(is)", &result, &iccid);
-       iccid_info.icc_length = strlen((const char*)iccid);
-       if(iccid_info.icc_length > TAPI_SIM_ICCID_LEN_MAX){
-               dbg("current tapi support 20 byte but received length[%d] so changed");
-               iccid_info.icc_length = TAPI_SIM_ICCID_LEN_MAX;
-       }
-       memcpy(iccid_info.icc_num, iccid, iccid_info.icc_length);
+                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &status_info);
+               }
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &iccid_info, evt_cb_data->user_data);
+               g_free(evt_id);
        }
-
-       free(evt_cb_data);
+       g_variant_iter_free(iter);
 }
 
-static void on_response_get_sim_language(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_init_info(TelHandle *handle, TelSimCardStatusInfo *status_info)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimLanguagePreferenceCode_t lang = TAPI_SIM_LP_LANG_UNSPECIFIED;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && status_info, TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get(dbus_result, "(ii)", &result, &lang);
+       /* Fetch SIM Init status and Card changed information from DBUS property */
+       __get_sim_status_info(handle->sim_proxy, status_info);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &lang, evt_cb_data->user_data);
-       }
+       dbg("SIM - Status: [%d] Change status: [%d]",
+               status_info->status, status_info->change_status);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_set_sim_language(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_type(TelHandle *handle, TelSimCardType *card_type)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       TelSimCardStatusInfo status_info = {0,};
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && card_type, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       g_variant_get(dbus_result, "(i)", &result);
+       /* Fetch Card type from DBUS property */
+       *card_type = telephony_sim_get_sim_type(handle->sim_proxy);
+       dbg("SIM Card type: [%s]",
+               (*card_type == TEL_SIM_CARD_TYPE_GSM ? "GSM"
+               : (*card_type == TEL_SIM_CARD_TYPE_USIM ? "USIM"
+               : (*card_type == TEL_SIM_CARD_TYPE_RUIM ? "RUSM"
+               : (*card_type == TEL_SIM_CARD_TYPE_ISIM ? "ISIM"
+               : "UNKNOWN")))));
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sim_callforwarding_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_imsi(TelHandle *handle, TelSimImsiInfo *imsi)
 {
+       const gchar *mcc = NULL, *mnc = NULL, *msin = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-       GVariant *value = NULL;
-       GVariantIter *cphs_iter = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       const gchar *str_value = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimCallForwardingResp_t cf;
-       int i =0;
-
-       memset(&cf, 0, sizeof(TelSimCallForwardingResp_t));
-
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       TelSimCardStatusInfo status_info = {0,};
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
-       dbg("dbus_result format(%s)", g_variant_get_type_string(dbus_result));
-       g_variant_get(dbus_result, "(ibaa{sv}a{sv})", &result, &cf.b_cphs, &iter, &cphs_iter);
+       TEL_RETURN_IF_CHECK_FAIL(handle && imsi, TEL_RETURN_INVALID_PARAMETER);
 
-       if( cf.b_cphs ) {
-               while (g_variant_iter_loop(cphs_iter, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "b_line1")) {
-                               cf.cphs_cf.b_line1 = g_variant_get_boolean(value);
-                       }
-                       if (!g_strcmp0(key, "b_line2")) {
-                               cf.cphs_cf.b_line2 = g_variant_get_boolean(value);
-                       }
-                       if (!g_strcmp0(key, "b_fax")) {
-                               cf.cphs_cf.b_fax = g_variant_get_boolean(value);
-                       }
-                       if (!g_strcmp0(key, "b_data")) {
-                               cf.cphs_cf.b_data = g_variant_get_boolean(value);
-                       }
-               }
-       } else {
-               cf.cf_list.profile_count = g_variant_iter_n_children(iter);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                               if (!g_strcmp0(key, "rec_index")) {
-                                       cf.cf_list.cf[i].rec_index = g_variant_get_int32(value);
-                               }
-                               if (!g_strcmp0(key, "msp_num")) {
-                                       cf.cf_list.cf[i].msp_num = g_variant_get_byte(value);
-                               }
-                               if (!g_strcmp0(key, "cfu_status")) {
-                                       cf.cf_list.cf[i].cfu_status = g_variant_get_byte(value);
-                               }
-                               if (!g_strcmp0(key, "cfu_num")) {
-                                       str_value = g_variant_get_string(value, NULL);
-                                       snprintf(cf.cf_list.cf[i].cfu_num, strlen((const char*) str_value) + 1, "%s", str_value);
-                               }
-                               if (!g_strcmp0(key, "ton")) {
-                                       cf.cf_list.cf[i].ton = g_variant_get_int32(value);
-                               }
-                               if (!g_strcmp0(key, "npi")) {
-                                       cf.cf_list.cf[i].npi = g_variant_get_int32(value);
-                               }
-                               if (!g_strcmp0(key, "cc2_id")) {
-                                       cf.cf_list.cf[i].cc2_id = g_variant_get_byte(value);
-                               }
-                               if (!g_strcmp0(key, "ext7_id")) {
-                                       cf.cf_list.cf[i].ext7_id = g_variant_get_byte(value);
-                               }
+       /* Fetch MCC, MNC and MSIN from DBUS property */
+       mcc = telephony_sim_get_mcc(handle->sim_proxy);
+       if (mcc && strlen(mcc)) {
+               mnc = telephony_sim_get_mnc(handle->sim_proxy);
+               if (mnc && strlen(mnc)) {
+                       msin = telephony_sim_get_msin(handle->sim_proxy);
+                       if (msin && strlen(msin)) {
+                               goto imsi_fetched;
                        }
-                       i++;
-                       g_variant_iter_free(iter_row);
                }
-               g_variant_iter_free(iter);
        }
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cf, evt_cb_data->user_data);
+       telephony_sim_call_get_imsi_sync(handle->sim_proxy,
+               &sim_result, (gchar **)&mcc, (gchar **)&mnc, (gchar **)&msin,
+               NULL, &error);
+       if (error) {
+               err("DBUS Error - Code: [%d] Message: [%s], ", error->code, error->message);
+               g_error_free(error);
+               return TEL_SIM_RESULT_FAILURE;
+       }
+       else if (sim_result != TEL_SIM_RESULT_SUCCESS) {
+               err("Failed to get IMSI - sim_result: [%d]", sim_result);
+               return TEL_SIM_RESULT_FAILURE;
        }
 
-       free(evt_cb_data);
+imsi_fetched:
+       /* Update MCC, MNC and MSIN */
+       TEL_RETURN_IF_CHECK_FAIL((strlen(mcc) < TEL_SIM_MCC_MNC_LEN_MAX)
+               /* MNC can be 2 or 3 digits, considering the lower limit */
+               || (strlen(mnc) < (TEL_SIM_MCC_MNC_LEN_MAX - 1))
+               || (strlen(msin) <= TEL_SIM_MSIN_LEN_MAX), TEL_SIM_RESULT_FAILURE);
+
+       memcpy(imsi->mcc, mcc, strlen(mcc)+1);
+       memcpy(imsi->mnc, mnc, strlen(mnc)+1);
+       memcpy(imsi->msin, msin, strlen(msin)+1);
+
+       dbg("MCC: [%s] MNC: [%s] MSIN: [%s]", imsi->mcc, imsi->mnc, imsi->msin);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_set_sim_callforwarding_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_ecc(TelHandle *handle, TelSimEccList *ecc)
 {
+       GVariant *ecc_list = NULL;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       TelSimCardStatusInfo status_info = {0,};
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       dbg("Entry");
 
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && ecc, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       telephony_sim_call_get_ecc_sync(handle->sim_proxy,
+                                       &sim_result, &ecc->count, &ecc_list,
+                                       NULL, &error);
+       if (error) {
+               err("DBUS Error - Code: [%d] Message: [%s], ", error->code, error->message);
 
-               if (error)
-                       g_error_free(error);
+               /* Free 'error' */
+               g_error_free(error);
 
-               free(evt_cb_data);
-               return;
+               return TEL_RETURN_FAILURE;
        }
 
-       g_variant_get(dbus_result, "(i)", &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
-}
-
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get ECC list - sim_result: [%d]", sim_result);
 
-static void on_response_get_sim_messagewaiting_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-       GVariant *value = NULL;
-       GVariantIter *cphs_iter = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimMessageWaitingResp_t mw;
-       int i =0;
-
-       dbg("Func Entrance");
-       memset(&mw, 0, sizeof(TelSimMessageWaitingResp_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
+               /* Free resources */
+               g_variant_unref(ecc_list);
 
-               free(evt_cb_data);
-               return;
+               return TEL_RETURN_FAILURE;
        }
 
-       dbg("dbus_result format(%s)", g_variant_get_type_string(dbus_result));
-       g_variant_get(dbus_result, "(ibaa{sv}a{sv})", &result, &mw.b_cphs, &iter, &cphs_iter);
-
-       if( mw.b_cphs ) {
-               while (g_variant_iter_loop(cphs_iter, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "b_voice1")) {
-                               mw.cphs_mw.b_voice1 = g_variant_get_boolean(value);
-                       }
-                       if (!g_strcmp0(key, "b_voice2")) {
-                               mw.cphs_mw.b_voice2 = g_variant_get_boolean(value);
-                       }
-                       if (!g_strcmp0(key, "b_fax")) {
-                               mw.cphs_mw.b_fax = g_variant_get_boolean(value);
-                       }
-                       if (!g_strcmp0(key, "b_data")) {
-                               mw.cphs_mw.b_data = g_variant_get_boolean(value);
-                       }
-               }
+       if ((ecc->count != 0)
+                       && (ecc->count <= TEL_SIM_ECC_LIST_MAX)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
 
-       } else {
-               mw.mw_list.profile_count = g_variant_iter_n_children(iter);
+               dbg("ECC list count: [%d]", ecc->count);
 
+               g_variant_get(ecc_list, "aa{sv}", &iter);
                while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                               if (!g_strcmp0(key, "rec_index")) {
-                                       mw.mw_list.mw[i].rec_index = g_variant_get_int32(value);
-                               }
-                               if (!g_strcmp0(key, "indicator_status")) {
-                                       mw.mw_list.mw[i].indicator_status = g_variant_get_byte(value);
-                               }
-                               if (!g_strcmp0(key, "voice_count")) {
-                                       mw.mw_list.mw[i].voice_count = g_variant_get_int32(value);
-                               }
-                               if (!g_strcmp0(key, "fax_count")) {
-                                       mw.mw_list.mw[i].fax_count = g_variant_get_int32(value);
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "number") == 0) {
+                                       g_strlcpy(ecc->list[i].number,
+                                               g_variant_get_string(key_value, NULL),
+                                               TEL_SIM_ECC_NUMBER_LEN_MAX + 1);
                                }
-                               if (!g_strcmp0(key, "email_count")) {
-                                       mw.mw_list.mw[i].email_count = g_variant_get_int32(value);
-                               }
-                               if (!g_strcmp0(key, "other_count")) {
-                                       mw.mw_list.mw[i].other_count = g_variant_get_int32(value);
+
+                               if (g_strcmp0(key, "name") == 0) {
+                                       g_strlcpy(ecc->list[i].name,
+                                               g_variant_get_string(key_value, NULL),
+                                               TEL_SIM_ECC_TEXT_MAX + 1);
                                }
-                               if (!g_strcmp0(key, "video_count")) {
-                                       mw.mw_list.mw[i].video_count = g_variant_get_int32(value);
+
+                               if (g_strcmp0(key, "category") == 0) {
+                                       ecc->list[i].category = g_variant_get_int32(key_value);
                                }
                        }
                        i++;
@@ -430,2044 +314,1774 @@ static void on_response_get_sim_messagewaiting_info(GObject *source_object, GAsy
                }
                g_variant_iter_free(iter);
        }
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mw, evt_cb_data->user_data);
+       else {
+               warn("ECC list count is NOT valid - Count: [%d]", ecc->count);
+               ecc->count = 0;
        }
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_set_sim_messagewaiting_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_get_iccid(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       gchar *iccid = NULL;
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("Entry");
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Finish and extract the response data */
+       telephony_sim_call_get_iccid_finish(handle->sim_proxy,
+                                       &sim_result, &iccid, res, &error);
 
-               if (error)
-                       g_error_free(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM ICCID - sim_result: [%d]", sim_result);
 
-               free(evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
                return;
        }
 
-       g_variant_get(dbus_result, "(i)", &result);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       /* Sanity check for ICCID */
+       if (strlen(iccid) > TEL_SIM_ICCID_LEN_MAX) {
+               err("Received invalid ICCID: [%s] Length: [%d]", iccid, strlen(iccid));
+               sim_result = TEL_SIM_RESULT_FAILURE;
+               g_free(iccid);                  /* Send NULL iccid to in failure case */
+               iccid = NULL;
        }
+       else {
+               dbg("Received ICCID: [%s] Length: [%d]", iccid, strlen(iccid));
+       }
+
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, iccid);
 
-       free(evt_cb_data);
+       /* Free resources */
+       g_free(iccid);
 }
 
-static void on_response_get_sim_mailbox_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_iccid(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       const gchar *str_value = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimMailboxList_t list;
-       int i = 0;
-       gboolean b_cphs = 0;
-
-       dbg("Func Entrance");
-       memset(&list, 0, sizeof(TelSimMailboxList_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get(dbus_result, "(ibaa{sv})", &result, &b_cphs, &iter);
-       list.count = g_variant_iter_n_children(iter);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       i = 0;
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       list.list[i].b_cphs = b_cphs;
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-                       if (!g_strcmp0(key, "rec_index")) {
-                               list.list[i].rec_index = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "profile_num")) {
-                               list.list[i].profile_num = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "mb_type")) {
-                               list.list[i].mb_type = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "alpha_id_max_len")) {
-                               list.list[i].alpha_id_max_len = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "alpha_id")) {
-                               str_value = g_variant_get_string(value, NULL);
-                               snprintf(list.list[i].alpha_id, strlen((const char*)str_value) + 1, "%s", str_value);
-                       }
-                       if (!g_strcmp0(key, "ton")) {
-                               list.list[i].ton = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "npi")) {
-                               list.list[i].npi = g_variant_get_int32(value);
-                       }
-                       if (!g_strcmp0(key, "num")) {
-                               str_value = g_variant_get_string(value, NULL);
-                               snprintf(list.list[i].num, strlen((const char*)str_value) + 1, "%s", str_value);
-                       }
-                       if (!g_strcmp0(key, "cc_id")) {
-                               list.list[i].cc_id = g_variant_get_byte(value);
-                       }
-                       if (!g_strcmp0(key, "ext1_id")) {
-                               list.list[i].ext1_id = g_variant_get_byte(value);
-                       }
-               }
-               i++;
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
+       /* DBUS Request - GET (ICCID) */
+       telephony_sim_call_get_iccid(handle->sim_proxy,
+               NULL, on_response_sim_get_iccid, rsp_cb_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
-       }
-
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_set_sim_mailbox_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_get_language(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       gint language;  /* aligned to TelSimLanguagePreferenceCode */
 
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Finish and extract the response data */
+       telephony_sim_call_get_language_finish(handle->sim_proxy,
+                                       &sim_result, &language, res, &error);
 
-               if (error)
-                       g_error_free(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM Language - sim_result: [%d]", sim_result);
 
-               free(evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
                return;
        }
+       dbg("Language: [0x%02x]", language);
 
-       g_variant_get(dbus_result, "(i)", &result);
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &language);
+}
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
-       }
+EXPORT_API TelReturn tapi_sim_get_language(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       free(evt_cb_data);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       /* DBUS Request - GET (Language) */
+       telephony_sim_call_get_language(handle->sim_proxy,
+                       NULL, on_response_sim_get_language, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sim_cphs_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_set_language(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimCphsInfo_t cphs;
+       /* Finish and extract the response data */
+       telephony_sim_call_set_language_finish(handle->sim_proxy,
+                                       &sim_result, res, &error);
 
-       dbg("Func Entrance");
-       memset(&cphs, 0, sizeof(TelSimCphsInfo_t));
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result)
+               err("Failed to set SIM Language - sim_result: [%d]", sim_result);
+       else
+               dbg("SIM Language set");
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+}
+
+EXPORT_API TelReturn tapi_sim_set_language(TelHandle *handle,
+       TelSimLanguagePreferenceCode language, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get(dbus_result, "(iibbbbb)", &result, &cphs.CphsPhase,
-                       &cphs.CphsServiceTable.bOperatorNameShortForm, &cphs.CphsServiceTable.bMailBoxNumbers,
-                       &cphs.CphsServiceTable.bServiceStringTable,
-                       &cphs.CphsServiceTable.bCustomerServiceProfile,
-                       &cphs.CphsServiceTable.bInformationNumbers);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cphs, evt_cb_data->user_data);
-       }
+       CHECK_LANGUAGE_VALID(language);
 
-       free(evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       /* DBUS Request - SET (Language) */
+       telephony_sim_call_set_language(handle->sim_proxy,
+                       language, NULL, on_response_sim_set_language, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sim_msisdn(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_get_callforwarding_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+
+       GVariant *cf_list = NULL;
+       TelSimCfisList cf_info;
+
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       const gchar *str_value = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimMsisdnList_t list;
-       int i = 0;
-
-       dbg("Func Entrance");
-       memset(&list, 0, sizeof(TelSimMsisdnList_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
+
+       memset(&cf_info, 0x0, sizeof(TelSimCfisList));
+
+       /* Finish and extract the response data */
+       telephony_sim_call_get_call_forwarding_info_finish(handle->sim_proxy,
+               &sim_result, &cf_info.profile_count, &cf_list, res, &error);
 
-               if (error)
-                       g_error_free(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM Call forwarding info - sim_result: [%d]", sim_result);
+
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+
+               /* Free resources */
+               g_variant_unref(cf_list);
 
-               free(evt_cb_data);
                return;
        }
 
-       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
-       list.count = g_variant_iter_n_children(iter);
+       /* Validate Response data */
+       /**
+        * The Profile Identity shall be between 1 and 4 as defined
+        * in TS 23.097 for MSP
+        */
+       if ((cf_info.profile_count != 0)
+                       && (cf_info.profile_count <= TEL_SIM_MSP_CNT_MAX)
+                       && (g_variant_n_children(cf_list) == cf_info.profile_count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
 
-       /*this can be changed regarding concept*/
-       if(list.count > 3){
-               dbg("current list.count[%d] but we fixed maximum with 3", list.count);
-               list.count = 3;
-       }
-       /*this can be changed regarding concept*/
+               dbg("Call forwarding list count: [%d]", cf_info.profile_count);
 
-       i = 0;
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "name")) {
-                               str_value = g_variant_get_string(value, NULL);
-                               snprintf(list.list[i].name, strlen((const char*)str_value) + 1, "%s", str_value);
-                       }
-                       if (!g_strcmp0(key, "number")) {
-                               str_value = g_variant_get_string(value, NULL);
-                               snprintf(list.list[i].num, strlen((const char*)str_value) + 1, "%s", str_value);
+               g_variant_get(cf_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "profile_id") == 0) {
+                                       cf_info.cf[i].profile_id = g_variant_get_byte(key_value);
+                               }
+
+                               if (g_strcmp0(key, "indication") == 0) {
+                                       memcpy(cf_info.cf[i].indication,
+                                               g_variant_get_data(key_value),
+                                               TEL_SIM_CALL_FORWARDING_TYPE_MAX);
+                               }
                        }
+                       i++;
+                       g_variant_iter_free(iter_row);
                }
-               i++;
-               g_variant_iter_free(iter_row);
-               /*this can be changed regarding concept*/
-               if (i == 3)
-                       break;
-               /*this can be changed regarding concept*/
-       }
-       g_variant_iter_free(iter);
-
-       dbg("msisdn count[%d]", list.count);
-       for(i =0; i < list.count; i++){
-               dbg("msisdn[%d]-name[%s]number[%s]",i,list.list[i].name, list.list[i].num);
+               g_variant_iter_free(iter);
        }
+       else {
+               err("Invalid Profile count: [%d]", cf_info.profile_count);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+               cf_info.profile_count = 0;
+               sim_result = TEL_SIM_RESULT_FAILURE;
        }
 
-       free(evt_cb_data);
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &cf_info);
 }
 
-static void on_response_get_sim_oplmnwact(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_callforwarding_info(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       const gchar *str_value = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimOplmnwactList_t list;
-       int i = 0;
-
-       dbg("Func Entrance");
-       memset(&list, 0, sizeof(TelSimOplmnwactList_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
-       list.count = g_variant_iter_n_children(iter);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       i = 0;
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "plmn")) {
-                               str_value = g_variant_get_string(value, NULL);
-                               snprintf(list.list[i].plmn, strlen((const char*)str_value) + 1, "%s", str_value);
-                       }
-                       if (!g_strcmp0(key, "b_umst")) {
-                               list.list[i].b_umts = g_variant_get_boolean(value);
-                       }
-                       if (!g_strcmp0(key, "b_gsm")) {
-                               list.list[i].b_gsm = g_variant_get_boolean(value);
-                       }
-               }
-               i++;
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
-       }
+       /* DBUS Request - GET (Call Forwarding info) */
+       telephony_sim_call_get_call_forwarding_info(handle->sim_proxy,
+               NULL, on_response_sim_get_callforwarding_info, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sim_spn(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_get_messagewaiting_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+
+       GVariant *mw_list = NULL;
+       TelSimMwisList mw_info;
+
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimSpn_t spn_info;
-       gchar *spn = NULL;
-       guchar dc = 0;
+       memset(&mw_info, 0x0, sizeof(TelSimMwisList));
 
-       memset(&spn_info, 0, sizeof(TelSimSpn_t));
+       /* Finish and extract the response data */
+       telephony_sim_call_get_message_waiting_info_finish(handle->sim_proxy,
+               &sim_result, &mw_info.profile_count, &mw_list, res, &error);
 
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM Message Waiting info - sim_result: [%d]", sim_result);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-               if (error)
-                       g_error_free(error);
+               /* Free resources */
+               g_variant_unref(mw_list);
 
-               free(evt_cb_data);
                return;
        }
 
-       g_variant_get(dbus_result, "(iys)", &result, &dc, &spn);
+       /* Validate Response data */
+       /**
+        * The Profile Identity shall be between 1 and 4 as defined
+        * in TS 23.097 for MSP
+        */
+       if ((mw_info.profile_count != 0)
+                       && (mw_info.profile_count <= TEL_SIM_MSP_CNT_MAX)
+                       && (g_variant_n_children(mw_list) == mw_info.profile_count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
 
-       dbg("result[%d]", result);
-       if ( result == TAPI_SIM_ACCESS_SUCCESS) {
-               dbg("spn[%s], display condition[0x%x]", spn, dc);
-               spn_info.display_condition = dc;
-               snprintf((char *)spn_info.spn, strlen((const char*)spn)+1, "%s", spn);
-       }
+               dbg("Message Waiting list count: [%d]", mw_info.profile_count);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &spn_info, evt_cb_data->user_data);
+               g_variant_get(mw_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "profile_id") == 0) {
+                                       mw_info.mw[i].profile_id = g_variant_get_byte(key_value);
+                               }
+                               else if (g_strcmp0(key, "count_valid") == 0) {
+                                       mw_info.mw[i].count_valid = g_variant_get_boolean(key_value);
+                               }
+                               else if (g_strcmp0(key, "msg_waiting") == 0) {
+                                       GVariantIter *iter2 = NULL, *iter_row2 = NULL;
+                                       GVariant *key_value2;
+                                       const gchar *key2;
+                                       guint j = 0;
+
+                                       g_variant_get(key_value, "aa{sv}", &iter2);
+                                       while (g_variant_iter_next(iter2, "a{sv}", &iter_row2)) {
+                                               while (g_variant_iter_loop(iter_row2, "{sv}", &key2, &key_value2)) {
+                                                       if (g_strcmp0(key2, "indication") == 0) {
+                                                               mw_info.mw[i].msg_waiting[j].indication =
+                                                                       g_variant_get_boolean(key_value2);
+                                                       }
+                                                       else if (g_strcmp0(key2, "count") == 0) {
+                                                               mw_info.mw[i].msg_waiting[j].count =
+                                                                       g_variant_get_byte(key_value2);
+                                                       }
+                                               }
+                                               j++;
+                                               g_variant_iter_free(iter_row2);
+                                       }
+                                       g_variant_iter_free(iter2);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+       }
+       else {
+               err("Invalid Profile count: [%d]", mw_info.profile_count);
+               mw_info.profile_count = 0;
+               sim_result = TEL_SIM_RESULT_FAILURE;
        }
 
-       free(evt_cb_data);
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &mw_info);
 }
 
-static void on_response_get_sim_cphs_netname(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_messagewaiting_info(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimCphsNetName_t cphs_net;
-       gchar *full_name = NULL;
-       gchar *short_name = NULL;
+       dbg("Entry");
 
-       memset(&cphs_net, 0, sizeof(TelSimCphsNetName_t));
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       dbg("Func Entrance");
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-               if (error)
-                       g_error_free(error);
+       /* DBUS Request - GET (Message Waiting info) */
+       telephony_sim_call_get_message_waiting_info(handle->sim_proxy,
+               NULL, on_response_sim_get_messagewaiting_info, rsp_cb_data);
 
-               free(evt_cb_data);
-               return;
-       }
+       return TEL_RETURN_SUCCESS;
+}
 
-       g_variant_get(dbus_result, "(iss)", &result, &full_name, &short_name);
+static void on_response_sim_set_messagewaiting_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("result[%d]", result);
-       if ( result == TAPI_SIM_ACCESS_SUCCESS) {
-               dbg("full name[%s], short name[%s]", full_name, short_name);
-               snprintf((char *)cphs_net.full_name, strlen((const char*)full_name)+1, "%s", full_name);
-               snprintf((char *)cphs_net.short_name, strlen((const char*)short_name)+1, "%s", short_name);
-       }
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cphs_net, evt_cb_data->user_data);
-       }
+       /* Finish and extract the response data */
+       telephony_sim_call_set_message_waiting_info_finish(handle->sim_proxy,
+                                       &sim_result, res, &error);
+
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
 
-       free(evt_cb_data);
+       dbg("Set Message waiting info: [%s]",
+                       (sim_result == TEL_SIM_RESULT_SUCCESS ? "SUCCESS" : "FAIL"));
+
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 }
 
-static void on_response_req_sim_authentication(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_set_messagewaiting_info(TelHandle *handle,
+       TelSimMwis *req_mw, TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       GVariantIter *iter = NULL;
-       GVariant *ak_gv = NULL;
-       GVariant *cp_gv = NULL;
-       GVariant *it_gv = NULL;
-       GVariant *resp_gv = NULL;
-       GVariant *ak = NULL;
-       GVariant *cp = NULL;
-       GVariant *it = NULL;
-       GVariant *resp = NULL;
-       guchar rt_i;
-       int i = 0;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimAuthenticationResponse_t auth_resp;
-
-       dbg("Func Entrance");
-       memset(&auth_resp, 0, sizeof(TelSimAuthenticationResponse_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       TapiRespCbData *rsp_cb_data = NULL;
+       GVariant *var_mw;
+       GVariantBuilder builder;
+       unsigned int i;
+       TelSimCardStatusInfo status_info = {0,};
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && req_mw && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));
-       g_variant_get(dbus_result, "(iii@v@v@v@v)", &result, &auth_resp.auth_type,
-                       &auth_resp.auth_result, &ak_gv, &cp_gv, &it_gv, &resp_gv);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       ak = g_variant_get_variant(ak_gv);
-       g_variant_get(ak, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               auth_resp.authentication_key[i] = rt_i;
-               dbg("auth_resp.authentication_key[%d]=[0x%02x]", i, auth_resp.authentication_key[i]);
-               i++;
-       }
-       auth_resp.authentication_key_length = i;
-       g_variant_iter_free(iter);
-       i = 0;
+       dbg("Profile ID: [%d] ", req_mw->profile_id);
 
-       cp = g_variant_get_variant(cp_gv);
-       g_variant_get(cp, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               auth_resp.cipher_data[i] = rt_i;
-               dbg("auth_resp.cipher_data[%d]=[0x%02x]", i, auth_resp.cipher_data[i]);
-               i++;
+       g_variant_builder_init(&builder, G_VARIANT_TYPE("a(by)"));
+       for (i = 0; i < TEL_SIM_MAILBOX_TYPE_MAX; i++) {
+               g_variant_builder_add(&builder, "(by)",
+                               req_mw->msg_waiting[i].indication,
+                               req_mw->msg_waiting[i].count);
        }
-       auth_resp.cipher_length = i;
-       g_variant_iter_free(iter);
-       i = 0;
 
-       it = g_variant_get_variant(it_gv);
-       g_variant_get(it, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               auth_resp.integrity_data[i] = rt_i;
-               dbg("auth_resp.integrity_data[%d]=[0x%02x]", i, auth_resp.integrity_data[i]);
-               i++;
-       }
-       auth_resp.integrity_length = i;
-       g_variant_iter_free(iter);
-       i = 0;
+       var_mw = g_variant_builder_end(&builder);
 
-       resp = g_variant_get_variant(resp_gv);
-       g_variant_get(resp, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               auth_resp.resp_data[i] = rt_i;
-               dbg("auth_resp.resp_data[%d]=[0x%02x]", i, auth_resp.resp_data[i]);
-               i++;
-       }
-       auth_resp.resp_length = i;
-       g_variant_iter_free(iter);
-       i = 0;
+       /* DBUS Request - SET (Message Waiting info) */
+       telephony_sim_call_set_message_waiting_info(handle->sim_proxy,
+                       req_mw->profile_id, req_mw->count_valid, var_mw, NULL,
+                       on_response_sim_set_messagewaiting_info, rsp_cb_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &auth_resp, evt_cb_data->user_data);
-       }
+       g_variant_unref(var_mw);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_verify_sim_pins(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_get_mailbox_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
-       TelSimSecResult_t sec_rt;
+       GVariant *mb_list = NULL;
+       TelSimMailboxList mb_info;
 
-       dbg("Func Entrance");
-       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       memset(&mb_info, 0x0, sizeof(TelSimMailboxList));
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Finish and extract the response data */
+       telephony_sim_call_get_mailbox_info_finish(handle->sim_proxy,
+               &sim_result, &mb_info.alpha_id_max_len, &mb_info.count, &mb_list,
+               res, &error);
 
-               if (error)
-                       g_error_free(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM Mailbox info - sim_result: [%d]", sim_result);
 
-               free(evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
                return;
        }
 
-       g_variant_get(dbus_result, "(iii)", &result, &sec_rt.type, &sec_rt.retry_count);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &sec_rt, evt_cb_data->user_data);
-       }
+       /* Validate Response data */
+       /**
+        * The Profile Identity shall be between 1 and 4 as defined
+        * in TS 23.097 for MSP
+        */
+       if ((mb_info.count != 0)
+                       && (mb_info.count == g_variant_n_children(mb_list))) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
 
-       free(evt_cb_data);
-}
+               dbg("Mailbox list count: [%d]", mb_info.count);
 
-static void on_response_verify_sim_puks(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+               g_variant_get(mb_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "profile_id") == 0) {
+                                       mb_info.list[i].profile_id = g_variant_get_int32(key_value);
+                               }
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
-       TelSimSecResult_t sec_rt;
+                               if (g_strcmp0(key, "mb_type") == 0) {
+                                       mb_info.list[i].mb_type = g_variant_get_int32(key_value);
+                               }
 
-       dbg("Func Entrance");
-       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
+                               if (g_strcmp0(key, "alpha_id_len") == 0) {
+                                       mb_info.list[i].alpha_id_len = g_variant_get_int32(key_value);
+                               }
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+                               if (g_strcmp0(key, "alpha_id") == 0) {
+                                       memcpy(mb_info.list[i].alpha_id,
+                                               g_variant_get_data(key_value),
+                                               TEL_SIM_ALPHA_ID_LEN_MAX);
+                               }
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                               if (g_strcmp0(key, "number") == 0) {
+                                       memcpy(mb_info.list[i].number,
+                                               g_variant_get_data(key_value),
+                                               TEL_SIM_MBDN_NUM_LEN_MAX);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
                }
-
-               if (error)
-                       g_error_free(error);
-
-               free(evt_cb_data);
-               return;
+               g_variant_iter_free(iter);
        }
+       else {
+               err("Invalid Mailbox list count: [%d]", mb_info.count);
 
-       g_variant_get(dbus_result, "(iii)", &result, &sec_rt.type, &sec_rt.retry_count);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &sec_rt, evt_cb_data->user_data);
+               sim_result = TEL_SIM_RESULT_FAILURE;
+               mb_info.count = 0;
        }
 
-       free(evt_cb_data);
+       /* Free resources */
+       g_variant_unref(mb_list);
+
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &mb_info);
 }
 
-static void on_response_change_sim_pins(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+EXPORT_API TelReturn tapi_sim_get_mailbox_info(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
-       TelSimSecResult_t sec_rt;
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       dbg("Func Entrance");
-       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
-
-               if (error)
-                       g_error_free(error);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-               free(evt_cb_data);
-               return;
-       }
-
-       g_variant_get(dbus_result, "(iii)", &result, &sec_rt.type, &sec_rt.retry_count);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &sec_rt, evt_cb_data->user_data);
-       }
+       /* DBUS Request - GET (Mailbox info) */
+       telephony_sim_call_get_mailbox_info(handle->sim_proxy,
+                       NULL, on_response_sim_get_mailbox_info, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_disable_sim_facility(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_set_mailbox_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
-       TelSimFacilityResult_t f_rt;
+       /* Finish and extract the response data */
+       telephony_sim_call_set_mailbox_info_finish(handle->sim_proxy, &sim_result, res, &error);
 
-       dbg("Func Entrance");
-       memset(&f_rt, 0, sizeof(TelSimFacilityResult_t));
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("Set Mailbox info: [%s]",
+                       (sim_result == TEL_SIM_RESULT_SUCCESS ? "SUCCESS" : "FAIL"));
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+}
 
-               if (error)
-                       g_error_free(error);
+EXPORT_API TelReturn tapi_sim_set_mailbox_info(TelHandle *handle,
+       TelSimMailBoxNumber *req_mb,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-               free(evt_cb_data);
-               return;
-       }
+       dbg("Entry");
 
-       g_variant_get(dbus_result, "(iii)", &result, &f_rt.type, &f_rt.retry_count);
+       TEL_RETURN_IF_CHECK_FAIL(handle && req_mb && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &f_rt, evt_cb_data->user_data);
-       }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       free(evt_cb_data);
+       dbg("Profile ID: [%d] mailbox type: [%d]  Alpha ID Length:[%d] "
+               "Alpha ID: [%s] Number: [%s]", req_mb->profile_id,
+               req_mb->mb_type, req_mb->alpha_id_len, req_mb->alpha_id,
+               req_mb->number);
+
+       /* DBUS Request - SET (Mailbox info) */
+       telephony_sim_call_set_mailbox_info(handle->sim_proxy,
+               req_mb->profile_id, req_mb->mb_type, req_mb->alpha_id_len,
+               req_mb->alpha_id, req_mb->number, NULL,
+               on_response_sim_set_mailbox_info, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_enable_sim_facility(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_get_msisdn(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
-       TelSimFacilityResult_t f_rt;
+       GVariant *msisdn_list = NULL;
+       TelSimMsisdnList msisdn_info;
 
-       dbg("Func Entrance");
-       memset(&f_rt, 0, sizeof(TelSimFacilityResult_t));
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       guint i = 0;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       memset(&msisdn_info, 0x0, sizeof(TelSimMsisdnList));
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Finish and extract the response data */
+       telephony_sim_call_get_msisdn_finish(handle->sim_proxy,
+               &sim_result, &msisdn_info.count, &msisdn_list, res, &error);
 
-               if (error)
-                       g_error_free(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM MSISDN - sim_result: [%d]", sim_result);
 
-               free(evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
                return;
        }
 
-       g_variant_get(dbus_result, "(iii)", &result, &f_rt.type, &f_rt.retry_count);
+       if ((msisdn_info.count != 0)
+                       && (msisdn_info.count == g_variant_n_children(msisdn_list))) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("MSISDN list count: [%d]", msisdn_info.count);
+               msisdn_info.list = g_malloc0(msisdn_info.count * sizeof(TelSimMsisdnList));
+
+               g_variant_get(msisdn_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "alpha_id") == 0) {
+                                       msisdn_info.list[i].alpha_id =
+                                               g_strdup(g_variant_get_string(key_value, NULL));
+                               }
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &f_rt, evt_cb_data->user_data);
+                               if (g_strcmp0(key, "num") == 0) {
+                                       msisdn_info.list[i].num =
+                                               g_strdup(g_variant_get_string(key_value, NULL));
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
        }
+       else {
+               err("Invalid MSISDN list count: [%d]", msisdn_info.count);
 
-       free(evt_cb_data);
-}
+               sim_result = TEL_SIM_RESULT_FAILURE;
+               msisdn_info.count = 0;
+       }
 
-static void on_response_get_sim_facility(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       /* Free resources */
+       g_variant_unref(msisdn_list);
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
-       TelSimFacilityInfo_t fi;
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &msisdn_info);
 
-       dbg("Func Entrance");
-       memset(&fi, 0, sizeof(TelSimFacilityInfo_t));
+       /* Free resources */
+       i = 0;
+       while (msisdn_info.count) {
+               g_free(msisdn_info.list[i].alpha_id);
+               g_free(msisdn_info.list[i].num);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+               msisdn_info.count--;
+               i++;
+       }
+       g_free(msisdn_info.list);
+}
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+EXPORT_API TelReturn tapi_sim_get_msisdn(TelHandle *handle, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       g_variant_get(dbus_result, "(iii)", &result, &fi.type, &fi.f_status);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &fi, evt_cb_data->user_data);
-       }
+       /* DBUS Request - GET (MSIDN) */
+       telephony_sim_call_get_msisdn(handle->sim_proxy,
+               NULL, on_response_sim_get_msisdn, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sim_lock_info(GObject *source_object, GAsyncResult *res,
-               gpointer user_data)
+static void on_response_sim_get_spn(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
-       TelSimLockInfo_t lock;
+       TelSimSpn spn_info;
+       gint display_condition; /* Aligned to TelSimSpnDispCondition */
+       gchar *spn;
 
-       dbg("Func Entrance");
-       memset(&lock, 0, sizeof(TelSimLockInfo_t));
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       memset(&spn_info, 0x0, sizeof(TelSimSpn));
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Finish and extract the response data */
+       telephony_sim_call_get_spn_finish(handle->sim_proxy,
+                                       &sim_result, &display_condition, &spn, res, &error);
 
-               if (error)
-                       g_error_free(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM SPN - sim_result: [%d]", sim_result);
 
-               free(evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
                return;
        }
 
-       g_variant_get(dbus_result, "(iiii)", &result, &lock.lock_type, &lock.lock_status,
-                       &lock.retry_count);
+       /* Validate Response data */
+       if (strlen(spn) > TEL_SIM_SPN_LEN_MAX) {
+               err("Invalid SPN length: [%d] SPN: [%s]", strlen(spn), spn);
+               sim_result = TEL_SIM_RESULT_FAILURE;
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &lock, evt_cb_data->user_data);
-       }
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-       free(evt_cb_data);
-}
-
-static void on_response_req_sim_apdu(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
+               /* Free resources */
+               g_free(spn);
 
-       GVariantIter *iter = NULL;
-       GVariant *param_gv = NULL;
-       GVariant *inner_gv = NULL;
-       guchar rt_i;
-       unsigned short i = 0;
+               return;
+       }
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimApduResp_t r_apdu;
+       memcpy(spn_info.spn, spn, strlen(spn));
+       spn_info.spn[strlen(spn)] = '\0';
+       spn_info.display_condition = display_condition;
 
-       dbg("Func Entrance");
-       memset(&r_apdu, 0, sizeof(TelSimApduResp_t));
+       /* Free resources */
+       g_free(spn);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("SPN: [%s] Display condition: [%d]", spn_info.spn, spn_info.display_condition);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &spn_info);
+}
 
-               if (error)
-                       g_error_free(error);
+EXPORT_API TelReturn tapi_sim_get_spn(TelHandle *handle, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-               free(evt_cb_data);
-               return;
-       }
+       dbg("Entry");
 
-       /*      dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));*/
-       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
-       inner_gv = g_variant_get_variant(param_gv);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               r_apdu.apdu_resp[i] = rt_i;
-               i++;
-       }
-       r_apdu.apdu_resp_len = i;
-       dbg("r_apdu.apdu_resp_len=[%d]", r_apdu.apdu_resp_len);
-       g_variant_iter_free(iter);
-       g_variant_unref(inner_gv);
-       g_variant_unref(param_gv);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &r_apdu, evt_cb_data->user_data);
-       }
+       /* DBUS Request - GET (SPN) */
+       telephony_sim_call_get_spn(handle->sim_proxy,
+                                       NULL, on_response_sim_get_spn, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_req_sim_atr(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sim_get_cphs_netname(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       GVariant *dbus_result;
-
-       GVariantIter *iter = NULL;
-       GVariant *param_gv = NULL;
-       GVariant *inner_gv = NULL;
-       guchar rt_i;
-       unsigned short i = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       struct tapi_resp_data *evt_cb_data = user_data;
-       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
-       TelSimAtrResp_t r_atr;
+       TelSimCphsNetName cphs_info;
 
-       dbg("Func Entrance");
-       memset(&r_atr, 0, sizeof(TelSimAtrResp_t));
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       memset(&cphs_info, 0x0, sizeof(TelSimCphsNetName));
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       /* Finish and extract the response data */
+       telephony_sim_call_get_cphs_net_name_finish(handle->sim_proxy,
+                       &sim_result, &cphs_info.full_name, &cphs_info.short_name, res, &error);
 
-               if (error)
-                       g_error_free(error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get CPHS Network name - sim_result: [%d]", sim_result);
 
-               free(evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
                return;
        }
+       dbg("CPHS - Full name: [%s] Short name: [%s]", cphs_info.full_name, cphs_info.short_name);
 
-       dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));
-       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
-       inner_gv = g_variant_get_variant(param_gv);
-
-       g_variant_get(inner_gv, "ay", &iter);
-       while (g_variant_iter_loop(iter, "y", &rt_i)) {
-               r_atr.atr_resp[i] = rt_i;
-               i++;
-       }
-       r_atr.atr_resp_len = i;
-       dbg("r_atr.atr_resp_len=[%d]", r_atr.atr_resp_len);
-       g_variant_iter_free(iter);
-       g_variant_unref(inner_gv);
-       g_variant_unref(param_gv);
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &r_atr, evt_cb_data->user_data);
-       }
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &cphs_info);
 
-       free(evt_cb_data);
+       /* Free resources */
+       g_free(cphs_info.full_name);
+       g_free(cphs_info.short_name);
 }
 
-EXPORT_API int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status,
-               int *card_changed)
+EXPORT_API TelReturn tapi_sim_get_cphs_netname(TelHandle *handle, TapiResponseCb callback, void *user_data)
 {
-       GError *gerr = NULL;
-       GVariant *sync_gv = NULL;
-       int api_err = TAPI_API_SUCCESS;
-       TelSimCardStatus_t init_status = 0;
-       int changed = FALSE;
-
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
-
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(sim_status, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(card_changed, TAPI_API_INVALID_PTR);
-
-       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
-                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetInitStatus", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &gerr);
-
-       if (sync_gv) {
-               g_variant_get(sync_gv, "(ib)", &init_status, &changed);
-               *sim_status = init_status;
-               *card_changed = changed;
-               dbg("init_status[%d]",init_status);
-               dbg("changed[%d]",changed);
-       } else {
-               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
-               g_error_free(gerr);
-               return TAPI_API_OPERATION_FAILED;
-       }
-       g_variant_unref(sync_gv);
-       return api_err;
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
+
+       dbg("Entry");
+
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       /* DBUS Request - GET (CPHS Network name) */
+       telephony_sim_call_get_cphs_net_name(handle->sim_proxy,
+                                       NULL, on_response_sim_get_cphs_netname, rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type)
+static void on_response_sim_get_sp_display_info(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *gerr = NULL;
-       GVariant *sync_gv = NULL;
-       int sim_ret =0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance");
+       GVariant *sp_list;
+       TelSimSpPlmnList sp_info;
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(card_type, TAPI_API_INVALID_PTR);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       guint i = 0;
 
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       memset(&sp_info, 0, sizeof(TelSimSpPlmnList));
 
-       sim_ret = _tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       /* Finish and extract the response data */
+       telephony_sim_call_get_sp_display_info_finish(handle->sim_proxy,
+               &sim_result, &sp_info.count, &sp_list, res, &error);
 
-       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
-                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetCardType", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &gerr);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM SP Display info - sim_result: [%d]", sim_result);
 
-       if (sync_gv) {
-               g_variant_get(sync_gv, "(i)", card_type);
-       } else {
-               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
-               g_error_free(gerr);
-               return TAPI_API_OPERATION_FAILED;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
        }
-       g_variant_unref(sync_gv);
-       return TAPI_API_SUCCESS;
-}
 
-EXPORT_API int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi)
-{
-       GError *gerr = NULL;
-       GVariant *sync_gv = NULL;
-       gchar *gplmn = NULL;
-       gchar *gmsin = NULL;
-       int sim_ret = 0;
-
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
-
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
-
-       TAPI_RETURN_VAL_IF_FAIL(imsi, TAPI_API_INVALID_PTR);
-
-       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
-                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetIMSI", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &gerr);
-
-       if (sync_gv) {
-               dbg("imsi type_format(%s)", g_variant_get_type_string(sync_gv));
-               g_variant_get(sync_gv, "(ss)", &gplmn, &gmsin);
-
-               dbg("gplmn[%s],gmsin[%s]",gplmn,gmsin);
-               snprintf(imsi->szMcc, 3 + 1, "%s", gplmn);
-               snprintf(imsi->szMnc, strlen((const char*)gplmn) - 3 + 1, "%s", &gplmn[3]);
-               snprintf(imsi->szMsin, strlen((const char*)gmsin) + 1, "%s", gmsin);
-
-               dbg("imsi->szMnc[%s]", imsi->szMnc);
-               dbg("imsi->szMcc[%s]", imsi->szMcc);
-               g_free(gplmn);
-               g_free(gmsin);
-       } else {
-               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
-               g_error_free(gerr);
-               return TAPI_API_OPERATION_FAILED;
-       }
-       g_variant_unref(sync_gv);
-       return TAPI_API_SUCCESS;
-}
+       /* Validate Response data */
+       if ((sp_info.count != 0)
+                       && (g_variant_n_children(sp_list) == sp_info.count)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
 
-EXPORT_API int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc)
-{
-       GError *gerr = NULL;
-       GVariant *sync_gv;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
-       const gchar *str_value = NULL;
-       int i = 0;
-       int sim_ret = 0;
-
-       dbg("Func Entrance");
-       memset(ecc, 0, sizeof(TelSimEccList_t));
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(ecc, TAPI_API_INVALID_PTR);
-
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
-
-       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
-                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetECC", NULL, NULL,
-                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &gerr);
-
-       if (sync_gv) {
-/*             dbg("ecc type_format(%s)", g_variant_get_type_string(sync_gv));*/
-               g_variant_get(sync_gv, "(aa{sv})", &iter);
-               ecc->ecc_count = g_variant_iter_n_children(iter);
-               dbg("ecc->ecc_count[%d]",ecc->ecc_count);
-               i = 0;
+               dbg("SPN list count: [%d]", sp_info.count);
+
+               g_variant_get(sp_list, "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, "name")) {
-                                       str_value = g_variant_get_string(value, NULL);
-                                       snprintf(ecc->list[i].name, strlen((const char*)str_value) + 1, "%s", str_value);
-                               }
-                               if (!g_strcmp0(key, "number")) {
-                                       str_value = g_variant_get_string(value, NULL);
-                                       snprintf(ecc->list[i].number, strlen((const char*)str_value) + 1, "%s", str_value);
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "index") == 0) {
+                                       sp_info.list[i].index =
+                                               g_variant_get_uint32(key_value);
                                }
-                               if (!g_strcmp0(key, "category")) {
-                                       ecc->list[i].category = g_variant_get_int32(value);
+
+                               if (g_strcmp0(key, "plmn") == 0) {
+                                       sp_info.list[i].plmn =
+                                               g_strdup(g_variant_get_string(key_value, NULL));
                                }
                        }
                        i++;
                        g_variant_iter_free(iter_row);
                }
                g_variant_iter_free(iter);
-       } else {
-               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
-               g_error_free(gerr);
-               return TAPI_API_OPERATION_FAILED;
        }
-       return TAPI_API_SUCCESS;
-}
-
-EXPORT_API int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
-
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       else {
+               err("Invalid SP info count: [%d] SPN: [%s]", sp_info.count);
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+               sim_result = TEL_SIM_RESULT_FAILURE;
+               sp_info.count = 0;
+       }
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       /* Free  resources */
+       g_variant_unref(sp_list);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &sp_info);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetICCID", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_sim_iccid, evt_cb_data);
+       /* Free  resources */
+       i = 0;
+       while (sp_info.count) {
+               g_free(sp_info.list[i].plmn);
 
-       return TAPI_API_SUCCESS;
+               sp_info.count--;
+               i++;
+       }
+       g_free(sp_info.list);
 }
 
-EXPORT_API int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sim_get_sp_display_info(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
-
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       dbg("Entry");
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetLanguage", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_get_sim_language, evt_cb_data);
+       /* DBUS Request - GET (SP Display info) */
+       telephony_sim_call_get_sp_display_info(handle->sim_proxy,
+               NULL, on_response_sim_get_sp_display_info, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_set_sim_language(TapiHandle *handle, TelSimLanguagePreferenceCode_t language,
-               tapi_response_cb callback, void *user_data)
+static void on_response_sim_req_authentication(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance w/ lang[%d]",language);
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TelSimAuthenticationResponse auth_resp;
+       gint auth_type; /* Aligned to TelSimAuthenticationType */
+       gchar *resp_data, *authentication_key, *cipher_data, *integrity_data;
+       guchar *decoded_data;
+       gsize decoded_data_len = 0;
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       memset(&auth_resp, 0x0, sizeof(TelSimAuthenticationResponse));
 
-       param = g_variant_new("(i)", language);
+       /* Finish and extract the response data */
+       telephony_sim_call_req_authentication_finish(handle->sim_proxy,
+                       &sim_result, &auth_type, &resp_data, &authentication_key,
+                       &cipher_data, &integrity_data, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "SetLanguage", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_set_sim_language, evt_cb_data);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to get SIM SP Display info - sim_result: [%d]", sim_result);
 
-       return TAPI_API_SUCCESS;
-}
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
+       auth_resp.auth_type = auth_type;
 
-EXPORT_API int tel_get_sim_callforwarding_info(TapiHandle *handle, tapi_response_cb callback,
-               void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
+       /* Decode Base64 - Response data */
+       decoded_data = g_base64_decode((const gchar *)resp_data, &decoded_data_len);
+       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
+               err("Invalid Response Data length: [%d]", decoded_data_len);
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+               /* Free resources */
+               g_free(decoded_data);
+               g_free(resp_data);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+               return;
+       }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       if (decoded_data_len)
+               memcpy(auth_resp.resp_data, decoded_data, decoded_data_len);
+       auth_resp.resp_length = decoded_data_len;
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetCallForwarding", NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
-                       -1, handle->ca, on_response_get_sim_callforwarding_info, evt_cb_data);
+       /* Free resources */
+       g_free(decoded_data);
+       decoded_data = NULL;
+       g_free(resp_data);
+       decoded_data_len = 0;
 
-       return TAPI_API_SUCCESS;
-}
+       /* Decode Base64 - Authentication Key */
+       decoded_data = g_base64_decode((const gchar *)authentication_key, &decoded_data_len);
+       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
+               err("Invalid Authentication Key length: [%d]", decoded_data_len);
 
-EXPORT_API int tel_set_sim_callforwarding_info(TapiHandle *handle, TelSimCallForwardingReq_t *req_cf,
-               tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int sim_ret = 0;
-       gchar *g_number = NULL;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+               /* Free resources */
+               g_free(decoded_data);
+               g_free(authentication_key);
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+               return;
+       }
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       if (decoded_data_len)
+               memcpy(auth_resp.authentication_key, decoded_data, decoded_data_len);
+       auth_resp.authentication_key_length = decoded_data_len;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Free resources */
+       g_free(decoded_data);
+       decoded_data = NULL;
+       g_free(authentication_key);
+       decoded_data_len = 0;
 
-       g_number = calloc(strlen((const char*)&req_cf->cf_data_u.cf.cfu_num)+1, 1);
-       if (!g_number) {
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
+       /* Decode Base64 - Cipher data */
+       decoded_data = g_base64_decode((const gchar *)cipher_data, &decoded_data_len);
+       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
+               err("Invalid Cipher Data length: [%d]", decoded_data_len);
 
-       memcpy((void*)g_number, (const void*)&req_cf->cf_data_u.cf.cfu_num, strlen((const char*)&req_cf->cf_data_u.cf.cfu_num));
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-       param = g_variant_new("(biiyiisiibbbb)",
-                       req_cf->b_cphs,
-                       req_cf->cf_data_u.cf.rec_index,
-                       req_cf->cf_data_u.cf.msp_num,
-                       req_cf->cf_data_u.cf.cfu_status,
-                       req_cf->cf_data_u.cf.ton,
-                       req_cf->cf_data_u.cf.npi,
-                       g_number,
-                       req_cf->cf_data_u.cf.cc2_id,
-                       req_cf->cf_data_u.cf.ext7_id,
-                       req_cf->cf_data_u.cphs_cf.b_line1,
-                       req_cf->cf_data_u.cphs_cf.b_line2,
-                       req_cf->cf_data_u.cphs_cf.b_fax,
-                       req_cf->cf_data_u.cphs_cf.b_data);
+               /* Free resources */
+               g_free(decoded_data);
+               g_free(cipher_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "SetCallForwarding", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_set_sim_callforwarding_info, evt_cb_data);
+               return;
+       }
 
-       if (g_number)
-               free(g_number);
+       if (decoded_data_len)
+               memcpy(auth_resp.cipher_data, decoded_data, decoded_data_len);
+       auth_resp.cipher_length = decoded_data_len;
 
-       return TAPI_API_SUCCESS;
-}
+       /* Free resources */
+       g_free(decoded_data);
+       decoded_data = NULL;
+       g_free(cipher_data);
+       decoded_data_len = 0;
 
-EXPORT_API int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback,
-               void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
+       /* Decode Base64 - Integrity data */
+       decoded_data = g_base64_decode((const gchar *)integrity_data, &decoded_data_len);
+       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
+               err("Invalid Integrity Data length: [%d]", decoded_data_len);
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+               /* Free resources */
+               g_free(decoded_data);
+               g_free(integrity_data);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+               return;
+       }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       if (decoded_data_len)
+               memcpy(auth_resp.integrity_data, decoded_data, decoded_data_len);
+       auth_resp.integrity_length = decoded_data_len;
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetMessageWaiting", NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
-                       -1, handle->ca, on_response_get_sim_messagewaiting_info, evt_cb_data);
+       /* Free resources */
+       g_free(decoded_data);
+       decoded_data = NULL;
+       g_free(integrity_data);
+       decoded_data_len = 0;
 
-       return TAPI_API_SUCCESS;
-}
+       dbg("Authentication type: [%d] Authentication Response Length: [%d] "\
+               "Authentication Key Length: [%d] Cipher Length: [%d] Integrity Length: [%d]",
+               auth_resp.auth_type, auth_resp.resp_length, auth_resp.authentication_key_length,
+               auth_resp.cipher_length, auth_resp.integrity_length);
 
-EXPORT_API int tel_set_sim_messagewaiting_info(TapiHandle *handle, TelSimMessageWaitingReq_t *req_mw,
-               tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int sim_ret = 0;
-
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
-
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       dbg("b_cphs[%d], rec_index[%d], indicator_status[0x%x], voice_count[%d], fax_count[%d], email_count[%d], other_count[%d], video_count[%d], b_voice1[%d],b_voice2[%d],b_fax[%d], b_data[%d]",
-                       req_mw->b_cphs,
-                       req_mw->mw_data_u.mw.rec_index,
-                       req_mw->mw_data_u.mw.indicator_status,
-                       req_mw->mw_data_u.mw.voice_count,
-                       req_mw->mw_data_u.mw.fax_count,
-                       req_mw->mw_data_u.mw.email_count,
-                       req_mw->mw_data_u.mw.other_count,
-                       req_mw->mw_data_u.mw.video_count,
-                       req_mw->mw_data_u.cphs_mw.b_voice1,
-                       req_mw->mw_data_u.cphs_mw.b_voice2,
-                       req_mw->mw_data_u.cphs_mw.b_fax,
-                       req_mw->mw_data_u.cphs_mw.b_data);
-
-       param = g_variant_new("(biyiiiiibbbb)",
-                       req_mw->b_cphs,
-                       req_mw->mw_data_u.mw.rec_index,
-                       req_mw->mw_data_u.mw.indicator_status,
-                       req_mw->mw_data_u.mw.voice_count,
-                       req_mw->mw_data_u.mw.fax_count,
-                       req_mw->mw_data_u.mw.email_count,
-                       req_mw->mw_data_u.mw.other_count,
-                       req_mw->mw_data_u.mw.video_count,
-                       req_mw->mw_data_u.cphs_mw.b_voice1,
-                       req_mw->mw_data_u.cphs_mw.b_voice2,
-                       req_mw->mw_data_u.cphs_mw.b_fax,
-                       req_mw->mw_data_u.cphs_mw.b_data);
-
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "SetMessageWaiting", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_set_sim_messagewaiting_info, evt_cb_data);
-
-       return TAPI_API_SUCCESS;
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &auth_resp);
 }
 
-EXPORT_API int tel_get_sim_mailbox_info(TapiHandle *handle, tapi_response_cb callback,
-               void *user_data)
+EXPORT_API TelReturn tapi_sim_req_authentication(TelHandle *handle,
+               TelSimAuthenticationData *authentication_data, TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
-
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
-
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       TapiRespCbData *rsp_cb_data = NULL;
+       gchar *encoded_rand, *encoded_autn;
+       TelSimCardStatusInfo status_info = {0,};
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetMailbox", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_get_sim_mailbox_info, evt_cb_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && authentication_data && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       return TAPI_API_SUCCESS;
-}
+       if (authentication_data->auth_type > TEL_SIM_AUTH_IMS_AKA) {
+               err("Invalid Authentication type: [%d]", authentication_data->auth_type);
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-EXPORT_API int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb,
-               tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int sim_ret = 0;
-       gchar *g_alpha = NULL;
-       gchar *g_number = NULL;
-
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
-
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       g_alpha = calloc(strlen((const char*)&req_mb->alpha_id)+1, 1);
-       if (!g_alpha) {
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
-
-       memcpy((void*)g_alpha, (const void*)&req_mb->alpha_id, strlen((const char*)&req_mb->alpha_id));
-
-       g_number = calloc(strlen((const char*)&req_mb->num)+1, 1);
-       if (!g_number) {
-               free(g_alpha);
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
-
-       memcpy((void*)g_number, (const void*)&req_mb->num, strlen((const char*)&req_mb->num));
-
-       dbg("req_mb->b_cphs[%d], req_mb->rec_index[%d], req_mb->profile_num[%d], req_mb->mb_type[%d], req_mb->alpha_id_max_len[%d],req_mb->alpha_id[%s]",
-                       req_mb->b_cphs,
-                       req_mb->rec_index,
-                       req_mb->profile_num,
-                       req_mb->mb_type,
-                       req_mb->alpha_id_max_len,
-                       g_alpha);
-
-       dbg("req_mb->ton[%d],req_mb->npi[%d],g_number[%s],req_mb->cc_id[%d],req_mb->ext1_id[%d]",
-                       req_mb->ton,
-                       req_mb->npi,
-                       g_number,
-                       req_mb->cc_id,
-                       req_mb->ext1_id);
-
-       param = g_variant_new("(biiiisiisii)",
-                       req_mb->b_cphs,
-                       req_mb->mb_type,
-                       req_mb->rec_index,
-                       req_mb->profile_num,
-                       req_mb->alpha_id_max_len,
-                       g_alpha,
-                       req_mb->ton,
-                       req_mb->npi,
-                       g_number,
-                       req_mb->cc_id,
-                       req_mb->ext1_id);
-
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "SetMailbox", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_set_sim_mailbox_info, evt_cb_data);
-
-       if (g_alpha)
-               free(g_alpha);
-
-       if (g_number)
-               free(g_number);
-
-       return TAPI_API_SUCCESS;
-}
+       if (authentication_data->rand_length == 0) {
+               err("Invalid RAND length: [%d]", authentication_data->auth_type);
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-EXPORT_API int tel_get_sim_cphs_info(TapiHandle *handle, tapi_response_cb callback,
-               void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
+       if ((authentication_data->auth_type != TEL_SIM_AUTH_GSM)
+                       && (authentication_data->autn_length == 0)) {
+               err("Invalid inputs - Auth type: [%d] AUTN length: [%d]",
+                               authentication_data->auth_type, authentication_data->autn_length);
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       /* Encode Base64 - Rand data */
+       encoded_rand = g_base64_encode((const guchar *)authentication_data->rand_data,
+                                       authentication_data->rand_length);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       /* Encode Base64 - Authentication data */
+       encoded_autn = g_base64_encode((const guchar *)authentication_data->autn_data,
+                                       authentication_data->autn_length);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* DBUS Request - REQ (Authentication) */
+       telephony_sim_call_req_authentication(handle->sim_proxy,
+                       authentication_data->auth_type, encoded_rand, encoded_autn, NULL,
+                       on_response_sim_req_authentication, rsp_cb_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetCPHSInfo", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_sim_cphs_info, evt_cb_data);
+       /* Free resources */
+       g_free(encoded_rand);
+       g_free(encoded_autn);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+static void on_response_sim_verify_pins(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TelSimSecPinResult verify_pin_resp;
+       gint pin_type;  /* Aligned to TelSimPinType */
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
+
+       memset(&verify_pin_resp, 0, sizeof(TelSimSecPinResult));
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;;
+       /* Finish and extract the response data */
+       telephony_sim_call_verify_pins_finish(handle->sim_proxy,
+                       &sim_result, &pin_type, &verify_pin_resp.retry_count, res, &error);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Verify SIM PIN - sim_result: [%d]", sim_result);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetMSISDN", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_sim_msisdn, evt_cb_data);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
 
-       return TAPI_API_SUCCESS;
+       verify_pin_resp.pin_type = pin_type;
+       dbg("Verify PIN - Type: [%d] Re-try count: [%d]", verify_pin_resp.pin_type, verify_pin_resp.retry_count);
+
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &verify_pin_resp);
 }
 
-EXPORT_API int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback,
-               void *user_data)
+EXPORT_API TelReturn tapi_sim_verify_pins(TelHandle *handle,
+                       TelSimSecPinPw  *pin_data, TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       dbg("Entry");
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TEL_RETURN_IF_CHECK_FAIL(handle && pin_data && pin_data->pw && callback,
+                               TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       if ((strlen(pin_data->pw) < 4) || (strlen(pin_data->pw) > 8)) {
+               err("Invalid PIN length: [%d", strlen(pin_data->pw));
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetOplmnwact", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_get_sim_oplmnwact, evt_cb_data);
+       /* DBUS Request - VERIFY (PIN) */
+       telephony_sim_call_verify_pins(handle->sim_proxy,
+                                       pin_data->pin_type, pin_data->pw, NULL,
+                                       on_response_sim_verify_pins, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback,
-               void *user_data)
+static void on_response_sim_verify_puks(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TelSimSecPukResult verify_puk_resp;
+       gint puk_type;  /* Aligned to TelSimPukType */
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       memset(&verify_puk_resp, 0x0, sizeof(TelSimSecPukResult));
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Finish and extract the response data */
+       telephony_sim_call_verify_puks_finish(handle->sim_proxy,
+                       &sim_result, &puk_type, &verify_puk_resp.retry_count, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetSpn", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_get_sim_spn, evt_cb_data);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Verify SIM PUK - sim_result: [%d]", sim_result);
 
-       return TAPI_API_SUCCESS;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
+       verify_puk_resp.puk_type = puk_type;
+       dbg("Verify PUK - Type: [%d] Re-try count: [%d]", verify_puk_resp.puk_type, verify_puk_resp.retry_count);
+
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &verify_puk_resp);
 }
 
-EXPORT_API int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback,
-               void *user_data)
+EXPORT_API TelReturn tapi_sim_verify_puks(TelHandle *handle,
+               TelSimSecPukPw *puk_data, TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       dbg("Entry");
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TEL_RETURN_IF_CHECK_FAIL(handle && puk_data && puk_data->puk_pw &&
+                               puk_data->new_pin_pw && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       if ((strlen(puk_data->puk_pw) < 4) || (strlen(puk_data->puk_pw) > 8)
+                       || (strlen(puk_data->new_pin_pw) < 4) || (strlen(puk_data->new_pin_pw) > 8)) {
+               err("Invalid lengths - PUK: [%d] New PIN: [%d]",
+                               strlen(puk_data->puk_pw), strlen(puk_data->new_pin_pw));
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetCphsNetName", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_get_sim_cphs_netname, evt_cb_data);
+       /* DBUS Request - VERIFY (PUKS) */
+       telephony_sim_call_verify_puks(handle->sim_proxy,
+                       puk_data->puk_type, puk_data->puk_pw, puk_data->new_pin_pw,
+                       NULL, on_response_sim_verify_puks, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_req_sim_authentication(TapiHandle *handle,
-               TelSimAuthenticationData_t *authentication_data, tapi_response_cb callback, void *user_data)
+static void on_response_sim_change_pins(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariantBuilder *builder = NULL;
-       GVariant *param = NULL;
-       GVariant *rand_gv = NULL;
-       GVariant *autn_gv = NULL;
-       int i =0;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       TelSimSecPinResult change_pin_resp;
+       gint pin_type;
 
-       dbg("Func Entrance ");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       memset(&change_pin_resp, 0, sizeof(TelSimSecPinResult));
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       /* Finish and extract the response data */
+       telephony_sim_call_change_pins_finish(handle->sim_proxy,
+                       &sim_result, &pin_type, &change_pin_resp.retry_count, res, &error);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Change SIM PIN - sim_result: [%d]", sim_result);
 
-       TAPI_RETURN_VAL_IF_FAIL(authentication_data, TAPI_API_INVALID_PTR);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
+       change_pin_resp.pin_type = pin_type;
+       dbg("Change PIN - Type: [%d] Re-try count: [%d]",
+                       change_pin_resp.pin_type, change_pin_resp.retry_count);
 
-       if (authentication_data->auth_type > TAPI_SIM_AUTH_TYPE_3G)
-               return TAPI_API_INVALID_INPUT;
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &change_pin_resp);
+}
 
-       if (authentication_data->rand_length == 0)
-               return TAPI_API_INVALID_INPUT;
+EXPORT_API TelReturn tapi_sim_change_pins(TelHandle *handle,
+               TelSimSecChangePinPw *pin_data, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       if (authentication_data->auth_type != TAPI_SIM_AUTH_TYPE_GSM
-                       && authentication_data->autn_length == 0)
-               return TAPI_API_INVALID_INPUT;
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && pin_data && pin_data->old_pw &&
+                               pin_data->new_pw && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
-       for (i = 0; i < authentication_data->rand_length; i++) {
-               dbg("authentication_data->rand_data[%d][0x%02x]", i,authentication_data->rand_data[i]);
-               g_variant_builder_add(builder, "y", authentication_data->rand_data[i]);
+       if ((strlen(pin_data->old_pw) < 4) || (strlen(pin_data->old_pw) > 8)
+                       || (strlen(pin_data->new_pw) < 4) || (strlen(pin_data->new_pw) > 8)) {
+               err("Invalid lengths - Old PIN: [%d] New PIN: [%d]",
+                               strlen(pin_data->old_pw), strlen(pin_data->new_pw));
+               return TEL_RETURN_INVALID_PARAMETER;
        }
-       rand_gv = g_variant_builder_end(builder);
-
-       builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
-               for (i = 0; i < authentication_data->autn_length; i++) {
-                       dbg("authentication_data->autn_data[%d][0x%02x]", i,authentication_data->autn_data[i]);
-                       g_variant_builder_add(builder, "y", authentication_data->autn_data[i]);
-               }
-       autn_gv = g_variant_builder_end(builder);
 
-       param = g_variant_new("(ivv)", authentication_data->auth_type, rand_gv, autn_gv);
-       /*g_variant_builder_unref (builder);*/
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "Authentication", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_req_sim_authentication, evt_cb_data);
+       /* DBUS Request - CHANGE (PINS) */
+       telephony_sim_call_change_pins(handle->sim_proxy,
+                       pin_data->pin_type, pin_data->old_pw, pin_data->new_pw,
+                       NULL, on_response_sim_change_pins, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data,
-               tapi_response_cb callback, void *user_data)
+static void on_response_sim_disable_facility(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       gchar *gpw = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+
+       TelSimFacilityResult disable_facility_resp;
+       gint facility_type;     /* Aligned to TelSimLockType */
+
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       memset(&disable_facility_resp, 0, sizeof(TelSimFacilityResult));
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       /* Finish and extract the response data */
+       telephony_sim_call_disable_facility_finish(handle->sim_proxy,
+                       &sim_result, &facility_type, &disable_facility_resp.retry_count, res, &error);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Disable SIM facility - sim_result: [%d]", sim_result);
 
-       TAPI_RETURN_VAL_IF_FAIL(pin_data, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(pin_data->pw, TAPI_API_INVALID_PTR);
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
+       disable_facility_resp.type = facility_type;
+       dbg("Disable Facility - Type: [%d] Re-try count: [%d]",
+                       disable_facility_resp.type, disable_facility_resp.retry_count);
 
-       dbg("pin type[%d]", pin_data->type);
-       if (pin_data->type != TAPI_SIM_PTYPE_PIN1 && pin_data->type != TAPI_SIM_PTYPE_PIN2
-                       && pin_data->type != TAPI_SIM_PTYPE_SIM)
-               return TAPI_API_INVALID_INPUT;
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &disable_facility_resp);
+}
 
-       if ((pin_data->pw_len < 4) || (pin_data->pw_len > 8))
-               return TAPI_API_INVALID_INPUT;
+EXPORT_API TelReturn tapi_sim_disable_facility(TelHandle *handle,
+               TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
+
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && pw && pw->pw && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       gpw = calloc(pin_data->pw_len+1, 1);
-       if (!gpw) {
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       if (pw->lock_type >TEL_SIM_LOCK_PC) {
+               err("Invalid input - Lock type: [%d]", pw->lock_type);
+               return TEL_RETURN_INVALID_PARAMETER;
        }
 
-       memcpy((void*)gpw, (const void*)pin_data->pw, pin_data->pw_len);
+       if ((pw->lock_type < TEL_SIM_LOCK_PN)
+                       && ((strlen(pw->pw) < 4) || (strlen(pw->pw) > 8))) {
+               err("Invalid input - Lock type: [%d] PIN length: [%d]",
+                               pw->lock_type, strlen(pw->pw));
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       param = g_variant_new("(is)", pin_data->type, gpw);
+       if ((pw->lock_type > TEL_SIM_LOCK_FD) && (strlen(pw->pw) < 6)) {
+               err("Invalid input - Lock type: [%d] PIN length: [%d]",
+                               pw->lock_type, strlen(pw->pw));
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "VerifySec", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_verify_sim_pins, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (gpw)
-               free(gpw);
+       /* DBUS Request - DISABLE (Facility) */
+       telephony_sim_call_disable_facility(handle->sim_proxy,
+                       pw->lock_type, pw->pw, NULL, on_response_sim_disable_facility, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_data,
-               const TelSimSecPw_t *new_pin_data, tapi_response_cb callback, void *user_data)
+static void on_response_sim_enable_facility(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       gchar *gpin = NULL;
-       gchar *gpuk = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TelSimFacilityResult enable_facility_resp;
+       gint facility_type;     /* Aligned to TelSimLockType */
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       memset(&enable_facility_resp, 0x0, sizeof(TelSimFacilityResult));
 
-       TAPI_RETURN_VAL_IF_FAIL((puk_data != NULL && new_pin_data != NULL), TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL((puk_data->pw != NULL && new_pin_data->pw != NULL),     TAPI_API_INVALID_PTR);
+       /* Finish and extract the response data */
+       telephony_sim_call_enable_facility_finish(handle->sim_proxy,
+                       &sim_result, &facility_type, &enable_facility_resp.retry_count, res, &error);
 
-       dbg("puk type[%d] pin type[%d]", puk_data->type, new_pin_data->type);
-       if ((puk_data->type != TAPI_SIM_PTYPE_PUK1 && puk_data->type != TAPI_SIM_PTYPE_PUK2)
-                       || (new_pin_data->type != TAPI_SIM_PTYPE_PIN1 && new_pin_data->type != TAPI_SIM_PTYPE_PIN2))
-               return TAPI_API_INVALID_INPUT;
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Enable SIM facility - sim_result: [%d]", sim_result);
 
-       if ((puk_data->type != TAPI_SIM_PTYPE_PUK1 || new_pin_data->type != TAPI_SIM_PTYPE_PIN1)
-                       && (puk_data->type != TAPI_SIM_PTYPE_PUK2 || new_pin_data->type != TAPI_SIM_PTYPE_PIN2))
-               return TAPI_API_INVALID_INPUT;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
+       enable_facility_resp.type = facility_type;
+       dbg("Enable Facility - Type: [%d] Re-try count: [%d]",
+                       enable_facility_resp.type, enable_facility_resp.retry_count);
 
-       if ((puk_data->pw_len < 4) || (puk_data->pw_len > 8) || (new_pin_data->pw_len < 4)
-                       || (new_pin_data->pw_len > 8))
-               return TAPI_API_INVALID_INPUT;
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &enable_facility_resp);
+}
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+EXPORT_API TelReturn tapi_sim_enable_facility(TelHandle *handle,
+               TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       gpin = calloc(new_pin_data->pw_len+1, 1);
-       if (!gpin) {
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
+       dbg("Entry");
 
-       gpuk = calloc(puk_data->pw_len+1, 1);
-       if (!gpuk) {
-               g_free(evt_cb_data);
-               free(gpin);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback && pw && pw->pw,
+                               TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       memcpy((void*)gpin, (const void*)new_pin_data->pw, new_pin_data->pw_len);
-       memcpy((void*)gpuk, (const void*)puk_data->pw, puk_data->pw_len);
+       if (pw->lock_type >TEL_SIM_LOCK_PC) {
+               err("Invalid input - Lock type: [%d]", pw->lock_type);
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       param = g_variant_new("(iss)", puk_data->type, gpuk, gpin);
+       if ((pw->lock_type < TEL_SIM_LOCK_PN)
+                       && ((strlen(pw->pw) < 4) || (strlen(pw->pw) > 8))) {
+               err("Invalid input - Lock type: [%d] PIN length: [%d]",
+                               pw->lock_type, strlen(pw->pw));
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "VerifyPUK", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_verify_sim_puks, evt_cb_data);
+       if ((pw->lock_type > TEL_SIM_LOCK_FD) && (strlen(pw->pw) < 6)) {
+               err("Invalid input - Lock type: [%d] PIN length: [%d]",
+                               pw->lock_type, strlen(pw->pw));
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       if (gpin)
-               free(gpin);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (gpuk)
-               free(gpuk);
+       /* DBUS Request - ENABLE (Facility) */
+       telephony_sim_call_enable_facility(handle->sim_proxy,
+                       pw->lock_type, pw->pw, NULL, on_response_sim_enable_facility, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_pin,
-               const TelSimSecPw_t *new_pin, tapi_response_cb callback, void *user_data)
+static void on_response_sim_get_facility(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       gchar *gpin_o = NULL;
-       gchar *gpin_n = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TelSimFacilityInfo facility_info;
+       gint facility_type;     /* Aligned to TelSimLockType */
+       gint facility_status;   /* Aligned to TelSimFacilityStatus */
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       memset(&facility_info, 0, sizeof(TelSimFacilityInfo));
 
-       TAPI_RETURN_VAL_IF_FAIL((old_pin != NULL && new_pin != NULL), TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL((old_pin->pw != NULL && new_pin->pw != NULL), TAPI_API_INVALID_PTR);
+       /* Finish and extract the response data */
+       telephony_sim_call_get_facility_finish(handle->sim_proxy,
+                       &sim_result, &facility_type, &facility_status, res, &error);
 
-       dbg("old_pin type[%d],new_pin type[%d]", old_pin->type, new_pin->type);
-       if ((old_pin->type != TAPI_SIM_PTYPE_PIN1) && (old_pin->type != TAPI_SIM_PTYPE_PIN2)
-                       && (new_pin->type != TAPI_SIM_PTYPE_PIN1) && (new_pin->type != TAPI_SIM_PTYPE_PIN2))
-               return TAPI_API_INVALID_INPUT;
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Get SIM facility - sim_result: [%d]", sim_result);
 
-       if (old_pin->type != new_pin->type)
-               return TAPI_API_INVALID_INPUT;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
+       facility_info.type = facility_type;
+       facility_info.f_status = facility_status;
+       dbg("Get Facility - Type: [%d] Status: [%d]",
+                       facility_info.type, facility_info.f_status);
 
-       if ((old_pin->pw_len < 4) || (old_pin->pw_len > 8))
-               return TAPI_API_INVALID_INPUT;
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &facility_info);
+}
 
-       if ((new_pin->pw_len < 4) || (new_pin->pw_len > 8))
-               return TAPI_API_INVALID_INPUT;
+EXPORT_API TelReturn tapi_sim_get_facility(TelHandle *handle,
+               TelSimLockType type, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       gpin_o = calloc(old_pin->pw_len+1, 1);
-       if (!gpin_o) {
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       gpin_n = calloc(new_pin->pw_len+1, 1);
-       if (!gpin_n) {
-               free(gpin_o);
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       if (type >TEL_SIM_LOCK_PC) {
+               err("Invalid input - Facility type: [%d]", type);
+               return TEL_RETURN_INVALID_PARAMETER;
        }
 
-       memcpy((void*)gpin_o, (const void*)old_pin->pw, old_pin->pw_len);
-       memcpy((void*)gpin_n, (const void*)new_pin->pw, new_pin->pw_len);
-
-       param = g_variant_new("(iss)", old_pin->type, gpin_o, gpin_n);
-       dbg("old_pin len[%d],new_pin len[%d]", old_pin->pw_len, new_pin->pw_len);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "ChangePIN", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_change_sim_pins, evt_cb_data);
+       /* DBUS Request - GET (Facility) */
+       telephony_sim_call_get_facility(handle->sim_proxy,
+                       type, NULL, on_response_sim_get_facility, rsp_cb_data);
 
-       if (gpin_o)
-               free(gpin_o);
-
-       if (gpin_n)
-               free(gpin_n);
-
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw,
-               tapi_response_cb callback, void *user_data)
+static void on_response_sim_get_lock_info(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       gchar *gpw = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TelSimLockInfo lock_info;
+       gint lock_type; /* Aligned to TelSimLockType */
+       gint lock_status;       /* Aligned to TelSimLockStatus */
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       memset(&lock_info, 0x0, sizeof(TelSimLockInfo));
 
-       TAPI_RETURN_VAL_IF_FAIL(pw, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR);
+       /* Finish and extract the response data */
+       telephony_sim_call_get_lock_info_finish(handle->sim_proxy, &sim_result, &lock_type,
+                                                                                       &lock_status, &lock_info.retry_count,
+                                                                                       res, &error);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Get SIM Lock info: [%d]", sim_result);
 
-       dbg("facility type[%d]", pw->lock_type);
-       if(pw->lock_type < TAPI_SIM_LOCK_PS || pw->lock_type >TAPI_SIM_LOCK_PC)
-               return TAPI_API_INVALID_INPUT;
-       if ((pw->lock_type < TAPI_SIM_LOCK_PN) && ((pw->pw_len < 4) || (pw->pw_len > 8)) )
-               return TAPI_API_INVALID_INPUT;
-       if ((pw->lock_type > TAPI_SIM_LOCK_FD) && (pw->pw_len < 6) )
-               return TAPI_API_INVALID_INPUT;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
+       lock_info.lock_type = lock_type;
+       lock_info.lock_status = lock_status;
+       dbg("SIM lock - Type: [%d] Status: [%d] Re-try count: [%d]",
+                       lock_info.lock_type, lock_info.lock_status, lock_info.retry_count);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &lock_info);
+}
 
-       gpw = calloc(pw->pw_len+1, 1);
-       if (!gpw) {
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
-       }
+EXPORT_API TelReturn tapi_sim_get_lock_info(TelHandle *handle,
+               TelSimLockType type, TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
+
+       dbg("Entry");
 
-       memcpy((void*)gpw, (const void*)pw->pw, pw->pw_len);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_PRESENT(status_info.status);
 
-       param = g_variant_new("(is)", pw->lock_type, gpw);
+       if (type >TEL_SIM_LOCK_PC) {
+               err("Invalid input - Lock type: [%d]", type);
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "DisableFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE,
-                       -1, handle->ca, on_response_disable_sim_facility, evt_cb_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (gpw)
-               free(gpw);
+       /* DBUS Request - GET (Lock info) */
+       telephony_sim_call_get_lock_info(handle->sim_proxy,
+                       type, NULL, on_response_sim_get_lock_info, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw,
-               tapi_response_cb callback, void *user_data)
+static void on_response_sim_req_apdu(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       gchar *gpw = NULL;
-       int sim_ret = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TelSimApduResp apdu_resp;
+       guchar *decode_apdu_resp;
+       gsize decode_apdu_resp_len;
+       gchar *apdu;
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       TAPI_RETURN_VAL_IF_FAIL(pw, TAPI_API_INVALID_PTR);
-       TAPI_RETURN_VAL_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR);
+       memset(&apdu_resp, 0x0, sizeof(TelSimApduResp));
 
-       dbg("facility type[%d]", pw->lock_type);
-       if(pw->lock_type < TAPI_SIM_LOCK_PS || pw->lock_type >TAPI_SIM_LOCK_PC)
-               return TAPI_API_INVALID_INPUT;
-       if ((pw->lock_type < TAPI_SIM_LOCK_PN) && ((pw->pw_len < 4) || (pw->pw_len > 8)) )
-               return TAPI_API_INVALID_INPUT;
-       if ((pw->lock_type > TAPI_SIM_LOCK_FD) && (pw->pw_len < 6) )
-               return TAPI_API_INVALID_INPUT;
+       /* Finish and extract the response data */
+       telephony_sim_call_req_apdu_finish(handle->sim_proxy, &sim_result, &apdu, res, &error);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to Request SIM apdu: [%d]", sim_result);
 
-       gpw = calloc(pw->pw_len+1, 1);
-       if (!gpw) {
-               g_free(evt_cb_data);
-               return TAPI_API_SYSTEM_OUT_OF_MEM;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
        }
 
-       memcpy((void*)gpw, (const void*)pw->pw, pw->pw_len);
+       /* Decode Base64 - APDU Response */
+       decode_apdu_resp = g_base64_decode((const gchar *)apdu, &decode_apdu_resp_len);
+       if (decode_apdu_resp_len > TEL_SIM_APDU_RESP_LEN_MAX) {
+               err("Invalid APDU response length: [%d]", decode_apdu_resp_len);
+
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-       param = g_variant_new("(is)", pw->lock_type, gpw);
+               /* Free resources */
+               g_free(decode_apdu_resp);
+               g_free(apdu);
+
+               return;
+       }
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "EnableFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_enable_sim_facility, evt_cb_data);
+       if (decode_apdu_resp_len)
+               memcpy(apdu_resp.apdu_resp, decode_apdu_resp, decode_apdu_resp_len);
+       apdu_resp.apdu_resp_len = decode_apdu_resp_len;
 
-       if (gpw)
-               free(gpw);
+       dbg("APDU response - Length: [%d] Data: [%s]",
+                       apdu_resp.apdu_resp_len, decode_apdu_resp);
 
-       return TAPI_API_SUCCESS;
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &apdu_resp);
+
+       /* Free resources */
+       g_free(decode_apdu_resp);
+       g_free(apdu);
 }
 
-EXPORT_API int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type,
-               tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sim_req_apdu(TelHandle *handle, TelSimApdu* apdu_data,
+                                                                         TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int sim_ret = 0;
-
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TapiRespCbData *rsp_cb_data = NULL;
+       gchar *encoded_req_apdu;
+       TelSimCardStatusInfo status_info = {0,};
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       dbg("Entry");
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS)
-               return sim_ret;
+       TEL_RETURN_IF_CHECK_FAIL(handle && apdu_data
+                       && apdu_data->apdu_len && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       dbg("facility type[%d]", type);
-       if(type < TAPI_SIM_LOCK_PS || type >TAPI_SIM_LOCK_PC)
-               return TAPI_API_INVALID_INPUT;
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       /* Encode Base64 */
+       encoded_req_apdu = g_base64_encode((const guchar *)apdu_data->apdu,
+                                                       apdu_data->apdu_len);
 
-       param = g_variant_new("(i)", type);
+       /* DBUS Request - REQ (APDU) */
+       telephony_sim_call_req_apdu(handle->sim_proxy,
+                       encoded_req_apdu, NULL, on_response_sim_req_apdu, rsp_cb_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_get_sim_facility, evt_cb_data);
+       /* Free resources */
+       g_free(encoded_req_apdu);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-EXPORT_API int tel_get_sim_lock_info(TapiHandle *handle, TelSimLockType_t type,
-               tapi_response_cb callback, void *user_data)
+static void on_response_sim_req_atr(GObject *source_object,
+                                               GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param = NULL;
-       int sim_ret = 0;
-
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
-
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret != TAPI_API_SUCCESS && sim_ret != TAPI_API_SIM_LOCKED)
-               return sim_ret;
+       TelSimAtr atr_resp;
+       guchar *decode_atr_resp;
+       gsize decode_atr_resp_len;
+       gchar *atr;
 
-       dbg("lock type[%d]", type);
-       if(type < TAPI_SIM_LOCK_PS || type >TAPI_SIM_LOCK_PC)
-               return TAPI_API_INVALID_INPUT;
+       GError *error = NULL;
+       gint sim_result = TEL_SIM_RESULT_FAILURE;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       memset(&atr_resp, 0, sizeof(TelSimAtr));
 
-       param = g_variant_new("(i)", type);
+       /* Finish and extract the response data */
+       telephony_sim_call_req_atr_finish(handle->sim_proxy, &sim_result, &atr, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetLockInfo", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_get_sim_lock_info, evt_cb_data);
+       /* Process Response data */
+       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
+               err("Failed to request SIM atr: [%d]", sim_result);
 
-       return TAPI_API_SUCCESS;
-}
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+               return;
+       }
 
-EXPORT_API int tel_req_sim_apdu(TapiHandle *handle, TelSimApdu_t* apdu_data,
-               tapi_response_cb callback, void *user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariantBuilder *builder = NULL;
-       GVariant *param = NULL;
-       GVariant *inner_gv = NULL;
-       int i = 0;
-       int sim_ret = 0;
+       /* Decode Base64 - ATR Response */
+       decode_atr_resp = g_base64_decode((const gchar *)atr, &decode_atr_resp_len);
+       if (decode_atr_resp_len > TEL_SIM_ATR_LEN_MAX) {
+               err("Invalid ATR response length: [%d]", decode_atr_resp_len);
 
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+               /* Invoke response callback */
+               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+               /* Free resources */
+               g_free(decode_atr_resp);
+               g_free(atr);
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+               return;
+       }
 
-       TAPI_RETURN_VAL_IF_FAIL(apdu_data, TAPI_API_INVALID_PTR);
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       if (decode_atr_resp_len)
+               memcpy(atr_resp.atr, decode_atr_resp, decode_atr_resp_len);
+       atr_resp.atr_len = decode_atr_resp_len;
 
-       builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
-       for (i = 0; i < apdu_data->apdu_len; i++) {
-               dbg("apdu_data->apdu[%d][0x%02x]", i,apdu_data->apdu[i]);
-               g_variant_builder_add(builder, "y", apdu_data->apdu[i]);
-       }
-       inner_gv = g_variant_builder_end(builder);
-       param = g_variant_new("(v)", inner_gv);
-       /*g_variant_builder_unref (builder);*/
+       dbg("ATR response - Length: [%d] Data: [%s]", atr_resp.atr_len, decode_atr_resp);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "TransferAPDU", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
-                       handle->ca, on_response_req_sim_apdu, evt_cb_data);
+       /* Invoke response callback */
+       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &atr_resp);
 
-       return TAPI_API_SUCCESS;
+       /* Free resources */
+       g_free(decode_atr_resp);
+       g_free(atr);
 }
 
-EXPORT_API int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_sim_req_atr(TelHandle *handle, TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       int sim_ret = 0;
-
-       dbg("Func Entrance");
-       if (_tel_check_tapi_state() != 0)
-               return TAPI_API_SERVICE_NOT_READY;
+       TapiRespCbData *rsp_cb_data = NULL;
+       TelSimCardStatusInfo status_info = {0,};
 
-       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       dbg("Entry");
 
-       sim_ret =_tel_check_sim_state(handle);
-       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
-               return sim_ret;
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       __get_sim_status_info(handle->sim_proxy, &status_info);
+       CHECK_IF_SIM_INITIALIZED(status_info.status);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
-                       DBUS_TELEPHONY_SIM_INTERFACE, "GetATR", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_req_sim_atr, evt_cb_data);
+       /* DBUS Request - REQ (ATR) */
+       telephony_sim_call_req_atr(handle->sim_proxy,
+                       NULL, on_response_sim_req_atr, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
index e4f6bfa..9a2ad18 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-
-/**
- * @ingroup    TAPI
- * @defgroup   SMS
- * @{
- *
- * SMS APIs allow a client to accomplish the following features: @n
- * - Send, Recieve, Save, Delete, Read short messages  @n
- * - Set and Get information like Service Center Address, Cell Broadcast configuration,Preferred Bearer, SMS parameters @n
- * - Retrieve information like Current Memory selected, NetTextCount related to the messages @n
- * - Set delivery report @n
- */
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "tapi_common.h"
-#include "TapiUtility.h"
-#include "TelSms.h"
-
-#include "common.h"
 #include "tapi_log.h"
-#include "ITapiNetText.h"
-
-static void on_response_default(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-
-       GVariant *dbus_result = NULL;
-       int data = 0;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+#include "tapi.h"
+#include "tapi_private.h"
 
-       CHECK_DEINIT(error);
+#include "tapi_sms.h"
 
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
-
-                       free(evt_cb_data);
-               }
-
-               if (error)
-                       g_error_free(error);
-
-               return;
+static gboolean __tapi_check_sim_sms_data(const TelSmsSimDataInfo *data)
+{
+       if (data == NULL)
+               return FALSE;
+
+       switch (data->status) {
+       case TEL_SMS_STATUS_MT_READ:
+       case TEL_SMS_STATUS_MT_UNREAD:
+       case TEL_SMS_STATUS_MO_SENT:
+       case TEL_SMS_STATUS_MO_NOT_SENT:
+       case TEL_SMS_STATUS_MO_DELIVERED:
+       case TEL_SMS_STATUS_MO_DELIVERY_NOT_CONFIRMED:
+       case TEL_SMS_STATUS_REPLACED:
+               break;
+       default:
+               return FALSE;
        }
 
-       dbg("on_response_default type_format(%s)", g_variant_get_type_string(dbus_result));
-
-       g_variant_get (dbus_result, "(i)", &result);
-
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
-               }
+       if (data->data.tpdu_length > TEL_SMS_SMDATA_SIZE_MAX)
+               return FALSE;
 
-               free(evt_cb_data);
-       }
+       return TRUE;
 }
 
-static void on_response_read_msg(GObject *source_object, GAsyncResult *res, gpointer user_data)
+void on_sms_property_change_handler(TelephonySms *sms,
+       GVariant *changed_properties, const gchar *invalidated_properties,
+       gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-
-       TelSmsData_t    readMsg = {0,};
 
-       GVariant *dbus_result = NULL;
-       const char *sca = NULL;
-       const char *tpdu = NULL;
-       gsize length;
-       guchar *decoded_sca = NULL;
-       guchar *decoded_tpdu = NULL;
+       TapiEvtCbData *evt_cb_data = NULL;
+       TelHandle *handle = user_data;
+       GVariantIter *iter;
+       const gchar *key;
+       GVariant *value;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
-
-                       free(evt_cb_data);
-               }
-
-               if (error)
-                       g_error_free(error);
+       if (handle == NULL)
+               return;
 
+       if (g_variant_n_children(changed_properties) == 0)
                return;
-       }
 
-       dbg("on_response_read_msg type_format(%s)", g_variant_get_type_string(dbus_result));
+       dbg("Properties Changed:");
 
-//     readMsg.SimIndex = 0xFFFFFFFF;
-       g_variant_get (dbus_result, "(iiisis)", &result,
-                       &readMsg.SimIndex,
-                       &readMsg.MsgStatus,
-                       &sca,
-                       &readMsg.SmsData.MsgLength,
-                       &tpdu);
+       g_variant_get(changed_properties, "a{sv}", &iter);
+       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+               char *evt_id;
 
-       decoded_sca = g_base64_decode(sca, &length);
-       if (decoded_sca) {
-               memcpy(&(readMsg.SmsData.Sca[0]), decoded_sca, TAPI_SMS_ENCODED_SCA_LEN_MAX);
-               g_free(decoded_sca);
-       }
+               dbg("%s", key);
 
-       decoded_tpdu = g_base64_decode(tpdu, &length);
-       if (decoded_tpdu) {
-               memcpy(&(readMsg.SmsData.szData[0]), decoded_tpdu, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
-               g_free(decoded_tpdu);
-       }
+               evt_id = g_strdup_printf("%s:%s", TELEPHONY_SMS_INTERFACE, key);
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &readMsg, evt_cb_data->user_data);
-               }
+               evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
 
-               free(evt_cb_data);
+               if (evt_cb_data) {
+                       if (!g_strcmp0("SimMemoryStatus", key)
+                               || !g_strcmp0("InitStatus", key)) {
+                               gboolean status = g_variant_get_boolean(value);
+                               dbg("status[%d]", status);
+                               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &status);
+                       }
+               }
+               g_free(evt_id);
        }
+       g_variant_iter_free(iter);
 }
 
-static void on_response_write_msg(GObject *source_object, GAsyncResult *res, gpointer user_data)
+void on_sms_signal_emit_handler(TelephonySms *sms, gchar *sender_name,
+               gchar *signal_name, GVariant *parameters, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       int index = 0;
-
-       GVariant *dbus_result = NULL;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       TapiEvtCbData *evt_cb_data = NULL;
+       TelHandle *handle = user_data;
+       char *evt_id = NULL;
 
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
+       dbg("Entry");
 
-                       free(evt_cb_data);
-               }
+       if (handle == NULL)
+               return;
 
-               if (error)
-                       g_error_free(error);
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SMS_INTERFACE,
+                                       signal_name);
 
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               g_free(evt_id);
                return;
        }
 
-       dbg("on_response_write_msg type_format(%s)", g_variant_get_type_string(dbus_result));
+       if (!g_strcmp0(signal_name, "IncomingMsg")) {
+               TelSmsDatapackageInfo incoming_msg;
+               GVariant *sca;
+               char *sca_number = NULL;
+               char *tpdu = NULL;
+               guchar *decoded_tpdu = NULL;
+
+               GVariantIter *iter = NULL;
+               GVariant *key_value;
+               const gchar *key;
 
-       g_variant_get (dbus_result, "(ii)", &result, &index);
+               memset(&incoming_msg, 0, sizeof(TelSmsDatapackageInfo));
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &index, evt_cb_data->user_data);
+               g_variant_get(parameters, "(@a{sv}s)", &sca, &tpdu);
+               g_variant_get(sca, "a{sv}", &iter);
+               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "ton") == 0) {
+                               incoming_msg.sca.ton = g_variant_get_byte(key_value);
+                       }
+                       else if (g_strcmp0(key, "npi") == 0) {
+                               incoming_msg.sca.npi = g_variant_get_byte(key_value);
+                       }
+                       else if (g_strcmp0(key, "number") == 0) {
+                               g_strlcpy(incoming_msg.sca.number,
+                                       g_variant_get_string(key_value, NULL),
+                                       TEL_SMS_SCA_LEN_MAX + 1);
+                       }
                }
+               g_variant_iter_free(iter);
 
-               free(evt_cb_data);
-       }
-}
+               dbg("TON: [%d] NPI: [%d] SCA: [%s]",
+                       incoming_msg.sca.ton, incoming_msg.sca.npi,
+                       incoming_msg.sca.number);
 
-static void on_response_delete_msg(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       int index = -1;
+               decoded_tpdu = g_base64_decode(tpdu, &incoming_msg.tpdu_length);
+               if (!decoded_tpdu) {
+                       err("base64 decoding of tpdu failed");
+                       goto out;
+               }
+               else if (incoming_msg.tpdu_length > TEL_SMS_SMDATA_SIZE_MAX) {
+                       err("invalid tpdu length received: [%d]", incoming_msg.tpdu_length);
+                       g_free(decoded_tpdu);
+                       goto out;
+               }
 
-       GVariant *dbus_result = NULL;
+               memcpy((gchar*)incoming_msg.tpdu, (gchar*)decoded_tpdu,
+                               TEL_SMS_SMDATA_SIZE_MAX);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+               dbg("Signal [%s] TPDU length: [%d]",
+                       signal_name, incoming_msg.tpdu_length);
 
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &incoming_msg);
 
-                       free(evt_cb_data);
+               g_free(decoded_tpdu);
+out:
+               g_variant_unref(sca);
+               g_free(sca_number);
+               g_free(tpdu);
+       }
+       else if (!g_strcmp0(signal_name, "IncomingCbMsg")) {
+               TelSmsCbMsgInfo cb_msg;
+               char *pdu = NULL;
+               memset(&cb_msg, 0, sizeof(TelSmsCbMsgInfo));
+
+               g_variant_get(parameters, "(is)", &cb_msg.cb_type, &pdu);
+
+               cb_msg.cb_data = g_base64_decode(pdu, &cb_msg.length);
+               if (cb_msg.cb_data) {
+                       dbg("signal[%s] cb_type[%d] cb_data[%s] cb_data_len[%d]",
+                               signal_name, cb_msg.cb_type, pdu, cb_msg.length);
+               } else {
+                       dbg("signal[%s] cb_type[%d] cb_data_len[%d]",
+                               signal_name, cb_msg.cb_type, cb_msg.length);
                }
 
-               if (error)
-                       g_error_free(error);
-
-               return;
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &cb_msg);
+               g_free(pdu);
+               g_free(cb_msg.cb_data);
        }
+       else if (!g_strcmp0(signal_name, "IncomingEtwsMsg")) {
+               TelSmsEtwsMsgInfo etws_msg;
+               char *pdu = NULL;
+               memset(&etws_msg, 0, sizeof(TelSmsEtwsMsgInfo));
+
+               g_variant_get(parameters, "(is)", &etws_msg.etws_type, &pdu);
+               etws_msg.etws_data = g_base64_decode(pdu, &etws_msg.length);
+
+               if (etws_msg.etws_data) {
+                       dbg("signal[%s] etws_type[%d]  etws_data[%s] etws_data_len[%d]",
+                               signal_name, etws_msg.etws_type, pdu, etws_msg.length);
+               } else {
+                       dbg("signal[%s] etws_type[%d]  etws_data_len[%d]",
+                               signal_name, etws_msg.etws_type, etws_msg.length);
+               }
 
-       dbg("on_response_delete_msg type_format(%s)", g_variant_get_type_string(dbus_result));
-
-       g_variant_get (dbus_result, "(ii)", &result, &index);
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &etws_msg);
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &index, evt_cb_data->user_data);
-               }
+               g_free(pdu);
+               g_free(etws_msg.etws_data);
 
-               free(evt_cb_data);
        }
+       else {
+               err("Unsupported signal [%s]", signal_name);
+       }
+
+       g_free(evt_id);
 }
 
-static void on_response_get_msg_count(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sms_send(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelSmsStoredMsgCountInfo_t storedMsgCnt = {0,};
 
-       GVariant *dbus_result = NULL;
-       const char *indexList = NULL;
-       gsize length;
-       guchar *decoded_indexList = NULL;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_sms_call_send_finish(handle->sms_proxy, (int *)&result,
+                       res, &error);
 
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-                       free(evt_cb_data);
-               }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-               if (error)
-                       g_error_free(error);
+EXPORT_API TelReturn tapi_sms_send(TelHandle *handle,
+                       const TelSmsSendInfo *info,
+                       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
+       GVariantBuilder sca_builder;
+       GVariant *sca;
+       char *encoded_tpdu;
 
-               return;
-       }
+       dbg("Entry");
 
-       dbg("on_response_get_msg_count type_format(%s)", g_variant_get_type_string(dbus_result));
+       g_return_val_if_fail(handle != NULL && info != NULL &&
+                       info->send_data.tpdu_length <= TEL_SMS_SMDATA_SIZE_MAX &&
+                       callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(iiis)", &result,
-                                                               &storedMsgCnt.TotalCount,
-                                                               &storedMsgCnt.UsedCount,
-                                                               &indexList);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       decoded_indexList = g_base64_decode(indexList, &length);
-       if (decoded_indexList) {
-               memcpy(&(storedMsgCnt.IndexList[0]), decoded_indexList, TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX);
-               g_free(decoded_indexList);
-       }
+       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &storedMsgCnt, evt_cb_data->user_data);
-               }
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "ton", g_variant_new_byte(info->send_data.sca.ton));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "npi", g_variant_new_byte(info->send_data.sca.npi));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "number", g_variant_new_string(info->send_data.sca.number));
 
-               free(evt_cb_data);
-       }
+       sca = g_variant_builder_end(&sca_builder);
 
+       encoded_tpdu = g_base64_encode(info->send_data.tpdu, info->send_data.tpdu_length);
+
+       telephony_sms_call_send(handle->sms_proxy,
+               info->more_msgs,
+               sca, encoded_tpdu, NULL,
+               on_response_sms_send, rsp_cb_data);
+
+       g_free(encoded_tpdu);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sca(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sms_read_sms_in_sim(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelSmsAddressInfo_t scaInfo = {0,};
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       GVariant *dbus_result = NULL;
-       const char *sca = NULL;
-       gsize length;
-       guchar *decoded_sca = NULL;
+       TelSmsSimDataInfo data;
+       TelSmsMsgStatus status;
+       GVariant *sca = NULL;
+       unsigned int pdu_len;
+       char *encoded_pdu = NULL;
+       guchar *pdu = NULL;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       GVariantIter *iter = NULL;
+       GVariant *key_value;
+       const gchar *key;
 
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       GError *error = NULL;
 
-                       free(evt_cb_data);
-               }
+       dbg("Entry");
 
-               if (error)
-                       g_error_free(error);
+       telephony_sms_call_read_in_sim_finish(handle->sms_proxy,
+               (int *)&result, (int *)&status, &sca, &encoded_pdu, res, &error);
 
-               return;
+       CHECK_DEINIT(error, rsp_cb_data, result);
+
+       if (result != TEL_SMS_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               goto out;
        }
 
-       dbg("on_response_get_sca type_format(%s)", g_variant_get_type_string(dbus_result));
+       pdu = g_base64_decode(encoded_pdu, &pdu_len);
+       if (pdu_len > TEL_SMS_SMDATA_SIZE_MAX) {
+               err("PDU length is wrong");
+               RESP_CALLBACK_CALL(rsp_cb_data, TEL_SMS_RESULT_FAILURE, NULL);
+               goto out;
+       }
 
-       g_variant_get (dbus_result, "(iiiis)", &result,
-                                       &scaInfo.Ton,
-                                       &scaInfo.Npi,
-                                       &scaInfo.DialNumLen,
-                                       &sca);
+       data.status = status;
+       data.data.tpdu_length = pdu_len;
+       memcpy(data.data.tpdu, pdu, pdu_len);
 
-       decoded_sca = g_base64_decode(sca, &length);
-       if (decoded_sca) {
-               memcpy(&(scaInfo.szDiallingNum[0]), decoded_sca, TAPI_SIM_SMSP_ADDRESS_LEN + 1);
-               g_free(decoded_sca);
+       g_variant_get(sca, "a{sv}", &iter);
+       while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+               if (g_strcmp0(key, "ton") == 0) {
+                       data.data.sca.ton = g_variant_get_byte(key_value);
+               }
+               else if (g_strcmp0(key, "npi") == 0) {
+                       data.data.sca.npi = g_variant_get_byte(key_value);
+               }
+               else if (g_strcmp0(key, "number") == 0) {
+                       g_strlcpy(data.data.sca.number,
+                               g_variant_get_string(key_value, NULL),
+                               TEL_SMS_SCA_LEN_MAX + 1);
+               }
        }
+       g_variant_iter_free(iter);
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &scaInfo, evt_cb_data->user_data);
-               }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &data);
 
-               free(evt_cb_data);
-       }
+out:
+       g_variant_unref(sca);
+       g_free(encoded_pdu);
+       g_free(pdu);
 }
 
-static void on_response_get_cb_config(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_sms_read_sms_in_sim(TelHandle *handle,
+               unsigned int index, TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       int i;
-       TelSmsCbConfig_t cbConfig = {0,};
-
-       GVariant *dbus_result = NULL;
-       GVariant *value = NULL;
-       GVariantIter *iter = NULL;
-       GVariantIter *iter_row = NULL;
-       const gchar *key = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("Entry");
 
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
+       g_return_val_if_fail(handle != NULL &&
+                       index < TEL_SMS_GSM_MSG_NUM_MAX &&
+                       callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-                       free(evt_cb_data);
-               }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-               if (error)
-                       g_error_free(error);
+       telephony_sms_call_read_in_sim(handle->sms_proxy,
+               index, NULL,
+               on_response_sms_read_sms_in_sim, rsp_cb_data);
 
-               return;
-       }
+       return TEL_RETURN_SUCCESS;
+}
 
-       dbg("on_response_get_cb_config type_format(%s)", g_variant_get_type_string(dbus_result));
+static void on_response_sms_write_sms_in_sim(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       unsigned int index;
+       GError *error = NULL;
 
-       g_variant_get (dbus_result, "(iiiiiaa{sv})", &result,
-                                       &cbConfig.Net3gppType,
-                                       &cbConfig.CBEnabled,
-                                       &cbConfig.MsgIdMaxCount,
-                                       &cbConfig.MsgIdRangeCount,
-                                       &iter);
+       dbg("Entry");
 
-       i = 0;
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
-                       if (!g_strcmp0(key, "FromMsgId")) {
-                               cbConfig.MsgIDs[i].Net3gpp.FromMsgId = g_variant_get_uint16(value);
-                       }
-                       if (!g_strcmp0(key, "ToMsgId")) {
-                               cbConfig.MsgIDs[i].Net3gpp.ToMsgId = g_variant_get_uint16(value);
-                       }
-                       if (!g_strcmp0(key, "CBCategory")) {
-                               cbConfig.MsgIDs[i].Net3gpp2.CBCategory = g_variant_get_uint16(value);
-                       }
-                       if (!g_strcmp0(key, "CBLanguage")) {
-                               cbConfig.MsgIDs[i].Net3gpp2.CBLanguage = g_variant_get_uint16(value);
-                       }
-                       if (!g_strcmp0(key, "Selected")) {
-                               cbConfig.MsgIDs[i].Net3gpp.Selected = g_variant_get_byte(value);
-                       }
-               }
-               i++;
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
+       telephony_sms_call_write_in_sim_finish(handle->sms_proxy,
+                       (int *)&result, &index, res, &error);
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &cbConfig, evt_cb_data->user_data);
-               }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               free(evt_cb_data);
+       if (result != TEL_SMS_RESULT_SUCCESS) {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       } else {
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &index);
        }
 }
 
-static void on_response_get_sms_params(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_sms_write_sms_in_sim(TelHandle *handle,
+       const TelSmsSimDataInfo *wdata,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelSmsParams_t paramInfo = {0,};
-
-       GVariant *dbus_result = NULL;
-       const char *alphaId = NULL;
-       const char *destDialNum = NULL;
-       const char *scaDialNum = NULL;
-       gsize length;
-       guchar *decoded_alphaId = NULL;
-       guchar *decoded_destDialNum = NULL;
-       guchar *decoded_scaDialNum = NULL;
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
+       TapiRespCbData *rsp_cb_data;
+       GVariantBuilder sca_builder;
+       GVariant *sca;
+       char *encoded_tpdu;
 
-                       free(evt_cb_data);
-               }
+       dbg("Entry");
 
-               if (error)
-                       g_error_free(error);
+       g_return_val_if_fail(handle != NULL &&
+                       __tapi_check_sim_sms_data(wdata) && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-               return;
-       }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       dbg("on_response_get_sms_params type_format(%s)", g_variant_get_type_string(dbus_result));
-
-       g_variant_get (dbus_result, "(iiiisiiiisiiisiii)", &result,
-                                                               &paramInfo.RecordIndex,
-                                                               &paramInfo.RecordLen,
-                                                               &paramInfo.AlphaIdLen,
-                                                               &alphaId,
-                                                               &paramInfo.ParamIndicator,
-                                                               &paramInfo.TpDestAddr.DialNumLen,
-                                                               &paramInfo.TpDestAddr.Ton,
-                                                               &paramInfo.TpDestAddr.Npi,
-                                                               &destDialNum,
-                                                               &paramInfo.TpSvcCntrAddr.DialNumLen,
-                                                               &paramInfo.TpSvcCntrAddr.Ton,
-                                                               &paramInfo.TpSvcCntrAddr.Npi,
-                                                               &scaDialNum,
-                                                               &paramInfo.TpProtocolId,
-                                                               &paramInfo.TpDataCodingScheme,
-                                                               &paramInfo.TpValidityPeriod);
-
-       decoded_alphaId = g_base64_decode(alphaId, &length);
-       if (decoded_alphaId) {
-               memcpy(&(paramInfo.szAlphaId[0]), decoded_alphaId, TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1);
-               g_free(decoded_alphaId);
-       }
+       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
 
-       decoded_destDialNum = g_base64_decode(destDialNum, &length);
-       if (decoded_destDialNum) {
-               memcpy(&(paramInfo.TpDestAddr.szDiallingNum[0]), decoded_destDialNum, TAPI_SIM_SMSP_ADDRESS_LEN + 1);
-               g_free(decoded_destDialNum);
-       }
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "ton", g_variant_new_byte(wdata->data.sca.ton));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "npi", g_variant_new_byte(wdata->data.sca.npi));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "number", g_variant_new_string(wdata->data.sca.number));
 
-       decoded_scaDialNum = g_base64_decode(scaDialNum, &length);
-       if (decoded_scaDialNum) {
-               memcpy(&(paramInfo.TpSvcCntrAddr.szDiallingNum[0]), decoded_scaDialNum, TAPI_SIM_SMSP_ADDRESS_LEN + 1);
-               g_free(decoded_scaDialNum);
-       }
+       sca = g_variant_builder_end(&sca_builder);
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &paramInfo, evt_cb_data->user_data);
-               }
+       encoded_tpdu = g_base64_encode(wdata->data.tpdu, wdata->data.tpdu_length);
 
-               free(evt_cb_data);
-       }
+       telephony_sms_call_write_in_sim(handle->sms_proxy,
+               wdata->status, sca, encoded_tpdu,
+               NULL,
+               on_response_sms_write_sms_in_sim, rsp_cb_data);
 
+       g_free(encoded_tpdu);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_get_sms_param_cnt(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_sms_delete_sms_in_sim(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
        GError *error = NULL;
-       GDBusConnection *conn = NULL;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       int recordCount = 0;
 
-       GVariant *dbus_result = NULL;
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_sms_call_delete_in_sim_finish(handle->sms_proxy,
+                       (int *)&result, res, &error);
 
-       if (!dbus_result) {
-               if (evt_cb_data) {
-                       if (evt_cb_data->cb_fn) {
-                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-                       }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-                       free(evt_cb_data);
-               }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-               if (error)
-                       g_error_free(error);
+EXPORT_API TelReturn tapi_sms_delete_sms_in_sim(TelHandle *handle,
+       unsigned int index,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
 
-               return;
-       }
+       dbg("Entry");
 
-       dbg("on_response_get_sms_param_cnt type_format(%s)", g_variant_get_type_string(dbus_result));
+       g_return_val_if_fail(handle != NULL &&
+                       callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(ii)", &result,
-                       &recordCount);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &recordCount, evt_cb_data->user_data);
-               }
+       telephony_sms_call_delete_in_sim(handle->sms_proxy, index, NULL,
+                       on_response_sms_delete_sms_in_sim, rsp_cb_data);
 
-               free(evt_cb_data);
-       }
+       return TEL_RETURN_SUCCESS;
 }
 
-/**
- *
- * This function enables the applications to send SMS to the network.
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]         pDataPackage - SMS-SUBMIT TPDU or SMS-COMMAND, and its length have to be passed in this structure.
- *                             tapi_sms_more_to_send_t parameter denotes whether the sms is short or concatenated.
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer              tapi_sms_datapackage, tapi_sms_more_to_send_t.
- */
-EXPORT_API int tel_send_sms(struct tapi_handle *handle,
-               const TelSmsDatapackageInfo_t *pDataPackage,
-               int bMoreMsgToSend,
-               tapi_response_cb callback, void* user_data)
+static void on_response_sms_get_count(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       gchar *encoded_sca = NULL;
-       gchar *encoded_tpdu = NULL;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       TelSmsStoredMsgCountInfo info;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       GVariant *var;
+       GVariantIter *iter;
+       unsigned int index;
+       gint i = 0;
 
-       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage ,TAPI_API_INVALID_PTR);
+       dbg("Entry");
 
-       if ((pDataPackage->Sca[0] > TAPI_SIM_SMSP_ADDRESS_LEN)
-                       || (pDataPackage->MsgLength > TAPI_NETTEXT_SMDATA_SIZE_MAX))
-               return TAPI_API_INVALID_INPUT;
+       memset(&info, 0, sizeof(TelSmsStoredMsgCountInfo));
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_sms_call_get_count_finish(handle->sms_proxy,
+                       (int *)&result, &info.total_count, &info.used_count,
+                       &var, res, &error);
 
-       encoded_sca = g_base64_encode(&(pDataPackage->Sca[0]), TAPI_SMS_ENCODED_SCA_LEN_MAX);
-       if (encoded_sca == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the SCA");
-               return TAPI_API_OPERATION_FAILED;
+       CHECK_DEINIT(error, rsp_cb_data, result);
+
+       if (result != TEL_SMS_RESULT_SUCCESS) {
+               g_variant_unref(var);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
        }
 
-       encoded_tpdu = g_base64_encode(&(pDataPackage->szData[0]), pDataPackage->MsgLength);
-       if (encoded_tpdu == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the TPDU");
-               return TAPI_API_OPERATION_FAILED;
+       if (info.used_count == 0) {
+               g_variant_unref(var);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &info);
+               return;
        }
 
-       param = g_variant_new("(sisi)", encoded_sca,
-                                                       pDataPackage->MsgLength,
-                                                       encoded_tpdu,
-                                                       bMoreMsgToSend);
+       if (info.used_count > TEL_SMS_GSM_MSG_NUM_MAX) {
+               err("Invalid result!");
+               g_variant_unref(var);
+               result = TEL_SMS_RESULT_FAILURE;
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SendMsg", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, 120000, handle->ca,
-               on_response_default, evt_cb_data);
+       g_variant_get(var, "au", &iter);
 
-       g_free(encoded_sca);
-       g_free(encoded_tpdu);
+       dbg("Fetching index ...");
+       while (g_variant_iter_next(iter, "u", &index)) {
+               dbg("index - %d", index);
+               info.index_list[i] = index;
+               i++;
+       }
 
-       return TAPI_API_SUCCESS;
-}
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &info);
 
+       g_variant_iter_free(iter);
+       g_variant_unref(var);
+}
 
-/**
- *
- * This function enables the applications to read sms from the preferred storage.
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          index - the message to be read
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark             tapi_sms_selmem_set is to be called always to select the
- *                             preferred memory before calling this api.
- * @Refer
- */
-EXPORT_API int tel_read_sms_in_sim(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+EXPORT_API TelReturn tapi_sms_get_count(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance ");
-
-       if( (index < 0) || (index > TAPI_NETTEXT_MAX_INDEX) ) {
-               err("Invalid Input -Read SMS %d",index);
-
-               return TAPI_API_INVALID_INPUT;
-       }
+       TapiRespCbData *rsp_cb_data;
 
-       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", index);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "ReadMsg", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_read_msg, evt_cb_data);
+       telephony_sms_call_get_count(handle->sms_proxy, NULL,
+                       on_response_sms_get_count, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-
-/**
- *
- * This function enables the applications to write/save sms to the preferred storage.
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          index - the message to be saved, msg_status will denote the status
- *                             of the message whether Sent, Unsent, Read, Unread, Unknown.
- *                             pDataPackage- the SMS-SUBMIT PDU or SMS-DELIVER,SMS-STATUSREPORT
- *                             being passed to be saved in memory.
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @Refer              tapi_sms_datapackage, tapi_sms_status_type.
- */
-EXPORT_API int tel_write_sms_in_sim(struct tapi_handle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data)
+static void on_response_sms_set_cb_config(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       gchar *encoded_sca = NULL;
-       gchar *encoded_tpdu = NULL;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(pWriteData ,TAPI_API_INVALID_PTR);
+       telephony_sms_call_set_cb_config_finish(handle->sms_proxy,
+                       (int *)&result, res, &error);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       encoded_sca = g_base64_encode(&(pWriteData->SmsData.Sca[0]), TAPI_SMS_ENCODED_SCA_LEN_MAX);
-       if (encoded_sca == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the SCA");
-               return TAPI_API_OPERATION_FAILED;
-       }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       encoded_tpdu = g_base64_encode(&(pWriteData->SmsData.szData[0]), TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
-       if (encoded_tpdu == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the TPDU");
-               return TAPI_API_OPERATION_FAILED;
+EXPORT_API TelReturn tapi_sms_set_cb_config(TelHandle *handle,
+       const TelSmsCbConfigInfo *cb_conf,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
+       GVariant *mids;
+       GVariantBuilder builder;
+       unsigned int i;
+
+       dbg("Entry");
+
+       g_return_val_if_fail(handle != NULL && callback != NULL &&
+                       cb_conf != NULL &&
+                       cb_conf->msg_id_range_cnt < TEL_SMS_GSM_CBMI_LIST_SIZE_MAX,
+                       TEL_RETURN_INVALID_PARAMETER);
+
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       g_variant_builder_init(&builder, G_VARIANT_TYPE("aa{sv}"));
+       for (i = 0; i < cb_conf->msg_id_range_cnt; i++) {
+               g_variant_builder_open(&builder, G_VARIANT_TYPE("a{sv}"));
+
+               g_variant_builder_add(&builder, "{sv}",
+                       "from_msg_id",
+                       g_variant_new_uint16(cb_conf->msg_ids[i].from_msg_id));
+               g_variant_builder_add(&builder, "{sv}",
+                       "to_msg_id",
+                       g_variant_new_uint16(cb_conf->msg_ids[i].to_msg_id));
+               g_variant_builder_add(&builder, "{sv}",
+                       "selected",
+                       g_variant_new_boolean(cb_conf->msg_ids[i].selected));
+
+               g_variant_builder_close(&builder);
        }
+       mids = g_variant_builder_end(&builder);
 
-       param = g_variant_new("(isis)", pWriteData->MsgStatus,
-                                                       encoded_sca,
-                                                       pWriteData->SmsData.MsgLength,
-                                                       encoded_tpdu);
-
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SaveMsg", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_write_msg, evt_cb_data);
-
-       g_free(encoded_sca);
-       g_free(encoded_tpdu);
+       telephony_sms_call_set_cb_config(handle->sms_proxy,
+                       cb_conf->cb_enabled, cb_conf->msg_id_range_cnt,
+                       mids, NULL,
+                       on_response_sms_set_cb_config, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-
-/**
- *
- * This function enables the applications to delete sms to the preferred storage.
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          index - the message to be deleted. if index is -1, all sms in the sim are deleted.
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark             tapi_sms_selmem_set has to be called always before calling this API
- * @Refer
- */
-EXPORT_API int tel_delete_sms_in_sim(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+static void on_response_sms_get_cb_config(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       TelSmsCbConfigInfo config;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       GVariant *var;
+       GVariantIter *iter = NULL, *iter_row = NULL;
+       GVariant *key_value;
+       const gchar *key;
 
-       if ((index < -1) || (index > TAPI_NETTEXT_MAX_INDEX)) {
-               err("Invalid Index Input");
-               return TAPI_API_INVALID_INPUT;
-       }
+       guint count = 0;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(i)", index);
+       memset(&config, 0, sizeof(TelSmsCbConfigInfo));
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "DeleteMsg", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_delete_msg, evt_cb_data);
+       telephony_sms_call_get_cb_config_finish(handle->sms_proxy,
+                       (int *)&result, &config.cb_enabled,
+                       &config.msg_id_range_cnt, &var,
+                       res, &error);
 
-       return TAPI_API_SUCCESS;
-}
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
+       if (result != TEL_SMS_RESULT_SUCCESS) {
+               g_variant_unref(var);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
 
-/**
- *
- * This function enables the applications to get the count of the messages stored in the memory
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]  None
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *              Its value can be any value from 0 to 255 if the API is returned successfully
- *                 -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface  Asynchronous
- * @remark             The requested memory details come in response API
- * @Refer          None
- */
-EXPORT_API int tel_get_sms_count(struct tapi_handle *handle, tapi_response_cb callback, void* user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-
-       dbg("Func Entrance ");
+       if (config.msg_id_range_cnt == 0) {
+               g_variant_unref(var);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &config);
+               return;
+       }
 
-       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+       if (g_variant_n_children(var) != config.msg_id_range_cnt
+               || config.msg_id_range_cnt > TEL_SMS_GSM_CBMI_LIST_SIZE_MAX) {
+               err("Invalid result!");
+               g_variant_unref(var);
+               result = TEL_SMS_RESULT_FAILURE;
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_variant_get(var, "aa{sv}", &iter);
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "from_msg_id") == 0) {
+                               config.msg_ids[count].from_msg_id =
+                                       g_variant_get_uint16(key_value);
+                       }
+                       else if (g_strcmp0(key, "to_msg_id") == 0) {
+                               config.msg_ids[count].to_msg_id =
+                                       g_variant_get_uint16(key_value);
+                       }
+                       else if (g_strcmp0(key, "number") == 0) {
+                               config.msg_ids[count].selected =
+                                       g_variant_get_boolean(key_value);
+                       }
+               }
+               count++;
+               g_variant_iter_free(iter_row);
+       }
+       g_variant_iter_free(iter);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "GetMsgCount", NULL, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_get_msg_count, evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &config);
 
-       return TAPI_API_SUCCESS;
+       g_variant_unref(var);
 }
 
-
-/**
- *
- * This function enables the applications to get the service center address from the SIM storage
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          pSCA - the service center address that is to be set in the SIM storage
- *                                         refer to 3GPP TS 23.040:9.1.2.5 Address fields
- *                             index - the index that is to be set in the SIM storage
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer             tapi_sms_sms_addr_info
- */
-EXPORT_API int tel_get_sms_sca(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+EXPORT_API TelReturn tapi_sms_get_cb_config(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX)) {
-               err("Invalid Index Input");
-               return TAPI_API_INVALID_INPUT;
-       }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_sms_call_get_cb_config(handle->sms_proxy, NULL,
+                       on_response_sms_get_cb_config, rsp_cb_data);
 
-       param = g_variant_new("(i)", index);
+       return TEL_RETURN_SUCCESS;
+}
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "GetSca", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_get_sca, evt_cb_data);
+static void on_response_sms_get_parameters(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       TelSmsParamsInfoList param_list;
+       GError *error = NULL;
 
-       return TAPI_API_SUCCESS;
-}
+       GVariant *var;
+       GVariantIter *iter = NULL, *iter_row = NULL;
+       GVariant *key_value;
+       const gchar *key;
 
+       guint count = 0;
 
-/**
- *
- * This function enables the applications to set the service center address in the SIM storage
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          pSCA - the service center address that is to be set in the SIM storage
- *                                         refer to 3GPP TS 23.040:9.1.2.5 Address fields
- *                             index - the index that is to be set in the SIM storage
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          ASynchronous.
- * @remark
- * @Refer             tapi_sms_sms_addr_info
- */
-EXPORT_API int tel_set_sms_sca(struct tapi_handle *handle, const TelSmsAddressInfo_t *pSCA, int index, tapi_response_cb callback, void* user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       gchar *encoded_sca = NULL;
+       TelSmsParamsInfo *params;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(pSCA ,TAPI_API_INVALID_PTR);
+       telephony_sms_call_get_parameters_finish(handle->sms_proxy,
+               (int *)&result, &param_list.count, &var, res, &error);
 
-       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX)) {
-               err("Invalid Index Input");
-               return TAPI_API_INVALID_INPUT;
+       CHECK_DEINIT(error, rsp_cb_data, result);
+
+       if (result != TEL_SMS_RESULT_SUCCESS) {
+               g_variant_unref(var);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
        }
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       if (param_list.count == 0) {
+               g_variant_unref(var);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, &param_list);
+               return;
+       }
 
-       encoded_sca = g_base64_encode(&(pSCA->szDiallingNum[0]), TAPI_SIM_SMSP_ADDRESS_LEN);
-       if (encoded_sca == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the SCA");
-               return TAPI_API_OPERATION_FAILED;
+       if (g_variant_n_children(var) != param_list.count) {
+               err("Invalid result!");
+               g_variant_unref(var);
+               result = TEL_SMS_RESULT_FAILURE;
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
        }
 
-       param = g_variant_new("(iiiis)", index,
-                                                       pSCA->Ton,
-                                                       pSCA->Npi,
-                                                       pSCA->DialNumLen,
-                                                       encoded_sca);
+       param_list.params =
+               g_malloc0(sizeof(TelSmsParamsInfo) * param_list.count);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SetSca", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
+       params = param_list.params;
 
-       g_free(encoded_sca);
+       g_variant_get(var, "aa{sv}", &iter);
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                       if (g_strcmp0(key, "index") == 0) {
+                               params[count].index = g_variant_get_uint32(key_value);
+                       }
+                       else if (g_strcmp0(key, "sca") == 0) {
+                               GVariantIter *iter2 = NULL;
+                               GVariant *key_value2;
+                               const gchar *key2;
+
+                               g_variant_get(key_value, "a{sv}", &iter2);
+                               while (g_variant_iter_loop(iter2, "{sv}", &key2, &key_value2)) {
+                                       if (g_strcmp0(key, "ton") == 0) {
+                                               params[count].sca.ton =
+                                                       g_variant_get_byte(key_value2);
+                                       }
+                                       else if (g_strcmp0(key2, "npi") == 0) {
+                                               params[count].sca.npi =
+                                                       g_variant_get_byte(key_value2);
+                                       }
+                                       else if (g_strcmp0(key2, "number") == 0) {
+                                               g_strlcpy(params[count].sca.number,
+                                                       g_variant_get_string(key_value2, NULL),
+                                                       TEL_SMS_SCA_LEN_MAX + 1);
+                                       }
+                               }
+                               g_variant_iter_free(iter2);
+                       }
+                       else if (g_strcmp0(key, "vp") == 0) {
+                               params[count].vp = g_variant_get_boolean(key_value);
+                       }
+               }
+               count++;
+               g_variant_iter_free(iter_row);
+       }
+       g_variant_iter_free(iter);
 
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &param_list);
 
-       return TAPI_API_SUCCESS;
+       g_variant_unref(var);
+       g_free(param_list.params);
 }
 
-
-/**
- *
- * This function enables the applications to set the configuration for cell broadcast messages
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          None
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer             None
- */
-EXPORT_API int tel_get_sms_cb_config(struct tapi_handle *handle, tapi_response_cb callback, void* user_data)
+EXPORT_API TelReturn tapi_sms_get_parameters(TelHandle *handle,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "GetCbConfig", NULL, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_get_cb_config, evt_cb_data);
+       telephony_sms_call_get_parameters(handle->sms_proxy, NULL,
+                       on_response_sms_get_parameters, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**
- *
- * This function enables the applications to set the configuration for cell broadcast messages
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          tapi_sms_cb_config the configuration details to be set
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer             tapi_sms_cb_config
- */
-EXPORT_API int tel_set_sms_cb_config(struct tapi_handle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data)
+static void on_response_sms_set_parameters(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       gchar *encoded_cbConfig = NULL;
-
-       dbg("Func Entrance ");
-
-       TAPI_RET_ERR_NUM_IF_FAIL(pCBConfig ,TAPI_API_INVALID_PTR);
-
-       if ((pCBConfig->Net3gppType > 2) || (pCBConfig->MsgIdRangeCount < 0)) {
-               err("Invalid Input -3gppType(%d)",pCBConfig->Net3gppType);
-               err("Invalid Input -MsgIdRangeCount(%d)",pCBConfig->MsgIdRangeCount);
-
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       encoded_cbConfig = g_base64_encode((const guchar *)&(pCBConfig->MsgIDs[0]), TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX*5);
-       if (encoded_cbConfig == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the CB Config");
-               return TAPI_API_OPERATION_FAILED;
-       }
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       param = g_variant_new("(iiiis)", pCBConfig->Net3gppType,
-                                                       pCBConfig->CBEnabled,
-                                                       pCBConfig->MsgIdMaxCount,
-                                                       pCBConfig->MsgIdRangeCount,
-                                                       encoded_cbConfig);
+       dbg("Entry");
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SetCbConfig", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
+       telephony_sms_call_set_parameters_finish(handle->sms_proxy,
+                       (int *)&result, res, &error);
 
-       g_free(encoded_cbConfig);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-/**
- *
- * This function enables the applications to set the phone memory status whether full or available
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          memory_status whether full or available
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer             tapi_sms_memstatus_type
- */
-EXPORT_API int tel_set_sms_memory_status(struct tapi_handle *handle, int memoryStatus, tapi_response_cb callback, void* user_data)
+EXPORT_API TelReturn tapi_sms_set_parameters(TelHandle *handle,
+       const TelSmsParamsInfo *params,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance ");
-
-       if ((memoryStatus < TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE) || (memoryStatus > TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL)) {
-               err("Invalid Input -MemoryStatus Nettext");
-               return TAPI_API_INVALID_INPUT;
-       }
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TapiRespCbData *rsp_cb_data;
+       GVariantBuilder sca_builder;
+       GVariant *sca;
 
-       param = g_variant_new("(i)", memoryStatus);
+       dbg("Entry");
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SetMemStatus", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
+       g_return_val_if_fail(handle != NULL && callback != NULL &&
+                       params != NULL && params->index > 0,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       return TAPI_API_SUCCESS;
-}
-
-/**
- *
- * This function is used to get SMS preferred bearer on which SMS has to be transmitted. This is a synchronous function
- *
- * @return             TRUE in case of success and FALSE in case of error .
- * @param[in]        None
- *
- * @param[out] requestId-Unique identifier for a particular request
- *                          Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer
- */
-EXPORT_API int tel_get_sms_preferred_bearer(struct tapi_handle *handle, tapi_response_cb callback, void* user_data)
-{
-       struct tapi_resp_data *evt_cb_data = NULL;
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       dbg("Func Entrance ");
+       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
 
-       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "ton", g_variant_new_byte(params->sca.ton));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "npi", g_variant_new_byte(params->sca.npi));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "number", g_variant_new_string(params->sca.number));
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       sca = g_variant_builder_end(&sca_builder);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "GetPrefBearer", NULL, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
+       telephony_sms_call_set_parameters(handle->sms_proxy, params->index,
+                       sca, params->vp, NULL,
+                       on_response_sms_set_parameters, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**
- *
- * This function enables the applications to set the preferred bearer
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          service option ie the bearer type to be set
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer             tapi_sms_bearer_type
- */
-EXPORT_API int tel_set_sms_preferred_bearer(struct tapi_handle *handle, TelSmsBearerType_t BearerType, tapi_response_cb callback, void* user_data)
+static void on_response_sms_send_deliver_report(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance ");
-
-       if ((TAPI_NETTEXT_BEARER_PS_ONLY > BearerType) || (TAPI_NETTEXT_NO_PREFERRED_BEARER < BearerType)) {
-               err("Invalid Input -PrefBearer Set Nettext");
-               return TAPI_API_INVALID_INPUT;
-       }
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(i)", BearerType);
+       telephony_sms_call_send_deliver_report_finish(handle->sms_proxy,
+                       (int *)&result, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SetPrefBearer", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-/**
- *
- * This function enables the applications to set the deliver report for an incoming message(MT).
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]         pDataPackage - SMS-DELIVER-REPORT, and its length have to be passed in this structure.
- * @param[in]          RPCause - the result cause
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Synchronous.
- * @remark
- * @Refer             tapi_sms_deliver_report
- */
-EXPORT_API int tel_send_sms_deliver_report(struct tapi_handle *handle,
-               const TelSmsDatapackageInfo_t *pDataPackage,
-               TelSmsResponse_t RPCause,
-               tapi_response_cb callback, void* user_data)
+EXPORT_API TelReturn tapi_sms_send_deliver_report(TelHandle *handle,
+       const TelSmsDeliverReportInfo *dr_info,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       gchar *encoded_sca = NULL;
-       gchar *encoded_tpdu = NULL;
+       TapiRespCbData *rsp_cb_data;
+       GVariantBuilder sca_builder;
+       GVariant *sca;
+       char *encoded_tpdu;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage ,TAPI_API_INVALID_PTR);
+       g_return_val_if_fail(handle != NULL && dr_info != NULL &&
+                       dr_info->report <= TEL_SMS_DELIVERY_REPORT_UNSPECIFIED_ERROR &&
+                       dr_info->data.tpdu_length <= TEL_SMS_SMDATA_SIZE_MAX &&
+                       callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       encoded_sca = g_base64_encode(&(pDataPackage->Sca[0]), TAPI_SMS_ENCODED_SCA_LEN_MAX);
-       if (encoded_sca == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the SCA");
-               return TAPI_API_OPERATION_FAILED;
-       }
+       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
 
-       encoded_tpdu = g_base64_encode(&(pDataPackage->szData[0]), TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
-       if (encoded_tpdu == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the TPDU");
-               return TAPI_API_OPERATION_FAILED;
-       }
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "ton", g_variant_new_byte(dr_info->data.sca.ton));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "npi", g_variant_new_byte(dr_info->data.sca.npi));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "number", g_variant_new_string(dr_info->data.sca.number));
 
-       param = g_variant_new("(sisi)", encoded_sca,
-                                                       pDataPackage->MsgLength,
-                                                       encoded_tpdu,
-                                                       RPCause);
+       sca = g_variant_builder_end(&sca_builder);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SetDeliveryReport", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
+       encoded_tpdu = g_base64_encode(dr_info->data.tpdu, dr_info->data.tpdu_length);
+       telephony_sms_call_send_deliver_report(handle->sms_proxy,
+                       dr_info->report, sca, encoded_tpdu, NULL,
+                       on_response_sms_send_deliver_report, rsp_cb_data);
 
-       g_free(encoded_sca);
        g_free(encoded_tpdu);
+       g_variant_unref(sca);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**
- *
- * This function enables the application to set the status of a message
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          index - the message to be changed
- *                             msgStatus -SMS message status
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          Asynchronous.
- * @remark
- * @Refer             tapi_sms_memory_type,tapi_sms_status_type
- */
-EXPORT_API int tel_set_sms_message_status(struct tapi_handle *handle, int index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data)
+static void on_response_sms_set_sca(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance ");
-
-       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX) ||
-               (msgStatus > TAPI_NETTEXT_STATUS_RESERVED)) {
-               err("Invalid Input -MsgStatus Set Nettext");
-               return TAPI_API_INVALID_INPUT;
-       }
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(ii)", index, msgStatus);
+       telephony_sms_call_set_sca_finish(handle->sms_proxy,
+                       (int *)&result, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SetMsgStatus", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-/**
- *
- * This function enables to application to get the sms parameters
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          record index of the record in which the sms parameters are stored in the EFsmsp file
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          ASynchronous.
- * @remark             Requested details come in response API
- * @Refer
- */
-EXPORT_API int tel_get_sms_parameters(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+EXPORT_API TelReturn tapi_sms_set_sca(TelHandle *handle, TelSmsSca *sca,
+                       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
+       TapiRespCbData *rsp_cb_data;
+       GVariantBuilder sca_builder;
+       GVariant *var_sca;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+       g_return_val_if_fail(handle != NULL && sca != NULL &&
+                       callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX)) {
-               err("Invalid Input -SMS Param Get Nettext");
-               return TAPI_API_INVALID_INPUT;
-       }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+
+       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "ton", g_variant_new_byte(sca->ton));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "npi", g_variant_new_byte(sca->npi));
+       g_variant_builder_add(&sca_builder, "{sv}",
+               "number", g_variant_new_string(sca->number));
 
-       param = g_variant_new("(i)", index);
+       var_sca = g_variant_builder_end(&sca_builder);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "GetSmsParams", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_get_sms_params, evt_cb_data);
+       telephony_sms_call_set_sca(handle->sms_proxy, var_sca, NULL,
+                       on_response_sms_set_sca, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**
- *
- * This function enables to application to get the sms parameters
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          tapi_smsp_set_param_t sms parameters to be set in the EFsmsp file
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          ASynchronous.
- * @remark
- * @Refer             tapi_smsp_set_param_t
- */
-EXPORT_API int tel_set_sms_parameters(struct tapi_handle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data)
+static void on_response_sms_get_sca(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-       gchar *encoded_alphaId = NULL;
-       gchar *encoded_destDialNum = NULL;
-       gchar *encoded_scaDialNum = NULL;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+
+       TelSmsSca sca;
+       GVariant *var_sca;
+
+       GVariantIter *iter = NULL;
+       GVariant *key_value;
+       const gchar *key;
 
-       dbg("Func Entrance ");
+       GError *error = NULL;
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
 
-       TAPI_RET_ERR_NUM_IF_FAIL(pSmsSetParameters ,TAPI_API_INVALID_PTR);
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_sms_call_get_sca_finish(handle->sms_proxy,
+                       (int *)&result, &var_sca, res, &error);
 
-       encoded_alphaId = g_base64_encode((guchar *)&(pSmsSetParameters->szAlphaId[0]), TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1);
-       if (encoded_alphaId == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the AlphaId");
-               return TAPI_API_OPERATION_FAILED;
-       }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       encoded_destDialNum = g_base64_encode(&(pSmsSetParameters->TpDestAddr.szDiallingNum[0]), TAPI_SIM_SMSP_ADDRESS_LEN + 1);
-       if (encoded_destDialNum == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the DestAddr.DiallingNum");
-               return TAPI_API_OPERATION_FAILED;
+       if (result != TEL_SMS_RESULT_SUCCESS) {
+               g_variant_unref(var_sca);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
        }
 
-       encoded_scaDialNum = g_base64_encode(&(pSmsSetParameters->TpSvcCntrAddr.szDiallingNum[0]), TAPI_SIM_SMSP_ADDRESS_LEN + 1);
-       if (encoded_scaDialNum == NULL) {
-               dbg("g_base64_encode: Failed to Enocde the ScaAddr.DiallingNum");
-               return TAPI_API_OPERATION_FAILED;
+       g_variant_get(var_sca, "a{sv}", &iter);
+       while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
+               if (g_strcmp0(key, "ton") == 0) {
+                       sca.ton = g_variant_get_byte(key_value);
+               }
+               else if (g_strcmp0(key, "npi") == 0) {
+                       sca.npi = g_variant_get_byte(key_value);
+               }
+               else if (g_strcmp0(key, "number") == 0) {
+                       g_strlcpy(sca.number,
+                               g_variant_get_string(key_value, NULL),
+                               TEL_SMS_SCA_LEN_MAX + 1);
+               }
        }
+       g_variant_iter_free(iter);
 
-       param = g_variant_new("(iiisiiiisiiisiii)", pSmsSetParameters->RecordIndex,
-                                                                       pSmsSetParameters->RecordLen,
-                                                                       pSmsSetParameters->AlphaIdLen,
-                                                                       encoded_alphaId,
-                                                                       pSmsSetParameters->ParamIndicator,
-                                                                       pSmsSetParameters->TpDestAddr.DialNumLen,
-                                                                       pSmsSetParameters->TpDestAddr.Ton,
-                                                                       pSmsSetParameters->TpDestAddr.Npi,
-                                                                       encoded_destDialNum,
-                                                                       pSmsSetParameters->TpSvcCntrAddr.DialNumLen,
-                                                                       pSmsSetParameters->TpSvcCntrAddr.Ton,
-                                                                       pSmsSetParameters->TpSvcCntrAddr.Npi,
-                                                                       encoded_scaDialNum,
-                                                                       pSmsSetParameters->TpProtocolId,
-                                                                       pSmsSetParameters->TpDataCodingScheme,
-                                                                       pSmsSetParameters->TpValidityPeriod);
-
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "SetSmsParams", param, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_default, evt_cb_data);
-
-       g_free(encoded_alphaId);
-       g_free(encoded_destDialNum);
-       g_free(encoded_scaDialNum);
-
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &sca);
+
+       g_variant_unref(var_sca);
 }
 
-/**
- *
- * This function enables to application to get the sms parameter count from the EFsmsp file.
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          None
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- * @Interface          ASynchronous.
- * @remark             Requested details come in response API
- * @Refer
- */
-EXPORT_API int tel_get_sms_parameter_count(struct tapi_handle *handle, tapi_response_cb callback, void* user_data)
+EXPORT_API TelReturn tapi_sms_get_sca(TelHandle *handle,
+                       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
-               "GetSmsParamCnt", NULL, NULL,
-               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-               on_response_get_sms_param_cnt, evt_cb_data);
+       telephony_sms_call_get_sca(handle->sms_proxy, NULL,
+                       on_response_sms_get_sca, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-#if 0
-/**
- *
- *  This API is used to send an SMS message to the network. This API allows keeping
- *  the dedicated link at lower layers by passing information as more messages to send in parameters.
- * This will enable not to release if a dedicated connection is used for transmission.
- *
- * @return             TRUE in case of success and FALSE in case of error .
- * @param[in]          TelSmsMsgInfo_t - SMS_SUBMIT/ACK/CANCEL and its length have to be passed in this structure.
- *
- *                             unsigned int MoreMsgToSend will be set to TRUE when there are more than one message to be
- *                         send or Multiple segmented concatenated message to be send, otherwise FALSE. This flag
- *                         indicates OEM that more messages to send.
- *
- * @param[out] RequestId-Unique identifier for a particular request
- *                         Its value can be any value from 0 to 255 if the API is returned successfully
- *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
- *
- * @Interface          Asynchronous.
- * @remark
- * @Refer              TelSmsMsgInfo_t.
- */
-EXPORT_API int tel_send_sms_msg(struct tapi_handle *handle, const TelSmsMsgInfo_t *pSmsMsgInfo, unsigned int MoreMsgToSend, tapi_response_cb callback, void* user_data)
+static void on_response_sms_set_memory_status(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance ");
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-       TS_BOOL ret = FALSE;
-       int api_err = TAPI_API_SUCCESS;
-       int emergency_mode = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       if (vconf_get_int("db/telephony/emergency", &emergency_mode) != 0) {
-               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL]GET db/telephony/emergency");
-               return TAPI_API_OPERATION_FAILED;
-       }
-       if (emergency_mode) {
-               TAPI_LIB_DEBUG(LEVEL_DEBUG, "emergency mode on");
-               return TAPI_API_OPERATION_FAILED;
-       }
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(pSmsMsgInfo ,TAPI_API_INVALID_PTR);
+       telephony_sms_call_set_memory_status_finish(handle->sms_proxy,
+                       (int *)&result, res, &error);
 
-       if (conn_name.length_of_name == 0) {
-               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
-               return TAPI_API_OPERATION_FAILED;
-       }
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
-       TAPI_GLIB_INIT_PARAMS();
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
-                       out_param1,out_param2,out_param3,out_param4);
+EXPORT_API TelReturn tapi_sms_set_memory_status(TelHandle *handle,
+                       gboolean available, TapiResponseCb callback,
+                       void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
 
-       g_array_append_vals(in_param1, pSmsMsgInfo, sizeof(TelSmsMsgInfo_t));
-       g_array_append_vals(in_param2, &MoreMsgToSend, sizeof(unsigned int));
-       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+       dbg("Entry");
 
-       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SEND_EX, in_param1, in_param2, in_param3,
-                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+       g_return_val_if_fail(handle != NULL && callback != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       if (ret) {
-               api_err = g_array_index(out_param1, int, 0);
-       }
-       else {
-               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
-       }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
-                       out_param1,out_param2,out_param3,out_param4);
+       telephony_sms_call_set_memory_status(handle->sms_proxy, available,
+                       NULL, on_response_sms_set_memory_status, rsp_cb_data);
 
-       return api_err;
+       return TEL_RETURN_SUCCESS;
 }
-#endif
 
-/**
- *
- * This function enables the applications to check the device status
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          None
- *
- *
- * @param[out] Device status whether Ready or Not Ready
- * @Interface          Synchronous.
- * @remark
- * @Refer
- */
-EXPORT_API int tel_check_sms_device_status(struct tapi_handle *handle, int *pReadyStatus)
+static void on_response_sms_set_message_status(GObject *source_object,
+                       GAsyncResult *res, gpointer user_data)
 {
-       GError *error;
-       GVariant *smsReady = NULL;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
-       TAPI_RET_ERR_NUM_IF_FAIL(pReadyStatus, TAPI_API_INVALID_PTR);
+       telephony_sms_call_set_message_status_finish(handle->sms_proxy,
+                       (int *)&result, res, &error);
 
-       memset(pReadyStatus, 0, sizeof(int));
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       error = NULL;
-       smsReady = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
-                       DBUS_TELEPHONY_SMS_INTERFACE, "GetSmsReadyStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       if(!smsReady){
-               dbg( "error to get SMS ready_status(%s)", error->message);
-               g_error_free (error);
-               return TAPI_API_OPERATION_FAILED;
-       }
+EXPORT_API TelReturn tapi_sms_set_message_status(TelHandle *handle,
+                       TelSmsStatusInfo *info, TapiResponseCb callback,
+                       void *user_data)
+{
+       TapiRespCbData *rsp_cb_data;
 
-       dbg("get SMS ready_status type_format(%s)", g_variant_get_type_string(smsReady));
+       dbg("Entry");
 
-       g_variant_get(smsReady, "(b)", pReadyStatus);
+       g_return_val_if_fail(handle != NULL && callback != NULL &&
+                       info != NULL && info->index > 0 &&
+                       info->status <= TEL_SMS_STATUS_REPLACED,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       dbg("************SMS_device_status (%d)", *pReadyStatus);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       return TAPI_API_SUCCESS;
+       telephony_sms_call_set_message_status(handle->sms_proxy, info->index,
+                       info->status, NULL, on_response_sms_set_message_status,
+                       rsp_cb_data);
+
+       return TEL_RETURN_SUCCESS;
 }
 
-#if 0
-/**
- *
- * This function enables to application to set that the device is ready to recieve messages from network.
- *
- * @return             Returns appropriate error code. Refer TapiResult_t .
- * @param[in]          None
- *
- * @param[out] None
- * @Interface          Synchronous.
- * @remark
- * @Refer
- */
-EXPORT_API int tel_set_sms_device_status(struct tapi_handle *handle)
+EXPORT_API TelReturn tapi_sms_get_init_status(TelHandle *handle,
+                       gboolean *init_status)
 {
-       struct tapi_resp_data *evt_cb_data = NULL;
-       GVariant *param;
-
-       dbg("Func Entrance ");
-
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
-
-       TS_BOOL ret = FALSE;
-       int api_err = TAPI_API_SUCCESS;
+       g_return_val_if_fail(handle != NULL && init_status != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
-       TAPI_GLIB_INIT_PARAMS();
-       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+       *init_status = telephony_sms_get_init_status(handle->sms_proxy);
 
-       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_DEVICEREADY,
-                       in_param1, in_param2, in_param3, in_param4,
-                       &out_param1, &out_param2, &out_param3, &out_param4);
+       return TEL_RETURN_SUCCESS;
+}
 
-       if (ret) {
-               api_err = g_array_index(out_param1, int, 0);
-       }
-       else {
-               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
-       }
+EXPORT_API TelReturn tapi_sms_get_sim_memory_status(TelHandle *handle,
+                       gboolean *memory_full)
+{
+       g_return_val_if_fail(handle != NULL && memory_full != NULL,
+                       TEL_RETURN_INVALID_PARAMETER);
 
-       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+       *memory_full = telephony_sms_get_sim_memory_status(handle->sms_proxy);
 
-       return api_err;
+       return TEL_RETURN_SUCCESS;
 }
-#endif
-//eof
index 3e9d174..0fcd87e 100644 (file)
@@ -1,9 +1,8 @@
 /*
- * libslp-tapi
+ * libtapi
  *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Ja-young Gu <jygu@samsung.com>
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
+#include "tapi_private.h"
+#include "tapi.h"
+#include "tapi_ss.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <tel_ss.h>
 
-#include "tapi_common.h"
-#include "TapiUtility.h"
-#include "TelSs.h"
+void on_ss_signal_emit_handler(TelephonySs *ss, gchar *sender_name,
+                                       gchar *signal_name, GVariant *parameters,
+                                       gpointer user_data)
+{
+       TapiEvtCbData *evt_cb_data = NULL;
+       TelHandle *handle = user_data;
+       char *evt_id = NULL;
 
-#include "common.h"
-#include "tapi_log.h"
-#include "ITapiSs.h"
+       dbg("Entry");
 
-static void on_response_get_ss_barring_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1, i = 0;
-       TelSsBarringResp_t resp;
-
-       GVariant *dbus_result = 0, *value = 0;
-       GVariantIter *iter = 0;
-       GVariantIter *iter_row = 0;
-       const gchar *key = 0;
-
-       memset(&resp, '\0', sizeof(TelSsBarringResp_t));
-
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
-
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       if (handle == NULL) {
+               err("invalid handle");
+               return;
+       }
 
-               if (error)
-                       g_error_free(error);
+       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SS_INTERFACE,
+                                       signal_name);
 
-               free(evt_cb_data);
+       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       if (evt_cb_data == NULL) {
+               err("invalid evt_id[%s]", evt_id);
+               g_free(evt_id);
                return;
        }
 
-       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+       if (!g_strcmp0(signal_name, "NotifyUssd")) {
+               TelSsUssdNoti ussd_noti;
+               memset(&ussd_noti, 0, sizeof(TelSsUssdNoti));
+               g_variant_get(parameters, "(is)", &ussd_noti.status, &ussd_noti.str);
 
-       resp.record_num = g_variant_iter_n_children(iter);
+               dbg("signal[%s] status[%d] str[%s]", signal_name,
+                                       ussd_noti.status, ussd_noti.str);
 
-       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
-               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &ussd_noti);
+               g_free(ussd_noti.str);
+       } else {
+               err("Unsupported signal %s", signal_name);
+       }
 
-                       if ( !g_strcmp0(key, "ss_class") ) {
-                               resp.record[i].Class = g_variant_get_int32(value);
-                       }
+       g_free(evt_id);
+}
 
-                       if ( !g_strcmp0(key, "ss_status") ) {
-                               resp.record[i].Status = g_variant_get_int32(value);
-                       }
+static gboolean __tapi_check_ss_class(TelSsClass ss_class)
+{
+       switch (ss_class) {
+       case TEL_SS_CLASS_ALL_TELE_BEARER:
+       case TEL_SS_CLASS_ALL_TELE:
+       case TEL_SS_CLASS_VOICE:
+       case TEL_SS_CLASS_ALL_DATA_TELE:
+       case TEL_SS_CLASS_FAX:
+       case TEL_SS_CLASS_SMS:
+       case TEL_SS_CLASS_VGCS:
+       case TEL_SS_CLASS_VBS:
+       case TEL_SS_CLASS_ALL_TELE_EXPT_SMS:
+       case TEL_SS_CLASS_ALL_BEARER:
+       case TEL_SS_CLASS_ALL_ASYNC:
+       case TEL_SS_CLASS_ALL_SYNC:
+       case TEL_SS_CLASS_ALL_CS_SYNC:
+       case TEL_SS_CLASS_ALL_CS_ASYNC:
+       case TEL_SS_CLASS_ALL_DEDI_PS:
+       case TEL_SS_CLASS_ALL_DEDI_PAD:
+       case TEL_SS_CLASS_ALL_DATA_CDA:
+       case TEL_SS_CLASS_ALL_GPRS_BEARER:
+       case TEL_SS_CLASS_AUX_VOICE:
+               return TRUE;
+       }
 
-                       if ( !g_strcmp0(key, "barring_mode") ) {
-                               resp.record[i].Flavour = g_variant_get_int32(value);
-                       }
+       return FALSE;
+}
 
-               }
-               i++;
-               g_variant_iter_free(iter_row);
+static gboolean __tapi_check_barring_type(TelSsBarringType type)
+{
+       switch (type) {
+       case TEL_SS_CB_TYPE_BAOC:
+       case TEL_SS_CB_TYPE_BOIC:
+       case TEL_SS_CB_TYPE_BOIC_NOT_HC:
+       case TEL_SS_CB_TYPE_BAIC:
+       case TEL_SS_CB_TYPE_BIC_ROAM:
+       case TEL_SS_CB_TYPE_NS:
+       case TEL_SS_CB_TYPE_AB:
+       case TEL_SS_CB_TYPE_AOB:
+       case TEL_SS_CB_TYPE_AIB:
+               return TRUE;
        }
-       g_variant_iter_free(iter);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       return FALSE;
+}
+static gboolean __tapi_check_barring_pwd(const char *pwd)
+{
+       if (pwd == NULL || (strlen(pwd) > TEL_SS_BARRING_PASSWORD_LEN_MAX))
+               return FALSE;
+       else
+               return TRUE;
+}
+static gboolean __tapi_check_forwarding_mode(TelSsForwardMode mode)
+{
+       switch (mode) {
+       case TEL_SS_CF_MODE_DISABLE:
+       case TEL_SS_CF_MODE_ENABLE:
+       case TEL_SS_CF_MODE_REGISTER:
+       case TEL_SS_CF_MODE_DEREGISTER:
+               return TRUE;
        }
 
-       free(evt_cb_data);
+       return FALSE;
 }
 
-static void on_response_change_ss_barring_password(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_forwarding_condition(TelSsForwardCondition condition)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
+       switch (condition) {
+       case TEL_SS_CF_COND_CFU:
+       case TEL_SS_CF_COND_CFB:
+       case TEL_SS_CF_COND_CFNRY:
+       case TEL_SS_CF_COND_CFNRC:
+       case TEL_SS_CF_COND_ALL:
+       case TEL_SS_CF_COND_ALL_CFC:
+               return TRUE;
+       }
 
-       GVariant *dbus_result = 0;
+       return FALSE;
+}
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+static gboolean __tapi_check_forwarding_number(const char *number)
+{
+       if (number == NULL || (strlen(number) > TEL_SS_NUMBER_LEN_MAX))
+               return FALSE;
+       else
+               return TRUE;
+}
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+static gboolean __tapi_check_and_get_cli_status(const TelSsCliInfo *cli_info, gint *status)
+{
+       switch (cli_info->type) {
+       case TEL_SS_CLI_CLIR:
+               if (cli_info->status.clir <= TEL_CLIR_STATUS_SUPPRESSION) {
+                       *status = cli_info->status.clir;
+                       return TRUE;
+               }
+       break;
+       case TEL_SS_CLI_CLIP:
+               if (cli_info->status.clip == TEL_SS_CLI_DISABLE || cli_info->status.clip == TEL_SS_CLI_ENABLE) {
+                       *status = cli_info->status.clip;
+                       return TRUE;
+               }
+       break;
+       case TEL_SS_CLI_COLP:
+               if (cli_info->status.colp == TEL_SS_CLI_DISABLE || cli_info->status.colp == TEL_SS_CLI_ENABLE) {
+                       *status = cli_info->status.colp;
+                       return TRUE;
                }
+       break;
+       case TEL_SS_CLI_COLR:
+               if (cli_info->status.colr == TEL_SS_CLI_DISABLE || cli_info->status.colr == TEL_SS_CLI_ENABLE) {
+                       *status = cli_info->status.colr;
+                       return TRUE;
+               }
+       break;
+       case TEL_SS_CLI_CDIP:
+               if (cli_info->status.cdip == TEL_SS_CLI_DISABLE || cli_info->status.cdip == TEL_SS_CLI_ENABLE) {
+                       *status = cli_info->status.cdip;
+                       return TRUE;
+               }
+       break;
+       case TEL_SS_CLI_CNAP:
+               if (cli_info->status.cnap == TEL_SS_CLI_DISABLE || cli_info->status.cnap == TEL_SS_CLI_ENABLE) {
+                       *status = cli_info->status.cnap;
+                       return TRUE;
+               }
+       }
 
-               if (error)
-                       g_error_free(error);
+       return FALSE;
+}
 
-               free(evt_cb_data);
-               return;
+static gboolean __tapi_check_cli_type(TelSsCliType type)
+{
+       switch (type) {
+       case TEL_SS_CLI_CLIR:
+       case TEL_SS_CLI_CLIP:
+       case TEL_SS_CLI_COLP:
+       case TEL_SS_CLI_COLR:
+       case TEL_SS_CLI_CDIP:
+       case TEL_SS_CLI_CNAP:
+               return TRUE;
        }
 
-       g_variant_get (dbus_result, "(i)",  &result);
+       return FALSE;
+}
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+static gboolean __tapi_check_ussd_type(TelSsUssdType type)
+{
+       switch (type) {
+       case TEL_SS_USSD_TYPE_USER_INIT:
+       case TEL_SS_USSD_TYPE_USER_RSP:
+       case TEL_SS_USSD_TYPE_USER_REL:
+               return TRUE;
        }
 
-       free(evt_cb_data);
+       return FALSE;
 }
 
-static void on_response_get_ss_forward_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static gboolean __tapi_check_ussd_string(unsigned char *string)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1, i = 0;
-       TelSsForwardResp_t resp;
+       if (string == NULL)
+               return FALSE;
 
-       GVariant *dbus_result = 0, *value = 0;
-       GVariantIter *iter = 0;
-       GVariantIter *iter_row = 0;
-       const gchar *key = 0;
+       return TRUE;
+}
 
+static void on_response_ss_set_barring(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       memset(&resp, '\0', sizeof(TelSsForwardResp_t));
+       dbg("Entry");
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_ss_call_set_barring_finish(handle->ss_proxy, (int *)&result, res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-               if (error)
-                       g_error_free(error);
+EXPORT_API TelReturn tapi_ss_set_barring(TelHandle *handle,
+       const TelSsBarringInfo *barring_info,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
 
-               free(evt_cb_data);
-               return;
-       }
+       dbg("Entry");
 
-       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && barring_info && __tapi_check_ss_class(barring_info->class)
+               && __tapi_check_barring_type(barring_info->type)
+               && __tapi_check_barring_pwd(barring_info->pwd),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       resp.record_num = g_variant_iter_n_children(iter);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
-               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+       telephony_ss_call_set_barring(handle->ss_proxy,
+               barring_info->class, barring_info->enable,
+               barring_info->type, barring_info->pwd, NULL,
+               on_response_ss_set_barring, rsp_cb_data);
 
-                       if ( !g_strcmp0(key, "ss_class") ) {
-                               resp.record[i].Class = g_variant_get_int32(value);
-                       }
+       return TEL_RETURN_SUCCESS;
+}
 
-                       if ( !g_strcmp0(key, "ss_status") ) {
-                               resp.record[i].Status = g_variant_get_int32(value);
-                       }
+static void on_response_ss_get_barring_status(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
 
-                       if ( !g_strcmp0(key, "forwarding_mode") ) {
-                               resp.record[i].ForwardCondition = g_variant_get_int32(value);
-                       }
+       GVariant *record_list;
+       TelSsBarringResp barring_resp = {0, };
 
-                       if ( !g_strcmp0(key, "no_reply_time") ) {
-                               resp.record[i].NoReplyWaitTime = g_variant_get_int32(value);
-                       }
+       GError *error = NULL;
 
-                       if ( !g_strcmp0(key, "number_present") ) {
-                               resp.record[i].bCallForwardingNumberPresent = g_variant_get_int32(value);
-                       }
+       dbg("Entry");
 
-                       if ( !g_strcmp0(key, "forwarding_number") ) {
-                               strncpy((char *)resp.record[i].szCallForwardingNumber, g_variant_get_string(value, 0), TAPI_CALL_DIALDIGIT_LEN_MAX );
-                       }
+       telephony_ss_call_get_barring_status_finish(handle->ss_proxy,
+               (int *)&result, &(barring_resp.record_num),
+               &record_list, res, &error);
 
-               }
-               i++;
-               g_variant_iter_free(iter_row);
+       CHECK_DEINIT(error, rsp_cb_data, result);
+
+       if (result != TEL_SS_RESULT_SUCCESS) {
+               g_variant_unref(record_list);
+               err("Failed to get barring status: %d", result);
+
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
        }
-       g_variant_iter_free(iter);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       if ((barring_resp.record_num != 0)
+                       && (g_variant_n_children(record_list)
+                       == barring_resp.record_num)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("Barring status list count: [%d]", barring_resp.record_num);
+               barring_resp.records =
+                       g_malloc0(sizeof(TelSsBarringInfoRecord)*barring_resp.record_num);
+
+               g_variant_get(record_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "class") == 0) {
+                                       barring_resp.records[i].class = g_variant_get_int32(key_value);
+                               }
+
+                               if (g_strcmp0(key, "enable") == 0) {
+                                       barring_resp.records[i].enable = g_variant_get_boolean(key_value);
+                               }
+
+                               if (g_strcmp0(key, "type") == 0) {
+                                       barring_resp.records[i].type = g_variant_get_int32(key_value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+       }
+       else {
+               warn("Barring status list count is NOT valid - Count: [%d]", barring_resp.record_num);
+               barring_resp.record_num = 0;
        }
+       g_variant_unref(record_list);
 
-       free(evt_cb_data);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &barring_resp);
+
+       g_free(barring_resp.records);
 }
 
-static void on_response_get_ss_waiting_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+EXPORT_API TelReturn tapi_ss_get_barring_status(TelHandle *handle,
+       const TelSsBarringGetInfo *get_barring_info,
+       TapiResponseCb callback, void *user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1, i = 0;
-       TelSsWaitingResp_t resp;
+       TapiRespCbData *rsp_cb_data = NULL;
 
-       GVariant *dbus_result = 0, *value = 0;
-       GVariantIter *iter = 0;
-       GVariantIter *iter_row = 0;
-       const gchar *key = 0;
+       dbg("Entry");
 
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && get_barring_info && __tapi_check_ss_class(get_barring_info->class)
+               && __tapi_check_barring_type(get_barring_info->type),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       memset(&resp, '\0', sizeof(TelSsWaitingResp_t));
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       telephony_ss_call_get_barring_status(handle->ss_proxy,
+               get_barring_info->class, get_barring_info->type, NULL,
+               on_response_ss_get_barring_status, rsp_cb_data);
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       return TEL_RETURN_SUCCESS;
+}
 
-               if (error)
-                       g_error_free(error);
+static void on_response_ss_change_barring_password(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       GError *error = NULL;
 
-               free(evt_cb_data);
-               return;
-       }
+       dbg("Entry");
 
-       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+       telephony_ss_call_change_barring_password_finish(handle->ss_proxy, (int *)&result, res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       resp.record_num = g_variant_iter_n_children(iter);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
-               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+EXPORT_API TelReturn tapi_ss_change_barring_password(TelHandle *handle,
+       const TelSsBarringPwdInfo *barring_pwd_info,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
 
-                       if ( !g_strcmp0(key, "ss_class") ) {
-                               resp.record[i].Class = g_variant_get_int32(value);
-                       }
+       dbg("Entry");
 
-                       if ( !g_strcmp0(key, "ss_status") ) {
-                               resp.record[i].Status = g_variant_get_int32(value);
-                       }
-               }
-               i++;
-               g_variant_iter_free(iter_row);
-       }
-       g_variant_iter_free(iter);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && barring_pwd_info && __tapi_check_barring_pwd(barring_pwd_info->new_pwd)
+               && __tapi_check_barring_pwd(barring_pwd_info->old_pwd),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
-       }
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       free(evt_cb_data);
-}
+       telephony_ss_call_change_barring_password(handle->ss_proxy,
+               barring_pwd_info->old_pwd, barring_pwd_info->new_pwd, NULL,
+               on_response_ss_change_barring_password, rsp_cb_data);
 
+       return TEL_RETURN_SUCCESS;
+}
 
-static void on_response_get_ss_cli_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_ss_set_forwarding(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       TelSsCliResp_t resp;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       GError *error = NULL;
 
-       GVariant *dbus_result = 0;
+       dbg("Entry");
 
-       memset(&resp, '\0', sizeof(TelSsCliResp_t));
+       telephony_ss_call_set_forwarding_finish(handle->ss_proxy, (int *)&result, res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+}
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+EXPORT_API TelReturn tapi_ss_set_forwarding(TelHandle *handle,
+       const TelSsForwardInfo *forwarding_info,
+       TapiResponseCb callback, void *user_data)
+{
+       TapiRespCbData *rsp_cb_data = NULL;
 
-               if (error)
-                       g_error_free(error);
+       dbg("Entry");
 
-               free(evt_cb_data);
-               return;
-       }
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && forwarding_info && __tapi_check_ss_class(forwarding_info->class)
+               && __tapi_check_forwarding_mode(forwarding_info->mode)
+               && __tapi_check_forwarding_condition(forwarding_info->condition)
+               && __tapi_check_forwarding_number(forwarding_info->number),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       g_variant_get (dbus_result, "(iii)",  &result, &resp.Type, &resp.Status);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
-       }
+       telephony_ss_call_set_forwarding(handle->ss_proxy,
+               forwarding_info->class, forwarding_info->mode, forwarding_info->condition,
+               forwarding_info->number, forwarding_info->wait_time, NULL,
+               on_response_ss_set_forwarding, rsp_cb_data);
 
-       free(evt_cb_data);
+       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_send_ss_ussd_request(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_ss_get_forwarding_status(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       GError *error = 0;
-       GDBusConnection *conn = 0;
-       struct tapi_resp_data *evt_cb_data = user_data;
-       int result = -1;
-       char *tmp_str = 0;
-       TelSsUssdResp_t resp;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
 
-       GVariant *dbus_result = 0;
+       GVariant *record_list;
+       TelSsForwardingResp forwarding_resp = {0, };
 
-       memset(&resp, '\0', sizeof(TelSsUssdResp_t));
+       GError *error = NULL;
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
 
-       conn = G_DBUS_CONNECTION (source_object);
-       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
-       CHECK_DEINIT(error);
+       dbg("Entry");
 
-       if (!dbus_result) {
-               if (evt_cb_data->cb_fn) {
-                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
-               }
+       telephony_ss_call_get_forwarding_status_finish(handle->ss_proxy,
+               (int *)&result, &(forwarding_resp.record_num),
+               &record_list, res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-               if (error)
-                       g_error_free(error);
+       if (result != TEL_SS_RESULT_SUCCESS) {
+               g_variant_unref(record_list);
+               err("Failed to get forwarding status: %d", result);
 
-               free(evt_cb_data);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
                return;
        }
 
-       g_variant_get (dbus_result, "(iiiis)",  &result, &resp.Type, &resp.Status, &resp.Length, &tmp_str);
-
-       if (!result) {
-               memcpy( resp.szString, tmp_str, resp.Length );
-               g_free(tmp_str);
+       if ((forwarding_resp.record_num != 0)
+                       && (g_variant_n_children(record_list)
+                       == forwarding_resp.record_num)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("Forwarding status list count: [%d]", forwarding_resp.record_num);
+               forwarding_resp.records =
+                       g_malloc0(sizeof(TelSsForwardingInfoRecord)*forwarding_resp.record_num);
+
+               g_variant_get(record_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "class") == 0) {
+                                       forwarding_resp.records[i].class = g_variant_get_int32(key_value);
+                               }
+
+                               if (g_strcmp0(key, "enable") == 0) {
+                                       forwarding_resp.records[i].enable = g_variant_get_boolean(key_value);
+                               }
+
+                               if (g_strcmp0(key, "condition") == 0) {
+                                       forwarding_resp.records[i].condition = g_variant_get_int32(key_value);
+                               }
+
+                               if (g_strcmp0(key, "number") == 0) {
+                                       g_strlcpy(forwarding_resp.records[i].number,
+                                               g_variant_get_string(key_value, NULL),
+                                               TEL_SS_NUMBER_LEN_MAX + 1);
+                               }
+
+                               if (g_strcmp0(key, "wait_time") == 0) {
+                                       forwarding_resp.records[i].wait_time = g_variant_get_int32(key_value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
        }
-
-       if (evt_cb_data->cb_fn) {
-               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       else {
+               warn("Forwarding status list count is NOT valid - Count: [%d]",
+                       forwarding_resp.record_num);
+               forwarding_resp.record_num = 0;
        }
+       g_variant_unref(record_list);
+
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &forwarding_resp);
 
-       free(evt_cb_data);
+       g_free(forwarding_resp.records);
 }
 
-EXPORT_API int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_ss_get_forwarding_status(TelHandle *handle,
+       const TelSsForwardGetInfo *get_forwarding_info,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-       gchar *method = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && get_forwarding_info && __tapi_check_ss_class(get_forwarding_info->class)
+               && __tapi_check_forwarding_condition(get_forwarding_info->condition),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(iis)", info->Class, info->Type, info->szPassword);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       if ( info->Mode == TAPI_SS_CB_MODE_ACTIVATE ) {
-               dbg("[ check ] barring activate");
-               method = "ActivateBarring";
+       telephony_ss_call_get_forwarding_status(handle->ss_proxy,
+               get_forwarding_info->class, get_forwarding_info->condition, NULL,
+               on_response_ss_get_forwarding_status, rsp_cb_data);
 
-       } else {
-               dbg("[ check ] barring deactivate");
-               method = "DeactivateBarring";
+       return TEL_RETURN_SUCCESS;
+}
 
-       }
+static void on_response_ss_set_waiting(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       GError *error = NULL;
+
+       dbg("Entry");
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       method, param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_ss_barring_status, evt_cb_data );
+       telephony_ss_call_set_waiting_finish(handle->ss_proxy, (int *)&result, res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-EXPORT_API int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_ss_set_waiting(TelHandle *handle,
+       const TelSsWaitingInfo *waiting_info,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && waiting_info && __tapi_check_ss_class(waiting_info->class),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(ii)", class, type);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       "GetBarringStatus", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_ss_barring_status, evt_cb_data );
+       telephony_ss_call_set_waiting(handle->ss_proxy,
+               waiting_info->class, waiting_info->enable, NULL,
+               on_response_ss_set_waiting, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**********************************************************************************************
- *
- * This function is used to change call barring password.
- *
- * @param      pOldPassword[IN] of type char* Specifies the Old Call Barring Password.
- * @param      pNewPassword[IN] of type char* Specifies the New Call Barring Password.
- * @param      pNewPasswordAgain[IN] of type char* Specifies the New Call Barring Password for Confirm.
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-EXPORT_API int tel_change_ss_barring_password(TapiHandle *handle,
-               const char *old_password,
-               const char *new_password,
-               const char *new_password_again,
-               tapi_response_cb callback, void *user_data)
+static void on_response_ss_get_waiting_status(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+
+       GVariant *record_list;
+       TelSsWaitingResp waiting_resp = {0, };
+
+       GError *error = NULL;
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       telephony_ss_call_get_waiting_status_finish(handle->ss_proxy,
+               (int *)&result, &(waiting_resp.record_num),
+               &record_list, res, &error);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       param = g_variant_new("(sss)", old_password, new_password, new_password_again);
+       if (result != TEL_SS_RESULT_SUCCESS) {
+               g_variant_unref(record_list);
+               err("Failed to get waiting status: %d", result);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
+
+       if ((waiting_resp.record_num != 0)
+                       && (g_variant_n_children(record_list)
+                       == waiting_resp.record_num)) {
+               GVariantIter *iter = NULL, *iter_row = NULL;
+               GVariant *key_value;
+               const gchar *key;
+               guint i = 0;
+
+               dbg("Waiting status list count: [%d]", waiting_resp.record_num);
+               waiting_resp.records =
+                       g_malloc0(sizeof(TelSsWaitingInfo)*waiting_resp.record_num);
+
+               g_variant_get(record_list, "aa{sv}", &iter);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
+                               if (g_strcmp0(key, "class") == 0) {
+                                       waiting_resp.records[i].class = g_variant_get_int32(key_value);
+                               }
+
+                               if (g_strcmp0(key, "enable") == 0) {
+                                       waiting_resp.records[i].enable = g_variant_get_boolean(key_value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+       }
+       else {
+               warn("Waiting status list count is NOT valid - Count: [%d]",
+                       waiting_resp.record_num);
+               waiting_resp.record_num = 0;
+       }
+       g_variant_unref(record_list);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       "ChangeBarringPassword", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_change_ss_barring_password, evt_cb_data );
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &waiting_resp);
 
-       return TAPI_API_SUCCESS;
+       g_free(waiting_resp.records);
 }
 
-/**********************************************************************************************
- *
- * This function is used to Activate or Deactivate the call forwarding feature.
- *
- * @param      forwardInfo[IN] of type TelSsForwardInfo_t which specifies the Teleservice and CF flavour, Forwarded to number.
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-EXPORT_API int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_ss_get_waiting_status(TelHandle *handle,
+       TelSsClass class,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-       gchar *method = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle
+               && callback
+               && __tapi_check_ss_class(class),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(iiis)", info->Class, info->Condition, info->NoReplyConditionTimer, info->szPhoneNumber);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       switch ( info->Mode ) {
-               case TAPI_SS_CF_MODE_DISABLE_EV: {
-                       dbg("[ check ] forwarding deactivate");
-                       method = "DeactivateForwarding";
-               } break;
+       telephony_ss_call_get_waiting_status(handle->ss_proxy,
+               class, NULL,
+               on_response_ss_get_waiting_status, rsp_cb_data);
 
-               case TAPI_SS_CF_MODE_ENABLE_EV: {
-                       dbg("[ check ] forwarding activate");
-                       method = "ActivateForwarding";
-               } break;
+       return TEL_RETURN_SUCCESS;
+}
 
-               case TAPI_SS_CF_MODE_REGISTRATION_EV: {
-                       dbg("[ check ] forwarding registration");
-                       method = "RegisterForwarding";
-               } break;
+static void on_response_ss_set_cli(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
+{
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       GError *error = NULL;
 
-               case TAPI_SS_CF_MODE_ERASURE_EV: {
-                       dbg("[ check ] forwarding deregistration");
-                       method = "DeregisterForwarding";
-               } break;
+       dbg("Entry");
 
-               default:
-                       dbg("[ error ] invalid input : (0x%x)", info->Mode);
-                       return TAPI_API_INVALID_INPUT;
-       }
+       telephony_ss_call_set_cli_finish(handle->ss_proxy, (int *)&result, res, &error);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       method, param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_ss_forward_status, evt_cb_data );
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
 }
 
-/**********************************************************************************************
- *
- * This function is used to interrogate the status of call forwarding feature.
- *
- * @param      forwardType[IN] of type TelSsForwardType_t which specifies the telecommunication service.
- * @param      condition[IN]   is of type TelSsForwardWhen_t specified the CF flavour
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-EXPORT_API int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_ss_set_cli(TelHandle *handle,
+       const TelSsCliInfo *cli_info,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
+       int cli_status;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle
+               && callback && cli_info
+               && __tapi_check_and_get_cli_status(cli_info, &cli_status),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(ii)", class, condition);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       "GetForwardingStatus", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_ss_forward_status, evt_cb_data );
+       telephony_ss_call_set_cli(handle->ss_proxy,
+               cli_info->type, cli_status, NULL,
+               on_response_ss_set_cli, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**********************************************************************************************
- *
- * This function is used to Activate or dectivate call waiting feature.
- *
- * @param      waitInfo[IN] of type TelSsWaitingInfo_t which specifies the telecommunication service and mode.
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-EXPORT_API int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data)
+static void on_response_ss_get_cli_status(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
-       gchar *method = 0;
-
-       dbg("Func Entrance ");
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       TelSsCliResp cli_resp = {0, };
+       int net_status;
+       int dev_status;
+       GError *error = NULL;
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       dbg("Entry");
 
-       param = g_variant_new("(i)", info->Class);
+       telephony_ss_call_get_cli_status_finish(handle->ss_proxy,
+               (int *)&result, (int *)(&(cli_resp.type)), &net_status, &dev_status,
+               res, &error);
 
-       if ( info->Mode == TAPI_SS_CW_MODE_ACTIVATE ) {
-               dbg("[ check ] waiting activate");
-               method = "ActivateWaiting";
-
-       } else {
-               dbg("[ check ] waiting deactivate");
-               method = "DeactivateWaiting";
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
+       if (result != TEL_SS_RESULT_SUCCESS) {
+               err("Failed to get CLI status: %d", result);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
        }
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       method, param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_ss_waiting_status, evt_cb_data );
+       switch (cli_resp.type) {
+       case TEL_SS_CLI_CLIR:
+               cli_resp.status.clir.net_status = (TelSsClirNetworkStatus)net_status;
+               cli_resp.status.clir.dev_status = (TelSsClirDeviceStatus)dev_status;
+       break;
+       case TEL_SS_CLI_CLIP:
+               cli_resp.status.clip.net_status = (TelSsCliNetworkStatus)net_status;
+               cli_resp.status.clip.dev_status = (TelSsCliDeviceStatus)dev_status;
+       break;
+       case TEL_SS_CLI_COLP:
+               cli_resp.status.colp.net_status = (TelSsCliNetworkStatus)net_status;
+               cli_resp.status.colp.dev_status = (TelSsCliDeviceStatus)dev_status;
+       break;
+       case TEL_SS_CLI_COLR:
+               cli_resp.status.colr.net_status = (TelSsCliNetworkStatus)net_status;
+               cli_resp.status.colr.dev_status = (TelSsCliDeviceStatus)dev_status;
+       break;
+       case TEL_SS_CLI_CDIP:
+               cli_resp.status.cdip.net_status = (TelSsCliNetworkStatus)net_status;
+               cli_resp.status.cdip.dev_status = (TelSsCliDeviceStatus)dev_status;
+       break;
+       case TEL_SS_CLI_CNAP:
+               cli_resp.status.cnap.net_status = (TelSsCliNetworkStatus)net_status;
+               cli_resp.status.cnap.dev_status = (TelSsCliDeviceStatus)dev_status;
+       break;
+       default :
+               result = TEL_SS_RESULT_FAILURE;
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
 
-       return TAPI_API_SUCCESS;
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &cli_resp);
 }
 
-/**********************************************************************************************
- *
- * This function is used to interrogate the status of call waiting feature.
- *
- * @param      CallType[IN] of type TelSsCallType_t which specifies the telecommunication service .
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-
-EXPORT_API int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t class, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_ss_get_cli_status(TelHandle *handle,
+       TelSsCliType type,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && __tapi_check_cli_type(type), TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(i)", class);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       "GetWaitingStatus", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_ss_waiting_status, evt_cb_data );
+       telephony_ss_call_get_cli_status(handle->ss_proxy,
+               type, NULL, on_response_ss_get_cli_status, rsp_cb_data);
 
-       return TAPI_API_SUCCESS;
+       return TEL_RETURN_SUCCESS;
 }
 
-/**********************************************************************************************
- *
- * This function is used to interrogate the status of CLI services feature.
- *
- * @param      CliType[IN] of type TelSsCliType_t which specifies the CLI service .
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-EXPORT_API int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data)
+static void on_response_ss_send_ussd_request(GObject *source_object,
+       GAsyncResult *res, gpointer user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = user_data;
+       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       TelSsUssdResp ussd_resp = {0, };
+       GError *error = NULL;
+
+       dbg("Entry");
 
-       dbg("Func Entrance ");
+       telephony_ss_call_send_ussd_request_finish(handle->ss_proxy,
+               (int *)&result, (int *)(&(ussd_resp.type)), (int *)(&(ussd_resp.status)),
+               (gchar **)&(ussd_resp.str), res, &error);
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       CHECK_DEINIT(error, rsp_cb_data, result);
 
-       param = g_variant_new("(i)", type);
+       if (result != TEL_SS_RESULT_SUCCESS) {
+               g_free(ussd_resp.str);
+               err("USSD request failed: %d", result);
+               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+               return;
+       }
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       "GetCLIStatus", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_get_ss_cli_status, evt_cb_data );
+       RESP_CALLBACK_CALL(rsp_cb_data, result, &ussd_resp);
 
-       return TAPI_API_SUCCESS;
+       g_free(ussd_resp.str);
 }
 
-/**********************************************************************************************
- *
- * This function is used to send a USSD string and also the User response for a NW intiated USSD.
- *
- * @param      pAppMsg[IN] of type TelSsUssdMsgInfo_t which specifies the USSD String,length of the string, format of the string.
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark     TelSsUssdMsgInfo_t ->IndType is not used while calling this function, This is used for sending the response.
- *                     Limo standard defines only one structure for Request and response.
- *
- ***********************************************************************************************/
-EXPORT_API int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data)
+EXPORT_API TelReturn tapi_ss_send_ussd_request(TelHandle *handle,
+       const TelSsUssdInfo *ussd_request,
+       TapiResponseCb callback, void *user_data)
 {
-       struct tapi_resp_data *evt_cb_data = 0;
-       GVariant *param = 0;
+       TapiRespCbData *rsp_cb_data = NULL;
 
-       dbg("Func Entrance ");
+       dbg("Entry");
 
-       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TEL_RETURN_IF_CHECK_FAIL(handle && callback
+               && ussd_request && __tapi_check_ussd_type(ussd_request->type)
+               && __tapi_check_ussd_string(ussd_request->str),
+               TEL_RETURN_INVALID_PARAMETER);
 
-       param = g_variant_new("(iis)", info->Type, info->Length, info->szString);
+       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_dbus_connection_call(handle->dbus_connection,
-                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
-                       "SendUSSD", param, 0,
-                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
-                       on_response_send_ss_ussd_request, evt_cb_data );
-
-       return TAPI_API_SUCCESS;
-}
-
-/**********************************************************************************************
- *
- * This function is used to Sets AOC information.
- *
- * @param      AocType[IN] of type TelSsAocType_t which specifies the which AOC type to read.
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-EXPORT_API int tel_get_ss_aoc_info(TapiHandle *handle, TelSsAocType_t AocType, tapi_response_cb callback, void *user_data)
-{
-       return 0;
-}
+       telephony_ss_call_send_ussd_request(handle->ss_proxy,
+               ussd_request->type, (const gchar *)ussd_request->str, NULL,
+               on_response_ss_send_ussd_request, rsp_cb_data);
 
-/**********************************************************************************************
- *
- * This function is used to Sets AOC information.
- *
- * @param      AocSetInfo[IN] of type TelCallAocInfo_t which specifies the AOC info parameters .
- * @return     enum type TapiResult_t Specifies the API's Return result.
- * @remark
- *
- ***********************************************************************************************/
-EXPORT_API int tel_set_ss_aoc_info(TapiHandle *handle, TelCallAocInfo_t *AocSetInfo, tapi_response_cb callback, void *user_data)
-{
-       return 0;
+       return TEL_RETURN_SUCCESS;
 }
-
 /*     EOF  */
diff --git a/tapi-3.0.pc.in b/tapi-3.0.pc.in
new file mode 100644 (file)
index 0000000..7bca8e6
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: tapi
+Description: Telephony client API library
+Requires: glib-2.0
+Version: @TAPI_VERSION@
+Libs: -L${libdir} -ltapi-3.0
+Cflags: -I${includedir}/tapi-3.0 -I${includedir}/tapi-3.0/common
diff --git a/tapi.pc.in b/tapi.pc.in
deleted file mode 100644 (file)
index fcf836a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@PREFIX@
-exec_prefix=${prefix}
-libdir=@LIB_INSTALL_DIR@
-includedir=${prefix}/include
-
-Name: TAPI Library
-Description: Telephony DBUS Client
-Requires: glib-2.0 gobject-2.0
-Version: 0.1
-Libs: -L${libdir} -ltapi
-Cflags: -I${includedir}/telephony-client
diff --git a/test_src/CMakeLists.txt b/test_src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2ff5459
--- /dev/null
@@ -0,0 +1,22 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(tapitest C)
+
+SET(tapitest
+       main.c
+       menu.c
+       network.c
+       sat.c
+       sim.c
+       sms.c
+       sms_util.c
+       phonebook.c
+       modem.c
+       ss.c
+       call.c
+       gps.c
+)
+
+ADD_EXECUTABLE(tapitest ${tapitest})
+TARGET_LINK_LIBRARIES(tapitest ${pkgs_LDFLAGS} "-L${CMAKE_BINARY_DIR} -ltapi-3.0")
+INSTALL(TARGETS tapitest RUNTIME DESTINATION bin/)
+ADD_DEPENDENCIES(tapitest tapi-3.0)
diff --git a/test_src/call.c b/test_src/call.c
new file mode 100644 (file)
index 0000000..811ee79
--- /dev/null
@@ -0,0 +1,1005 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <tapi.h>
+#include <tapi_call.h>
+#include <tapi_events.h>
+#include "menu.h"
+#include "call.h"
+
+#define CHECK_RESULT(result) \
+{\
+       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) { \
+               msg("API failed with result : %d", result); \
+               return; \
+       } else { \
+               msg("Result[%d] :[%s] ", result, dbg_call_result[result]); \
+       } \
+       if (result != TEL_CALL_RESULT_SUCCESS) \
+               return;\
+}
+
+static char* dbg_call_result[] = {
+       "TEL_CALL_RESULT_SUCCESS",
+       "TEL_CALL_RESULT_FAILURE",
+       "TEL_CALL_RESULT_INVALID_PARAMETER",
+       "TEL_CALL_RESULT_MEMORY_FAILURE",
+       "TEL_CALL_RESULT_OPERATION_NOT_SUPPORTED",
+       "TEL_CALL_RESULT_FDN_RESTRICTED",
+       "TEL_CALL_RESULT_NETWORK_BUSY",
+       "TEL_CALL_RESULT_SERVICE_NOT_ALLOWED",
+       "TEL_CALL_RESULT_OPERATION_NOT_PERMITTED"
+       };
+
+static char data_call_type[MENU_DATA_SIZE + 1] = "0";
+static char data_call_ecc[MENU_DATA_SIZE + 1] = "0";
+static char data_call_number[MENU_DATA_SIZE + 1] = "+821099777347";
+
+static char data_answer_type[MENU_DATA_SIZE + 1] = "1";
+
+static char data_call_id[MENU_DATA_SIZE + 1] = "1";
+static char data_end_type[MENU_DATA_SIZE + 1] = "1";
+
+static char data_dtmf_string[MENU_DATA_SIZE + 1] = "1";
+
+static char data_call_active_line_type[MENU_DATA_SIZE + 1] = "1";
+
+static char data_vol_device[MENU_DATA_SIZE + 1] = "0";
+static char data_vol_level[MENU_DATA_SIZE + 1] = "1";
+
+static char data_call_sound_path[MENU_DATA_SIZE + 1] = "0";
+static char data_sound_ex_volume[MENU_DATA_SIZE + 1] = "0";
+
+static char data_mute_status[MENU_DATA_SIZE + 1] = "0";
+
+static char data_sound_recording_status[MENU_DATA_SIZE + 1] = "0";
+
+static char data_sound_equalization_mode[MENU_DATA_SIZE + 1] = "0";
+static char data_sound_direction[MENU_DATA_SIZE + 1] = "0";
+/* To be implemented later
+static char data_sound_equalization_parameter[MENU_DATA_SIZE + 1] = "0";  */
+
+static void on_noti_call_status_idle(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelCallStatusIdleNoti *noti_data = data;
+
+       if (g_strcmp0(noti_id, TEL_NOTI_VOICE_CALL_STATUS_IDLE) == 0) {
+               msg("Event (%s) received !!", TEL_NOTI_VOICE_CALL_STATUS_IDLE);
+       } else if (g_strcmp0(noti_id, TEL_NOTI_VIDEO_CALL_STATUS_IDLE) == 0) {
+               msg("Event (%s) received !!", TEL_NOTI_VIDEO_CALL_STATUS_IDLE);
+       } else {
+               msg("Unregistered Event recieved!!");
+               return;
+       }
+
+       if (noti_data) {
+               msg(" id = %d", noti_data->call_id);
+               msg(" cause = %d", noti_data->cause);
+       } else {
+               msg("Call Noti data is NULL.");
+       }
+
+
+}
+
+static void on_noti_call_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *call_id = data;
+
+       msg("Event (%s) recieved !!", noti_id);
+
+       if (call_id) {
+               msg("call id = %d", *call_id);
+       } else {
+               msg("Call Noti data is NULL.");
+       }
+}
+
+static void on_noti_call_sound_ringback_tone(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelCallSoundRingbackToneNoti *noti_data = data;
+
+       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_RINGBACK_TONE) == 0) {
+               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_RINGBACK_TONE);
+       } else {
+               msg("Unregistered Event recieved!!");
+               return;
+       }
+
+       if (noti_data) {
+               msg(" Sound Ring-Back Tone - %s", (*noti_data == TEL_CALL_SOUND_RINGBACK_TONE_START) ? "START" : "END");
+       } else {
+               msg("Call Sound Ringback Noti data is NULL");
+       }
+}
+
+static void on_noti_call_sound_wbamr(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelCallSoundWbamrNoti *noti_data = data;
+
+       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_WBAMR) == 0) {
+               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_WBAMR);
+       } else {
+               msg("Unregistered Event recieved!!");
+               return;
+       }
+
+       if (noti_data) {
+               msg(" AMR-WB status - %s", (*noti_data == TEL_CALL_SOUND_WBAMR_STATUS_OFF) ? "OFF" : "ON");
+       } else {
+               msg("Call Sound AMR-WB Noti data is NULL");
+       }
+}
+
+static void on_noti_call_sound_equalization(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelCallSoundEqualizationNoti *noti_data = data;
+
+       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_EQUALIZATION) == 0) {
+               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_EQUALIZATION);
+       } else {
+               msg("Unregistered Event recieved!!");
+               return;
+       }
+
+       if (noti_data) {
+               msg(" mode = %d", noti_data->mode);
+               msg(" direction = %d", noti_data->direction);
+       } else {
+               msg("Call Sound Equalization Noti data is NULL");
+       }
+}
+
+static void on_noti_call_sound_clock_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       gboolean *clock_status = data;
+
+       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_CLOCK_STATUS) == 0) {
+               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_CLOCK_STATUS);
+       } else {
+               msg("Unregistered Event recieved!!");
+               return;
+       }
+
+       if (clock_status) {
+               msg("clock_status[%d]", *clock_status);
+       } else {
+               msg("Call Sound Clock Status notification data is null");
+       }
+}
+
+static void on_dial_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_dial_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_dial(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelCallDial call_dial_info;
+       TelReturn result;
+
+       memset(&call_dial_info, '\0', sizeof(TelCallDial));
+
+       call_dial_info.call_type = atoi(data_call_type);
+       call_dial_info.ecc = atoi(data_call_ecc);
+       memcpy(call_dial_info.number, data_call_number, strlen(data_call_number));
+
+       msg("call type : (%d)", call_dial_info.call_type);
+       msg("emergency call category : (%d)", call_dial_info.ecc);
+       msg("phone number : (%s)", call_dial_info.number);
+
+       msg("call tapi_call_dial()");
+
+       result = tapi_call_dial(handle, &call_dial_info, on_dial_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_answer_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_answer_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_answer(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelCallAnswerType ans_type;
+
+       ans_type = atoi(data_answer_type);
+
+       msg("answer type : (%d)", ans_type);
+
+       msg("call tapi_call_answer()");
+
+       result = tapi_call_answer(handle, ans_type, on_answer_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_end_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_end_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_end(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelCallEnd call_end_info;
+
+       memset(&call_end_info, '\0', sizeof(TelCallEnd));
+
+       call_end_info.call_id = atoi(data_call_id);
+       call_end_info.end_type = atoi(data_end_type);
+
+       msg("call id : (%d)", call_end_info.call_id);
+       msg("call end type : (%d)", call_end_info.end_type);
+
+       msg("call tapi_call_end()");
+
+       result = tapi_call_end(handle, &call_end_info, on_end_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_send_dtmf_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_send_DTMF_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_send_dtmf(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       const char *str = data_dtmf_string;
+
+       msg("DTMF string : (%s)", str);
+
+       msg("call tapi_call_send_dtmf()");
+
+       result = tapi_call_send_dtmf(handle, str, on_send_dtmf_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_hold_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_hold_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_hold(MManager * mm, struct menu_data * menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+
+       msg("call tapi_call_hold()");
+
+       result = tapi_call_hold(handle, on_hold_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_active_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_active_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_active(MManager * mm, struct menu_data * menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+
+       msg("call tapi_call_active()");
+
+       result = tapi_call_active(handle, on_active_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_swap_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_swap_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_swap(MManager * mm, struct menu_data * menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+
+       msg("call tapi_call_swap()");
+
+       result = tapi_call_swap(handle, on_swap_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_join_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_join_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_join(MManager * mm, struct menu_data * menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+
+       msg("call tapi_call_join()");
+
+       result = tapi_call_join(handle, on_join_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_split_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_split_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_split(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       int call_id;
+
+       call_id = atoi(data_call_id);
+
+       msg("split call Id : (%d)", call_id);
+
+       msg("call tapi_call_split()");
+
+       result = tapi_call_split(handle, call_id, on_split_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_transfer_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_transfer_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_transfer(MManager * mm, struct menu_data * menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+
+       msg("call tapi_call_transfer()");
+
+       result = tapi_call_transfer(handle, on_transfer_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_deflect_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_deflect_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_deflect(MManager * mm, struct menu_data * menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       const char *number = data_call_number;
+
+       msg("call deflect number : (%s)", number);
+
+       msg("call tapi_call_deflect()");
+
+       result = tapi_call_deflect(handle, number, on_deflect_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_set_active_line_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_set_active_line_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_set_active_line(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelCallActiveLine active_line;
+
+       active_line = atoi(data_call_active_line_type);
+
+       msg("active line type : (%d)", active_line);
+
+       msg("call tapi_call_set_active_line()");
+
+       result = tapi_call_set_active_line(handle, active_line, on_set_active_line_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_get_active_line_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) {
+               msg("Unidentified Result : %d", result);
+       } else {
+               msg("on_get_active_line_call() - result[%d] :[%s] ", result, dbg_call_result[result]);
+               if (result == TEL_CALL_RESULT_SUCCESS){
+                       TelCallActiveLine *act = data;
+                       msg("on_get_active_line_call() - active_line : %d", *act);
+               }
+       }
+}
+
+static int run_call_get_active_line(MManager * mm, struct menu_data * menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+
+       msg("call tapi_call_get_active_line()");
+
+       result = tapi_call_get_active_line(handle, on_get_active_line_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static int run_call_get_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       unsigned int call_id = 0;
+       TelCallStatus info;
+
+       memset(&info, '\0', sizeof(TelCallStatus));
+
+       call_id = atoi(data_call_id);
+
+       msg("call id : (%d)", call_id);
+
+       msg("call tapi_call_get_status()");
+
+       result = tapi_call_get_status(handle, call_id, &info);
+       CHECK_RT(result);
+
+       msg("id = %d", info.call_id);
+       msg("type = %d", info.call_type);
+       msg("state = %d", info.call_state);
+       msg("mo_call = %d", info.mo_call);
+       msg("multiparty = %d", info.mpty);
+       msg("cli_validity = %d", info.cli_validity);
+       msg("number = %s", info.number);
+       msg("cni_validity= %d", info.cni_validity);
+       msg("forward = %d", info.forward);
+       msg("active_line = %d", info.active_line);
+
+       return 0;
+}
+
+
+static int run_call_get_status_all(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result = 0;
+       unsigned int iter;
+       TelCallStatusList call_status_list;
+
+       memset(&call_status_list, '\0', sizeof(TelCallStatusList));
+
+       msg("call tapi_call_get_status_all()");
+
+       result = tapi_call_get_status_all(handle, &call_status_list);
+       CHECK_RT(result);
+       msg("Total Call Results are [%d]", call_status_list.count);
+
+       if (call_status_list.count<= TEL_CALL_MAX_CALLS_COUNT) {
+               for (iter = 0; iter < call_status_list.count; iter++) {
+                       msg("Call No. = %d", iter+1);
+                       msg("id = %d", call_status_list.status[iter].call_id);
+                       msg("type = %d", call_status_list.status[iter].call_type);
+                       msg("state = %d", call_status_list.status[iter].call_state);
+                       msg("mo_call = %d", call_status_list.status[iter].mo_call);
+                       msg("multiparty = %d", call_status_list.status[iter].mpty);
+                       msg("cli_validity = %d", call_status_list.status[iter].cli_validity);
+                       msg("number = %s", call_status_list.status[iter].number);
+                       msg("cni_validity= %d", call_status_list.status[iter].cni_validity);
+                       msg("name = %s", call_status_list.status[iter].name);
+                       msg("forward = %d", call_status_list.status[iter].forward);
+                       msg("active_line = %d", call_status_list.status[iter].active_line);
+                       msg("");
+               }
+       } else {
+                       msg("Call status list count exceeded max count : [%d]", call_status_list.count);
+       }
+       return 0;
+}
+
+static void on_set_volume_info_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_set_volume_info_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_set_volume_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result = 0;
+       TelCallVolumeInfo data;
+
+       memset(&data, '\0', sizeof(TelCallVolumeInfo));
+
+       data.device = atoi(data_vol_device);
+       data.volume = atoi(data_vol_level);
+
+       msg("device : (%d)", data.device);
+       msg("volume : (%d)", data.volume);
+
+       msg("call tapi_call_set_volume_info()");
+
+       result = tapi_call_set_volume_info(handle, &data, on_set_volume_info_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_get_volume_info_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) {
+               msg("Unidentified Result : %d", result);
+       } else {
+               msg("on_get_volume_info_call() - result[%d] :[%s] ", result, dbg_call_result[result]);
+               if (result == TEL_CALL_RESULT_SUCCESS){
+                       int *volume = data;
+                       msg("on_get_volume_info_call() - volume : %d", *volume);
+               }
+       }
+}
+
+static int run_call_get_volume_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result = 0;
+       TelCallSoundDevice device;
+
+       device = atoi(data_vol_device);
+
+       msg("call sound device : (%d)", device);
+
+       msg("call tapi_call_get_volume_info()");
+
+       result = tapi_call_get_volume_info(handle, device, on_get_volume_info_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_set_sound_path_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_set_sound_path_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_set_sound_path(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result = 0;
+       TelCallSoundPathInfo sound_path_info;
+
+       memset(&sound_path_info, '\0', sizeof(TelCallSoundPathInfo));
+
+       sound_path_info.path = atoi(data_call_sound_path);
+       sound_path_info.ex_volume = atoi(data_sound_ex_volume);
+
+       msg("sound path : (%d)", sound_path_info.path);
+       msg("sound ex-volume : (%d)", sound_path_info.ex_volume);
+
+       msg("call tapi_call_set_sound_path()");
+
+       result = tapi_call_set_sound_path(handle, &sound_path_info, on_set_sound_path_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_set_mute_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_set_mute_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_set_mute(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result = 0;
+       gboolean status = 0;
+
+       status = atoi(data_mute_status);
+
+       msg("mute status : (%d)", status);
+
+       msg("call tapi_call_set_mute()");
+
+       result = tapi_call_set_mute(handle, status, on_set_mute_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_get_mute_status_call(TelHandle *handle, int result, void *data, void *user_data)
+{
+       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) {
+               msg("Unidentified Result : %d", result);
+       } else {
+               msg("on_get_mute_status_call() - result[%d] :[%s] ", result, dbg_call_result[result]);
+               if(result == TEL_CALL_RESULT_SUCCESS) {
+                       gboolean *mute = data;
+                       msg("on_get_mute_status_call() - status : %d", *mute);
+               }
+       }
+}
+
+static int run_call_get_mute_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result = 0;
+
+       msg("call tapi_call_get_mute_status()");
+
+       result = tapi_call_get_mute_status(handle, on_get_mute_status_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_set_sound_recording_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_set_sound_recording_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_set_sound_recording(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result = 0;
+       TelCallSoundRecording sound_rec;
+
+       sound_rec = atoi(data_sound_recording_status);
+
+       msg("sound_recording_status : (%d)", sound_rec);
+
+       msg("call tapi_call_set_sound_recording()");
+
+       result = tapi_call_set_sound_recording(handle, sound_rec, on_set_sound_recording_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+static void on_set_sound_equalization_call(TelHandle * handle, int result, void *data, void *user_data)
+{
+       msg("on_set_sound_equalization_call :");
+       CHECK_RESULT(result);
+}
+
+static int run_call_set_sound_equalization(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelCallSoundEqualization sound_eq;
+       TelReturn result;
+
+       memset(&sound_eq, '\0', sizeof(TelCallSoundEqualization));
+
+       sound_eq.mode = atoi(data_sound_equalization_mode);
+       sound_eq.direction = atoi(data_sound_direction);
+/*  To be implemented later
+       memcpy(sound_eq.parameter, data_sound_equalization_parameter, strlen(data_sound_equalization_parameter)); */
+
+       msg("sound eq mode : (%d)", sound_eq.mode);
+       msg("sound eq direction : (%d)", sound_eq.direction);
+
+       msg("call tapi_call_set_sound_equalization()");
+
+       result = tapi_call_set_sound_equalization(handle, &sound_eq, on_set_sound_equalization_call, 0);
+       CHECK_RT(result);
+       return 0;
+}
+
+
+static struct menu_data menu_call_dial[] = {
+       { "1", "type (0=VOICE, 1=DATA, 2=Emergency)", NULL, NULL, data_call_type},
+       { "2", "type (0=DEFAULT, 1=POLICE, 2=AMBULANCE, 4=FIREBRIGADE, 8=MARINEGUARD, 16=MOUNTAINRESCUE, 32=MANUAL_ECALL, 64=AUTO_ECALL)", NULL, NULL, data_call_ecc} ,
+       { "3", "number", NULL, NULL, data_call_number},
+       { "4", "run", 0, run_call_dial, 0},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_answer[] = {
+       { "1", "type (0=ACCEPT, 1=REJECT, 2=REPLACE, 3=HOLD&ACCEPT)", NULL, NULL, data_answer_type},
+       { "2", "run", NULL, run_call_answer, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_end[] = {
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "type (0=END, 1=END ALL, 2=END ACTIVE ALL, 3=END HOLD ALL)", NULL, NULL, data_end_type},
+       { "3", "run", NULL, run_call_end, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_send_dtmf[] = {
+       { "1", "Dtmf Character (0-9, A-D, '*', and '#')", NULL, NULL, data_dtmf_string},
+       { "2", "run", NULL, run_call_send_dtmf, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_hold[] = {
+       { "1", "run", NULL, run_call_hold, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_active[] = {
+       { "1", "run", NULL, run_call_active, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_swap[] = {
+       { "1", "run", NULL, run_call_swap, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_join[] = {
+       { "1", "run", NULL, run_call_join, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_split[] = {
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "run", NULL, run_call_split, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_transfer[] = {
+       { "1", "run", 0, run_call_transfer, 0},
+       { 0, 0, },
+};
+
+static struct menu_data menu_call_deflect[] = {
+       { "1", "deflect number", NULL, NULL, data_call_number},
+       { "2", "run", NULL, run_call_deflect, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_set_active_line[] = {
+       { "1", "type (0=LINE1, 1=LINE2 )", NULL, NULL, data_call_active_line_type},
+       { "2", "run", NULL, run_call_set_active_line, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_get_active_line[] = {
+       { "1", "run", NULL, run_call_get_active_line, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_get_status[] = {
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "run", NULL, run_call_get_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_get_status_all[] = {
+       { "1", "run", NULL, run_call_get_status_all, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_set_volume_info[] = {
+       { "1", "device (0=RECIEVER, 16=SPEAKER PHONE, 32=HFK, 48=HEADSET, 64=BLUETOOTH, 160=EC)", NULL, NULL, data_vol_device},
+       { "2", "volume(1 - 100) ", NULL, NULL, data_vol_level},
+       { "3", "run", NULL, run_call_set_volume_info, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_get_volume_info[] = {
+       { "1", "device (0=RECIEVER, 16=SPEAKER PHONE, 32=HFK, 48=HEADSET, 64=BLUETOOTH, 160=EC)", NULL, NULL, data_vol_device},
+       { "2", "run", NULL, run_call_get_volume_info, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_set_sound_path[] = {
+       { "1", "path (0=HANDSET, 1=HEADSET, 2=HANDSFREE, 3=BLUETOOTH, 4=STEREO_BLUETOOTH, 5=SPEAKER_PHONE, 6=HEADSET_3_5PI, 7=BLUETOOTH_NSEC_OFF, 8=MIC2, 9=MIC1, 10=HEADSET_HAC)", NULL, NULL, data_call_sound_path},
+       { "2", "ex_volume (0=OFF 1=ON)", NULL, NULL, data_sound_ex_volume},
+       { "3", "run", NULL, run_call_set_sound_path, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_set_mute[] = {
+       { "1", "status (0=MUTE_OFF, 1=MUTE_ON)", NULL, NULL, data_mute_status},
+       { "2", "run", NULL, run_call_set_mute, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_get_mute_status[] = {
+       { "1", "run", NULL, run_call_get_mute_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_set_sound_recording[] = {
+       { "1", "recording (0=STOP, 1=START, 2=PAUSE)", NULL, NULL, data_sound_recording_status},
+       { "2", "run", NULL, run_call_set_sound_recording, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_set_sound_equalization[] = {
+       { "1", "mode (0=OFF, 1=ON, 2=FLAG_OFF, 3=FLAG_ON, 4=SOFT1, 5=SOFT2)", NULL, NULL, data_sound_equalization_mode},
+       { "2", "direction (0=LEFT, 1=RIGHT)", NULL, NULL, data_sound_direction} ,
+/* To be implemented Later
+       { "3", "parameter enter max six values", 0, 0, data_sound_equalization_parameter},*/
+       { "3", "run", NULL, run_call_set_sound_equalization, NULL},
+       { NULL, NULL, },
+};
+
+struct menu_data menu_call[] = {
+       { "1", "tapi_call_dial", menu_call_dial, NULL, NULL},
+       { "2", "tapi_call_answer", menu_call_answer, NULL, NULL},
+       { "3", "tapi_call_end", menu_call_end, NULL, NULL},
+       { "4", "tapi_call_send_dtmf", menu_call_send_dtmf, NULL, NULL},
+       { "5", "tapi_call_hold", menu_call_hold, NULL, NULL},
+       { "6", "tapi_call_active", menu_call_active, NULL, NULL},
+       { "7", "tapi_call_swap", menu_call_swap, NULL, NULL},
+       { "8", "tapi_call_join", menu_call_join, NULL, NULL},
+       { "9", "tapi_call_split", menu_call_split, NULL, NULL},
+       { "10", "tapi_call_transfer", menu_call_transfer, NULL, NULL},
+       { "11", "tapi_call_deflect", menu_call_deflect, NULL, NULL},
+       { "12s", "tapi_call_set_active_line", menu_call_set_active_line, NULL, NULL},
+       { "12g", "tapi_call_get_active_line", menu_call_get_active_line, NULL, NULL},
+       { "13", "tapi_call_get_status", menu_call_get_status, NULL, NULL},
+       { "14", "tapi_call_get_status_all", menu_call_get_status_all, NULL, NULL},
+       { "15s", "tapi_call_set_volume_info", menu_call_set_volume_info, NULL, NULL},
+       { "15g", "tapi_call_get_volume_info", menu_call_get_volume_info, NULL, NULL},
+       { "16", "tapi_call_set_sound_path", menu_call_set_sound_path, NULL, NULL},
+       { "17s", "tapi_call_set_mute", menu_call_set_mute, NULL, NULL},
+       { "17g", "tapi_call_get_mute_status", menu_call_get_mute_status, NULL, NULL},
+       { "18", "tapi_call_set_sound_recording", menu_call_set_sound_recording, NULL, NULL},
+       { "19", "tapi_call_set_sound_equalization", menu_call_set_sound_equalization, NULL, NULL},
+       { NULL, NULL, },
+};
+
+void register_call_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_IDLE, on_noti_call_status_idle, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VOICE_CALL_STATUS_IDLE - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_IDLE, on_noti_call_status_idle, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VIDEO_CALL_STATUS_IDLE - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_ACTIVE, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VOICE_CALL_STATUS_ACTIVE - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_HELD, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VOICE_CALL_STATUS_HELD - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_DIALING, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VOICE_CALL_STATUS_DIALING - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_ALERT, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VOICE_CALL_STATUS_ALERT - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_INCOMING, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VOICE_CALL_STATUS_INCOMING - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_DIALING, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VIDEO_CALL_STATUS_DIALING - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_ALERT, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VIDEO_CALL_STATUS_ALERT - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_INCOMING, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_VIDEO_CALL_STATUS_INCOMING - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_WAITING, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MO_WAITING - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_HELD, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_HELD - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_ACTIVE, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_ACTIVE - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_JOINED, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_JOINED - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_FORWARDED, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MO_FORWARDED - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MT_FORWARDED, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MT_FORWARDED - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MT_DEFLECTED, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MT_DEFLECTED - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_DEFLECTED, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_MO_DEFLECTED - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_TRANSFERED, on_noti_call_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_INFO_TRANSFERED - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_RINGBACK_TONE, on_noti_call_sound_ringback_tone, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_SOUND_RINGBACK_TONE - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_WBAMR, on_noti_call_sound_wbamr, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_SOUND_WBAMR - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_EQUALIZATION, on_noti_call_sound_equalization, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_SOUND_EQUALIZATION - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_CLOCK_STATUS, on_noti_call_sound_clock_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_CALL_SOUND_CLOCK_STATUS - register event failed: [%d]", ret);
+
+}
diff --git a/test_src/call.h b/test_src/call.h
new file mode 100644 (file)
index 0000000..4745afb
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALL_H__
+#define __CALL_H__
+
+
+void register_call_event(TelHandle *handle);
+
+#endif
diff --git a/test_src/gps.c b/test_src/gps.c
new file mode 100644 (file)
index 0000000..78404ad
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_gps.h>
+#include <tapi_events.h>
+
+#include "menu.h"
+#include "gps.h"
+
+static char *dbg_gps_result[] = {
+       "TEL_GPS_RESULT_SUCCESS",
+       "TEL_GPS_RESULT_FAILURE",
+       "TEL_GPS_RESULT_INVALID_PARAMETER",
+       "TEL_GPS_RESULT_MEMORY_FAILURE",
+       "TEL_GPS_RESULT_OPERATION_NOT_SUPPORTED",
+       "TEL_GPS_RESULT_OPERATION_NOT_PERMITTED",
+       "TEL_GPS_RESULT_UNKNOWN_FAILURE",
+};
+
+static char data_gps_set_frequency_aiding[MENU_DATA_SIZE + 1] = "1";
+
+/* Utilities */
+static void _gps_hex_dump(char *pad, int size, const void *data)
+{
+       char buf[255] = {0, };
+       char hex[4] = {0, };
+       int i;
+       unsigned char *p;
+
+       if (size <= 0) {
+               msg("%sno data", pad);
+               return;
+       }
+       p = (unsigned char *)data;
+
+       snprintf(buf, 255, "%s%04X: ", pad, 0);
+       for (i = 0; i<size; i++) {
+               snprintf(hex, 4, "%02X ", p[i]);
+               strcat(buf, hex);
+
+               if ((i + 1) % 8 == 0) {
+                       if ((i + 1) % 16 == 0) {
+                               msg("%s", buf);
+                               memset(buf, 0, 255);
+                               snprintf(buf, 255, "%s%04X: ", pad, i + 1);
+                       }
+                       else {
+                               strcat(buf, "  ");
+                       }
+               }
+       }
+
+       msg("%s", buf);
+}
+
+static void _gps_print_dump(int data_len, void *data)
+{
+       if(!data)
+               return;
+
+       msg("");
+       msg("  \tlen=%d", data_len);
+       _gps_hex_dump("        ", data_len, data);
+
+       msg("");
+}
+
+/* Event Callback */
+static void on_noti_gps(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       msg("");
+       msgb("event(%s) received !!", noti_id);
+
+       if (!g_strcmp0(noti_id, TEL_NOTI_GPS_ASSIST_DATA)
+               || !g_strcmp0(noti_id, TEL_NOTI_GPS_MEASURE_POSITION)) {
+               TelGpsDataInfo *gps_data = NULL;
+
+               if(!data) {
+                       msg("Gps event data received is null");
+                       return;
+               }
+
+               gps_data = (TelGpsDataInfo *)data;
+               _gps_print_dump(gps_data->data_len, gps_data->data);
+       } else if (!g_strcmp0(noti_id, TEL_NOTI_GPS_RESET_ASSIST_DATA)) {
+               /* Reset Assist Data */
+       } else {
+               msg("Unhandled event received");
+       }
+}
+
+/* Requests and Responses */
+static void on_gps_set_frequency_aiding(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("");
+       msgb("tapi_gps_set_frequency_aiding() response received");
+
+       if (result >= TEL_GPS_RESULT_SUCCESS && result <= TEL_GPS_RESULT_UNKNOWN_FAILURE) {
+               msg("result[%d][%s]", result, dbg_gps_result[result]);
+       } else {
+               msg("Api failed with result[%d]", result);
+       }
+}
+
+static int run_gps_set_frequency_aiding(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt;
+       gboolean state;
+
+       msg("call tapi_gps_set_frequency_aiding()");
+
+       state = atoi(data_gps_set_frequency_aiding);
+       msg("state[%s]", (state == 1) ? "Enable" : "Disable");
+
+       rt = tapi_gps_set_frequency_aiding(handle, state, on_gps_set_frequency_aiding, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static int run_gps_confirm_measure_position(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt;
+       TelGpsDataInfo gps_data;
+
+       msg("call tapi_gps_confirm_measure_pos()");
+
+       memset(&gps_data, 0, sizeof(TelGpsDataInfo));
+
+       rt = tapi_gps_confirm_measure_pos(handle, &gps_data);
+       CHECK_RT(rt);
+
+       _gps_print_dump(gps_data.data_len, gps_data.data);
+
+       g_free(gps_data.data);
+       return 0;
+}
+
+/* Sub-Menu */
+static struct menu_data menu_gps_set_frequency_aiding[] = {
+       { "1", "state (0=Disable, 1=Enable)", NULL, NULL, data_gps_set_frequency_aiding},
+       { "2", "run", NULL, run_gps_set_frequency_aiding, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_gps_confirm_measure_position[] = {
+       { "1", "run", NULL, run_gps_confirm_measure_position, NULL},
+       { NULL, NULL, },
+};
+
+/* Menu */
+struct menu_data menu_gps[] = {
+       { "1", "Set Frequency Aiding", menu_gps_set_frequency_aiding, NULL, NULL},
+       { "2", "Confirm Measure Position", menu_gps_confirm_measure_position, NULL, NULL},
+       { NULL, NULL, },
+};
+
+/* Register Events */
+void register_gps_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_GPS_ASSIST_DATA, on_noti_gps, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_GPS_ASSIST_DATA - Event register failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_GPS_MEASURE_POSITION, on_noti_gps, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_GPS_MEASURE_POSITION - Event register failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_GPS_RESET_ASSIST_DATA, on_noti_gps, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_GPS_RESET_ASSIST_DATA - Event register failed: [%d]", ret);
+}
diff --git a/test_src/gps.h b/test_src/gps.h
new file mode 100644 (file)
index 0000000..5a747a7
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GPS_H__
+#define __GPS_H__
+
+
+void register_gps_event(TelHandle *handle);
+
+#endif
diff --git a/test_src/main.c b/test_src/main.c
new file mode 100644 (file)
index 0000000..30409d2
--- /dev/null
@@ -0,0 +1,333 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include <tapi.h>
+
+#include "menu.h"
+#include "network.h"
+#include "sat.h"
+#include "sms.h"
+#include "sim.h"
+#include "phonebook.h"
+#include "modem.h"
+#include "call.h"
+#include "ss.h"
+#include "gps.h"
+
+#define SIM_SEL_MENU_KEY_COUNT 2
+
+extern struct menu_data menu_modem[];
+extern struct menu_data menu_sat[];
+extern struct menu_data menu_net[];
+extern struct menu_data menu_sms[];
+extern struct menu_data menu_sim[];
+extern struct menu_data menu_phonebook[];
+extern struct menu_data menu_ss[];
+extern struct menu_data menu_call[];
+extern struct menu_data menu_gps[];
+
+TelHandle *handle = NULL;
+char **cp_list = NULL;
+int cp_count = 0;
+
+
+static char data_subscription_type[MENU_DATA_SIZE + 1] = "";
+/* TODO
+static char data_property_int[MENU_DATA_SIZE + 1] = "org.tizen.telephony.Modem:power";
+static char data_property_string[MENU_DATA_SIZE + 1] = "org.tizen.telephony.Network:network_name";
+*/
+
+static int get_modem_info(MManager *mm, struct menu_data *menu)
+{
+       int i = 0;
+
+       while (cp_list[i]) {
+               msg("[%02d] strlen(%d), '%s'", i, strlen(cp_list[i]), cp_list[i]);
+               i++;
+       }
+
+       return 0;
+}
+
+static int init(MManager *mm, struct menu_data *menu)
+{
+       int subs_type = atoi(data_subscription_type);
+
+       if (handle) {
+               msg("handle already exists");
+               return 0;
+       }
+
+       if (cp_list[subs_type-1]) {
+               msg("call tapi_init(%s)", cp_list[subs_type-1]);
+               handle = tapi_init(cp_list[subs_type-1]);
+       }
+
+       if (!handle)
+               msg("handle is null");
+
+       menu_manager_set_user_data(mm, handle);
+
+       return 0;
+}
+
+static int deinit(MManager *mm, struct menu_data *menu)
+{
+       TelReturn ret;
+       if (!handle) {
+               msg("handle is null");
+               return 0;
+       }
+
+       msg("call tapi_deinit()");
+       ret = tapi_deinit(handle);
+       if (ret != TEL_RETURN_SUCCESS)
+       handle = NULL;
+
+       menu_manager_set_user_data(mm, handle);
+
+       return 0;
+}
+
+#if 0
+static int get_property_int(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       int result_int = -1;
+       int ret;
+
+       msg("call tapi_get_property_int()");
+
+       ret = tapi_get_property_int(handle, data_property_int, &result_int);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("failed. (return = %d)", ret);
+       }
+
+       msg(" - result = %d", result_int);
+
+       return 0;
+}
+
+static int get_property_string(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       char *result_str = NULL;
+       int ret;
+
+       msg("call tapi_get_property_string()");
+
+       ret = tapi_get_property_string (handle, data_property_string, &result_str);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("failed. (return = %d)", ret);
+       }
+
+       msg(" - result = %s", result_str);
+
+       if (result_str)
+               free (result_str);
+
+       return 0;
+}
+#endif
+
+static struct menu_data menu_common[] = {
+       { "1", "get modem info", NULL, get_modem_info, NULL},
+       { "2", "tapi_init", NULL, init, NULL},
+       { "3", "tapi_deinit", NULL, deinit, NULL},
+
+
+/*Todo */
+#if 0
+       { "4", "tapi_get_property_int",         NULL,   get_property_int,       NULL},
+       { "4s", " - property",  NULL,   NULL,   data_property_int},
+       { "5", "tapi_get_property_string",              NULL,   get_property_string,    NULL},
+       { "5s", " - property",  NULL,   NULL,   data_property_string},
+#endif
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_main[] = {
+       { "1", "Common", menu_common, NULL, NULL},
+       { "2", "Modem", menu_modem, NULL, NULL},
+       { "3", "Network", menu_net, NULL, NULL},
+       { "4", "SIM", menu_sim, NULL, NULL},
+       { "5", "CALL", menu_call, NULL, NULL},
+       { "6", "SMS", menu_sms, NULL, NULL},
+       { "7", "SS", menu_ss, NULL, NULL},
+       { "8", "Phonebook", menu_phonebook, NULL, NULL},
+       { "9", "SAT", menu_sat, NULL, NULL},
+       { "a", "GPS", menu_gps, NULL, NULL},
+       { NULL, NULL, },
+};
+
+static int __select_handle_register_event (MManager *mm, struct menu_data *menu)
+{
+       int subs_type = atoi(data_subscription_type);
+
+       if (subs_type < 1 || subs_type > cp_count) {
+               msg("Please select an existing CP Name");
+               return RET_FAILURE;
+       }
+
+       if (handle) {
+               tapi_deinit(handle);
+               handle = NULL;
+       }
+
+       handle = tapi_init(cp_list[subs_type-1]);
+
+       if (!handle) {
+               msg("[SIM%d] tapi_init(%s) - FAILED!!!.", subs_type, cp_list[subs_type-1]);
+               return RET_FAILURE;
+       } else {
+               msg("[SIM%d] tapi_init(%s) - SUCCESS!!!.", subs_type, cp_list[subs_type-1]);
+       }
+
+       menu_manager_set_user_data(mm, handle);
+
+       register_network_event(handle);
+       register_modem_event(handle);
+       register_sim_event(handle);
+       register_sat_event(handle);
+       register_sms_event(handle);
+       register_phonebook_event(handle);
+       register_call_event(handle);
+       register_ss_event(handle);
+       register_gps_event(handle);
+
+       return RET_SUCCESS;
+}
+
+
+static gboolean __create_sim_selection_menu(struct menu_data sim_selection_menu[SIM_SEL_MENU_KEY_COUNT+1])
+{
+       unsigned int total_cp_len = 0;
+       unsigned int title_len = 0;
+       unsigned int index_count = 0;
+       unsigned int i = 0;
+
+       if( tapi_get_cp_name_list(&cp_list) != TEL_RETURN_SUCCESS) {
+               msg("tapi_get_cp_name_list() failed. Exiting!");
+               return FALSE;
+       }
+
+       if (!cp_list) {
+               msg("cp_list is null");
+               return FALSE;
+       }
+
+       while (cp_list[i]) {
+               total_cp_len += strlen(cp_list[i]);
+               cp_count++;
+               i++;
+       }
+
+       /**
+        * Available CPs are displayed as below (in UI) -
+        *         Modems(1=Modem0,2=Modem1,3=Modem2)
+        *
+        * Title length is calculated as,
+        *         title_len = total_cp_len + (2*cp_count) + (cp_count-1) + 8 + 1;
+        * where,
+        *         total_cp_len = strlen(Modem0)+strlen(Modem1)+ strlen(Modem2)
+        *         (2*cp_count) = To print "1="  "2="  "3="
+        *         cp_count-1   = Number of commas
+        *         8 = Modems()
+        *         1 = NULL termination
+        */
+       title_len = total_cp_len + (2*cp_count) + (cp_count-1) + 8 + 1;
+       sim_selection_menu[0].title = (char *)g_try_malloc0(title_len);
+       index_count += sprintf(&sim_selection_menu[0].title[index_count], "Modems(");
+
+       i=0;
+       while (cp_list[i]) {
+               if (i != 0)
+                       sim_selection_menu[0].title[index_count++] = ',';
+
+               index_count += sprintf(&sim_selection_menu[0].title[index_count], "%d=", (i+1));
+               index_count += sprintf(&sim_selection_menu[0].title[index_count], "%s", cp_list[i]);
+               i++;
+       }
+
+       if (index_count <= title_len - 2) {
+               sim_selection_menu[0].title[index_count++] = ')';
+               sim_selection_menu[0].title[index_count] = '\0';
+       } else {
+               msg("Invalid count");
+               return FALSE;
+       }
+
+       sim_selection_menu[0].key = "1";
+       sim_selection_menu[0].sub_menu = NULL;
+       sim_selection_menu[0].callback = NULL;
+       sim_selection_menu[0].data = data_subscription_type;
+
+       sim_selection_menu[1].key = "2";
+       sim_selection_menu[1].title = "run";
+       sim_selection_menu[1].sub_menu = menu_main;
+       sim_selection_menu[1].callback = __select_handle_register_event;
+       sim_selection_menu[1].data = NULL;
+
+       return TRUE;
+}
+
+
+int main(int arg, char **argv)
+{
+       GMainLoop *mainloop;
+       GIOChannel *channel = g_io_channel_unix_new(STDIN_FILENO);
+       MManager *manager;
+       struct menu_data sim_selection_menu[SIM_SEL_MENU_KEY_COUNT+1] = { {NULL, NULL, }, };
+
+       g_type_init();
+       mainloop = g_main_loop_new(NULL, FALSE);
+
+       msg("");
+       msg("* Telephony Test application ");
+       msg("* Build On: %s  %s", __DATE__, __TIME__);
+
+       if (__create_sim_selection_menu(sim_selection_menu) == FALSE)
+               goto OUT;
+
+       manager = menu_manager_new(sim_selection_menu, mainloop);
+       menu_manager_run(manager);
+
+       g_io_add_watch(channel, (G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL), on_menu_manager_keyboard, manager);
+
+       g_main_loop_run(mainloop);
+
+OUT:
+       g_strfreev(cp_list);
+       g_free(sim_selection_menu[0].title);
+       g_main_loop_unref(mainloop);
+       msg("******* Bye bye *******");
+
+       return 0;
+}
+
+
diff --git a/test_src/menu.c b/test_src/menu.c
new file mode 100644 (file)
index 0000000..00619aa
--- /dev/null
@@ -0,0 +1,267 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include "menu.h"
+
+#define DEFAULT_MENU_MENU      "m"
+#define DEFAULT_MENU_PREV      "p"
+#define DEFAULT_MENU_QUIT      "q"
+#define DEFAULT_MENU_NONE      "-"
+
+
+struct menu_manager {
+       GQueue *stack;
+       GQueue *title_stack;
+
+       struct menu_data *menu;
+
+       char *buf;
+
+       void *user_data;
+       GMainLoop *mainloop;
+};
+
+
+char key_buffer[MENU_DATA_SIZE];
+
+static void _show_prompt()
+{
+       msgn(" >> ");
+}
+
+static void _show_reserved_menu()
+{
+       msg(ANSI_COLOR_DARKGRAY "--------------------------------------------" ANSI_COLOR_NORMAL);
+       msg(ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY " ] " ANSI_COLOR_NORMAL "Previous menu " , DEFAULT_MENU_PREV);
+       msg(ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY " ] " ANSI_COLOR_NORMAL "Show Menu " , DEFAULT_MENU_MENU);
+       msg(ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY " ] " ANSI_COLOR_NORMAL "Quit " , DEFAULT_MENU_QUIT);
+}
+
+static void _show_input_ok()
+{
+       msg("OK.");
+}
+
+static void _show_menu(MManager *m, struct menu_data menu[])
+{
+       int i = 0;
+       int len = 0;
+       struct menu_data *item;
+
+       if (!menu)
+               return;
+
+       msg("");
+       msg("============================================");
+       len = g_queue_get_length(m->title_stack);
+       msgn(ANSI_COLOR_YELLOW " Main");
+       if (len > 0) {
+               for (i = 0; i < len; i++) {
+                       msgn(ANSI_COLOR_NORMAL " >> " ANSI_COLOR_YELLOW "%s", (char *)g_queue_peek_nth(m->title_stack, i));
+               }
+       }
+       msg(ANSI_COLOR_NORMAL);
+       msg("--------------------------------------------");
+
+       i = 0;
+       while (1) {
+               item = menu + i;
+               if (item->key == NULL)
+                       break;
+
+               if (!g_strcmp0(item->key, "-")) {
+                       msgn("       ");
+               }
+               else {
+                       msgn(ANSI_COLOR_DARKGRAY " [" ANSI_COLOR_NORMAL "%3s" ANSI_COLOR_DARKGRAY "] " ANSI_COLOR_NORMAL,
+                                       item->key);
+               }
+
+               if (item->data) {
+                       msg("%s " ANSI_COLOR_LIGHTBLUE "(%s)" ANSI_COLOR_NORMAL, item->title, item->data);
+               }
+               else {
+                       msg("%s", item->title);
+               }
+
+               i++;
+       }
+
+       _show_reserved_menu();
+
+       msg("============================================");
+
+       _show_prompt();
+}
+
+static void _show_item_data_input_msg(struct menu_data *item)
+{
+       msg("");
+       msg("============================================");
+       msg(" Input [%s] data ", item->title);
+       msg("--------------------------------------------");
+       msg(" current = [%s]", item->data);
+       msgn(" new >> ");
+}
+
+static void _move_menu(MManager *mm, struct menu_data menu[], char *key)
+{
+       struct menu_data *item;
+       int i = 0;
+
+       if (!mm->menu)
+               return;
+
+       if (!g_strcmp0(DEFAULT_MENU_PREV, key)) {
+               if (g_queue_get_length(mm->stack) > 0) {
+                       mm->menu = g_queue_pop_tail(mm->stack);
+                       g_queue_pop_tail(mm->title_stack);
+               }
+               _show_menu(mm, mm->menu);
+               mm->buf = key_buffer;
+               return;
+       }
+       else if (!g_strcmp0(DEFAULT_MENU_MENU, key)) {
+               _show_menu(mm, mm->menu);
+               return;
+       }
+       else if (!g_strcmp0(DEFAULT_MENU_QUIT, key)) {
+               g_main_loop_quit(mm->mainloop);
+               return;
+       }
+       else if (!g_strcmp0(DEFAULT_MENU_NONE, key)) {
+               _show_prompt();
+               return;
+       }
+
+       while (1) {
+               int ret = RET_SUCCESS;
+               item = menu + i;
+               if (item->key == NULL)
+                       break;
+
+               if (!g_strcmp0(item->key, key)) {
+                       if (item->callback) {
+                               ret = item->callback(mm, item);
+                               _show_prompt();
+                       }
+                       if (ret == RET_SUCCESS) {
+                               if (item->sub_menu) {
+                                       g_queue_push_tail(mm->stack, mm->menu);
+                                       g_queue_push_tail(mm->title_stack, item->title);
+
+                                       mm->menu = item->sub_menu;
+                                       _show_menu(mm, mm->menu);
+                                       mm->buf = key_buffer;
+                               }
+
+                               if (item->data) {
+                                       _show_item_data_input_msg(item);
+                                       mm->buf = item->data;
+                               }
+                       }
+
+                       return;
+               }
+
+               i++;
+       }
+
+       _show_prompt();
+}
+
+MManager *menu_manager_new(struct menu_data items[], GMainLoop *mainloop)
+{
+       MManager *mm;
+
+       mm = calloc(sizeof(struct menu_manager), 1);
+       mm->stack = g_queue_new();
+       mm->title_stack = g_queue_new();
+       mm->menu = items;
+       mm->mainloop = mainloop;
+
+       return mm;
+}
+
+int menu_manager_run(MManager *mm)
+{
+       _show_menu(mm, mm->menu);
+
+       mm->buf = key_buffer;
+
+       return 0;
+}
+
+int menu_manager_set_user_data(MManager *mm, void *user_data)
+{
+       if (!mm)
+               return -1;
+
+       mm->user_data = user_data;
+
+       return 0;
+}
+
+void *menu_manager_ref_user_data(MManager *mm)
+{
+       if (!mm)
+               return NULL;
+
+       return mm->user_data;
+}
+
+gboolean on_menu_manager_keyboard(GIOChannel *src, GIOCondition con, gpointer data)
+{
+       MManager *mm = data;
+       char local_buf[MENU_DATA_SIZE + 1] = { 0, };
+
+       if (fgets(local_buf, MENU_DATA_SIZE, stdin) == NULL)
+               return TRUE;
+
+       if (strlen(local_buf) > 0) {
+               if (local_buf[strlen(local_buf) - 1] == '\n')
+                       local_buf[strlen(local_buf) - 1] = '\0';
+       }
+
+       if (mm->buf == key_buffer) {
+               if (strlen(local_buf) < 1) {
+                       _show_prompt();
+                       return TRUE;
+               }
+
+               _move_menu(mm, mm->menu, local_buf);
+       }
+       else {
+               if (mm->buf) {
+                       memset(mm->buf, 0, MENU_DATA_SIZE);
+                       memcpy(mm->buf, local_buf, MENU_DATA_SIZE);
+                       _show_input_ok();
+               }
+               mm->buf = key_buffer;
+               _move_menu(mm, mm->menu, DEFAULT_MENU_MENU);
+       }
+
+       return TRUE;
+}
diff --git a/test_src/menu.h b/test_src/menu.h
new file mode 100644 (file)
index 0000000..60a9a09
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MENU_H__
+#define __MENU_H__
+
+__BEGIN_DECLS
+
+#define ANSI_COLOR_NORMAL "\e[0m"
+
+#define ANSI_COLOR_BLACK "\e[0;30m"
+#define ANSI_COLOR_RED "\e[0;31m"
+#define ANSI_COLOR_GREEN "\e[0;32m"
+#define ANSI_COLOR_BROWN "\e[0;33m"
+#define ANSI_COLOR_BLUE "\e[0;34m"
+#define ANSI_COLOR_MAGENTA "\e[0;35m"
+#define ANSI_COLOR_CYAN "\e[0;36m"
+#define ANSI_COLOR_LIGHTGRAY "\e[0;37m"
+
+#define ANSI_COLOR_DARKGRAY "\e[1;30m"
+#define ANSI_COLOR_LIGHTRED "\e[1;31m"
+#define ANSI_COLOR_LIGHTGREEN "\e[1;32m"
+#define ANSI_COLOR_YELLOW "\e[1;33m"
+#define ANSI_COLOR_LIGHTBLUE "\e[1;34m"
+#define ANSI_COLOR_LIGHTMAGENTA "\e[1;35m"
+#define ANSI_COLOR_LIGHTCYAN "\e[1;36m"
+#define ANSI_COLOR_WHITE "\e[1;37m"
+
+#define msg(fmt,args...) do { fprintf(stdout, fmt "\n", ##args); fflush(stdout); } while (0)
+#define msgn(fmt,args...) do { fprintf(stdout, fmt, ##args); fflush(stdout); } while (0)
+#define msgb(fmt,args...) do { fprintf(stdout, ANSI_COLOR_LIGHTGREEN fmt ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); } while (0)
+
+#define MENU_DATA_SIZE         255
+
+#define CHECK_RT(x) \
+{ \
+       if (x != TEL_RETURN_SUCCESS) { \
+               msg("api call failed with [%d]", x); \
+               return 0; \
+       } \
+}
+
+#define RET_SUCCESS 0
+#define RET_FAILURE -1
+
+typedef struct menu_manager MManager;
+
+struct menu_data {
+       char *key;
+       char *title;
+       struct menu_data *sub_menu;
+       int (*callback)(MManager *mm, struct menu_data *menu);
+       char *data;
+};
+
+MManager* menu_manager_new(struct menu_data items[], GMainLoop *mainloop);
+int       menu_manager_run(MManager *mm);
+int       menu_manager_set_user_data(MManager *mm, void *user_data);
+void*     menu_manager_ref_user_data(MManager *mm);
+
+gboolean  on_menu_manager_keyboard(GIOChannel *src, GIOCondition con, gpointer data);
+
+__END_DECLS
+
+#endif
diff --git a/test_src/modem.c b/test_src/modem.c
new file mode 100644 (file)
index 0000000..52484ff
--- /dev/null
@@ -0,0 +1,262 @@
+/*
+ * libtapi
+ * Telephony test application
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_modem.h>
+#include <tapi_events.h>
+
+#include "menu.h"
+#include "modem.h"
+
+static char *dbg_modem_power_status[] = {"OFF", "ON", "RESET", };
+
+static char *dbg_modem_status[] = {"TEL_MODEM_POWER_OFF", "TEL_MODEM_POWER_ON",
+               "TEL_MODEM_POWER_ERROR", };
+
+static char *dbg_modem_result[] = {"TEL_MODEM_RESULT_SUCCESS", "TEL_MODEM_RESULT_FAILURE",
+               "TEL_MODEM_RESULT_INVALID_PARAMETER", "TEL_MODEM_RESULT_MEMORY_FAILURE",
+               "TEL_MODEM_RESULT_OPERATION_NOT_SUPPORTED", "TEL_MODEM_RESULT_UNKNOWN_FAILURE", };
+
+static char data_modem_set_flight_mode[MENU_DATA_SIZE + 1] = "1";
+static char data_modem_set_power_mode[MENU_DATA_SIZE + 1] = "1";
+
+static void on_noti_modem_power_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       gboolean *status = data;
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_MODEM_POWER_STATUS);
+
+       if (!status)
+               return;
+
+       msg("modem power status[%s]", (*status == TRUE) ? "ON" : "OFF");
+}
+
+static void on_noti_modem_flight_mode_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       gboolean *status = data;
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_MODEM_FLIGHT_MODE_STATUS);
+
+       if (!status)
+               return;
+
+       msg("modem flight mode status[%s]", (*status == TRUE) ? "ON" : "OFF");
+}
+
+static int run_modem_get_version(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelModemVersion version;
+       TelReturn rt = 0;
+
+       msg("call tapi_modem_get_version()");
+
+       memset(&version, 0, sizeof(TelModemVersion));
+
+       rt = tapi_modem_get_version(handle, &version);
+       CHECK_RT(rt);
+
+       msg("sw version: [%s]", version.software_version);
+       msg("hw version: [%s]", version.hardware_version);
+       msg("RfCal Date: [%s]", version.calibration_date);
+       msg("Product Code: [%s]", version.product_code);
+
+       return 0;
+}
+
+static int run_modem_get_imei(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       char imei[TEL_MODEM_IMEI_LENGTH_MAX + 1] = {};
+       TelReturn rt = 0;
+
+       msg("call tapi_modem_get_imei()");
+
+       rt = tapi_modem_get_imei(handle, imei);
+       CHECK_RT(rt);
+
+       msg("imei: [%s]", imei);
+
+       return 0;
+}
+
+static void on_modem_set_power_status(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msgb("tapi_modem_set_power_status() response received");
+       if (result >= TEL_MODEM_RESULT_SUCCESS && result <= TEL_MODEM_RESULT_UNKNOWN_FAILURE) {
+               msg("access_rt[%d][%s]", result, dbg_modem_result[result]);
+       } else {
+               msg("access_rt[%d]", result);
+       }
+}
+
+static int run_modem_set_power_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelModemPowerStatus mode;
+       TelReturn rt = 0;
+
+       msg("call tapi_modem_set_power_status()");
+
+       mode = atoi(data_modem_set_power_mode);
+
+       if (mode <= TEL_MODEM_POWER_ERROR) {
+               msg("Requested power mode: [%d][%s]", mode, dbg_modem_power_status[mode]);
+       } else {
+               msg("Requested power mode: [%d]", mode);
+       }
+
+       rt = tapi_modem_set_power_status(handle, mode, on_modem_set_power_status, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static int run_modem_get_power_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelModemPowerStatus status;
+       TelReturn rt = 0;
+
+       msg("call tapi_modem_get_power_status()");
+
+       rt = tapi_modem_get_power_status(handle, &status);
+       CHECK_RT(rt);
+
+       if (status <= TEL_MODEM_POWER_ERROR) {
+               msg("status[%d][%s]", status, dbg_modem_status[status]);
+       } else {
+               msg("status[%d]", status);
+       }
+
+       return 0;
+}
+
+static void on_modem_set_flight_mode(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msgb("tapi_modem_set_flight_mode() response received");
+       if (result >= TEL_MODEM_RESULT_SUCCESS && result <= TEL_MODEM_RESULT_UNKNOWN_FAILURE) {
+               msg("access_rt[%d][%s]", result, dbg_modem_result[result]);
+       } else {
+               msg("access_rt[%d]", result);
+       }
+}
+
+static int run_modem_set_flight_mode(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       gboolean enable;
+       TelReturn rt = 0;
+
+       msg("call tapi_modem_set_flight_mode()");
+
+       enable = atoi(data_modem_set_flight_mode);
+       msg("Requested flight mode: [%s]", ((enable == 1) ? "ON" : "OFF"));
+
+       rt = tapi_modem_set_flight_mode(handle, enable, on_modem_set_flight_mode, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static int run_modem_get_flight_mode(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       gboolean enable;
+       TelReturn rt = 0;
+
+       msg("call tapi_modem_get_flight_mode()");
+
+       rt = tapi_modem_get_flight_mode(handle, &enable);
+       CHECK_RT(rt);
+
+       msg("Flight mode status: [%s]", ((enable == 1) ? "ON" : "OFF"));
+
+       return 0;
+}
+
+static struct menu_data menu_modem_get_version[] = {
+       { "1", "run", NULL, run_modem_get_version, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_get_imei[] = {
+       { "1", "run", NULL, run_modem_get_imei, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_set_power_status[] = {
+       { "1", "mode (0=OFF, 1=ON, 2=RESET)", NULL, NULL, data_modem_set_power_mode},
+       { "2", "run", NULL, run_modem_set_power_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_get_power_status[] = {
+       { "1", "run", NULL, run_modem_get_power_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_set_flight_mode[] = {
+       { "1", "mode (0=OFF, 1=ON)", NULL, NULL, data_modem_set_flight_mode},
+       { "2", "run", NULL, run_modem_set_flight_mode, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_get_flight_mode[] = {
+       { "1", "run", NULL, run_modem_get_flight_mode, NULL},
+       { NULL, NULL, },
+};
+
+struct menu_data menu_modem[] = {
+       { "1g", "Get Modem Version", menu_modem_get_version, NULL, NULL},
+       { "2g", "Get IMEI", menu_modem_get_imei, NULL, NULL},
+       { "3s", "Set Modem Power Status", menu_modem_set_power_status, NULL, NULL},
+       { "3g", "Get Modem Status", menu_modem_get_power_status, NULL, NULL},
+       { "4s", "Set Flight Mode", menu_modem_set_flight_mode, NULL, NULL},
+       { "4g", "Get Flight Mode", menu_modem_get_flight_mode, NULL, NULL},
+       { NULL, NULL, },
+};
+
+void register_modem_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       /* Event register can fail only in Invalid input parameter case
+        * Assuming we pass valid input parameters
+        */
+       ret = tapi_register_event_id(handle, TEL_NOTI_MODEM_POWER_STATUS, on_noti_modem_power_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_MODEM_POWER_STATUS - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_MODEM_FLIGHT_MODE_STATUS, on_noti_modem_flight_mode_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_MODEM_FLIGHT_MODE_STATUS - register event failed: [%d]", ret);
+}
diff --git a/test_src/modem.h b/test_src/modem.h
new file mode 100644 (file)
index 0000000..61c32c8
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MODEM_H__
+#define __MODEM_H__
+
+
+void register_modem_event(TelHandle *handle);
+
+#endif
diff --git a/test_src/network.c b/test_src/network.c
new file mode 100644 (file)
index 0000000..5d9868a
--- /dev/null
@@ -0,0 +1,599 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_events.h>
+#include <tapi_network.h>
+
+#include "menu.h"
+#include "network.h"
+
+#define CHECK_NETWORK_RESULT(x) \
+{ \
+       if (x >= TEL_NETWORK_RESULT_SUCCESS && x <= TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED) { \
+               msg("result[%d][%s]", x, dbg_network_result[x]); \
+       } else { \
+               msg("API failed with result[%d]", x); \
+       } \
+       if (x != TEL_NETWORK_RESULT_SUCCESS) \
+               return; \
+}
+
+static char *dbg_network_result[] = {"TEL_NETWORK_RESULT_SUCCESS", "TEL_NETWORK_RESULT_FAILURE",
+               "TEL_NETWORK_RESULT_INVALID_PARAMETER", "TEL_NETWORK_RESULT_MEMORY_FAILURE",
+               "TEL_NETWORK_RESULT_OPERATION_NOT_PERMITTED", "TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED", };
+
+static char data_network_act[MENU_DATA_SIZE + 1] = "";
+static char data_network_plmn[MENU_DATA_SIZE + 1] = "45001";
+static char data_network_plmn_index[MENU_DATA_SIZE + 1] = "1";
+static char data_network_mode[MENU_DATA_SIZE + 1] = "";
+
+
+/* Notification Callbacks */
+static void on_noti_registration_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelNetworkRegStatusInfo *reg_info = data;
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_NETWORK_REGISTRATION_STATUS);
+
+       if (!reg_info) {
+               msg("Network registration status noti data is null");
+               return;
+       }
+
+       msg("circuit status[%d]", reg_info->cs_status);
+       msg("packet status[%d]", reg_info->ps_status);
+       msg("access technology[%d]", reg_info->act);
+}
+
+static void on_noti_cell_info(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelNetworkCellInfo *cell_info = data;
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_NETWORK_CELL_INFO);
+
+       if (!cell_info) {
+               msg("Network cell info noti data is null");
+               return;
+       }
+
+       msg("lac[%d]", cell_info->lac);
+       msg("cell_id[%d]", cell_info->cell_id);
+       msg("rac[%d]", cell_info->rac);
+}
+
+static void on_noti_identity(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelNetworkIdentityInfo *id_info = data;
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_NETWORK_IDENTITY);
+
+       if (!id_info) {
+               msg("Network identity noti data is null");
+               return;
+       }
+
+       msg("plmn[%s]", id_info->plmn);
+       msg("short_name[%s]", id_info->short_name);
+       msg("long_name[%s]", id_info->long_name);
+}
+
+static void on_noti_rssi(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       unsigned int *rssi = data;
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_NETWORK_RSSI);
+
+       if (!rssi) {
+               msg("Network Rssi noti data is null");
+               return;
+       }
+
+       msg("RSSI[%d]", *rssi);
+}
+
+static void on_noti_time_info(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelNetworkNitzInfoNoti *time_info = data;
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_NETWORK_TIME_INFO);
+
+       if (!time_info) {
+               msg("Time info noti data is null");
+               return;
+       }
+
+       msg("plmn[%s]", time_info->plmn);
+       msg("year[%d]", time_info->year);
+       msg("month[%d]", time_info->month);
+       msg("day[%d]", time_info->day);
+       msg("hour[%d]", time_info->hour);
+       msg("minute[%d]", time_info->minute);
+       msg("second[%d]", time_info->second);
+       msg("GMT offset[%d]", time_info->gmtoff);
+       msg("DST offset[%d]", time_info->dstoff);
+       msg("is DST[%d]", time_info->isdst);
+}
+
+static int run_net_get_registration_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelNetworkRegistrationInfo reg_info;
+       TelReturn rt = 0;
+
+       msg("call tapi_network_get_registration_info()");
+
+       memset(&reg_info, 0, sizeof(TelNetworkRegistrationInfo));
+
+       rt = tapi_network_get_registration_info(handle, &reg_info);
+       CHECK_RT(rt);
+
+       msg("cs_status[%d]", reg_info.reg_status_info.cs_status);
+       msg("ps_status[%d]", reg_info.reg_status_info.ps_status);
+       msg("act[%d]", reg_info.reg_status_info.act);
+       msg("lac[%d]", reg_info.cell_info.lac);
+       msg("cell_id[%d]", reg_info.cell_info.cell_id);
+       msg("rac[%d]", reg_info.cell_info.rac);
+
+       return 0;
+}
+
+static void on_net_get_net_id_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkIdentityInfo *id_info = data;
+
+       msg("tapi_network_get_identity_info() response received");
+       CHECK_NETWORK_RESULT(result);
+
+       if (!id_info) {
+               msg("network identity info data is null");
+               return;
+       }
+
+       msg("plmn[%s]", id_info->plmn);
+       msg("short_name[%s]", id_info->short_name);
+       msg("long_name[%s]", id_info->long_name);
+}
+
+static int run_net_get_net_id_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_get_identity_info()");
+
+       rt = tapi_network_get_identity_info(handle, on_net_get_net_id_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_search(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkPlmnList *plmn_list = data;
+       unsigned int i = 0;
+
+       msgb("tapi_network_search() response received");
+       CHECK_NETWORK_RESULT(result);
+
+       if (!plmn_list) {
+               msg("plmn list data is null");
+               return;
+       }
+
+       msg("plmn_list count[%d]", plmn_list->count);
+
+       for (i = 0; i < plmn_list->count; i++) {
+               msg("[%d] plmn_status[%d] act[%d] plmn[%s] short_name[%s] long_name[%s]",
+                       i+1, plmn_list->network_list[i].plmn_status, plmn_list->network_list[i].act,
+                       plmn_list->network_list[i].network_identity.plmn,
+                       plmn_list->network_list[i].network_identity.short_name,
+                       plmn_list->network_list[i].network_identity.long_name);
+       }
+}
+
+static int run_net_search(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_search()");
+
+       rt = tapi_network_search(handle, on_net_search, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_cancel_network_search(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msgb("tapi_network_cancel_search() response received");
+       CHECK_NETWORK_RESULT(result);
+}
+
+static int run_net_cancel_network_search(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_cancel_search()");
+
+       rt = tapi_network_cancel_search(handle, on_net_cancel_network_search, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_select_network_automatic(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msgb("tapi_network_select_automatic() response received");
+       CHECK_NETWORK_RESULT(result);
+}
+
+static int run_net_select_network_automatic(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_select_automatic()");
+
+       rt = tapi_network_select_automatic(handle, on_net_select_network_automatic, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_select_network_manual(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msgb("tapi_network_select_manual() response received");
+       CHECK_NETWORK_RESULT(result);
+}
+
+static int run_net_select_network_manual(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelNetworkSelectManualInfo select_info;
+       TelReturn rt = 0;
+
+       msg("call tapi_network_select_manual()");
+
+       memset(&select_info, 0, sizeof(TelNetworkSelectManualInfo));
+
+       select_info.act = atoi(data_network_act);
+       select_info.plmn = (char *)data_network_plmn;
+
+       msg("act[%d]", select_info.act);
+       msg("plmn[%s]", select_info.plmn);
+
+       rt = tapi_network_select_manual(handle, &select_info, on_net_select_network_manual, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_get_network_selection_mode(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkSelectionMode *mode = data;
+
+       msgb("tapi_network_get_selection_mode() response received");
+       CHECK_NETWORK_RESULT(result);
+
+       if (!mode) {
+               msg("network selection mode data is null");
+               return;
+       }
+
+       msg("network selection mode: [%d]", *mode);
+}
+
+static int run_net_get_network_selection_mode(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_get_selection_mode()");
+
+       rt = tapi_network_get_selection_mode(handle, on_net_get_network_selection_mode, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_set_preferred_plmn(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msgb("tapi_network_set_preferred_plmn() response received");
+       CHECK_NETWORK_RESULT(result);
+}
+
+static int run_net_set_preferred_plmn(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelNetworkPreferredPlmnInfo info;
+
+       msg("call tapi_network_set_preferred_plmn()");
+
+       memset(&info, 0, sizeof(TelNetworkPreferredPlmnInfo));
+
+       info.index = atoi(data_network_plmn_index);
+       info.plmn = (char *)data_network_plmn;
+       info.act = atoi(data_network_act);
+
+       msg("plmn_index[%d]", info.index);
+       msg("plmn[%s]", info.plmn);
+       msg("act[%d]", info.act);
+
+       rt = tapi_network_set_preferred_plmn(handle, &info, on_net_set_preferred_plmn, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_get_preferred_plmn(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkPreferredPlmnList *plmn_list = data;
+       unsigned int i = 0;
+
+       msgb("tapi_network_get_preferred_plmn() response received");
+       CHECK_NETWORK_RESULT(result);
+
+       if (!plmn_list) {
+               msg("preferred plmn list data is null");
+               return;
+       }
+
+       msg("preferred PLMN count[%d]", plmn_list->count);
+
+       for(i = 0; i < plmn_list->count; i++) {
+               msg("[%d] index[%d] plmn[%s] act[%d]", i+1, plmn_list->list[i].index,
+                       plmn_list->list[i].plmn, plmn_list->list[i].act);
+       }
+}
+
+static int run_net_get_preferred_plmn(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_get_preferred_plmn()");
+
+       rt = tapi_network_get_preferred_plmn(handle, on_net_get_preferred_plmn, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_set_network_mode(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msgb("tapi_network_set_mode() response received");
+       CHECK_NETWORK_RESULT(result);
+}
+
+static int run_net_set_network_mode(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelNetworkMode mode;
+       TelReturn rt = 0;
+
+       msg("call tapi_network_set_mode()");
+
+       mode = atoi(data_network_mode);
+       msg("requested mode[%d]", mode);
+
+       rt = tapi_network_set_mode(handle, mode, on_net_set_network_mode, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_get_network_mode(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkMode *mode = data;
+
+       msgb("tapi_network_get_mode() response received");
+       CHECK_NETWORK_RESULT(result);
+
+       if (!mode) {
+               msg("network mode data is null");
+               return;
+       }
+
+       msg("mode[%d]", *mode);
+}
+
+static int run_net_get_network_mode(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_get_mode()");
+
+       rt = tapi_network_get_mode(handle, on_net_get_network_mode, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_net_get_neighboring_cell_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkNeighbourCellInfo *cell_info = data;
+       unsigned int i = 0;
+
+       msgb("tapi_network_get_neighboring_cell_info() response received");
+       CHECK_NETWORK_RESULT(result);
+
+       if (!cell_info) {
+               msg("neighbouring cell info data is null");
+               return;
+       }
+
+       msg("gsm_list_count[%d]", cell_info->gsm_list_count);
+
+       for(i = 0; i < cell_info->gsm_list_count; i++) {
+               msg("[%d] cell_id[%d] lac[%d] bcch[%d] bsic[%d] rxlev[%d]",
+                       i+1, cell_info->gsm_list[i].cell_id, cell_info->gsm_list[i].lac,
+                       cell_info->gsm_list[i].bcch, cell_info->gsm_list[i].bsic,
+                       cell_info->gsm_list[i].rxlev);
+       }
+
+       msg("umts_list_count[%d]", cell_info->umts_list_count);
+
+       for(i = 0; i < cell_info->umts_list_count; i++) {
+               msg("[%d] cell_id[%d] lac[%d] arfcn[%d] psc[%d] rscp[%d]",
+                       i+1, cell_info->umts_list[i].cell_id, cell_info->umts_list[i].lac,
+                       cell_info->umts_list[i].arfcn, cell_info->umts_list[i].psc,
+                       cell_info->umts_list[i].rscp);
+       }
+}
+
+static int run_net_get_neighboring_cell_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_network_get_neighboring_cell_info()");
+
+       rt = tapi_network_get_neighboring_cell_info(handle, on_net_get_neighboring_cell_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static struct menu_data menu_net_get_registration_info[] = {
+       { "1", "run", NULL, run_net_get_registration_info, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_get_net_id_info[] = {
+       { "1", "run", NULL, run_net_get_net_id_info, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_search[] = {
+       { "1", "run", NULL, run_net_search, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_cancel_network_search[] = {
+       { "1", "run", NULL, run_net_cancel_network_search, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_select_network_automatic[] = {
+       { "1", "run", NULL, run_net_select_network_automatic, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_select_network_manual[] = {
+       { "1", "act (0=UNKNOWN 1=GSM 2=GPRS 3=EGPRS 4=UMTS 5=GSM/UMTS 6=HSDPA 7=HSUPA 8=HSPA 9=LTE)",
+                       NULL, NULL, data_network_act},
+       { "2", "plmn (45001)", NULL, NULL, data_network_plmn},
+       { "3", "run", NULL, run_net_select_network_manual, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_get_network_selection_mode[] = {
+       { "1", "run", NULL, run_net_get_network_selection_mode, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_set_preferred_plmn[] = {
+       { "1", "index (starts from 1)", NULL, NULL, data_network_plmn_index},
+       { "2", "plmn (45001)", NULL, NULL, data_network_plmn},
+       { "3", "act (0=UNKNOWN 1=GSM 2=GPRS 3=EGPRS 4=UMTS 5=GSM/UMTS 6=HSDPA 7=HSUPA 8=HSPA 9=LTE)",
+                       NULL, NULL, data_network_act},
+       { "4", "run", NULL, run_net_set_preferred_plmn, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_get_preferred_plmn[] = {
+       { "1", "run", NULL, run_net_get_preferred_plmn, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_set_network_mode[] = {
+       { "1", "network mode (0=AUTO 1=2G 2=3G 3=LTE)", NULL, NULL, data_network_mode},
+       { "2", "run", NULL, run_net_set_network_mode, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_get_network_mode[] = {
+       { "1", "run", NULL, run_net_get_network_mode, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_get_neighboring_cell_info[] = {
+       { "1", "run", NULL, run_net_get_neighboring_cell_info, NULL},
+       { NULL, NULL, },
+};
+
+struct menu_data menu_net[] = {
+       { "1g", "Get Network Registration Info", menu_net_get_registration_info, NULL, NULL},
+       { "2g", "Get Network Identity Info", menu_net_get_net_id_info, NULL, NULL},
+       { "3", "Network Search ", menu_net_search, NULL, NULL},
+       { "4", "Cancel Network Search", menu_net_cancel_network_search, NULL, NULL},
+       { "5", "Select Network Automatic", menu_net_select_network_automatic, NULL, NULL},
+       { "6", "Select Network Manual", menu_net_select_network_manual, NULL, NULL},
+       { "7g", "Get Network Selection mode", menu_net_get_network_selection_mode, NULL, NULL},
+       { "8s", "Set Preferred PLMN", menu_net_set_preferred_plmn, NULL, NULL},
+       { "8g", "Get Preferred PLMN", menu_net_get_preferred_plmn, NULL, NULL},
+       { "9s", "Set Network mode", menu_net_set_network_mode, NULL, NULL},
+       { "9g", "Get Network mode", menu_net_get_network_mode, NULL, NULL},
+       { "10g", "Get Neighboring Cell Info", menu_net_get_neighboring_cell_info, NULL, NULL},
+       { NULL, NULL, },
+};
+
+void register_network_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       /* Network */
+       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_REGISTRATION_STATUS, on_noti_registration_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_NETWORK_REGISTRATION_STATUS - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_CELL_INFO, on_noti_cell_info, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_NETWORK_CELL_INFO - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_IDENTITY, on_noti_identity, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_NETWORK_IDENTITY - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_RSSI, on_noti_rssi, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_NETWORK_SIGNAL_STRENGTH - register event failed: [%d]", ret);
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_TIME_INFO, on_noti_time_info, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_NETWORK_TIME_INFO - register event failed: [%d]", ret);
+}
diff --git a/test_src/network.h b/test_src/network.h
new file mode 100644 (file)
index 0000000..5b15b27
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __NETWORK_H__
+#define __NETWORK_H__
+
+
+void register_network_event(TelHandle *handle);
+
+#endif
diff --git a/test_src/phonebook.c b/test_src/phonebook.c
new file mode 100644 (file)
index 0000000..479c2b3
--- /dev/null
@@ -0,0 +1,418 @@
+/*
+ * libtapi
+ * Telephony test application
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_events.h>
+#include <tapi_phonebook.h>
+
+#include "menu.h"
+#include "sim.h"
+#include "phonebook.h"
+
+#define CHECK_PB_RESULT(x) \
+{ \
+       if (x >= TEL_PB_RESULT_SUCCESS && x <= TEL_PB_RESULT_ACCESS_RESTRICTED) { \
+               msg("result[%d][%s]", x, dbg_pb_result[x]); \
+       } else { \
+               msg("Api failed with result: [%d]", x); \
+       } \
+       if (x != TEL_PB_RESULT_SUCCESS) \
+               return; \
+}
+
+#define MSG_PB_TYPE(x) \
+{ \
+       if (x <= TEL_PB_USIM) { \
+               msg("pb_type[%d][%s]", x, dbg_pb_type_name[x]); \
+       } else { \
+               msg("pb_type[%d]", x); \
+       } \
+}
+
+static char *dbg_pb_type_name[] = { "TEL_PB_FDN", "TEL_PB_ADN", "TEL_PB_SDN",
+               "TEL_PB_USIM", };
+
+static char *dbg_pb_result[] = {"TEL_PB_RESULT_SUCCESS", "TEL_PB_RESULT_FAILURE",
+       "TEL_PB_RESULT_INVALID_PARAMETER", "TEL_PB_RESULT_MEMORY_FAILURE",
+       "TEL_PB_RESULT_OPERATION_NOT_SUPPORTED", "TEL_PB_RESULT_UNKNOWN_FAILURE",
+       "TEL_PB_RESULT_INVALID_INDEX", "TEL_PB_RESULT_NOT_INITIALIZED",
+       "TEL_PB_RESULT_PIN2_REQUIRED", "TEL_PB_RESULT_PUK2_REQUIRED",
+       "TEL_PB_RESULT_ACCESS_RESTRICTED", };
+
+static char data_pb_type[MENU_DATA_SIZE + 1] = {};
+static char data_pb_index[MENU_DATA_SIZE + 1] = {};
+static char data_pb_name[MENU_DATA_SIZE + 1] = {};
+static char data_pb_number[MENU_DATA_SIZE + 1] = {};
+static char data_pb_sne[MENU_DATA_SIZE + 1] = {};
+static char data_pb_group_name[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr_count[MENU_DATA_SIZE + 1] = "0";
+static char data_pb_anr1_num[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr1_desc[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr1_aas[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr2_num[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr2_desc[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr2_aas[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr3_num[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr3_desc[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr3_aas[MENU_DATA_SIZE + 1] = {};
+static char data_pb_email_count[MENU_DATA_SIZE + 1] = "0";
+static char data_pb_email1[MENU_DATA_SIZE + 1] = {};
+static char data_pb_email2[MENU_DATA_SIZE + 1] = {};
+static char data_pb_email3[MENU_DATA_SIZE + 1] = {};
+static char data_pb_email4[MENU_DATA_SIZE + 1] = {};
+static char data_pb_hidden[MENU_DATA_SIZE + 1] = "0";
+
+static void on_noti_pb_status(TelHandle *handle, const char *event_id, void *data, void *user_data)
+{
+       gboolean *status = data;
+       msgb("event(%s) received !!", TEL_NOTI_PB_STATUS);
+       if (!status) {
+               msg("Phonebook status notification data is null");
+               return;
+       }
+       msg("pb_status[%s]", (*status == TRUE) ? "PB INIT DONE" : "PB INIT NOT DONE");
+}
+
+static int run_pb_get_sim_pb_init_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       gboolean init_completed = 0;
+       TelPbList list;
+
+       msg("call tapi_pb_get_sim_pb_init_info()");
+
+       memset(&list, 0, sizeof(TelPbList));
+
+       rt = tapi_pb_get_sim_pb_init_info(handle, &init_completed, &list);
+       CHECK_RT(rt);
+
+       msg("status[%d]", init_completed);
+       msg("fdn[%d]", list.fdn);
+       msg("adn[%d]", list.adn);
+       msg("sdn[%d]", list.sdn);
+       msg("3g usim[%d]", list.usim);
+
+       return 0;
+}
+
+static void on_pb_get_sim_pb_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelPbInfo *pb_info = data;
+
+       msg("tapi_pb_get_sim_pb_info() response received");
+       CHECK_PB_RESULT(result);
+
+       if (!pb_info) {
+               msg("sim pb info response data is null");
+               return;
+       }
+
+       MSG_PB_TYPE(pb_info->pb_type);
+       if (pb_info->pb_type > TEL_PB_USIM) {
+               msg("Invalid pb type [%d]", pb_info->pb_type);
+               return;
+       }
+
+       if (pb_info->pb_type == TEL_PB_USIM) {
+               msg("max_count[%d]", pb_info->info_u.usim.max_count);
+               msg("used_count[%d]", pb_info->info_u.usim.used_count);
+               msg("max_text_len[%d]", pb_info->info_u.usim.max_text_len);
+               msg("max_anr_count[%d]", pb_info->info_u.usim.max_anr_count);
+               msg("max_anr_len[%d]", pb_info->info_u.usim.max_anr_len);
+               msg("max_email_count[%d]", pb_info->info_u.usim.max_email_count);
+               msg("max_email_len[%d]", pb_info->info_u.usim.max_email_len);
+               msg("max_sne_len[%d]", pb_info->info_u.usim.max_sne_len);
+               msg("max_gas_len[%d]", pb_info->info_u.usim.max_gas_len);
+               msg("max_aas_len[%d]", pb_info->info_u.usim.max_aas_len);
+       } else {
+               msg("max_count[%d]", pb_info->info_u.sim.max_count);
+               msg("used_count[%d]", pb_info->info_u.sim.used_count);
+               msg("max_num_len[%d]", pb_info->info_u.sim.max_num_len);
+               msg("max_text_len[%d]", pb_info->info_u.sim.max_text_len);
+       }
+}
+
+static int run_pb_get_sim_pb_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelPbType pb_type = atoi(data_pb_type);
+       TelReturn rt = 0;
+
+       msg("call tapi_pb_get_sim_pb_info()");
+
+       MSG_PB_TYPE(pb_type);
+
+       rt = tapi_pb_get_sim_pb_info(handle, pb_type, on_pb_get_sim_pb_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_pb_read_sim_pb_record(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelPbReadRecord *pb_rec = data;
+       unsigned char i;
+
+       msg("tapi_pb_read_sim_pb_record() response received");
+       CHECK_PB_RESULT(result);
+
+       if (!pb_rec) {
+               msg("pb read record response data is null");
+               return;
+       }
+
+       MSG_PB_TYPE(pb_rec->pb_type);
+       if (pb_rec->pb_type > TEL_PB_USIM) {
+               msg("Invalid pb type [%d]", pb_rec->pb_type);
+               return;
+       }
+
+       msg("index[%d]", pb_rec->index);
+       msg("next_index[%d]", pb_rec->next_index);
+
+       if (pb_rec->pb_type != TEL_PB_USIM) {
+               msg("name[%s]", pb_rec->rec_u.sim.name);
+               msg("number[%s]", pb_rec->rec_u.sim.number);
+               return;
+       }
+
+       msg("name[%s]", pb_rec->rec_u.usim.name);
+       msg("number[%s]", pb_rec->rec_u.usim.number);
+       msg("sne[%s]", pb_rec->rec_u.usim.sne);
+       msg("grp_name[%s]", pb_rec->rec_u.usim.grp_name);
+
+       msg("anr_count[%d]", pb_rec->rec_u.usim.anr_count);
+       for(i = 0; i < pb_rec->rec_u.usim.anr_count; i++)
+               msg("[%d]anr_num[%s] anr_desc[%d] anr_aas[%s]", i, pb_rec->rec_u.usim.anr[i].number,
+                       pb_rec->rec_u.usim.anr[i].description, pb_rec->rec_u.usim.anr[i].aas);
+
+       msg("email_count[%d]", pb_rec->rec_u.usim.email_count);
+       for(i = 0; i < pb_rec->rec_u.usim.email_count; i++)
+               msg("email[%d][%s]", i, pb_rec->rec_u.usim.email[i]);
+       msg("hidden[%d]", pb_rec->rec_u.usim.hidden);
+}
+
+static int run_pb_read_sim_pb_record(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelPbRecordInfo record;
+       TelReturn rt = 0;
+
+       msg("call tapi_pb_read_sim_pb_record()");
+
+       memset(&record, 0, sizeof(TelPbRecordInfo));
+
+       record.pb_type = atoi(data_pb_type);
+       record.index = atoi(data_pb_index);
+
+       MSG_PB_TYPE(record.pb_type);
+       msg("pb_index[%d]", record.index);
+
+       rt = tapi_pb_read_sim_pb_record(handle, &record, on_pb_read_sim_pb_record, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_pb_update_sim_pb_record(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_pb_update_sim_pb_record() response received");
+       CHECK_PB_RESULT(result);
+}
+
+static int run_pb_update_sim_pb_record(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelPbUpdateRecord record;
+       TelReturn rt = 0;
+
+       msg("call tapi_pb_update_sim_pb_record()");
+
+       memset(&record, 0, sizeof(TelPbUpdateRecord));
+
+       record.pb_type = atoi(data_pb_type);
+       record.index = atoi(data_pb_index);
+
+       MSG_PB_TYPE(record.pb_type);
+       if (record.pb_type > TEL_PB_USIM) {
+               msg("Invalid pb type [%d]", record.pb_type);
+               return 0;
+       }
+
+       msg("pb_index[%d]", record.index);
+
+       if (record.pb_type == TEL_PB_USIM) {
+               g_strlcpy(record.rec_u.usim.name, data_pb_name, TEL_PB_TEXT_MAX_LEN+1);
+               g_strlcpy(record.rec_u.usim.number, data_pb_number, TEL_PB_NUMBER_MAX_LEN+1);
+               g_strlcpy(record.rec_u.usim.sne, data_pb_sne, TEL_PB_TEXT_MAX_LEN+1);
+               g_strlcpy(record.rec_u.usim.grp_name, data_pb_group_name, TEL_PB_TEXT_MAX_LEN+1);
+
+               record.rec_u.usim.anr_count = data_pb_anr_count[0] - '0';
+               switch (record.rec_u.usim.anr_count) {
+               case 3:
+                       g_strlcpy(record.rec_u.usim.anr[2].number, data_pb_anr3_num, TEL_PB_NUMBER_MAX_LEN+1);
+                       record.rec_u.usim.anr[2].description = data_pb_anr3_desc[0] - '0';
+                       g_strlcpy(record.rec_u.usim.anr[2].aas, data_pb_anr3_aas, TEL_PB_TEXT_MAX_LEN+1);
+               case 2: /* FALL THROUGH */
+                       g_strlcpy(record.rec_u.usim.anr[1].number, data_pb_anr2_num, TEL_PB_NUMBER_MAX_LEN+1);
+                       record.rec_u.usim.anr[1].description = data_pb_anr1_desc[0] - '0';
+                       g_strlcpy(record.rec_u.usim.anr[1].aas, data_pb_anr2_aas, TEL_PB_TEXT_MAX_LEN+1);
+               case 1: /* FALL THROUGH */
+                       g_strlcpy(record.rec_u.usim.anr[0].number, data_pb_anr1_num, TEL_PB_NUMBER_MAX_LEN+1);
+                       record.rec_u.usim.anr[0].description= data_pb_anr1_desc[0] - '0';
+                       g_strlcpy(record.rec_u.usim.anr[0].aas, data_pb_anr1_aas, TEL_PB_TEXT_MAX_LEN+1);
+               default:
+               break;
+               }
+
+               record.rec_u.usim.email_count = data_pb_email_count[0] - '0';
+               switch (record.rec_u.usim.email_count) {
+               case 4:
+                       g_strlcpy((char*)&record.rec_u.usim.email[3], data_pb_email4, TEL_PB_TEXT_MAX_LEN+1);
+               case 3:
+                       g_strlcpy((char*)&record.rec_u.usim.email[2], data_pb_email3, TEL_PB_TEXT_MAX_LEN+1);
+               case 2:
+                       g_strlcpy((char*)&record.rec_u.usim.email[1], data_pb_email2, TEL_PB_TEXT_MAX_LEN+1);
+               case 1:
+                       g_strlcpy((char*)&record.rec_u.usim.email[0], data_pb_email1, TEL_PB_TEXT_MAX_LEN+1);
+               default:
+               break;
+               }
+
+               record.rec_u.usim.hidden = data_pb_hidden[0] - '0';
+       }
+       else {
+               g_strlcpy(record.rec_u.sim.name, data_pb_name, TEL_PB_TEXT_MAX_LEN+1);
+               g_strlcpy(record.rec_u.sim.number, data_pb_number, TEL_PB_NUMBER_MAX_LEN+1);
+       }
+
+       rt = tapi_pb_update_sim_pb_record(handle, &record, on_pb_update_sim_pb_record, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_pb_delete_sim_pb_record(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_pb_delete_sim_pb_record() response received");
+       CHECK_PB_RESULT(result);
+}
+
+static int run_pb_delete_sim_pb_record(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelPbRecordInfo record;
+       TelReturn rt = 0;
+
+       msg("call tapi_pb_delete_sim_pb_record()");
+
+       memset(&record, 0, sizeof(TelPbRecordInfo));
+
+       record.pb_type = atoi(data_pb_type);
+       record.index = atoi(data_pb_index);
+
+       MSG_PB_TYPE(record.pb_type);
+       msg("pb_index[%d]", record.index);
+
+       rt = tapi_pb_delete_sim_pb_record(handle, &record, on_pb_delete_sim_pb_record, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static struct menu_data menu_pb_get_sim_pb_init_info[] = {
+       { "1", "run", NULL, run_pb_get_sim_pb_init_info, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_pb_get_sim_pb_info[] = {
+       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
+       { "2", "run", NULL, run_pb_get_sim_pb_info,     NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_pb_read_sim_pb_record[] = {
+       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
+       { "2", "index", NULL, NULL, data_pb_index },
+       { "3", "run", NULL, run_pb_read_sim_pb_record,  NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_pb_update_sim_pb_record[] = {
+       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
+       { "2", "index", NULL, NULL, data_pb_index },
+       { "3", "name", NULL, NULL, data_pb_name },
+       { "4", "number", NULL, NULL, data_pb_number },
+       { "5", "sne", NULL, NULL, data_pb_sne },
+       { "6", "group_name", NULL, NULL, data_pb_group_name },
+       { "7", "anr_count", NULL, NULL, data_pb_anr_count },
+       { "8", "anr1_num", NULL, NULL, data_pb_anr1_num },
+       { "9", "anr1_desc", NULL, NULL, data_pb_anr1_desc },
+       { "10", "anr1_aas", NULL, NULL, data_pb_anr1_aas },
+       { "11", "anr2_num", NULL, NULL, data_pb_anr2_num },
+       { "12", "anr2_desc", NULL, NULL, data_pb_anr2_desc },
+       { "13", "anr2_aas", NULL, NULL, data_pb_anr2_aas },
+       { "14", "anr3_num", NULL, NULL, data_pb_anr3_num },
+       { "15", "anr3_desc", NULL, NULL, data_pb_anr3_desc },
+       { "16", "anr3_aas", NULL, NULL, data_pb_anr3_aas },
+       { "17", "email_count", NULL, NULL, data_pb_email_count },
+       { "18", "email1", NULL, NULL, data_pb_email1 },
+       { "19", "email2", NULL, NULL, data_pb_email2 },
+       { "20", "email3", NULL, NULL, data_pb_email3 },
+       { "21", "email4", NULL, NULL, data_pb_email4 },
+       { "22", "hidden", NULL, NULL, data_pb_hidden },
+       { "23", "run", NULL, run_pb_update_sim_pb_record, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_pb_delete_sim_pb_record[] = {
+       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
+       { "2", "index", NULL, NULL, data_pb_index },
+       { "3", "run", NULL, run_pb_delete_sim_pb_record, NULL },
+       { NULL, NULL, },
+};
+
+struct menu_data menu_phonebook[] = {
+       { "1", "phonebook init info", menu_pb_get_sim_pb_init_info, NULL, NULL },
+       { "2", "get pb info", menu_pb_get_sim_pb_info, NULL, NULL },
+       { "3", "read record", menu_pb_read_sim_pb_record, NULL, NULL },
+       { "4", "add/update record", menu_pb_update_sim_pb_record, NULL, NULL },
+       { "5", "delete record", menu_pb_delete_sim_pb_record, NULL, NULL },
+       { NULL, NULL, },
+};
+
+void register_phonebook_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_PB_STATUS, on_noti_pb_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS) {
+               msg("TEL_NOTI_PB_STATUS - event register failed(%d)", ret);
+       }
+}
diff --git a/test_src/phonebook.h b/test_src/phonebook.h
new file mode 100644 (file)
index 0000000..60d007a
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _PHONEBOOK_H_
+#define _PHONEBOOK_H_
+
+void register_phonebook_event(TelHandle *handle);
+
+#endif /* _PHONEBOOK_H_ */
diff --git a/test_src/sat.c b/test_src/sat.c
new file mode 100644 (file)
index 0000000..91c67e9
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_sat.h>
+#include <tapi_events.h>
+
+#include "menu.h"
+#include "sat.h"
+
+TelSatSetupMenuInfo main_menu;
+
+/* Event Callback */
+static void on_noti_sat_setup_menu(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int index;
+       TelSatSetupMenuInfo *setup_menu = NULL;
+
+       msg("noti id (%s)", noti_id);
+
+       if(!data){
+               msg("noti data is null");
+               return;
+       }
+
+       setup_menu = (TelSatSetupMenuInfo *)data;
+       msg("command id (%d)", setup_menu->command_id);
+       msg("menu present (%d)", setup_menu->is_main_menu_present);
+       msg("menu title (%s)", setup_menu->sat_main_title);
+       msg("item cnt (%d)", setup_menu->sat_main_menu_item_count);
+       for(index=0;index < setup_menu->sat_main_menu_item_count; index++){
+               msg("item id(%d) (%s)", setup_menu->sat_main_menu_item[index].item_id, setup_menu->sat_main_menu_item[index].item_string);
+       }
+       msg("menu help info (%d)", setup_menu->is_sat_main_menu_help_info);
+       msg("menu updated (%d)", setup_menu->is_updated_sat_main_menu);
+}
+
+static void on_noti_sat_display_text(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelSatDisplayTextInd *display_text = NULL;
+
+       msg("noti id (%s)", noti_id);
+
+       if(!data){
+               msg("noti data is null");
+               return;
+       }
+
+       display_text = (TelSatDisplayTextInd *)data;
+
+       msg("command id (%d)", display_text->command_id);
+       msg("display text (%s)", display_text->text.string);
+       msg("string len(%d)", display_text->text.string_len);
+       msg("duration (%d)", display_text->duration);
+       msg("high priority (%d)", display_text->is_priority_high);
+       msg("user response required(%d)", display_text->is_user_resp_required);
+}
+
+static void on_noti_sat_select_item(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int index;
+       TelSatSelectItemInd *select_item = NULL;
+
+       msg("noti id (%s)", noti_id);
+
+       if(!data){
+               msg("noti data is null");
+               return;
+       }
+
+       select_item = (TelSatSelectItemInd *)data;
+
+       msg("command id (%d)", select_item->command_id);
+       msg("help info(%d)", select_item->is_help_info_available);
+       msg("selected item string(%s)", select_item->text.string);
+       msg("string len(%d)", select_item->text.string_len);
+       msg("default item index(%d)", select_item->default_item_index);
+       msg("item count(%d)", select_item->menu_item_count);
+       for(index=0;index < select_item->menu_item_count; index++){
+               msg("item index(%d) id(%d) len(%d) str(%s)", index,
+                       select_item->menu_item[index].item_id, select_item->menu_item[index].text_len, select_item->menu_item[index].text);
+       }
+}
+
+/* Requests and Responses */
+static void on_sat_select_menu(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("");
+       msg("select menu item result(%d)", result);
+}
+
+static int run_sat_get_main_menu_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+
+       msg("call tapi_sat_get_main_menu_info()");
+
+       result = tapi_sat_get_main_menu_info(handle, &main_menu);
+       CHECK_RT(result);
+
+       msg("success to get main menu");
+       return 0;
+}
+
+static int run_sat_select_menu(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelSatMenuSelectionReqInfo selected_menu;
+       int index=0, item_id;
+       TelReturn result;
+
+       msg("call tapi_sat_select_menu()");
+
+       for(index=0;index < main_menu.sat_main_menu_item_count; index++){
+               msg("item id(%d) (%s)", main_menu.sat_main_menu_item[index].item_id, main_menu.sat_main_menu_item[index].item_string);
+       }
+       msg("select item >>> ");
+       if (scanf("%d", &item_id) < 0) {
+               msg("scanf() failed.");
+               return 0;
+       }
+
+       selected_menu.is_help_requested = 0;
+       selected_menu.item_identifier = item_id;
+
+       msg("selected item id (%d)", selected_menu.item_identifier);
+       result = tapi_sat_select_menu(handle, &selected_menu, on_sat_select_menu, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+/* SAT Menu */
+struct menu_data menu_sat[] = {
+       { "1", "GET Main Menu Info", NULL, run_sat_get_main_menu_info, NULL},
+       { "2", "SELECT Main Menu", NULL, run_sat_select_menu, NULL},
+       { NULL, NULL, },
+};
+
+/* Register Events */
+void register_sat_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_SAT_SETUP_MENU, on_noti_sat_setup_menu, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TAPI_NOTI_SAT_SETUP_MENU - event register failed [%d]", ret);
+       ret = tapi_register_event_id(handle, TEL_NOTI_SAT_DISPLAY_TEXT, on_noti_sat_display_text, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TAPI_NOTI_SAT_DISPLAY_TEXT - event register failed [%d]", ret);
+       ret = tapi_register_event_id(handle, TEL_NOTI_SAT_SELECT_ITEM, on_noti_sat_select_item, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TAPI_NOTI_SAT_SELECT_ITEM - event register failed [%d]", ret);
+}
diff --git a/test_src/sat.h b/test_src/sat.h
new file mode 100644 (file)
index 0000000..762906d
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SAT_H__
+#define __SAT_H__
+
+
+void register_sat_event(TelHandle *handle);
+
+#endif
diff --git a/test_src/sim.c b/test_src/sim.c
new file mode 100644 (file)
index 0000000..178f597
--- /dev/null
@@ -0,0 +1,1244 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_sim.h>
+#include <tapi_events.h>
+
+#include "menu.h"
+#include "sim.h"
+
+#define CHECK_SIM_RESULT(x) \
+{ \
+       if (x >= TEL_SIM_RESULT_SUCCESS && x <= TEL_SIM_RESULT_OPERATION_NOT_PERMITTED) { \
+               msg("result[%d][%s]", x, dbg_sim_result[x]); \
+       } else { \
+               msg("API failed with result[%d]", x); \
+       } \
+       if (x != TEL_SIM_RESULT_SUCCESS) \
+               return; \
+} \
+
+static char *dbg_sim_result[] = {
+       "TEL_SIM_RESULT_SUCCESS",
+       "TEL_SIM_RESULT_FAILURE",
+       "TEL_SIM_RESULT_INVALID_PARAMETER",
+       "TEL_SIM_RESULT_MEMORY_FAILURE",
+       "TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED",
+       "TEL_SIM_RESULT_CARD_ERROR",
+       "TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED",
+       "TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION",
+       "TEL_SIM_RESULT_INCORRECT_PASSWORD",
+       "TEL_SIM_RESULT_PIN_REQUIRED",
+       "TEL_SIM_RESULT_PUK_REQUIRED",
+       "TEL_SIM_RESULT_PERM_BLOCKED",
+       "TEL_SIM_RESULT_SQN_FAILURE",
+       "TEL_SIM_RESULT_OPERATION_NOT_PERMITTED",
+};
+
+static char data_sim_set_language[MENU_DATA_SIZE + 1] = { 0x01,}; //0x01 = English
+
+static char data_sim_set_mw_profile_id[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mw_indicator_status[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mw_voice_cnt[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mw_fax_cnt[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mw_email_cnt[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mw_other_cnt[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mw_video_cnt[MENU_DATA_SIZE + 1] = {};
+
+static char data_sim_set_mb_profile_id[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mb_type[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mb_alpha_id[MENU_DATA_SIZE + 1] = {};
+static char data_sim_set_mb_number[MENU_DATA_SIZE + 1] = {};
+
+static char data_sim_req_authentication_type[MENU_DATA_SIZE + 1] = { 0x01,}; //SIM_AUTH_TYPE_GSM
+static char data_sim_req_authentication_autn_data[MENU_DATA_SIZE + 1] = { 200, 200, 200,
+       200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, };
+static char data_sim_req_authentication_rand_data[MENU_DATA_SIZE + 1] = { 200, 200, 200,
+       200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, };
+
+static char data_sim_verify_pins_type[MENU_DATA_SIZE + 1] = {};
+static char data_sim_verify_pins_pw[MENU_DATA_SIZE + 1] = {};
+
+static char data_sim_verify_puks_type[MENU_DATA_SIZE + 1] = {};
+static char data_sim_verify_puks_puk_pw[MENU_DATA_SIZE + 1] = {};
+static char data_sim_verify_puks_pin[MENU_DATA_SIZE + 1] = {};
+
+static char data_sim_change_pins_type[MENU_DATA_SIZE + 1] = {};
+static char data_sim_change_pins_old_pw[MENU_DATA_SIZE + 1] = {};
+static char data_sim_change_pins_new_pw[MENU_DATA_SIZE + 1] = {};
+
+static char data_sim_facility_type[MENU_DATA_SIZE + 1] = {};
+static char data_sim_facility_pw[MENU_DATA_SIZE + 1] = {};
+static char data_sim_apdu[MENU_DATA_SIZE + 1] = {};
+
+static int _sim_str_to_hex(char a)
+{
+       int ret;
+
+       if (a >= '0' && a <= '9')
+               ret = a - '0';
+       else if (a >= 'a' && a <= 'f')
+               ret = a - 'a' + 10;
+       else if (a >= 'A' && a <= 'F')
+               ret = a - 'A' + 10;
+       return ret;
+}
+
+/* Event Callback */
+static void on_noti_sim_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelSimCardStatusInfo *status = data;
+
+       msgb("event(%s) received !!", TEL_NOTI_SIM_STATUS);
+
+       if (!status) {
+               msg("sim card status notification data is null");
+               return;
+       }
+       msg("status[%d]", status->status);
+       msg("change_status[%d]", status->change_status);
+}
+
+/* Requests and Responses */
+static int run_sim_get_init_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimCardStatusInfo sim_status_info;
+
+       msg("call tapi_sim_get_init_info()");
+
+       memset(&sim_status_info, 0, sizeof(TelSimCardStatusInfo));
+
+       rt = tapi_sim_get_init_info(handle, &sim_status_info);
+       CHECK_RT(rt);
+
+       msg("status[%d]", sim_status_info.status);
+       msg("change_status[%d]", sim_status_info.change_status);
+
+       return 0;
+}
+
+static int run_sim_get_card_type(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimCardType sim_type = 0;
+
+       msg("call tapi_sim_get_type()");
+
+       rt = tapi_sim_get_type(handle, &sim_type);
+       CHECK_RT(rt);
+
+       msg("sim card type[%d]", sim_type);
+
+       return 0;
+}
+
+static int run_sim_get_imsi(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimImsiInfo imsi;
+
+       msg("call tapi_sim_get_imsi()");
+
+       memset(&imsi, 0, sizeof(TelSimImsiInfo));
+
+       rt = tapi_sim_get_imsi(handle, &imsi);
+       CHECK_RT(rt);
+
+       msg("mcc[%s]", imsi.mcc);
+       msg("mnc[%s]", imsi.mnc);
+       msg("msin[%s]", imsi.msin);
+
+       return 0;
+}
+
+static int run_sim_get_ecc(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimEccList ecc_list;
+       unsigned int i =0;
+
+       msg("call tapi_sim_get_ecc()");
+
+       memset(&ecc_list, 0, sizeof(TelSimEccList));
+
+       rt = tapi_sim_get_ecc(handle, &ecc_list);
+       CHECK_RT(rt);
+
+       msg("ecc_count[%d]",ecc_list.count);
+
+       for(i = 0; i < ecc_list.count; i++) {
+               msg("[%d].name[%s] number[%s] category[%d]", i+1, ecc_list.list[i].name,
+                       ecc_list.list[i].number, ecc_list.list[i].category);
+       }
+
+       return 0;
+}
+
+static void on_sim_get_iccid(TelHandle *handle, int result, void *data, void *user_data)
+{
+       gchar *iccid = data;
+
+       msg("tapi_sim_get_iccid() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!iccid) {
+               msg("get sim iccid response data is null");
+               return;
+       }
+
+       msg("iccid[%s]", iccid);
+}
+
+static int run_sim_get_iccid(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_iccid()");
+
+       rt = tapi_sim_get_iccid(handle, on_sim_get_iccid, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_language(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimLanguagePreferenceCode *language = data;
+
+       msg("tapi_sim_get_language() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!language) {
+               msg("get sim language response data is null");
+               return;
+       }
+
+       msg("language[%d]", *language);
+}
+
+static int run_sim_get_language(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_language()");
+
+       rt = tapi_sim_get_language(handle, on_sim_get_language, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_set_language(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sim_set_language() response received");
+       CHECK_SIM_RESULT(result);
+}
+
+static int run_sim_set_language(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelSimLanguagePreferenceCode language;
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_set_language()");
+
+       language = atoi(data_sim_set_language);
+       msg("Language selected: [%d]", language);
+
+       rt = tapi_sim_set_language(handle, language, on_sim_set_language, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_cf_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimCfisList *cf_info = data;
+       unsigned int i = 0;
+
+       msg("tapi_sim_get_callforwarding_info() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!cf_info) {
+               msg("get cf info response data is null");
+               return;
+       }
+
+       msg("cf_info.profile_count[%d]", cf_info->profile_count);
+
+       for(i = 0; i < cf_info->profile_count; i++) {
+               msg("[%d].profile_id[%d] ", i+1, cf_info->cf[i].profile_id);
+               if(cf_info->cf[i].indication[0])
+                       msg(" Voice type ");
+               if(cf_info->cf[i].indication[1])
+                       msg(" Fax type ");
+               if(cf_info->cf[i].indication[2])
+                       msg(" Email type ");
+               if(cf_info->cf[i].indication[3])
+                       msg(" Other type ");
+               if(cf_info->cf[i].indication[4])
+                       msg(" Video type ");
+       }
+}
+
+static int run_sim_get_cf_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_callforwarding_info()");
+
+       rt = tapi_sim_get_callforwarding_info(handle, on_sim_get_cf_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_set_mw_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sim_set_messagewaiting_info() response received");
+       CHECK_SIM_RESULT(result);
+}
+
+static int run_sim_set_mw_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimMwis mw_info;
+       unsigned char indicator_status = 0;
+       unsigned char voice_count, fax_count, email_count, other_count, video_count;
+       unsigned char mask = 0x01;
+       int i = 0;
+
+       msg("call tapi_sim_set_messagewaiting_info()");
+
+       memset(&mw_info, 0, sizeof(TelSimMwis));
+
+       mw_info.profile_id = atoi(data_sim_set_mw_profile_id);
+       indicator_status = atoi(data_sim_set_mw_indicator_status);
+       voice_count = atoi(data_sim_set_mw_voice_cnt);
+       fax_count = atoi(data_sim_set_mw_fax_cnt);
+       email_count = atoi(data_sim_set_mw_email_cnt);
+       other_count = atoi(data_sim_set_mw_other_cnt);
+       video_count = atoi(data_sim_set_mw_video_cnt);
+
+       msg("profile id[%d]", mw_info.profile_id);
+       msg("indicator status[%d]", indicator_status);
+       msg("voice count[%d]", voice_count);
+       msg("fax count[%d]", fax_count);
+       msg("email count[%d]", email_count);
+       msg("other count[%d]", other_count);
+       msg("video count[%d]", video_count);
+
+       mw_info.count_valid = TRUE;
+
+       if (indicator_status) {
+               for (i = 0; i < 5; i++) {
+                       switch (indicator_status & mask) {
+                       case TEL_SIM_MWIS_VOICE:
+                               mw_info.msg_waiting[0].indication = TRUE;
+                               mw_info.msg_waiting[0].count = voice_count;
+                       break;
+                       case TEL_SIM_MWIS_FAX:
+                               mw_info.msg_waiting[1].indication = TRUE;
+                               mw_info.msg_waiting[1].count = fax_count;
+                       break;
+                       case TEL_SIM_MWIS_EMAIL:
+                               mw_info.msg_waiting[2].indication = TRUE;
+                               mw_info.msg_waiting[2].count = email_count;
+                       break;
+                       case TEL_SIM_MWIS_OTHER:
+                               mw_info.msg_waiting[3].indication = TRUE;
+                               mw_info.msg_waiting[3].count = other_count;
+                       break;
+                       case TEL_SIM_MWIS_VIDEO:
+                               mw_info.msg_waiting[4].indication = TRUE;
+                               mw_info.msg_waiting[4].count = video_count;
+                       break;
+                       default:
+                               msg("MWIS is NONE");
+                       }
+                       mask = mask << 1;
+               }
+       }
+
+       rt = tapi_sim_set_messagewaiting_info(handle, &mw_info, on_sim_set_mw_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_mw_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimMwisList *mw_info = data;
+       unsigned int i = 0;
+
+       msg("tapi_sim_get_messagewaiting_info() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!mw_info) {
+               msg("get msg waiting info response data is null");
+               return;
+       }
+
+       msg("mw_info.profile_count: [%d]", mw_info->profile_count);
+
+       for(i = 0; i < mw_info->profile_count; i++) {
+               msg("[%d].profile_id[%d] count_valid[%d] ", i+1, mw_info->mw[i].profile_id, mw_info->mw[i].count_valid);
+               if(mw_info->mw[i].msg_waiting[0].indication)
+                       msg(" Voice type and count:[%d]", mw_info->mw[i].msg_waiting[0].count);
+               if(mw_info->mw[i].msg_waiting[1].indication)
+                       msg(" Fax type and count:[%d]", mw_info->mw[i].msg_waiting[1].count);
+               if(mw_info->mw[i].msg_waiting[2].indication)
+                       msg(" Email type and count:[%d]", mw_info->mw[i].msg_waiting[2].count);
+               if(mw_info->mw[i].msg_waiting[3].indication)
+                       msg(" Other type and count:[%d]", mw_info->mw[i].msg_waiting[3].count);
+               if(mw_info->mw[i].msg_waiting[4].indication)
+                       msg(" Video type and count:[%d]", mw_info->mw[i].msg_waiting[4].count);
+       }
+}
+
+static int run_sim_get_mw_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_messagewaiting_info()");
+
+       rt = tapi_sim_get_messagewaiting_info(handle, on_sim_get_mw_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_set_mb_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sim_set_mailbox_info() response received");
+       CHECK_SIM_RESULT(result);
+}
+
+static int run_sim_set_mb_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimMailBoxNumber mb_info;
+
+       msg("call tapi_sim_set_mailbox_info()");
+
+       memset(&mb_info, 0, sizeof(TelSimMailBoxNumber));
+
+       mb_info.profile_id = atoi(data_sim_set_mb_profile_id);
+       mb_info.mb_type = atoi(data_sim_set_mb_type);
+       mb_info.alpha_id_len = strlen(data_sim_set_mb_alpha_id);
+       if (mb_info.alpha_id_len > TEL_SIM_ALPHA_ID_LEN_MAX) {
+               msg("Alpha id input too long");
+               return 0;
+       }
+       memcpy(mb_info.alpha_id, data_sim_set_mb_alpha_id, mb_info.alpha_id_len);
+
+       if (strlen(data_sim_set_mb_number) > TEL_SIM_MBDN_NUM_LEN_MAX) {
+               msg("Mail box number input too long");
+               return 0;
+       }
+       memcpy(mb_info.number, data_sim_set_mb_number, strlen(data_sim_set_mb_number));
+
+       msg("profile id[%d]", mb_info.profile_id);
+       msg("mb type[%d]", mb_info.mb_type);
+       msg("alpha id[%s]", mb_info.alpha_id);
+       msg("number[%s]", mb_info.number);
+
+       rt = tapi_sim_set_mailbox_info(handle, &mb_info, on_sim_set_mb_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_mb_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimMailboxList *mb_list = data;
+       unsigned int i = 0;
+
+       msg("tapi_sim_get_mailbox_info() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!mb_list) {
+               msg("get mailbox info response data is null");
+               return;
+       }
+
+       msg("alpha id max len: [%d]", mb_list->alpha_id_max_len);
+       msg("mb list count: [%d]", mb_list->count);
+
+       for (i = 0; i < mb_list->count; i++) {
+               msg("[%d].profile_id[%d] mb_type[%d] alpha_id length[%d] alpha_id[%s] number[%s]", i+1,
+                       mb_list->list[i].profile_id, mb_list->list[i].mb_type, mb_list->list[i].alpha_id_len,
+                       mb_list->list[i].alpha_id, mb_list->list[i].number);
+       }
+}
+
+static int run_sim_get_mb_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_mailbox_info()");
+
+       rt = tapi_sim_get_mailbox_info(handle, on_sim_get_mb_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_msisdn(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimMsisdnList *msisdn_list = data;
+       unsigned int i =0;
+
+       msg("tapi_sim_get_msisdn() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!msisdn_list) {
+               msg("get msisdn response data is null");
+               return;
+       }
+
+       msg("msisdn list count[%d]", msisdn_list->count);
+
+       for (i = 0; i < msisdn_list->count; i++)
+               msg("[%d].alpha_id[%s] number[%s]", i+1, msisdn_list->list[i].alpha_id, msisdn_list->list[i].num);
+}
+
+static int run_sim_get_msisdn(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_msisdn()");
+
+       rt = tapi_sim_get_msisdn(handle, on_sim_get_msisdn, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_spn(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimSpn *spn_info = data;
+
+       msg("tapi_sim_get_spn() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!spn_info) {
+               msg("get spn response data is null");
+               return;
+       }
+
+       msg("spn display condition[%d]", spn_info->display_condition);
+       msg("spn[%s]", spn_info->spn);
+}
+
+static int run_sim_get_spn(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_spn()");
+
+       rt = tapi_sim_get_spn(handle, on_sim_get_spn, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_cphs_netname(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimCphsNetName *cphs_net = data;
+
+       msg("tapi_sim_get_cphs_netname() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!cphs_net) {
+               msg("sim get cphs netname response data is null");
+               return;
+       }
+
+       msg("cphs full name[%s]", cphs_net->full_name);
+       msg("cphs short name[%s]", cphs_net->short_name);
+}
+
+static int run_sim_get_cphs_netname(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_cphs_netname()");
+
+       rt = tapi_sim_get_cphs_netname(handle, on_sim_get_cphs_netname, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_sp_display_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimSpPlmnList *sp_info = data;
+       unsigned int i = 0;
+
+       msg("tapi_sim_get_sp_display_info() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!sp_info) {
+               msg("sim get sp display info response data is null");
+               return;
+       }
+
+       msg("sp info count[%d]", sp_info->count);
+
+       for(i = 0; i < sp_info->count; i++)
+               msg("[%d].index[%d] plmn[%s]", i+1, sp_info->list[i].index, sp_info->list[i].plmn);
+}
+
+static int run_sim_get_sp_display_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_get_sp_display_info()");
+
+       rt = tapi_sim_get_sp_display_info(handle, on_sim_get_sp_display_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_req_authentication(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimAuthenticationResponse *auth_resp = data;
+       unsigned int i = 0;
+
+       msg("tapi_sim_req_authentication() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!auth_resp) {
+               msg("sim authentication response data is null");
+               return;
+       }
+
+       msg("auth_type[%d]", auth_resp->auth_type);
+       msg("auth_result[%d]", auth_resp->detailed_result);
+
+       msg("resp_length[%d]", auth_resp->resp_length);
+       for( i = 0; i < auth_resp->resp_length; i++)
+               msg("[%d].resp_data[0x%2x]", i+1, auth_resp->resp_data[i]);
+
+       msg("authentication_key_length[%d]", auth_resp->authentication_key_length);
+       for( i = 0; i < auth_resp->authentication_key_length; i++)
+               msg("[%d].authentication_key[0x%2x]", i+1, auth_resp->authentication_key[i]);
+
+       msg("cipher_length[%d]", auth_resp->cipher_length);
+       for( i = 0; i < auth_resp->cipher_length; i++)
+               msg("[%d].cipher_data[0x%2x]", i+1, auth_resp->cipher_data[i]);
+
+       msg("integrity_length[%d]", auth_resp->integrity_length);
+       for( i = 0; i < auth_resp->integrity_length; i++)
+               msg("[%d].integrity_data[0x%2x]", i+1, auth_resp->integrity_data[i]);
+}
+
+static int run_sim_req_authentication(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimAuthenticationData auth_data;
+
+       msg("call tapi_sim_req_authentication()");
+
+       memset(&auth_data, 0, sizeof(TelSimAuthenticationData));
+
+       auth_data.auth_type = atoi(data_sim_req_authentication_type);
+       auth_data.autn_length = strlen(data_sim_req_authentication_autn_data);
+       memcpy(auth_data.autn_data, data_sim_req_authentication_autn_data, auth_data.autn_length);
+       auth_data.rand_length = strlen(data_sim_req_authentication_rand_data);
+       memcpy(auth_data.rand_data, data_sim_req_authentication_rand_data, auth_data.rand_length);
+
+       msg("auth_type[%d]", auth_data.auth_type);
+       msg("autn_data[%s] autn_length[%d]", auth_data.autn_data, auth_data.autn_length);
+       msg("rand_data[%s] rand_length[%d]", auth_data.rand_data, auth_data.rand_length);
+
+       rt = tapi_sim_req_authentication(handle, &auth_data, on_sim_req_authentication, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_verify_pins(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimSecPinResult *verify_pin_resp = data;
+
+       msg("tapi_sim_verify_pins() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!verify_pin_resp) {
+               msg("sim verify pins response data is null");
+               return;
+       }
+
+       msg("pin type[%d]", verify_pin_resp->pin_type);
+       msg("No of tries left[%d]", verify_pin_resp->retry_count);
+}
+
+static int run_sim_verify_pins(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimSecPinPw pin_data;
+
+       msg("call tapi_sim_verify_pins()");
+
+       memset(&pin_data, 0, sizeof(TelSimSecPinPw));
+
+       pin_data.pin_type = atoi(data_sim_verify_pins_type);
+       pin_data.pw = (char *)data_sim_verify_pins_pw;
+
+       msg("pin type[%d]", pin_data.pin_type);
+       msg("password[%s]", pin_data.pw);
+
+       rt = tapi_sim_verify_pins(handle, &pin_data, on_sim_verify_pins, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_verify_puks(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimSecPukResult *verify_puk_resp = data;
+
+       msg("tapi_sim_verify_puks() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!verify_puk_resp) {
+               msg("sim verify puks response data is null");
+               return;
+       }
+
+       msg("puk type[%d]", verify_puk_resp->puk_type);
+       msg("No of tries left[%d]", verify_puk_resp->retry_count);
+}
+
+static int run_sim_verify_puks(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimSecPukPw puk_data;
+
+       msg("call tapi_sim_verify_puks()");
+
+       memset(&puk_data, 0, sizeof(TelSimSecPukPw));
+
+       puk_data.puk_type = atoi(data_sim_verify_puks_type);
+       puk_data.puk_pw = (char *)data_sim_verify_puks_puk_pw;
+       puk_data.new_pin_pw = (char *)data_sim_verify_puks_pin;
+
+       msg("puk_type[%d]", puk_data.puk_type);
+       msg("puk password[%s]", puk_data.puk_pw);
+       msg("new pin password[%s]", puk_data.new_pin_pw);
+
+       rt = tapi_sim_verify_puks(handle, &puk_data, on_sim_verify_puks, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_change_pins(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimSecPinResult *change_pin_resp = data;
+
+       msg("tapi_sim_change_pins() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!change_pin_resp) {
+               msg("sim change pins response data is null");
+               return;
+       }
+
+       msg("pin type[%d]", change_pin_resp->pin_type);
+       msg("No of tries left[%d]", change_pin_resp->retry_count);
+}
+
+static int run_sim_change_pins(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimSecChangePinPw pin_data;
+
+       msg("call tapi_sim_change_pins()");
+
+       memset(&pin_data, 0, sizeof(TelSimSecChangePinPw));
+
+       pin_data.pin_type = atoi(data_sim_change_pins_type);
+       pin_data.old_pw = (char *)data_sim_change_pins_old_pw;
+       pin_data.new_pw = (char *)data_sim_change_pins_new_pw;
+
+       msg("pin type[%d]", pin_data.pin_type);
+       msg("old password[%s]", pin_data.old_pw);
+       msg("new password[%s]", pin_data.new_pw);
+
+       rt = tapi_sim_change_pins(handle, &pin_data, on_sim_change_pins, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_enable_or_disable_facility(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimFacilityResult *sim_facility_resp = data;
+
+       msg("tapi_sim_enable/disable_facility() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!sim_facility_resp) {
+               msg("sim enable/disable facility response data is null");
+               return;
+       }
+
+       msg("lock_type[%d]", sim_facility_resp->type);
+       msg("No of tries left[%d]", sim_facility_resp->retry_count);
+}
+
+static int run_sim_enable_facility(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimFacilityPw pw;
+
+       msg("call tel_%s()", menu->title);
+
+       memset(&pw, 0, sizeof(TelSimFacilityPw));
+
+       pw.lock_type = atoi(data_sim_facility_type);
+       pw.pw = (char *)data_sim_facility_pw;
+
+       msg("lock_type[%d]", pw.lock_type);
+       msg("password[%s]", pw.pw);
+
+       rt = tapi_sim_enable_facility(handle, &pw, on_sim_enable_or_disable_facility, NULL);
+
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static int run_sim_disable_facility(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimFacilityPw pw;
+
+       msg("call tel_%s()", menu->title);
+
+       memset(&pw, 0, sizeof(TelSimFacilityPw));
+
+       pw.lock_type = atoi(data_sim_facility_type);
+       pw.pw = (char *)data_sim_facility_pw;
+
+       msg("lock_type[%d]", pw.lock_type);
+       msg("password[%s]", pw.pw);
+
+       rt = tapi_sim_disable_facility(handle, &pw, on_sim_enable_or_disable_facility, NULL);
+
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_facility(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimFacilityInfo *facility_info = data;
+
+       msg("tapi_sim_get_facility() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!facility_info) {
+               msg("get sim facility response data is null");
+               return;
+       }
+
+       msg("lock_type[%d]", facility_info->type);
+       msg("sim facility status[%d]", facility_info->f_status);
+}
+
+static int run_sim_get_facility(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimLockType lock_type;
+
+       msg("call tapi_sim_get_facility()");
+
+       lock_type = atoi(data_sim_facility_type);
+       msg("lock_type[%d]", lock_type);
+
+       rt = tapi_sim_get_facility(handle, lock_type, on_sim_get_facility, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_get_lock_info(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimLockInfo *lock_info = data;
+
+       msg("tapi_sim_get_lock_info() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!lock_info) {
+               msg("lock info response data is null");
+               return;
+       }
+
+       msg("lock_type[%d]", lock_info->lock_type);
+       msg("lock_status[%d]", lock_info->lock_status);
+       msg("No of tries left[%d]", lock_info->retry_count);
+}
+
+static int run_sim_get_lock_info(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimLockType lock_type;
+
+       msg("call tapi_sim_get_lock_info()");
+
+       lock_type = atoi(data_sim_facility_type);
+       msg("lock_type[%d]", lock_type);
+
+       rt = tapi_sim_get_lock_info(handle, lock_type, on_sim_get_lock_info, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_request_apdu(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimApduResp *apdu_resp = data;
+       unsigned int i = 0;
+
+       msg("tapi_sim_req_apdu() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!apdu_resp) {
+               msg("apdu response data is null");
+               return;
+       }
+
+       msg("apdu_len[%d]", apdu_resp->apdu_resp_len);
+
+       for(i = 0; i < apdu_resp->apdu_resp_len; i++)
+               msg("[%d]`s byte is [0x%x]",i, apdu_resp->apdu_resp[i]);
+}
+
+static int run_sim_request_apdu(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+       TelSimApdu apdu_data;
+       char result_apdu[MENU_DATA_SIZE +1] = {0,};
+       unsigned int i, j;
+       unsigned int len;
+
+       memset(&apdu_data, 0, sizeof(TelSimApdu));
+
+       msg("call tapi_sim_req_apdu()");
+
+       len = strlen(data_sim_apdu);
+
+       for (i = 0, j = 0; i < len; i += 2, j++)
+               result_apdu[j] = (_sim_str_to_hex(data_sim_apdu[i]) << 4) | (_sim_str_to_hex(data_sim_apdu[i+1]));
+
+       apdu_data.apdu_len = len/2;
+       if (apdu_data.apdu_len > TEL_SIM_APDU_LEN_MAX) {
+               msg("Input too long");
+               return 0;
+       }
+       memcpy(apdu_data.apdu, result_apdu, apdu_data.apdu_len);
+
+       for (i = 0; i < apdu_data.apdu_len; i++)
+               msg("[%02d] = 0x%02x\n", i, apdu_data.apdu[i]);
+
+       rt = tapi_sim_req_apdu(handle, &apdu_data, on_sim_request_apdu, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_sim_request_atr(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimAtr *atr_resp = data;
+       unsigned int i = 0;
+
+       msg("tapi_sim_req_atr() response received");
+       CHECK_SIM_RESULT(result);
+
+       if (!atr_resp) {
+               msg("atr response data is null");
+               return;
+       }
+
+       msg("atr_len[%d]", atr_resp->atr_len);
+
+       for(i = 0; i < atr_resp->atr_len; i++)
+               msg("[%d]`s byte is [0x%x]", i, atr_resp->atr[i]);
+}
+
+static int run_sim_request_atr(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sim_req_atr()");
+
+       rt = tapi_sim_req_atr(handle, on_sim_request_atr, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+/* SIM SubMenu */
+static struct menu_data menu_sim_get_init_info[] = {
+       { "1", "run", NULL, run_sim_get_init_info, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sim_get_card_type[] = {
+       { "1", "run", NULL, run_sim_get_card_type, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sim_get_imsi[] = {
+       { "1", "run", NULL, run_sim_get_imsi, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sim_get_ecc[] = {
+       { "1", "run", NULL, run_sim_get_ecc, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sim_get_iccid[] = {
+       { "1", "run", NULL, run_sim_get_iccid, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sim_set_language[] = {
+       {"1", "select language (0=GERMAN 1=ENGLISH 2=ITALIAN 3=FRENCH 4=SPANISH 5=DUTCH 6=SWEDISH" \
+               "7=DANISH 8=PORTUGUESE 9=FINNISH 10=NORWEGIAN 11=GREEK 12=TURKISH 13=HUNGARIAN 14=POLISH" \
+               "15=KOREAN 16=CHINESE 17=RUSSIAN 18=JAPANESE 255=LANG_UNSPECIFIED)", NULL, NULL, data_sim_set_language},
+       {"2", "run", NULL, run_sim_set_language, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_language[] = {
+       {"1", "run", NULL, run_sim_get_language, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_cf_info[] = {
+       {"1", "run", NULL, run_sim_get_cf_info, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_set_mw_info[] = {
+       {"1", "profile id", NULL, NULL, data_sim_set_mw_profile_id},
+       {"2", "Indicator status", NULL, NULL, data_sim_set_mw_indicator_status},
+       {"3", "voice count", NULL, NULL, data_sim_set_mw_voice_cnt},
+       {"4", "fax count", NULL, NULL, data_sim_set_mw_fax_cnt},
+       {"6", "email count", NULL, NULL, data_sim_set_mw_email_cnt},
+       {"7", "other count", NULL, NULL, data_sim_set_mw_other_cnt},
+       {"8", "video count", NULL, NULL, data_sim_set_mw_video_cnt},
+       {"9", "run", NULL, run_sim_set_mw_info, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_mw_info[] = {
+       {"1", "run", NULL, run_sim_get_mw_info, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_set_mb_info[] = {
+       {"1", "profile id", NULL, NULL, data_sim_set_mb_profile_id},
+       {"2", "mailbox type (0=VOICE 1=FAX 2=EMAIL 3=OTHER 4=VIDEO)", NULL, NULL, data_sim_set_mb_type},
+       {"3", "alpha id", NULL, NULL, data_sim_set_mb_alpha_id},
+       {"4", "number", NULL, NULL, data_sim_set_mb_number},
+       {"5", "run", NULL, run_sim_set_mb_info, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_mb_info[] = {
+       {"1", "run", NULL, run_sim_get_mb_info, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_msisdn[] = {
+       {"1", "run", NULL, run_sim_get_msisdn, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_spn[] = {
+       {"1", "run", NULL, run_sim_get_spn, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_cphs_netname[] = {
+       {"1", "run", NULL, run_sim_get_cphs_netname, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_sp_display_info[] = {
+       {"1", "run", NULL, run_sim_get_sp_display_info, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_req_authentication[] = {
+       {"1", "sim auth type (0=GSM 1=GSM_CTX 2=3G_CTX 3=GBA 4=GBA_NAF 5=IMS_AKA)",
+               NULL, NULL, data_sim_req_authentication_type},
+       {"2", "autn_data", NULL, NULL, data_sim_req_authentication_autn_data},
+       {"3", "rand_data", NULL, NULL, data_sim_req_authentication_rand_data},
+       {"4", "run", NULL, run_sim_req_authentication, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_verify_pins[] = {
+       {"1", "pin type(0=PIN1, 1=PIN2)", NULL, NULL, data_sim_verify_pins_type},
+       {"2", "password", NULL, NULL, data_sim_verify_pins_pw},
+       {"3", "run", NULL, run_sim_verify_pins, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_verify_puks[] = {
+       {"1", "puk type(0=PUK1, 1=PUK2)", NULL, NULL, data_sim_verify_puks_type},
+       {"2", "puk password", NULL, NULL, data_sim_verify_puks_puk_pw},
+       {"3", "pin", NULL, NULL, data_sim_verify_puks_pin},
+       {"4", "run", NULL, run_sim_verify_puks, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_change_pins[] = {
+       {"1", "pin type(0=PIN1, 1=PIN2)", NULL, NULL, data_sim_change_pins_type},
+       {"2", "old_pw", NULL, NULL, data_sim_change_pins_old_pw},
+       {"3", "new_pw", NULL, NULL, data_sim_change_pins_new_pw},
+       {"4", "run", NULL, run_sim_change_pins, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_enable_facility[] = {
+       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
+               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
+       {"2", "password", NULL, NULL, data_sim_facility_pw},
+       {"3", "run", NULL, run_sim_enable_facility, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_disable_facility[] = {
+       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
+               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
+       {"2", "password", NULL, NULL, data_sim_facility_pw},
+       {"3", "run", NULL, run_sim_disable_facility, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_facility[] = {
+       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
+               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
+       {"2", "run", NULL, run_sim_get_facility, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_lock_info[] = {
+       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
+               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
+       {"2", "run", NULL, run_sim_get_lock_info, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_request_apdu[] = {
+       {"1", "apdu", NULL, NULL, data_sim_apdu},
+       {"2", "run", NULL, run_sim_request_apdu, NULL},
+       {NULL, NULL},
+};
+
+static struct menu_data menu_sim_request_atr[] = {
+       {"1", "run", NULL, run_sim_request_atr, NULL},
+       {NULL, NULL},
+};
+
+/* SIM Menu */
+struct menu_data menu_sim[] = {
+       {"1g", "Get sim init info", menu_sim_get_init_info, NULL, NULL},
+       {"2g", "Get sim card type", menu_sim_get_card_type, NULL, NULL},
+       {"3g", "Get imsi", menu_sim_get_imsi, NULL, NULL},
+       {"4g", "Get ecc", menu_sim_get_ecc, NULL, NULL},
+       {"5g", "Get iccid", menu_sim_get_iccid, NULL, NULL},
+       {"6s", "Set sim language", menu_sim_set_language, NULL, NULL},
+       {"6g", "Get sim language", menu_sim_get_language, NULL, NULL},
+       {"7g", "Get call forwarding info", menu_sim_get_cf_info, NULL, NULL},
+       {"8s", "Set msg waiting info", menu_sim_set_mw_info, NULL, NULL},
+       {"8g", "Get msg waiting info", menu_sim_get_mw_info, NULL, NULL},
+       {"9s", "Set mailbox info", menu_sim_set_mb_info, NULL, NULL},
+       {"9g", "Get mailbox info", menu_sim_get_mb_info, NULL, NULL},
+       {"10g", "Get msisdn", menu_sim_get_msisdn, NULL, NULL},
+       {"11g", "Get spn", menu_sim_get_spn, NULL, NULL},
+       {"12g", "Get cphs network name", menu_sim_get_cphs_netname, NULL, NULL},
+       {"13g", "Get sim service provider info", menu_sim_get_sp_display_info, NULL, NULL},
+       {"14", "sim authentication", menu_sim_req_authentication, NULL, NULL},
+       {"15", "verify pins", menu_sim_verify_pins, NULL, NULL},
+       {"16", "verify puks", menu_sim_verify_puks, NULL, NULL},
+       {"17", "change pins", menu_sim_change_pins, NULL, NULL},
+       {"18", "disable_sim_facility", menu_sim_disable_facility, NULL, NULL},
+       {"19", "enable_sim_facility", menu_sim_enable_facility, NULL, NULL},
+       {"20g", "Get sim facility info", menu_sim_get_facility, NULL, NULL},
+       {"21g", "Get sim lock info", menu_sim_get_lock_info, NULL, NULL},
+       {"22", "request sim apdu", menu_sim_request_apdu, NULL, NULL},
+       {"23", "request sim atr", menu_sim_request_atr, NULL, NULL},
+       { NULL, NULL, },
+};
+
+/* Register Events */
+void register_sim_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       ret = tapi_register_event_id(handle, TEL_NOTI_SIM_STATUS, on_noti_sim_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_SIM_STATUS - event register failed [%d]", ret);
+}
diff --git a/test_src/sim.h b/test_src/sim.h
new file mode 100644 (file)
index 0000000..7e23bcd
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _SIM_H_
+#define _SIM_H_
+
+void register_sim_event(TelHandle *handle);
+
+#endif /* _SIM_H_ */
diff --git a/test_src/sms.c b/test_src/sms.c
new file mode 100644 (file)
index 0000000..909b2fd
--- /dev/null
@@ -0,0 +1,1303 @@
+
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_sms.h>
+#include <tapi_events.h>
+
+#include "menu.h"
+#include "sms.h"
+#include "sms_util.h"
+
+static int dcs_pos = 0;
+
+#define NETTEXT_MSG_SIZE_MAX 918
+
+#define CHECK_SMS_RESULT(x) \
+{ \
+       if (x >= TEL_SMS_RESULT_SUCCESS && x <= TEL_SMS_RESULT_OPERATION_NOT_PERMITTED) { \
+               msg("result[%d][%s]", x, dbg_sms_result[x]); \
+       } else { \
+               msg("API failed with result[%d]", x); \
+       } \
+       if (x != TEL_SMS_RESULT_SUCCESS) \
+               return ; \
+}
+
+char *dbg_sms_result[] = {
+       "TEL_SMS_RESULT_SUCCESS",
+       "TEL_SMS_RESULT_FAILURE",
+       "TEL_SMS_RESULT_INVALID_PARAMETER",
+       "TEL_SMS_RESULT_MEMORY_FAILURE",
+       "TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED",
+       "TEL_SMS_RESULT_UNKNOWN_FAILURE",
+       "TEL_SMS_RESULT_INVALID_MANDATORY_INFO",
+       "TEL_SMS_RESULT_NETWORK_CONGESTION",
+       "TEL_SMS_RESULT_SIM_FAILURE",
+       "TEL_SMS_RESULT_NETWORK_FAILURE",
+       "TEL_SMS_RESULT_OPERATION_NOT_PERMITTED",
+};
+
+static char data_sms_index[MENU_DATA_SIZE + 1] = {};
+static char data_sms_msg_status[MENU_DATA_SIZE + 1] = {};
+static char data_sms_memory_status[MENU_DATA_SIZE + 1] = {};
+static char data_sms_sca_ton[MENU_DATA_SIZE + 1] = {};
+static char data_sms_sca_npi[MENU_DATA_SIZE + 1] = {1, };
+static char data_sms_sca_number[MENU_DATA_SIZE + 1] = {};
+
+static char data_sms_set_params_index[MENU_DATA_SIZE + 1] = {};
+static char data_sms_set_params_vp[MENU_DATA_SIZE + 1] = {};
+
+static char data_sms_set_cb_status[MENU_DATA_SIZE + 1] = {};
+static char data_sms_set_cb_msg_id_rng_cnt[MENU_DATA_SIZE + 1] = {0, };
+static char data_sms_set_cb_from_msg_id[MENU_DATA_SIZE + 1] = {};
+static char data_sms_set_cb_to_msg_id[MENU_DATA_SIZE + 1] = {};
+static char data_sms_set_cb_msg_id_selected[MENU_DATA_SIZE + 1] = {};
+
+static char data_sms_send_more_msgs[MENU_DATA_SIZE + 1] = {};
+static char data_sms_send_msg[MENU_DATA_SIZE + 1] = {};
+static char data_sms_send_msg_dialling_num[MENU_DATA_SIZE + 1] = {};
+
+static void on_resp_write_sms_in_sim(TelHandle *handle, int result, void *data, void *user_data);
+static void on_resp_sms_delivery_report(TelHandle *handle, int result, void *data, void *user_data);
+static void on_send_sms(TelHandle *handle, int result, void *data, void *user_data);
+
+/* Utilities */
+static int __encode_and_send_sms_submit_tpdu (MManager *mm, char *dialling_num, unsigned int dial_num_len,
+               char *msg, unsigned int msg_len, TelSmsSendInfo *send_sms_info)
+{
+       TelHandle *handle = menu_manager_ref_user_data (mm);
+       TpduSmsSubmit tpdu_submit;
+       unsigned char packet[NETTEXT_MSG_SIZE_MAX] = {0, };
+       unsigned char tp_mr = 0;
+       unsigned char tp_pid = 0; //reaplace type (65)
+       unsigned char tp_dcs; //=17; //class_1(17),class_2(18)
+       unsigned char tp_vp;
+       unsigned int index = 0;
+       unsigned int i;
+       TelReturn rt = 0;
+
+       tp_mr++; /* msg_ref */
+
+       // TP-MTI, TP-RD, TP-VPF, TP-SRR, TP_UDHI, TP-RP
+       tpdu_submit.msg_type = SMS_TPDU_SUBMIT;
+       tpdu_submit.rd = FALSE; //false :accept duplicate msg , true: reject duplicate msg
+       tpdu_submit.vpf = SMS_VP_RELATIVE;
+       tpdu_submit.srr = FALSE; //false :A status report is not requested , true: A status report is requested
+       tpdu_submit.udhi = FALSE; //false: contains only the short message , true :a Header in addition to the short message
+       tpdu_submit.rp = FALSE; //false :TP Reply Path parameter is not set in this SMS SUBMIT, true : TP Reply Path parameter is set in this SMS SUBMIT
+
+       packet[index] = tpdu_submit.msg_type; // SUBMIT: bits 0, 1
+       packet[index] |= tpdu_submit.rd ? 0x04 : 0; // bit 2
+       packet[index] |= tpdu_submit.vpf << 3; // bits 3, 4
+       packet[index] |= tpdu_submit.srr ? 0x20 : 0; // bit 5
+       packet[index] |= tpdu_submit.udhi ? 0x40 : 0; // bit 6
+       packet[index] |= tpdu_submit.rp ? 0x80 : 0; // bit 7
+
+       index++;
+       msg("index of message ref is %d, msgref is %d", index, tp_mr);
+       /* TP-MR */
+       packet[index++] = tp_mr;
+
+       // TP-DA
+#if 1
+       index += sms_util_encode_addr_field (packet + index, dialling_num, dial_num_len,
+                       0x02, 0x01);
+#else
+       memcpy(&(packet[index]), dialling_num, dial_num_len);
+    index = index + dial_num_len;
+#endif
+
+       //msg("DESTINATTION  ADDR Encoded =========");
+
+       //TP-PID
+       packet[index++] = tp_pid;
+
+       // TP_DCS (Data Coding Scheme)
+
+       tpdu_submit.dcs.compressed = FALSE;
+       tpdu_submit.dcs.bmsg_class_set = FALSE;
+       tpdu_submit.dcs.coding_group_type = SMS_CODGRP_SM_GENERAL_DCS;
+       tpdu_submit.dcs.alphabet_type = SMS_ALPHABET_DEFAULT;
+       tpdu_submit.dcs.class_type = SMS_CLASS_2;
+
+       sms_util_encode_dcs (&tp_dcs, &tpdu_submit.dcs);
+
+       packet[index++] = tp_dcs;
+
+       //msg("DCS Encoded:tp_dcs =%d =========",tp_dcs);
+
+       //TP-VP
+       tpdu_submit.vp.vp_rel_type = SMS_VP_REL_6H;
+       tpdu_submit.vp.vp_type = SMS_VP_RELATIVE;
+       tpdu_submit.vp.vp_value = 0x01;
+
+       sms_util_encode_validity (&tp_vp, &tpdu_submit.vp);
+
+       //tp_vp =65;
+       packet[index++] = tp_vp;
+       //msg("Validity Encoded :tp_vp =%d =========",tp_vp);
+
+       // UDL
+       packet[index++] = msg_len;
+
+       // TP-UD
+
+       if (tpdu_submit.dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
+               int pos;
+               pos = sms_util_pack_gsm_code (packet + index, msg, msg_len);
+               index += pos;
+       }
+
+       for (i = 0; i < index; i++) {
+               msg("[%02x]", packet[i]);
+               if (i % 10 == 9)
+                       msg("\n");
+       }
+       msg("\n");
+
+       memcpy (send_sms_info->send_data.tpdu, packet, index);
+       send_sms_info->send_data.tpdu_length = index;
+
+       msg("call tapi_sms_send()");
+
+       msg("Length : %d", send_sms_info->send_data.tpdu_length);
+
+       rt = tapi_sms_send (handle, send_sms_info, on_send_sms, NULL );
+       CHECK_RT(rt);
+       return 0;
+}
+
+static gboolean __decode_cb_msg (unsigned int length, char *pdu)
+{
+       unsigned int msg_length;
+       int msg_id;
+       int serial_number = 0;
+       SmsCodingScheme dcs;
+       unsigned char page[2];
+       unsigned int contents_length;
+       char contents[TEL_SMS_CB_DATA_SIZE_MAX];
+       unsigned char gs;
+       unsigned char msg_code;
+       unsigned char update_number;
+
+       serial_number = (pdu[2] << 8) | pdu[1];
+
+       gs = (pdu[2] & 0xC0) >> 6;  //bit 7, bit 6
+
+       msg_code = ( ( (pdu[2] & 0x3F) << 4) | pdu[3]) & 0xF0;
+
+       update_number = pdu[3] & 0x0F; //bit3, bit2, bit1, bit0
+
+       msg_id = pdu[4] << 4 | pdu[3];
+
+       sms_util_decode_dcs(&dcs, pdu[6]);
+
+       page[0] = pdu[7] & 0x0F; //total page
+       page[1] = (pdu[7] & 0xF0) >> 4; //current page
+
+       msg_length = length - 2;
+       contents_length = msg_length - 6;
+
+       if (dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
+               sms_util_unpack_gsm_code (contents, &pdu[8], msg_length);
+       } else {
+               memcpy (contents, &pdu[8], msg_length);
+               contents[msg_length] = 0;
+       }
+
+       msg("*************************************\n");
+       msg("serial number : 0x%04x \n" , serial_number);
+       msg("Geographical Scope: 0x%x\n" , gs);
+       msg("message code : 0x%x\n", msg_code);
+       msg("update Number : 0x%x\n",update_number);
+       msg("message identifier :  0x%x\n" , msg_id);
+       msg("DCS-Commpressed?: %d (1: true)\n" , dcs.compressed);
+       msg("DCS-coding_group_type:     %x\n" , dcs.coding_group_type);
+       msg("contents bytes size : %d\n", contents_length);
+       msg("page : (%d /%d) (page /total ) \n", page[1], page[0]);
+       msg("contents: %s\n", contents);
+       msg("*************************************\n");
+
+       return TRUE;
+}
+
+static int __decode_sms_deliver_tpdu (unsigned int tpdu_len, char *tpdu)
+{
+       TpduSmsDeliver tpdu_deliver;
+       TmDateTime time_stamp;
+       unsigned int org_addr_len = 0;
+       char dialling_num[SMS_ADDRESS_LEN_MAX + 1];
+       char org_addr[SMS_ADDRESS_LEN_MAX + 1]; //originating number
+       int org_ton, org_npi;
+       int position = 0;
+
+       /* TP-MTI, TP-MMS, TP-SRI, TP_UDHI, TP-RP */
+       tpdu_deliver.msg_type = SMS_TPDU_DELIVER;
+       tpdu_deliver.mms = (tpdu[position] & 0x04) ? TRUE : FALSE; // bit 2 (Message Type Indicator)
+       tpdu_deliver.sri = (tpdu[position] & 0x20) ? TRUE : FALSE; // bit 5 (Status Report Indication)
+       tpdu_deliver.udhi = (tpdu[position] & 0x40) ? TRUE : FALSE;// bit 6 (User Data Header Indicator)
+       tpdu_deliver.rp = (tpdu[position] & 0x80) ? TRUE : FALSE;// bit 7 (Reply Path)
+
+       position++;
+
+       /* TP-OA */
+
+       memset (dialling_num, 0, sizeof (dialling_num));
+
+       org_addr_len = sms_util_decode_addr_field (dialling_num, &tpdu[position],
+                       &org_ton, &org_npi);
+       if (org_addr_len > SMS_ADDRESS_LEN_MAX - 1)
+               org_addr_len = SMS_ADDRESS_LEN_MAX - 1;
+
+       position += 2;
+
+       position += (org_addr_len + 1) / 2;
+       msg("pos = %d, length = %d", position, org_addr_len);
+
+       if (org_ton == SMS_TON_INTERNATIONAL) {
+               org_addr[0] = '+';
+               memcpy (&org_addr[1], dialling_num, org_addr_len - 1);
+               org_addr[org_addr_len + 1] = '\0';
+       } else {
+               memcpy (org_addr, dialling_num, org_addr_len);
+               org_addr[org_addr_len] = '\0';
+       }
+
+       /* TP-PID */
+       tpdu_deliver.pid= tpdu[position];
+
+       position++;
+
+       /* TP-DCS */
+       sms_util_decode_dcs(&tpdu_deliver.dcs, tpdu[position]);
+       dcs_pos = position;
+       position++;
+
+       /* TP-SCTS */
+       sms_util_decode_time_stamp (&tpdu[position], &time_stamp);
+
+       position += 7;
+
+       /* TP-UDL */
+       tpdu_deliver.udl = tpdu[position];
+
+       if (tpdu_deliver.udl > TEL_SMS_SMDATA_SIZE_MAX)
+               tpdu_deliver.udl = TEL_SMS_SMDATA_SIZE_MAX;
+
+       position++;
+
+       /* TP-UD */
+       tpdu_deliver.user_data = g_try_malloc0(sizeof(TEL_SMS_SMDATA_SIZE_MAX + 1));
+
+       if (tpdu_deliver.dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
+               char in_data[TEL_SMS_SMDATA_SIZE_MAX + 1];
+
+               memset (in_data, 0x00, TEL_SMS_SMDATA_SIZE_MAX + 1);
+
+               memcpy ((void*) in_data, (void*) &tpdu[position], tpdu_deliver.udl);
+
+               sms_util_unpack_gsm_code (tpdu_deliver.user_data, in_data,
+                               (unsigned char) tpdu_deliver.udl);
+       }
+
+       msg("*************************************");
+       msg("Msg Type: TPDU_DELIVER");
+
+       if (tpdu_deliver.rp) {
+               msg("RP: Set Reply Path");
+       } else {
+               msg("RP: Not set Reply Path");
+       }
+
+       if (tpdu_deliver.sri) {
+               msg("SRI: A status report shall be returned to the SME");
+       } else {
+               msg("SRI: A status report shall be not returned to the SME");
+       }
+
+       if (tpdu_deliver.mms) {
+               msg("MMS: No more messages are waiting for the MS in this SC");
+       } else {
+               msg("MMS: More messages are waiting for the MS in this SC");
+       }
+
+       if (tpdu_deliver.udhi) {
+               msg("UDHI: Contains a Header in addition to the short message.");
+       } else {
+               msg("UDHI: Only short message.");
+       }
+
+       msg("DcsClass : %x (4 means Class None) ", tpdu_deliver.dcs.class_type);
+
+       msg("From : %10s", org_addr);
+       msg("Time : %d-%d-%d  , %d:%d:%d", time_stamp.year, time_stamp.month,
+                       time_stamp.day, time_stamp.hour, time_stamp.minute,
+                       time_stamp.second);
+       msg("Message : %s ", tpdu_deliver.user_data);
+       msg("*************************************");
+
+       g_free(tpdu_deliver.user_data);
+
+       return dcs_pos;
+}
+
+static void __decode_sms_status_report_tpdu(unsigned int tpdu_len, char *tpdu)
+{
+       TpduSmsStatusReport status_report;
+       TmDateTime time_stamp;
+       TmDateTime discharge_time;
+       unsigned int rcp_addr_len = 0;
+       char dialling_num[SMS_ADDRESS_LEN_MAX];
+       char rcp_addr[SMS_ADDRESS_LEN_MAX]; //recipient number
+       int rcp_ton, rcp_npi;
+       int position = 0;
+       unsigned int mask;
+
+       /* TP-MTI, TP MMS, TP SRQ, TP_UDHI */
+       status_report.msg_type = tpdu[position] & 0x03; // bit 0,1
+       status_report.mms = tpdu[position] & 0x04 ? TRUE : FALSE; // bit 2
+       status_report.srq = tpdu[position] & 0x20 ? TRUE : FALSE; //bit 5
+       status_report.udhi = tpdu[position] & 0x40 ? TRUE : FALSE;       //bit 6
+
+       position++;
+
+       /* TP-MR */
+       status_report.mr = tpdu[position];
+       position++;
+
+       /* TP-RA */
+       memset (dialling_num, 0, sizeof (dialling_num));
+       sms_util_decode_addr_field(dialling_num, &tpdu[position], &rcp_ton, &rcp_npi);
+       position += 2;
+
+       rcp_addr_len = strlen ((char*) dialling_num);
+       position += (rcp_addr_len + 1) / 2;
+
+       if (rcp_ton == SMS_TON_INTERNATIONAL) {
+               rcp_addr[0] = '+';
+               memcpy (&rcp_addr[1], dialling_num, rcp_addr_len);
+               rcp_addr[rcp_addr_len + 1] = '\0';
+       } else {
+               memcpy (rcp_addr, dialling_num, rcp_addr_len);
+               rcp_addr[rcp_addr_len] = '\0';
+       }
+
+       status_report.rcp_addr.dial_num_len = rcp_addr_len + 1;
+       memcpy (status_report.rcp_addr.dialling_num, rcp_addr, rcp_addr_len + 1);
+       status_report.rcp_addr.npi = rcp_npi;
+       status_report.rcp_addr.ton = rcp_ton;
+
+       /* TP-SCTS */
+       sms_util_decode_time_stamp(&tpdu[position], &time_stamp);
+       position += 7;
+
+       /* TP-DT */
+       sms_util_decode_time_stamp (&tpdu[position], &discharge_time);
+       position += 7;
+
+       /* TP-ST */
+       status_report.status = tpdu[position];
+       position++;
+
+       /* TP-PI */
+       status_report.para_ind = tpdu[position];
+
+       mask = status_report.para_ind;
+
+       if ( (mask != 0xFF) && (mask != 0)) {
+               /* Increment only if mask is valid */
+               position++;
+
+               /* TP-PID */
+               if (mask & 0x01) {
+                       status_report.pid = tpdu[position];
+                       position++;
+               }
+               /* TP-DCS */
+               if (mask & 0x02) {
+                       sms_util_decode_dcs(&status_report.dcs, tpdu[position]);
+                       position++;
+               }
+               if (mask & 0x04) {
+                       /* TP-UDL */
+                       status_report.udl = tpdu[position];
+                       position++;
+
+                       /* TP-UD */
+                       status_report.user_data = g_try_malloc0(sizeof(TEL_SMS_SMDATA_SIZE_MAX + 1));
+
+                       if (status_report.dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
+                               char in_data[TEL_SMS_SMDATA_SIZE_MAX + 1];
+
+                               memset (in_data, 0x00, TEL_SMS_SMDATA_SIZE_MAX + 1);
+
+                               memcpy ((void*) in_data, (void*) &tpdu[position],
+                                               status_report.udl);
+
+                               sms_util_unpack_gsm_code (status_report.user_data, in_data,
+                                               (unsigned char) status_report.udl);
+                       }
+
+               }
+       }
+
+       msg("*************************************");
+       msg("Msg Type: STATUS_REPORT");
+       if (status_report.mms) {
+               msg("MMS: No more messages are waiting for the MS in this SC");
+       } else {
+               msg("MMS: More messages are waiting for the MS in this SC");
+       }
+
+       if (status_report.srq) {
+               msg("SRQ: the result of an SMS COMMAND ");
+       } else {
+               msg("SRQ: the result of a SMS SUBMIT.");
+       }
+
+       if (status_report.udhi) {
+               msg("UDHI: Contains a Header in addition to the short message.");
+       } else {
+               msg("UDHI: Only Short Message");
+       }
+
+       msg("STATUS:%x", status_report.status);
+       if (status_report.status == 0x00) {
+               msg("STATUS : Short message received by the SME");
+       } else if (status_report.status == 0x01) {
+               msg("STATUS : Short message forwarded by the SC to the SMEbut the SC is unable to confirm delivery");
+       } else {
+               msg("STATUS : Short message replaced by the SC");
+       }
+
+       msg("Recipient Number : %s", rcp_addr);
+       msg("SC Time Stamp : %d-%d-%d  , %d:%d:%d", time_stamp.year,
+                       time_stamp.month, time_stamp.day, time_stamp.hour,
+                       time_stamp.minute, time_stamp.second);
+       msg("Discharge Time : %d-%d-%d  , %d:%d:%d", discharge_time.year,
+                       discharge_time.month, discharge_time.day, discharge_time.hour,
+                       discharge_time.minute, discharge_time.second);
+
+       if (mask & 0x04)
+               msg("Message : %s ", status_report.user_data);
+
+       msg("*************************************");
+       g_free (status_report.user_data);
+}
+
+/* Event Callbacks */
+static void on_noti_sms_incom_msg (TelHandle *handle, const char *noti_id,
+               void *data, void *user_data)
+{
+       TelSmsDatapackageInfo *datapackage = NULL;
+       char *temp_tpdu;
+       unsigned int tpdu_len = 0;
+       unsigned char MTI = 0;
+       unsigned char MMS = 0;
+       unsigned char SRI = 0;
+       unsigned char UDHI = 0;
+       unsigned char RP = 0;
+       int position = 0;
+       TelReturn return_status;
+       SmsCodingScheme dcs;
+
+       msgb("event(%s) received !!", TEL_NOTI_SMS_INCOM_MSG);
+
+       if (data == NULL ) {
+               msg("TEL_NOTI_SMS_INCOM_MSG data is Null");
+               return;
+       }
+
+       datapackage = (TelSmsDatapackageInfo *)data;
+
+       RP = datapackage->tpdu[position] & 0x80;
+       UDHI = datapackage->tpdu[position] & 0x40;
+       SRI = datapackage->tpdu[position] & 0x20;
+       MMS = datapackage->tpdu[position] & 0x04;
+       MTI = datapackage->tpdu[position] & 0x03;
+
+       msg("RP [%x]", RP);
+       msg("UDHI [%x]", UDHI);
+       msg("SRI [%x]", SRI);
+       msg("MMS [%x]", MMS);
+       msg("MTI [%02x]", MTI);
+
+       tpdu_len = datapackage->tpdu_length;
+       temp_tpdu = malloc (sizeof(unsigned char) * tpdu_len);
+       memcpy (temp_tpdu, &datapackage->tpdu[position], tpdu_len);
+
+       if (MTI == SMS_TPDU_DELIVER) {
+               __decode_sms_deliver_tpdu (tpdu_len, (char *)temp_tpdu);
+
+               msg("dcs_pos : %d", dcs_pos);
+
+               sms_util_decode_dcs(&dcs, datapackage->tpdu[position + dcs_pos]);
+
+               {
+                       TelSmsSimDataInfo wdata;
+
+                       memset (&wdata, 0, sizeof(TelSmsSimDataInfo));
+                       memcpy (&(wdata.data.sca), &(datapackage->sca),
+                                       sizeof(TelSmsSca));
+
+                       wdata.data.tpdu_length = datapackage->tpdu_length;
+                       memcpy (wdata.data.tpdu, datapackage->tpdu, datapackage->tpdu_length);
+
+                       wdata.status= TEL_SMS_STATUS_MT_READ;
+
+                       return_status = tapi_sms_write_sms_in_sim (handle, &wdata,
+                                       on_resp_write_sms_in_sim, NULL );
+                       msg("return_status for tapi_sms_write_sms_in_sim(): [%d]", return_status);
+               }
+       } else if (MTI == SMS_TPDU_STATUS_REPORT) {
+               __decode_sms_status_report_tpdu(tpdu_len, temp_tpdu);
+       }
+
+       TelSmsDeliverReportInfo *del_report = NULL;
+
+       del_report = malloc (sizeof(TelSmsDeliverReportInfo));
+
+       memset (del_report, 0, sizeof(TelSmsDeliverReportInfo));
+
+       memcpy(&(del_report->data.sca), &(datapackage->sca), sizeof(TelSmsSca));
+
+       del_report->data.tpdu[0] = SMS_TPDU_DELIVER_REPORT;     //TP-UDHI[bit6] : 0
+       del_report->data.tpdu[1] = 0;// TP-PI = 0; bit2: TP-UDL bit1: TP-DCS bit0: TP-PID (No option field)
+       del_report->data.tpdu_length = 2;
+       del_report->report = TEL_SMS_DELIVERY_REPORT_SUCCESS;
+
+       msg("***receive message (Api:SendDeliverreport)****");
+
+       return_status = tapi_sms_send_deliver_report (handle, del_report, on_resp_sms_delivery_report, NULL );
+       msg("return_status for tapi_sms_send_deliver_report(): [%d]", return_status);
+
+       free (del_report);
+       free (temp_tpdu);
+}
+
+static void on_noti_sms_cb_incom_msg (TelHandle *handle, const char *noti_id,
+               void *data, void *user_data)
+{
+       TelSmsCbMsgInfo *cb_msg;
+       char pdu[TEL_SMS_CB_DATA_SIZE_MAX + 3] = {0, };
+
+       msg("");
+       msgb("event(%s) received !!", TEL_NOTI_SMS_CB_INCOM_MSG);
+
+       if (!data) {
+               msg("TEL_NOTI_SMS_CB_INCOM_MSG data is null");
+               return;
+       }
+       cb_msg = (TelSmsCbMsgInfo *)data;
+
+       msg("cb_type[%d]", cb_msg->cb_type);
+       msg("cb_msg_length[%d]", cb_msg->length);
+
+       pdu[0] = cb_msg->cb_type;
+       pdu[1] = cb_msg->length;
+       memcpy(&(pdu[2]), cb_msg->cb_data, TEL_SMS_CB_DATA_SIZE_MAX + 1);
+
+       __decode_cb_msg(cb_msg->length, pdu);
+}
+
+static void on_noti_sms_etws_incom_msg (TelHandle *handle, const char *noti_id,
+               void *data, void *user_data)
+{
+       TelSmsEtwsMsgInfo *etws_msg;
+
+       msg("event [%s] received !!!", TEL_NOTI_SMS_ETWS_INCOM_MSG);
+
+       if (!data) {
+               msg("TEL_NOTI_SMS_ETWS_INCOM_MSG data is null");
+               return;
+       }
+
+       etws_msg = (TelSmsEtwsMsgInfo *)data;
+
+       msg("etws_type[%d]", etws_msg->etws_type);
+       msg("etws_length[%d]", etws_msg->length);
+       /* TODO */
+}
+
+static void on_noti_sms_memory_status (TelHandle *handle, const char *noti_id,
+               void *data, void *user_data)
+{
+       gboolean *mem_status;
+       msg("event [%s] received !!!", TEL_NOTI_SMS_SIM_MEMORY_STATUS);
+
+       if (!data) {
+               msg("TEL_NOTI_SMS_SIM_MEMORY_STATUS data is null");
+               return;
+       }
+
+       mem_status = (gboolean *)data;
+       msg("sms memory status[%s]", (*mem_status == TRUE) ? "Available" : "Not Available");
+}
+
+static void on_noti_sms_init_status (TelHandle *handle, const char *noti_id,
+               void *data, void *user_data)
+{
+       gboolean *ready_status;
+
+       msg("event [%s] received !!!", TEL_NOTI_SMS_INIT_STATUS);
+
+       if (!data) {
+               msg("TEL_NOTI_SMS_INIT_STATUS data is null");
+               return;
+       }
+
+       ready_status = (gboolean *)data;
+       msg("[%s]", (*ready_status == TRUE) ? "Device Ready" : "Device Not Ready");
+}
+
+/* Requests and Responses */
+static void on_resp_write_sms_in_sim(TelHandle *handle, int result, void *data, void *user_data)
+{
+       unsigned int *index;
+       msg("tapi_sms_write_sms_in_sim() response received");
+       CHECK_SMS_RESULT(result);
+
+       if (!data) {
+               msg("data is null");
+               return;
+       }
+
+       index = (unsigned int *)data;
+       msg("index[%d]", *index);
+}
+
+static void on_resp_sms_delivery_report(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_send_deliver_report() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_get_msg_sim_memory_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       gboolean memory_full;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_get_sim_memory_status()");
+
+       rt = tapi_sms_get_sim_memory_status(handle, &memory_full);
+       CHECK_RT(rt);
+
+       msg("SMS SIM memory status: [%s]", ((memory_full == TRUE) ? "FULL" : "NOT FULL"));
+
+       return 0;
+}
+
+static int run_get_init_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       gboolean init_status;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_get_init_status()");
+
+       rt = tapi_sms_get_init_status(handle, &init_status);
+       CHECK_RT(rt);
+
+       msg("init status: [%s]", ((init_status == TRUE) ? "INITIALIZED" : "NOT INITIALIZED"));
+
+       return 0;
+}
+
+static void on_set_msg_status(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_set_message_status() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_set_msg_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelSmsStatusInfo sms_status_info;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_set_message_status()");
+
+       memset(&sms_status_info, 0, sizeof(TelSmsStatusInfo));
+
+       sms_status_info.index = atoi(data_sms_index);
+       sms_status_info.status = atoi(data_sms_msg_status);
+
+       msg("index[%d]", sms_status_info.index);
+       msg("msg status[%d]", sms_status_info.status);
+
+       rt = tapi_sms_set_message_status(handle, &sms_status_info, on_set_msg_status, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_set_memory_status(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_set_memory_status() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_set_memory_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       gboolean mem_status;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_set_memory_status()");
+
+       mem_status = atoi(data_sms_memory_status);
+       msg("mem_status: [%s]", (mem_status == TRUE) ? "AVAILABLE" : "NOT AVAILABLE");
+
+       rt = tapi_sms_set_memory_status(handle, mem_status, on_set_memory_status, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_get_sca(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSmsSca *sca;
+
+       msg("tapi_sms_get_sca() response received");
+       CHECK_SMS_RESULT(result);
+
+       if(!data) {
+               msg("get sca data is null");
+               return;
+       }
+
+       sca = (TelSmsSca *)data;
+
+       msg("sca_ton[%d]", sca->ton);
+       msg("sca_npi[%d]", sca->npi);
+       msg("sca_number[%s]", sca->number);
+}
+
+static int run_get_sca(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_get_sca()");
+
+       rt = tapi_sms_get_sca(handle, on_get_sca, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_set_sca(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_set_sca() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_set_sca(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelSmsSca sca;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_set_sca()");
+
+       memset(&sca, 0, sizeof(TelSmsSca));
+
+       sca.ton = atoi(data_sms_sca_ton);
+       sca.npi = atoi(data_sms_sca_npi);
+       g_strlcpy(sca.number, data_sms_sca_number, TEL_SMS_SCA_LEN_MAX + 1);
+
+       msg("sca_ton[%d]", sca.ton);
+       msg("sca_npi[%d]", sca.npi);
+       msg("sca_number[%s]", sca.number);
+
+       rt = tapi_sms_set_sca(handle, &sca, on_set_sca, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_get_parameters(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSmsParamsInfoList *param_list;
+       unsigned int i = 0;
+
+       msg("tapi_sms_get_parameters() response received");
+       CHECK_SMS_RESULT(result);
+
+       if (!data) {
+               msg("get parameters data is null");
+               return;
+       }
+
+       param_list = (TelSmsParamsInfoList *)data;
+
+       msg("count[%d]", param_list->count);
+
+       for(i = 0; i < param_list->count; i++) {
+               msg("index[%d]", param_list->params[i].index);
+               msg("sca_ton[%d]", param_list->params[i].sca.ton);
+               msg("sca_npi[%d]", param_list->params[i].sca.npi);
+               msg("sca_number[%s]", param_list->params[i].sca.number);
+               msg("validity period[%d]", param_list->params[i].vp);
+       }
+}
+
+static int run_get_parameters(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_get_parameters()");
+
+       rt = tapi_sms_get_parameters(handle, on_get_parameters, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_set_parameters(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_set_parameters() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_set_parameters(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelSmsParamsInfo params;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_set_parameters()");
+
+       memset(&params, 0, sizeof(TelSmsParamsInfo));
+
+       params.index = atoi(data_sms_set_params_index);
+       params.sca.ton = atoi(data_sms_sca_ton);
+       params.sca.npi = atoi(data_sms_sca_npi);
+       g_strlcpy(params.sca.number, data_sms_sca_number, TEL_SMS_SCA_LEN_MAX+1);
+       params.vp = atoi(data_sms_set_params_vp);
+
+       msg("index[%d]", params.index);
+       msg("sca_ton[%d]", params.sca.ton);
+       msg("sca_npi[%d]", params.sca.npi);
+       msg("sca_num[%s]", params.sca.number);
+       msg("validity period[%d]", params.vp);
+
+       rt = tapi_sms_set_parameters(handle, &params, on_set_parameters, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_get_cb_config(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSmsCbConfigInfo *config;
+       unsigned int i = 0;
+
+       msg("tapi_sms_get_cb_config() response received");
+       CHECK_SMS_RESULT(result);
+
+       if (!data) {
+               msg("get cb config data is null");
+               return;
+       }
+
+       config = (TelSmsCbConfigInfo *)data;
+
+       msg("ebabled[%s]", (config->cb_enabled) ? "cb enabled" : "cb disabled");
+       msg("msg_id range count[%d]", config->msg_id_range_cnt);
+
+       for(i = 0; i < config->msg_id_range_cnt; i++)
+               msg("[%d].from msg_id[%d] to msg_id[%d] selected[%s]", i+1,
+               config->msg_ids[i].from_msg_id, config->msg_ids[i].to_msg_id,
+               (config->msg_ids[i].selected) ? "YES" : "NO");
+}
+
+static int run_get_cb_config(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_get_cb_config()");
+
+       rt = tapi_sms_get_cb_config(handle, on_get_cb_config, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_set_cb_config(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_set_cb_config() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_set_cb_config(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelSmsCbConfigInfo cb_config;
+       TelReturn rt = 0;
+       int ret = 0;
+       unsigned int i = 0;
+
+       msg("call tapi_sms_set_cb_config()");
+
+       memset(&cb_config, 0, sizeof(TelSmsCbConfigInfo));
+
+       cb_config.cb_enabled = atoi(data_sms_set_cb_status);
+       cb_config.msg_id_range_cnt = atoi(data_sms_set_cb_msg_id_rng_cnt);
+
+       for(i = 0; i < cb_config.msg_id_range_cnt; i++) {
+               msg("[%d].Enter from_msg_id", i+1);
+               ret = read(0, data_sms_set_cb_from_msg_id, sizeof(data_sms_set_cb_from_msg_id));
+               if (ret <= 0) {
+                       msg("read 'from_msg_id' returned error: [%d]", ret);
+                       return -1;
+               }
+               cb_config.msg_ids[i].from_msg_id = atoi(data_sms_set_cb_from_msg_id);
+
+               msg("[%d].Enter to_msg_id", i+1);
+               ret = read(0, data_sms_set_cb_to_msg_id, sizeof(data_sms_set_cb_to_msg_id));
+               if (ret <= 0) {
+                       msg("read 'to_msg_id' returned error: [%d]", ret);
+                       return -1;
+               }
+               cb_config.msg_ids[i].to_msg_id = atoi(data_sms_set_cb_to_msg_id);
+
+               msg("[%d].Enter msg_id selected", i+1);
+               ret = read(0, data_sms_set_cb_msg_id_selected, sizeof(data_sms_set_cb_msg_id_selected));
+               if (ret <= 0) {
+                       msg("read 'selected' returned error: [%d]", ret);
+                       return -1;
+               }
+               cb_config.msg_ids[i].selected = atoi(data_sms_set_cb_msg_id_selected);
+       }
+
+       msg("cb_status[%s]", (cb_config.cb_enabled) ? "cb enabled" : "cb disabled");
+       msg("msg_id range count[%d]", cb_config.msg_id_range_cnt);
+
+       for(i = 0; i < cb_config.msg_id_range_cnt; i++)
+               msg("[%d].from msg_id[%d] to msg_id[%d] selected[%s]", i+1,
+               cb_config.msg_ids[i].from_msg_id, cb_config.msg_ids[i].to_msg_id,
+               (cb_config.msg_ids[i].selected) ? "YES" : "NO");
+
+       rt = tapi_sms_set_cb_config(handle, &cb_config, on_set_cb_config, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_get_msg_count(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSmsStoredMsgCountInfo *sms_count_info;
+       unsigned int i = 0;
+
+       msg("tapi_sms_get_count() response received");
+       CHECK_SMS_RESULT(result);
+
+       if (!data) {
+               msg("get msg count data is null");
+               return;
+       }
+
+       sms_count_info = (TelSmsStoredMsgCountInfo *)data;
+
+       msg("total count[%d]", sms_count_info->total_count);
+       msg("used count [%d]", sms_count_info->used_count);
+
+       msg("Index List :");
+       for(i = 0; i < sms_count_info->used_count; i++)
+               msg("[%d]", sms_count_info->index_list[i]);
+
+}
+
+static int run_get_msg_count(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_get_count()");
+
+       rt = tapi_sms_get_count(handle, on_get_msg_count, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_delete_sms(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_delete_in_sim() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_delete_sms(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       unsigned int index;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_delete_sms_in_sim()");
+
+       index = atoi(data_sms_index);
+       msg("index[%d]", index);
+
+       rt = tapi_sms_delete_sms_in_sim(handle, index, on_delete_sms, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_read_msg_in_sim(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSmsSimDataInfo *read_sms_data;
+
+       msg("tapi_sms_read_sms_in_sim() response received");
+       CHECK_SMS_RESULT(result);
+
+       if (!data) {
+               msg("read sms in sim data is null");
+               return;
+       }
+
+       read_sms_data = (TelSmsSimDataInfo *)data;
+
+       msg("status[%d]", read_sms_data->status);
+       msg("sca_ton[%d]", read_sms_data->data.sca.ton);
+       msg("sca_npi[%d]", read_sms_data->data.sca.npi);
+       msg("sca_number[%s]", read_sms_data->data.sca.number);
+
+       __decode_sms_deliver_tpdu(read_sms_data->data.tpdu_length, (char *)read_sms_data->data.tpdu);
+}
+
+static int run_read_msg_in_sim(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       unsigned int index;
+       TelReturn rt = 0;
+
+       msg("call tapi_sms_read_sms_in_sim()");
+
+       index = atoi(data_sms_index);
+       msg("index[%d]", index);
+
+       rt = tapi_sms_read_sms_in_sim(handle, index, on_read_msg_in_sim, NULL);
+       CHECK_RT(rt);
+
+       return 0;
+}
+
+static void on_send_sms(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("tapi_sms_send() response received");
+       CHECK_SMS_RESULT(result);
+}
+
+static int run_send_sms(MManager *mm, struct menu_data *menu)
+{
+       TelSmsSendInfo send_sms_info;
+       char dialling_num[SMS_ADDRESS_LEN_MAX + 1];
+       char message[512];
+       unsigned int dial_num_len = 0, msg_len = 0;
+
+       msg("call tapi_sms_send()");
+
+       memset(&send_sms_info, 0, sizeof(TelSmsSendInfo));
+
+       send_sms_info.more_msgs = atoi(data_sms_send_more_msgs);
+       msg("more msgs: [%s]", (send_sms_info.more_msgs == TRUE)? "Yes" : "No");
+
+       /* sca */
+       send_sms_info.send_data.sca.ton = atoi(data_sms_sca_ton);
+       send_sms_info.send_data.sca.npi = atoi(data_sms_sca_npi);
+       if (g_strlcpy(send_sms_info.send_data.sca.number, data_sms_sca_number,
+                       TEL_SMS_SCA_LEN_MAX + 1) > TEL_SMS_SCA_LEN_MAX) {
+               msg("Invalid sca number length entered");
+               return 0;
+       }
+       msg("sca_ton[%d] sca_npi[%d] sca_num[%s]", send_sms_info.send_data.sca.ton,
+               send_sms_info.send_data.sca.npi, send_sms_info.send_data.sca.number);
+
+       /* dialling number */
+       if (g_strlcpy(dialling_num, data_sms_send_msg_dialling_num,
+                       SMS_ADDRESS_LEN_MAX + 1) > SMS_ADDRESS_LEN_MAX) {
+               msg("Invalid dialling num length entered");
+               return 0;
+       }
+       dial_num_len = strlen(dialling_num);
+
+       /* message */
+       g_strlcpy(message, data_sms_send_msg, strlen(data_sms_send_msg)+1);
+       msg_len = strlen(message);
+
+       msg("To: [%s]", dialling_num);
+       msg("Message: [%s]", message);
+       msg("dial num length[%d] msg_len[%d]", dial_num_len, msg_len);
+
+       __encode_and_send_sms_submit_tpdu (mm, dialling_num, dial_num_len, message, msg_len, &send_sms_info);
+
+       return 0;
+}
+
+/* SubMenu */
+static struct menu_data menu_sms_send_sms[] = {
+       { "1", "more messages (0=No 1=Yes)", NULL, NULL, data_sms_send_more_msgs },
+       { "2", "sca ton (0=Unknown 1=International 2=National)", NULL, NULL, data_sms_sca_ton },
+       { "3", "sca npi (0=Unknown 1=Telephony)", NULL, NULL, data_sms_sca_npi },
+       { "4", "sca number", NULL, NULL, data_sms_sca_number },
+       { "5", "message", NULL, NULL, data_sms_send_msg},
+       { "6", "dialling number (<= 20)", NULL, NULL, data_sms_send_msg_dialling_num},
+       { "7", "run", NULL, run_send_sms, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_read_msg_in_sim[] = {
+       { "1", "index", NULL, NULL, data_sms_index },
+       { "2", "run", NULL, run_read_msg_in_sim, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_delete_msg_in_sim[] = {
+       { "1", "index", NULL, NULL, data_sms_index },
+       { "2", "run", NULL, run_delete_sms, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_get_msg_count[] = {
+       { "1", "run", NULL, run_get_msg_count, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_set_cb_config[] = {
+       { "1", "cb status (0=disabled 1=enabled)", NULL, NULL, data_sms_set_cb_status },
+       { "2", "msg id range count ( < 50)", NULL, NULL, data_sms_set_cb_msg_id_rng_cnt },
+       { "3", "run", NULL, run_set_cb_config, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_get_cb_config[] = {
+       { "1", "run", NULL, run_get_cb_config, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_set_parameters[] = {
+       { "1", "index", NULL, NULL, data_sms_set_params_index },
+       { "2", "sca ton(0=Unknown 1=International 2=National)", NULL, NULL, data_sms_sca_ton },
+       { "3", "sca npi (0=Unknown 1=Telephony)", NULL, NULL, data_sms_sca_npi },
+       { "4", "sca number", NULL, NULL, data_sms_sca_number },
+       { "5", "validity period", NULL, NULL, data_sms_set_params_vp },
+       { "6", "run", NULL, run_set_parameters, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_get_parameters[] = {
+       { "1", "run", NULL, run_get_parameters, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_set_sca[] = {
+       { "1", "sca ton(0=Unknown 1=International 2=National)", NULL, NULL, data_sms_sca_ton },
+       { "2", "sca npi (0=Unknown 1=Telephony)", NULL, NULL, data_sms_sca_npi },
+       { "3", "sca number", NULL, NULL, data_sms_sca_number },
+       { "4", "run", NULL, run_set_sca, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_get_sca[] = {
+       { "1", "run", NULL, run_get_sca, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_set_memory_status[] = {
+       { "1", "status (0=not available, 1=available)", NULL, NULL, data_sms_memory_status },
+       { "2", "run", NULL, run_set_memory_status, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_set_msg_status[] = {
+       { "1", "index", NULL, NULL, data_sms_index },
+       { "2", "status (0=MT_READ 1=MT_UNREAD 2=MO_SENT 3=MO_NOT_SENT 4=MO_DELIVERED" \
+               "5=MO_DELIVERY_NOT_CONFIRMED 6=REPLACED )", NULL, NULL, data_sms_msg_status },
+       { "3", "run", NULL, run_set_msg_status, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_get_init_status[] = {
+       { "1", "run", NULL, run_get_init_status, NULL },
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_sms_get_msg_sim_memory_status[] = {
+       { "1", "run", NULL, run_get_msg_sim_memory_status, NULL },
+       { NULL, NULL, },
+};
+
+/* Menu */
+struct menu_data menu_sms[] = {
+       { "1", "Send SMS", menu_sms_send_sms, NULL, NULL},
+       { "2", "Read SMS in SIM", menu_sms_read_msg_in_sim, NULL, NULL},
+       { "3", "Delete SMS in SIM", menu_sms_delete_msg_in_sim, NULL, NULL},
+       { "4", "Get SMS count", menu_sms_get_msg_count, NULL, NULL},
+       { "5", "Set SMS cell broadcast configuration", menu_sms_set_cb_config, NULL, NULL},
+       { "6", "Get SMS cell broadcast configuration", menu_sms_get_cb_config, NULL, NULL},
+       { "7", "Set SMS parameters", menu_sms_set_parameters, NULL, NULL},
+       { "8", "Get SMS parameters", menu_sms_get_parameters, NULL, NULL},
+       { "9", "Set SCA", menu_sms_set_sca, NULL, NULL},
+       { "10", "Get SCA", menu_sms_get_sca, NULL, NULL},
+       { "11", "Set SMS memory status", menu_sms_set_memory_status, NULL, NULL},
+       { "12", "Set SMS msg status", menu_sms_set_msg_status, NULL, NULL},
+       { "13", "Get SMS init status", menu_sms_get_init_status, NULL, NULL},
+       { "14", "Get SMS SIM memory status", menu_sms_get_msg_sim_memory_status, NULL, NULL},
+       { NULL, NULL, },
+};
+
+void register_sms_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_INCOM_MSG, on_noti_sms_incom_msg, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_SMS_INCOM_MSG - Event register failed: [%d]", ret);
+
+    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_CB_INCOM_MSG, on_noti_sms_cb_incom_msg, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_SMS_CB_INCOM_MSG - Event register failed: [%d]", ret);
+
+    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_ETWS_INCOM_MSG, on_noti_sms_etws_incom_msg, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_SMS_ETWS_INCOM_MSG - Event register failed: [%d]", ret);
+
+    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_SIM_MEMORY_STATUS, on_noti_sms_memory_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_SMS_SIM_MEMORY_STATUS - Event register failed: [%d]", ret);
+
+    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_INIT_STATUS, on_noti_sms_init_status, NULL);
+       if (ret != TEL_RETURN_SUCCESS)
+               msg("TEL_NOTI_SMS_INIT_STATUS - Event register failed: [%d]", ret);
+}
diff --git a/test_src/sms.h b/test_src/sms.h
new file mode 100644 (file)
index 0000000..3cefc01
--- /dev/null
@@ -0,0 +1,649 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TAPI_SMS_CDMA_H
+#define TAPI_SMS_CDMA_H
+
+/*
+   typedef unsigned char       INT8;
+   typedef unsigned short      INT16;
+   typedef unsigned int        INT;
+   typedef unsigned long       INT32;
+
+   typedef unsigned char       BYTE;
+   */
+
+typedef int BOOL;
+
+#ifndef packed__
+#define packed__ __attribute__ ((packed))
+#endif
+
+//=============================================================
+//
+//             PARAMETER_ID
+//
+//=============================================================
+#define PARAMID_TELESERVICE_ID                         0x01    /* Teleservice Identifier */
+#define PARAMID_SERVICE_CATEGORY                       0x02    /* Broadcast Service Category */
+#define PARAMID_ADDRESS                                        0x03    /* Address */
+#define PARAMID_SUBADDRESS                             0x04    /* Subaddress */
+#define PARAMID_BEARER_REPLY                           0x05    /* Bearer Reply Option */
+#define PARAMID_CAUSE_CODES                            0x06    /* Cause Codes */
+#define PARAMID_MESSAGE_ID                             0x07    /* Message Identifier */
+#define PARAMID_USER_DATA                                      0x08    /* User Data */
+#define PARAMID_USER_RESPONSE_CODE             0x09    /* User Response Code */
+#define PARAMID_MC_TIME_STAMP                  0x0A    /* Message Center Time Stamp */
+#define PARAMID_VALIDITY_PERIOD_ABS            0x0B    /* Validity Period - Absolute */
+#define PARAMID_VALIDITY_PERIOD_REL            0x0C    /* Validiry Period - Relative */
+#define PARAMID_DEFERRED_DELIVERY_ABS  0x0D    /* Deferred Delivery Time - Absolute */
+#define PARAMID_DEFERRED_DELIVERY_REL  0x0E    /* Deferred Delivery Time - Relative */
+#define PARAMID_PRIORITY                                       0x0F    /* Priority Indicator */
+#define PARAMID_PRIVACY                                        0x10    /* Privacy Indicator */
+#define PARAMID_REPLY_OPTION                           0x11    /* Reply Option */
+#define PARAMID_NUMBER_OF_MESSAGE              0x12    /* Number of Messages : Voice Mail Count */
+#define PARAMID_ALERT_ON_DELIVERY                      0x13    /* Alert on Message Delivery */
+#define PARAMID_LANGUAGE                                       0x14    /* Langauge Indicator */
+#define PARAMID_CALLBACK                                       0x15    /* Call Back Number */
+#define PARAMID_DISPLAY_MODE                           0x16    /* Display Mode */
+#define PARAMID_MULTI_ENCODING_USER_DATA       0x17    /* Multiply Encoding User Data */
+#define PARAMID_MEMORY_INDEX                           0x18    /* Memory address stored in Phone Memory */
+#define PARAMID_BEARER_DATA                            0x19    /* Bearer data - raw data  */
+
+//=============================================================
+//
+//             PARAMETER_DATA
+//
+//=============================================================
+
+//------------------------------------------------------------------------------
+// PARAMID_TELESERVICE_ID                      0x01    /* Teleservice Identifier */
+//------------------------------------------------------------------------------
+/* Common TELESERVICE ID's */
+#define TELESERVICEID_CPT95                            0x1001  /* 4097 : Paging */
+#define TELESERVICEID_CMT95                            0x1002  /* 4098 : Text Message */
+#define TELESERVICEID_VMN95                            0x1003  /* 4099 : Voice Mail Notification */
+#define TELESERVICEID_WAP                                      0x1004  /* WAP Message */
+
+//------------------------------------------------------------------------------
+// PARAMID_BCSERVICECATEGORY           0x02    /* Broadcast Service Category */
+//------------------------------------------------------------------------------
+// The Korean Wireless Service Carrier's do not use below Service Category's
+// Below Service Category's depend on the Carriers.
+#define CATEGORY_UNKNOWN                               0x00
+#define CATEGORY_EMERGENCY                             0x01
+#define CATEGORY_ADMIN                                 0x02
+#define CATEGORY_MAINTENANCE                   0x03
+#define CATEGORY_GEN_NEWS_LOC                  0x04
+#define CATEGORY_GEN_NEWS_REG                  0x05
+#define CATEGORY_GEN_NEWS_NAT                  0x06
+#define CATEGORY_GEN_NEWS_INT                  0x07
+#define CATEGORY_FIN_NEWS_LOC                  0x08
+#define CATEGORY_FIN_NEWS_REG                  0x09
+#define CATEGORY_FIN_NEWS_NAT                  0x0A
+#define CATEGORY_FIN_NEWS_INT                  0x0B
+#define CATEGORY_SPT_NEWS_LOC                  0x0C
+#define CATEGORY_SPT_NEWS_REG                  0x0D
+#define CATEGORY_SPT_NEWS_NAT                  0x0E
+#define CATEGORY_SPT_NEWS_INT                  0x0F
+#define CATEGORY_ENT_NEWS_LOC                  0x10
+#define CATEGORY_ENT_NEWS_REG                  0x11
+#define CATEGORY_ENT_NEWS_NAT                  0x12
+#define CATEGORY_ENT_NEWS_INT                  0x13
+#define CATEGORY_LOC_WEATHER                   0x14
+#define CATEGORY_AREA_TRAFFIC                  0x15
+#define CATEGORY_AIRPORT_SCHED                 0x16
+#define CATEGORY_RESTAURANTS                   0x17
+#define CATEGORY_LODGINGS                              0x18
+#define CATEGORY_RETAILS                               0x19
+#define CATEGORY_ADS                                   0x1A
+#define CATEGORY_STOCK_QUOTES                  0x1B
+#define CATEGORY_JOBS                                  0x1C
+#define CATEGORY_MEDICAL                               0x1D
+#define CATEGORY_TECH_NEWS                             0x1E
+#define CATEGORY_MULTI                                 0x1F
+
+//------------------------------------------------------------------------------
+// PARAMID_ADDRESS                                     0x03    /* Address */
+//------------------------------------------------------------------------------
+
+/* DIGIT MODE : CHARi[] filed�� 4bit dtmf code���� 8bit code������ ï¿½Ç¹ï¿½ï¿½Ñ´ï¿½.
+*/
+#define DIGITMODE_4BITDTMF                     0x00
+#define DIGITMODE_8BITCODE                     0x01
+
+/* NUMBER MODE
+*/
+#define NUMMODE_NONE_DATANETWORK       0x00    /* in ANSI TI.607 */
+#define NUMMODE_DATANETWORK                    0x01
+
+/* NUMBER TYPE
+*/
+/* The following are used when number mode is not data network address.
+*/
+#define NUMBER_TYPE_UNKNOWN                    0x00
+#define NUMBER_TYPE_INTERNATIONAL      0x01
+#define NUMBER_TYPE_NATIONAL           0x02
+#define NUMBER_TYPE_NETWORK                    0x03
+#define NUMBER_TYPE_SUBSCRIBER         0x04
+#define NUMBER_TYPE_RESERVED_5         0x05
+#define NUMBER_TYPE_ABREVIATED         0x06
+#define NUMBER_TYPE_RESERVED_7         0x07
+/* The following are used only when number mode is data network address
+   mode.
+   */
+#define NUMBER_TYPE_IP                         0x01
+#define NUMBER_TYPE_EMAILADDR          0x02
+
+/* NUMBER PLAN
+*/
+#define NUMBER_PLAN_UNKNOWN                    0x00
+#define NUMBER_PLAN_TELEPHONY          0x01    /* CCITT E.164 and E.163,  including ISDN plan */
+#define NUMBER_PLAN_RESERVED_2         0x02
+#define NUMBER_PLAN_DATA                       0x03    /* CCITT X.121 */
+#define NUMBER_PLAN_TELEX                      0x04    /* CCITT F.69 */
+#define NUMBER_PLAN_RESERVED_5         0x05
+#define NUMBER_PLAN_RESERVED_6         0x06
+#define NUMBER_PLAN_RESERVED_7         0x07
+#define NUMBER_PLAN_RESERVED_8         0x08
+#define NUMBER_PLAN_PRIVATE                    0x09
+#define NUMBER_PLAN_RESERVED_10                0x0A
+#define NUMBER_PLAN_RESERVED_11                0x0B
+#define NUMBER_PLAN_RESERVED_12                0x0C
+#define NUMBER_PLAN_RESERVED_13                0x0D
+#define NUMBER_PLAN_RESERVED_14                0x0E
+#define NUMBER_PLAN_RESERVED_15                0x0F
+
+/* NUM_FIELDS
+*/
+/*             MAXLENGTH_SMS_ADDRESS                   Maximum sms destination(or origination ) address /call back number */
+#define        MAXLENGTH_SMS_ADDRESS           20
+/* CHARi
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_SUBADDRESS                          0x04    /* Subaddress */
+//------------------------------------------------------------------------------
+/* SUB ADDRESS TYPE
+*/
+#define SUBADDR_NSAP                           0x00    /* CCITT X.213 or ISO 8348 AD2 */
+#define SUBADDR_USER_SPECIFIED         0x01    /* e.g. X.25 */
+
+/* ODD  : ï¿½Ì°ï¿½ï¿½ï¿½ ï¿½ï¿½ ï¿½Ê¿ï¿½ï¿½Ñ°ï¿½ ? phone���� ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ 4bit�� ï¿½ï¿½ï¿½ï¿½ï¿½Ï¸ï¿½ ï¿½Ç´Â°ï¿½ ï¿½Æ´Ñ°ï¿½ ?
+*/
+/* If the last CHARi field contains information only in the 4 most significant bits,
+   the ODD field shall be set to '1'.  Otherwise, the ODD field shall be set to '0'.
+   */
+#define SUBADDR_EVEN                           0x00
+#define SUBADDR_ODD                                    0x01
+
+/* NUM_FIELDS
+*/
+
+/* CHARi
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_BEARER_REPLY                                0x05    /* Bearer Reply Option */
+//------------------------------------------------------------------------------
+/* REPLY_SEQ
+*/
+// Range : 0 - 63
+//      refer to MAXLENGTH_SMS_REPLY_SEQUENCE_NUMBER
+
+//------------------------------------------------------------------------------
+// PARAMID_CAUSE_CODES                         0x06    /* Cause Codes */
+//------------------------------------------------------------------------------
+/* REPLY_SEQ
+*/
+// Range : 0 - 63
+// Refer to MAXLENGTH_SMS_REPLY_SEQUENCE_NUMBER
+
+/* ERROR_CLASS
+*/
+#define ERRORCLASS_NONE                                        0x00    /* No Error */
+#define ERRORCLASS_TEMP                                        0x02    /* Tempory Error */
+#define ERRORCLASS_PERMANENT                   0x03    /* Permanent Error */
+#define ERRORCLASS_INTERNAL                            0x04    /* Phone Internal Error */
+
+/* CAUSE_CODE : defined in IS-41D
+*/
+
+/* A. Network Problems:
+*/
+#define CAUSECODE_ADDRESS_VACANT                                                       0
+#define CAUSECODE_ADDRESS_TRANSLATION_FAILURE                          1
+#define CAUSECODE_NETWORK_RESOURCE_SHORTAGE                                    2
+#define CAUSECODE_NETWORK_FAILURE                                                      3
+#define CAUSECODE_INVALID_TELESERVICE_ID                                       4
+#define CAUSECODE_OTHER_NETWORK_PROBLEM                                                5
+#define CAUSECODE_OTHER_NETWORK_PROBLEM_MORE_FIRST                     6
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_NETWORK_PROBLEM_S   */
+#define IPC_CAUSECODE_OTHER_NETWORK_PROBLEM_MORE_LAST                  31
+
+/* B. Terminal Problems:
+*/
+#define CAUSECODE_NO_PAGE_RESPONSE                                                     32
+#define CAUSECODE_DESTINATION_BUSY                                                     33
+#define CAUSECODE_NO_ACK                                                                       34
+#define CAUSECODE_DESTINATION_RESOURCE_SHORTAGE                                35
+#define CAUSECODE_SMS_DELIVERY_POSTPONED                                       36
+#define CAUSECODE_DESTINATION_OUT_OF_SERVICE                           37
+#define CAUSECODE_DESTINATION_NO_LONGER_AT_THIS_ADDRESS                38
+#define CAUSECODE_OTHER_TERMINAL_PROBLEM                                       39
+#define CAUSECODE_OTHER_TERMINAL_PROBLEM_MORE_FIRST                    40
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_TERMINAL_PROBLEM_S */
+#define CAUSECODE_OTHER_TERMINAL_PROBLEM_MORE_LAST                     47
+#define CAUSECODE_SMS_DELIVERY_POSTPONED_MORE_FIRST                    48
+#define CAUSECODE_SMS_DELIVERY_POSTPONED_MORE_LAST                     63
+
+/* C. Radio Interface Problems:
+*/
+#define CAUSECODE_RADIO_IF_RESOURCE_SHORTAGE                           64
+#define CAUSECODE_RADIO_IF_INCOMPATIBLE                                                65
+#define CAUSECODE_OTHER_RADIO_IF_PROBLEM                                       66
+#define CAUSECODE_OTHER_RADIO_IF_PROBLEM_MORE_FIRST                    67
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_RADIO_IF_PROBLEM */
+#define CAUSECODE_OTHER_RADIO_IF_PROBLEM_MORE_LAST                     95
+
+/* D. General Problems:
+*/
+#define CAUSECODE_UNEXPECTED_PARM_SIZE                                         96
+#define CAUSECODE_SMS_ORIGINATION_DENIED                                       97
+#define CAUSECODE_SMS_TERMINATION_DENIED                                       98
+#define CAUSECODE_SUPPL_SERVICE_NOT_SUPPORTED                          99
+#define CAUSECODE_SMS_NOT_SUPPORTED                                                    100
+#define CAUSECODE_RESERVED_101                                                         101
+#define CAUSECODE_MISSING_EXPECTED_PARM                                                102
+#define CAUSECODE_MISSING_MANDATORY_PARM                                       103
+#define CAUSECODE_UNRECOGNIZED_PARM_VALUE                                      104
+#define CAUSECODE_UNEXPECTED_PARM_VALUE                                                105
+#define CAUSECODE_USER_DATA_SIZE_ERROR                                         106
+#define CAUSECODE_OTHER_GENERAL_PROBLEMS                                       107
+#define CAUSECODE_OTHER_GENERAL_PROBLEMS_MORE_FIRST                    108
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_GENERAL_PROBLEMS */
+#define CAUSECODE_OTHER_GENERAL_PROBLEMS_MORE_LAST                     255
+
+//------------------------------------------------------------------------------
+// PARAMID_MESSAGE_ID                          0x07    /* Message Identifier */
+//------------------------------------------------------------------------------
+/* MESSAGE_TYPE
+*/
+#define MESSAGETYPE_DELIVER                            0x01
+#define MESSAGETYPE_SUBMIT                             0x02
+#define MESSAGETYPE_CANCEL                             0x03
+#define MESSAGETYPE_DELIVERY_ACK               0x04
+#define MESSAGETYPE_USER_ACK                   0x05
+
+/* MESSAGE_ID
+*/
+// 2 bytes :    Range : 0 - 65535
+
+//------------------------------------------------------------------------------
+// PARAMID_USER_DATA                                   0x08    /* User Data */
+//------------------------------------------------------------------------------
+/* MESSAGE_ENCODING
+*/
+#define MSGENCODING_UNSPECIFIED                                                0x00    /* OCTET */
+#define MSGENCODING_IS91_EXTENDED_PROTOCOL                     0x01    /* */
+#define MSGENCODING_7BIT_ASCII                                         0x02    /* */
+#define MSGENCODING_IA5                                                                0x03    /* */
+#define MSGENCODING_UNICODE                                                    0x04    /* */
+#define MSGENCODING_SHIFT_JIS                                          0x05    /* */
+#define MSGENCODING_KSC5601                                                    0x06    /* Korean */
+#define MSGENCODING_HEBREW                                                     0x07    /* ISO_8859_8 */
+#define MSGENCODING_LATIN                                                      0x08    /* ISO_8859_1 */
+#define MSGENCODING_KSC5601_3PCS                                               0x10    /* Korean Standard */
+
+#define        MAXLENGTH_SMS_USER_DATA                                         160
+//------------------------------------------------------------------------------
+// PARAMID_USER_RESPONSE_CODE          0x09    /* User Response Code */
+//------------------------------------------------------------------------------
+/* USER_RESPONSE_CODE
+*/
+// This field value depends on the Teleservices or the carrier
+// This field had used in the Interactive Teleservices in Korea
+// currently the wireless service carriers adopt the browser( WAP,etc )
+// instead of SMS protocol in order to serve the interactive teleservice.
+
+//------------------------------------------------------------------------------
+// PARAMID_MC_TIME_STAMP                               0x0A    /* Message Center Time Stamp */
+//------------------------------------------------------------------------------
+
+/* YEAR
+*/
+// 4bit BCD Code,  example : if the year is 2002, the YEAR field contains 0x02.
+
+/* MONTH
+*/
+// 1 ~ 12 ( in decimal )
+
+/* DAY
+*/
+// 1 ~ 31( in decimal )
+
+/* HOUR
+*/
+// 0 ~ 23 ( in decimal )
+
+/* MINUTE
+*/
+// 0 ~ 59 ( in decimal )
+
+/* SECOND
+*/
+// 0 ~ 59 ( in decimal )
+
+//------------------------------------------------------------------------------
+// PARAMID_VALIDITY_PERIOD_ABS         0x0B    /* Validity Period - Absolute */
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// PARAMID_VALIDITY_PERIOD_REL         0x0C    /* Validiry Period - Relative */
+//------------------------------------------------------------------------------
+/* VALIDITY
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_DEFERRED_DELIVERY_ABS               0x0D    /* Deferred Delivery Time - Absolute */
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// PARAMID_DEFERRED_DELIVERY_REL               0x0E    /* Deferred Delivery Time - Relative */
+//------------------------------------------------------------------------------
+/* DELIVERY_TIME
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_PRIORITY                                    0x0F    /* Priority Indicator */
+//------------------------------------------------------------------------------
+#define PRIORITY_NORMAL                                        0x00
+#define PRIORITY_INTERACTIVE                   0x01
+#define PRIORITY_URGENT                                        0x02
+#define PRIORITY_EMERGENCY                             0x03
+
+//------------------------------------------------------------------------------
+// PARAMID_PRIVACY                                     0x10    /* Privacy Indicator */
+//------------------------------------------------------------------------------
+#define PRIVACY_NOT_RESTRICTED                 0x00
+#define PRIVACY_RESTRICTED                             0x01
+#define PRIVACY_CONFIDENTIAL                   0x02
+#define PRIVACY_SECRET                                 0x03
+
+//------------------------------------------------------------------------------
+// PARAMID_REPLY_OPTION                                0x11    /* Reply Option */
+//------------------------------------------------------------------------------
+
+// USER_ACK_REQ : user ack requested
+#define SMS_USER_ACK_NOT_REQUESTED             0x00
+#define SMS_USER_ACK_REQUESTED                 0x01
+
+// DAK_REQ : delivery ack requested
+#define SMS_DELIVERY_ACK_NOT_REQUESTED 0x00
+#define SMS_DELIVERY_ACK_REQUESTED             0x01
+
+//------------------------------------------------------------------------------
+// PARAMID_NUMBER_OF_MESSAGE                   0x12    /* Number of Messages : Voice Mail Count */
+//------------------------------------------------------------------------------
+/* MESSAGE_COUNT : voice mail count ( 0 - 99 )
+*/
+// refer to            MAXLENGTH_SMS_VOICE_MAIL_COUNT          99
+
+//------------------------------------------------------------------------------
+// PARAMID_ALERT_ON_DELIVERY                   0x13    /* Alert on Message Delivery */
+//------------------------------------------------------------------------------
+// IS-637B Feature : not yet adopted
+//             IPC_ALERT_PRIORITY_DEFAULT                      0x00    /* mobile default */
+//             IPC_ALERT_PRIORITY_LOW                          0x01    /* low priority alert: This alert is defined by the mobile station */
+//             IPC_ALERT_PRIORITY_MED                          0x02    /* medium priority alert : This alert is defined by the mobile station */
+//             IPC_ALERT_PRIORITY_HIGH                         0x03    /* high priority alert : This alert is defined by the mobile station */
+
+//------------------------------------------------------------------------------
+// PARAMID_LANGUAGE                                    0x14    /* Langauge Indicator */
+//------------------------------------------------------------------------------
+#define IPC_LANGUAGE_UNKNOWN                           0x00
+#define IPC_LANGUAGE_ENGLISH                           0x01
+#define IPC_LANGUAGE_FRENCH                                    0x02
+#define IPC_LANGUAGE_SPANISH                           0x03
+#define IPC_LANGUAGE_JAPANESE                          0x04
+#define IPC_LANGUAGE_KOREAN                                    0x05
+#define IPC_LANGUAGE_CHINESE                           0x06
+#define IPC_LANGUAGE_HEBREW                                    0x07
+#define IPC_LANGUAGE_KOREAN1                           0x40    /* Used in korean 3 PCS's and STI */
+#define IPC_LANGUAGE_KOREAN_SKT                                0xFE    /* Used in only SKT  */
+
+//------------------------------------------------------------------------------
+// PARAMID_CALLBACK                                    0x15    /* Call Back Number */
+//------------------------------------------------------------------------------
+/* DIGIT_MODE : CHARi[] filed�� 4bit dtmf code���� 8bit code������ ï¿½Ç¹ï¿½ï¿½Ñ´ï¿½.
+*/
+// refer to :
+//             DIGITMODE_4BITDTMF                      0x00
+//             DIGITMODE_8BITCODE                      0x01
+
+/* NUMBER_TYPE
+*/
+// refer to :
+//             NUMBER_TYPE_UNKNOWN                     0x00
+//             NUMBER_TYPE_INTERNATIONAL               0x01
+//             NUMBER_TYPE_NATIONAL                    0x02
+//             NUMBER_TYPE_NETWORK                     0x03
+//             NUMBER_TYPE_SUBSCRIBER          0x04
+//             NUMBER_TYPE_RESERVED_5          0x05
+//             NUMBER_TYPE_ABREVIATED          0x06
+//             NUMBER_TYPE_RESERVED_7          0x07
+
+/* NUMBER_PLAN
+*/
+// refer to :
+//             NUMBER_PLAN_UNKNOWN                     0x00
+//             NUMBER_PLAN_TELEPHONY                   0x01    /* CCITT E.164 and E.163,  including ISDN plan */
+//             NUMBER_PLAN_RESERVED_2          0x02
+//             NUMBER_PLAN_DATA                                0x03    /* CCITT X.121 */
+//             NUMBER_PLAN_TELEX                               0x04    /* CCITT F.69 */
+//             NUMBER_PLAN_RESERVED_5          0x05
+//             NUMBER_PLAN_RESERVED_6          0x06
+//             NUMBER_PLAN_RESERVED_7          0x07
+//             NUMBER_PLAN_RESERVED_8          0x08
+//             NUMBER_PLAN_PRIVATE                     0x09
+//             NUMBER_PLAN_RESERVED_10         0x0A
+//             NUMBER_PLAN_RESERVED_11         0x0B
+//             NUMBER_PLAN_RESERVED_12         0x0C
+//             NUMBER_PLAN_RESERVED_13         0x0D
+//             NUMBER_PLAN_RESERVED_14         0x0E
+//             NUMBER_PLAN_RESERVED_15         0x0F
+
+/* NUM_FIELDS
+*/
+// refer to :
+//             MAXLENGTH_SMS_ADDRESS                   32
+
+/* CHARi
+*/
+
+//------------------------------------------------------------------------------
+// IPC_SMSPARAMID_DISPLAY_MODE                         0x16    /* Display Mode */
+//------------------------------------------------------------------------------
+// IS-637B Feature : not yet adopted
+
+
+//------------------------------------------------------------------------------
+// IPC_SMSPARAMID_MULTI_ENCODING_USER_DATA     0x17    /* Multiply Encoding User Data */
+//------------------------------------------------------------------------------
+// refer to :
+
+// Teleservice Identifier
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned short                  teleserv_id;
+} packed__ ParamTeleserv_t;
+
+// Broadcast Service Category
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned short                  category;
+} packed__ ParamBcServCat_t;
+
+// Address
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   digit;
+       unsigned char                   num;
+       unsigned char                   numtype;
+       unsigned char                   numplan;
+       unsigned char                   len;
+       unsigned char                   CHARi[MAXLENGTH_SMS_ADDRESS];
+} packed__ ParamAddress_t;
+
+// Sub-Address
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   type;
+       unsigned char                   odd;
+       unsigned char                   len;
+       unsigned char                   CHARi[MAXLENGTH_SMS_ADDRESS];
+} packed__ ParamSubAddress_t;
+
+// Bearer Reply Option
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned short                  repyseq;
+} packed__ ParamBearerReplyOption_t;
+
+// Cause Codes
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   repyseq;
+       unsigned char                   class;
+       unsigned char                   code;
+} packed__ ParamErrorCause_t;
+
+// Message Identifier
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   type;
+       unsigned short                  msg_id;
+} packed__ ParamMsgId_t;
+
+// User Data
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   encoding;
+       unsigned char                   len;
+       unsigned char                   CHARi[MAXLENGTH_SMS_USER_DATA];
+} packed__ ParamUserData_t;
+
+// User Response code
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   code;
+} packed__ ParamUserResp_t;
+
+// Message Center Time Stamp, Validity Period, Deferred Delivery Time
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   year;
+       unsigned char                   month;
+       unsigned char                   day;
+       unsigned char                   hours;
+       unsigned char                   minutes;
+       unsigned char                   seconds;
+} packed__ ParamValidPeriodA_t, ParamDefDeliverTimeA_t;
+
+// Validity Period - Relative
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   valid;
+} packed__ ParamValidPeriodR_t, ParamDefDeliverTimeR_t;
+
+// Priority Indicator, Alert on Message Delivery
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   priority;
+} packed__ ParamPriority_t, ParamAlertPriority_t;
+
+// Privacy Indicator
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   privacy;
+} packed__ ParamPrivacy_t;
+
+// Reply Option
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   user_ack;
+       unsigned char                   delivery_ack;
+} packed__ ParamReplyOption_t;
+
+// Number of Messages
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   count;
+} packed__ ParamNumOfMsg_t;
+
+// Language indicator
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   language;
+} packed__ ParamLangInd_t;
+
+// Message display Mode
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   disply_mode;
+} packed__ ParamMsgDisplayMode_t;
+
+// Address
+typedef struct{
+       unsigned char                   param_id;
+       unsigned char                   param_len;
+       unsigned char                   digit;
+       unsigned char                   numtype;
+       unsigned char                   numplan;
+       unsigned char                   len;
+       unsigned char                   CHARi[MAXLENGTH_SMS_ADDRESS];
+} packed__ ParamCallback_t;
+
+typedef struct{
+       unsigned long                   index;
+       unsigned char                   data[255];
+} packed__ Message_t;
+
+void register_sms_event(TelHandle*handle);
+
+#endif //TAPI_SMS_CDMA_H
+// EOF
+
diff --git a/test_src/sms_util.c b/test_src/sms_util.c
new file mode 100644 (file)
index 0000000..51f9130
--- /dev/null
@@ -0,0 +1,567 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "sms_util.h"
+
+/* Utilites */
+
+static char *__AcItoa(int n, char* str, int b)
+{
+       int i = 0;
+
+       do
+               str[i++] = "0123456789ABCDEF"[n%b];
+
+       while ((n /= b) > 0);
+       str[i] = '\0';
+       g_strreverse(str);
+
+       return str;
+}
+
+void sms_util_decode_dcs(SmsCodingScheme *coding_scheme, unsigned char dcs)
+{
+       memset(coding_scheme, 0, sizeof(SmsCodingScheme));
+
+       /* bits 7..4 = 00xx : general data coding indication */
+       if ( dcs < 0x40 ) {
+               coding_scheme->coding_group_type = SMS_CODGRP_SM_GENERAL_DCS;
+
+               /* bit 5 = 1 : indicates the text is compressed */
+               if ( dcs & 0x20 )
+                       coding_scheme->compressed = TRUE;
+
+               /* bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning */
+               if ( dcs & 0x10 ) {
+                       coding_scheme->bmsg_class_set = TRUE;
+
+                       switch ( dcs & 0x03 )  { /* bits 1 to 0 : message class */
+                       case 0x00:
+                               coding_scheme->class_type = SMS_CLASS_0;
+                               break;
+                       case 0x01:
+                               coding_scheme->class_type = SMS_CLASS_1;
+                               break;
+                       case 0x02:
+                               coding_scheme->class_type = SMS_CLASS_2;
+                               break;
+                       case 0x03:
+                               coding_scheme->class_type = SMS_CLASS_3;
+                       }
+               }
+               else /* bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning */
+                       coding_scheme->class_type = SMS_CLASS_NONE;
+
+               switch ( dcs & 0x0C ) { /* bits 4 to 3 : character set */
+               case 0x00:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_DEFAULT;
+                       break;
+               case 0x04:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_8BIT;
+                       break;
+               case 0x08:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_UCS2;
+                       break;
+               case 0x0C:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_MAX;
+               }
+       } else if ( dcs >= 0x40 && dcs < 0x80 ) {
+               /* bits 7..4 = 01xx : message marked for automatic deletion group. bits 5..0
+               are coded exactly the same as group 00xx */
+
+               coding_scheme->coding_group_type = SMS_CODGRP_SM_AUTO_DELETION;
+
+               /* bit 5 = 1 : indicates the text is compressed */
+               if ( dcs & 0x20 )
+                       coding_scheme->compressed = TRUE;
+
+               /* bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning */
+               if ( dcs & 0x10 ) {
+                       coding_scheme->bmsg_class_set = TRUE;
+
+                       switch ( dcs & 0x03 ) { /* bits 1 to 0 : message class */
+                       case 0x00:
+                               coding_scheme->class_type = SMS_CLASS_0;
+                               break;
+                       case 0x01:
+                               coding_scheme->class_type = SMS_CLASS_1;
+                               break;
+                       case 0x02:
+                               coding_scheme->class_type = SMS_CLASS_2;
+                               break;
+                       case 0x03:
+                               coding_scheme->class_type = SMS_CLASS_3;
+                       }
+               }
+               else /* bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning */
+                       coding_scheme->class_type = SMS_CLASS_NONE;
+
+               switch ( dcs & 0x0C ) { /* bits 4 to 3 : character set */
+               case 0x00:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_DEFAULT;
+                       break;
+               case 0x04:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_8BIT;
+                       break;
+               case 0x08:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_UCS2;
+                       break;
+               case 0x0C:
+                       coding_scheme->alphabet_type = SMS_ALPHABET_MAX;
+               }
+       }
+       /* bits 7..4 = 1000 ~ 1011 : reserved */
+       /* bits 7..4 = 1100 : message waiting indication group, discard message */
+       else if ( dcs == 0xC0 ) {
+               coding_scheme->coding_group_type = SMS_CODGRP_SM_WAITING_DISCARD;
+       }
+       else if ( dcs < 0xE0 ) {
+               coding_scheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE;
+
+               if ( dcs & 0x08 )
+                       coding_scheme->bmsg_ind_active = TRUE;
+
+               switch ( dcs & 0x03 ) {
+               case 0x00:
+                       coding_scheme->waiting_type = SMS_WAITING_VOICE_MSG;
+                       break;
+               case 0x01:
+                       coding_scheme->waiting_type = SMS_WAITING_FAX_MSG;
+                       break;
+               case 0x02:
+                       coding_scheme->waiting_type = SMS_WAITING_EMAIL_MSG;
+                       break;
+               case 0x03:
+                       coding_scheme->waiting_type = SMS_WAITING_OTHER_MSG;
+               }
+       }
+       else if ( dcs < 0xF0 ) {
+               coding_scheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE_UCS2;
+
+               if ( dcs & 0x08 )
+                       coding_scheme->bmsg_ind_active = TRUE;
+
+               switch ( dcs & 0x03 ) {
+               case 0x00:
+                       coding_scheme->waiting_type = SMS_WAITING_VOICE_MSG;
+                       break;
+               case 0x01:
+                       coding_scheme->waiting_type = SMS_WAITING_FAX_MSG;
+                       break;
+               case 0x02:
+                       coding_scheme->waiting_type = SMS_WAITING_EMAIL_MSG;
+                       break;
+               case 0x03:
+                       coding_scheme->waiting_type = SMS_WAITING_OTHER_MSG;
+               }
+       }
+       else {
+               coding_scheme->coding_group_type = SMS_CODGRP_SM_CLASS_CODING;
+
+               if ( dcs & 0x04 )
+                       coding_scheme->alphabet_type = SMS_ALPHABET_8BIT;
+
+               switch ( dcs & 0x03 ) {
+                       case 0x00:
+                               coding_scheme->class_type = SMS_CLASS_0;
+                               break;
+                       case 0x01:
+                               coding_scheme->class_type = SMS_CLASS_1;
+                               break;
+                       case 0x02:
+                               coding_scheme->class_type = SMS_CLASS_2;
+                               break;
+                       case 0x03:
+                               coding_scheme->class_type = SMS_CLASS_3;
+               }
+       }
+}
+
+void sms_util_convert_bcd_2_digit( char* digits, char* bcd, int digit_len )
+{
+       int i, bcd_len;
+       char c[2];
+       unsigned char higher, lower;
+
+       if ( bcd == NULL || digits == NULL ) {
+               msg( " sms_util_convert_bcd_2_digit: bcd == NULL || digits == NULL. return.\n " );
+               return;
+       }
+
+       if ( digit_len == 0 ) {
+               //printf("__SmsConvertBCD2Digit: digit_len == 0. return.\n" );
+               digits[0] = 0x00;
+               return;
+       }
+
+       bcd_len = (digit_len + 1) / 2;
+
+       memset( digits, 0, bcd_len * 2 );
+
+       for ( i = 0; i < bcd_len; i++ ) {
+               lower = bcd[i] & 0x0F; // get low nibble
+
+               if ( lower == 0x0A )
+                       lower = '*';
+               else if ( lower == 0x0B )
+                       lower = '#';
+               else if ( lower == 0x0C )
+                       lower = 'p'; //DTMF Control digits seperator
+               else if ( lower == 0x0F )
+                       lower = 0;
+               else {
+                       __AcItoa( lower, c, 16 );
+                       lower = g_ascii_toupper(c[0]);
+               }
+
+               higher = ( bcd[i] >> 4 ) & 0x0F; // get high nibble
+
+               if ( higher == 0x0A )
+                       higher = '*'; // =0x2A
+               else if ( higher == 0x0B )
+                       higher = '#'; // =0x23
+               else if ( higher == 0x0C )
+                       higher = 'p'; // =0x70, DTMF Control digits seperator
+               else if ( higher == 0x0F ) { // if higher semi-octet is 0x0F, filled bits.
+                       //higher = 0;
+                       sprintf(digits + strlen(digits), "%c", lower);
+                       digits[/*digit_len-1*/bcd_len*2-1] = '\0';
+
+                       //printf("__SmsConvertBCD2Digit: digits [%s].\n", digits        );
+
+                       return;
+               }
+               else {
+                       __AcItoa(higher, c, 16);
+                       higher = g_ascii_toupper(c[0]);
+               }
+
+               //sprintf(digits, "%s%c%c", digits, lower, higher);
+               sprintf(digits + strlen(digits), "%c%c", lower, higher);
+       }
+
+       digits[digit_len] = '\0';
+
+       //printf("__SmsConvertBCD2Digit: digits [%s].\n", digits        );
+}
+
+char *sms_util_unpack_gsm_code(char *sz_data, const char *in, int in_len )
+{
+       int i;
+       int pos = 0;
+       int shift = 0;
+
+       for ( i = 0; i < in_len; i++, pos++ ) {
+               sz_data[i] = ( in[pos] << shift ) & 0x7F;
+
+               if ( pos != 0 ) {
+                       /* except the first byte, a character contains some bits
+                       ** from the previous byte.
+                       */
+                       sz_data[i] |= in[pos-1] >> (8-shift);
+               }
+               shift ++;
+
+               if ( shift == 7 ) {
+                       shift = 0;
+
+                       /* a possible extra complete character is available */
+                       i++;
+                       sz_data[i] = in[pos] >> 1;
+
+                       if( sz_data[i] == 0 ) {
+                               /* this is the end of the input, quit */
+                               break;
+                       }
+               }
+       }
+       return sz_data;
+}
+
+int sms_util_decode_addr_field(char *dialling_num, char* addr_field, int *result_ton, int *result_npi)
+{
+       int index = 0;
+       int ton, npi;
+       int dial_num_len = 0;
+
+       ton = ( addr_field[index+1] & 0x70 ) >> 4;
+       npi = addr_field[index+1] & 0x0F;
+
+       if ( ton != SMS_TON_ALPHA_NUMERIC ) {
+               dial_num_len = addr_field[index++];
+       } else {
+               dial_num_len = ( ( ( addr_field[index++] + 1 ) / 2 ) * 8 ) / 7;
+       }
+
+       if ( dial_num_len > SMS_ADDRESS_LEN_MAX ) {
+               dial_num_len = SMS_ADDRESS_LEN_MAX;
+       }
+
+       msg(" dial_num_len = %d\n", dial_num_len );
+
+       index++; /* ignore Type of Address field */
+
+       if (ton != SMS_TON_ALPHA_NUMERIC ) {
+               sms_util_convert_bcd_2_digit( dialling_num, (char*) &addr_field[index], dial_num_len );
+       } else {
+               sms_util_unpack_gsm_code( dialling_num, &addr_field[index], dial_num_len );
+       }
+
+       msg(  "sms_util_decode_addr_field: dialling_num [%s].\n", (char*) dialling_num  );
+
+       *result_ton=ton;
+       *result_npi=npi;
+
+       msg("ton %d npi %d\n", ton, npi);
+
+       return dial_num_len;
+}
+
+TmDateTime *sms_util_decode_time_stamp(char *time_stamp, TmDateTime *tm_date_time )
+{
+       char buf[3];
+
+       if ( time_stamp == NULL )
+               return NULL;
+
+       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[0], 2 );
+       tm_date_time->year = atoi( buf ) + 2000;
+       if ( ( tm_date_time->year >= 1900 + MAX_YEAR )/* && ( tm_date_time->year < 2000 + BASE_YEAR )*/ )
+               tm_date_time->year -= 100;
+       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[1], 2 );
+       tm_date_time->month = atoi( buf );
+       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[2], 2 );
+       tm_date_time->day = atoi( buf );
+       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[3], 2 );
+       tm_date_time->hour = atoi( buf );
+       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[4], 2 );
+       tm_date_time->minute = atoi( buf );
+       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[5], 2 );
+       tm_date_time->second = atoi( buf );
+
+       if ( ( tm_date_time->year < 1900 + BASE_YEAR ) || ( tm_date_time->year > 1900 + MAX_YEAR ) )
+               tm_date_time->year = 1900 + BASE_YEAR;
+
+       return tm_date_time;
+}
+
+void sms_util_convert_digit_2_bcd( char *bcd, char *digits, int digit_len )
+{
+       int i, j, digit;
+       unsigned char higher, lower;
+
+       if ( bcd == NULL || digits == NULL )
+               return;
+
+       // 0123456789 -> 1032547698
+       for ( i = 0, j = 0; i < digit_len; i = i + 2, j++ )
+       {
+               if ( digits[i] == '*' )
+                       digit = 0x0A;
+               else if ( digits[i] == '#' )
+                       digit = 0x0B;
+               else if (g_ascii_toupper(digits[i]) == 'P' )
+                       digit = 0x0C;
+               else
+                       digit = (int) ( digits[i] - '0' );
+
+               lower = digit & 0x0F;
+
+               if ( digit_len != i + 1 ) {
+                       if ( digits[i+1] == '*' )
+                               digit = 0x0A;
+                       else if ( digits[i+1] == '#' )
+                               digit = 0x0B;
+                       else if (g_ascii_toupper(digits[i+1]) == 'P' )
+                               digit = 0x0C;
+                       else
+                               digit = (int) ( digits[i+1] - '0' );
+
+                       higher = digit & 0x0F;
+               } else {
+                       higher = 0xFF;
+               }
+
+               bcd[j] = ( higher << 4 ) | lower;
+       }
+}
+
+int sms_util_pack_gsm_code( unsigned char *out, const char *data, int in_len )
+{
+       int i;
+       int pos;
+       int shift = 0;
+
+       for( pos = 0, i = 0; i < in_len; pos++, i++ ) {
+               /* pack the low bits */
+               out[pos] = data[i] >> shift;
+
+               if ( i + 1 < in_len ) {
+                       /* pack the high bits using the low bits of the next character */
+                       out[pos] |= data[i+1] << ( 7 - shift );
+                       shift++;
+                       if( shift == 7 ) {
+                               shift = 0;
+                               i++;
+                       }
+               }
+       }
+
+       /* done */
+       return pos;
+}
+
+int sms_util_encode_addr_field(unsigned char *addr_field, char* dialling_num,
+       int dial_num_len, int ton, int npi)
+{
+       int index = 0;
+
+       if ( dialling_num == NULL || addr_field == NULL )
+               return -1;
+
+       if ( dialling_num[0] == '+' ) {
+               dialling_num++;
+               dial_num_len--;
+               ton = SMS_TON_INTERNATIONAL;
+       }
+
+       if ( ton != SMS_TON_ALPHA_NUMERIC ) {
+               addr_field[index++] = (unsigned char)dial_num_len;
+       } else {
+               addr_field[index] = (unsigned char) ( ( ( dial_num_len * 7 + 7 ) / 8 ) * 2 );
+               if ( ( ( dial_num_len * 7 ) % 8 ) <= 4 )
+                       addr_field[index]--;
+
+               msg(" addr len packet: %d out of SMS_TON_ALPAHA\n", addr_field[index]);
+               index++;
+       }
+
+       SET_TON_NPI(addr_field[index], ton, npi);
+
+       index++;
+
+       if ( ton != SMS_TON_ALPHA_NUMERIC ) {
+               sms_util_convert_digit_2_bcd( (char*) &addr_field[index], (char*) dialling_num, dial_num_len );
+               index += (dial_num_len + 1) / 2;
+       } else {
+               index += sms_util_pack_gsm_code( &addr_field[index], dialling_num, (int) dial_num_len );
+       }
+
+       return index;
+}
+
+void sms_util_encode_dcs( unsigned char *result_dcs, SmsCodingScheme *coding_scheme )
+{
+       unsigned char dcs = 0x00;
+
+       if( coding_scheme->coding_group_type == SMS_CODGRP_SM_GENERAL_DCS ) { // bit 7..4 is 00xx
+               if ( coding_scheme->compressed )
+                       dcs |= 0x20; // bit 5 is 1
+               if ( coding_scheme->bmsg_class_set ) {
+                       dcs |= 0x10; // bit 4 is 1
+                       if( coding_scheme->class_type== SMS_CLASS_0 )
+                               dcs |= 0x00;
+                       else if ( coding_scheme->class_type == SMS_CLASS_1 )
+                               dcs |= 0x01;
+                       else if ( coding_scheme->class_type == SMS_CLASS_2 )
+                               dcs |= 0x02;
+                       else if ( coding_scheme->class_type == SMS_CLASS_3 )
+                               dcs |= 0x03;
+               }
+
+               switch ( coding_scheme->alphabet_type ) {
+               case SMS_ALPHABET_DEFAULT: // bit 3..2 is 00
+                       dcs |= 0x00;
+                       break;
+               case SMS_ALPHABET_8BIT: // bit 3..2 is 01
+                       dcs |= 0x04;
+                       break;
+               case SMS_ALPHABET_UCS2: // bit 3..2 is 10
+                       dcs |= 0x08;
+                       break;
+               default: // bit 3..2 is 11
+                       dcs |= 0x0C;
+               }
+       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_WAITING_DISCARD ) { // bit 7..4 is 1100
+               dcs |= 0xC0;
+       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE ) { // bit 7..4 is 1101
+               dcs |= 0xD0;
+               if ( coding_scheme->bmsg_ind_active ) // bit 3..2 is 10
+                       dcs |= 0x08;
+               else if( coding_scheme->waiting_type == SMS_WAITING_VOICE_MSG)
+                       dcs |= 0x00;
+               else if( coding_scheme->waiting_type == SMS_WAITING_FAX_MSG)
+                       dcs |= 0x01;
+               else if( coding_scheme->waiting_type == SMS_WAITING_EMAIL_MSG) // bit 1..0 is 10
+                       dcs |= 0x02;
+               else if( coding_scheme->waiting_type == SMS_WAITING_OTHER_MSG) // bit 1..0 is 11
+                       dcs |= 0x03;
+       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE_UCS2 ) { // bit 7..4 is 1110
+               dcs |= 0xE0;
+               if ( coding_scheme->bmsg_ind_active ) // bit 3..2 is 10
+                       dcs |= 0x08;
+               if( coding_scheme->waiting_type == SMS_WAITING_VOICE_MSG ) // bit 1..0 is 00
+                       dcs |= 0x00;
+               else if( coding_scheme->waiting_type == SMS_WAITING_FAX_MSG )
+                       dcs |= 0x01;
+               else if( coding_scheme->waiting_type == SMS_WAITING_EMAIL_MSG )
+                       dcs |= 0x02;
+               else if( coding_scheme->waiting_type == SMS_WAITING_OTHER_MSG )
+                       dcs |= 0x03;
+       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_CLASS_CODING ) { // bit 7..4 is 1111
+               dcs |= 0xF0;
+               if( coding_scheme->alphabet_type == SMS_ALPHABET_DEFAULT ) // bit 2 is 0
+                       dcs |= 0x00;
+               else if( coding_scheme->alphabet_type == SMS_ALPHABET_8BIT ) // bit 2 is 1
+                       dcs |= 0x04;
+               if( coding_scheme->class_type == SMS_CLASS_0) // bit 1..0 is 00
+                       dcs |= 0x00;
+               else if( coding_scheme->class_type == SMS_CLASS_1) // bit 1..0 is 01
+                       dcs |= 0x01;
+               else if( coding_scheme->class_type == SMS_CLASS_2) // bit 1..0 is 10
+                       dcs |= 0x02;
+               else if( coding_scheme->class_type == SMS_CLASS_3) // bit 1..0 is 11
+                       dcs |= 0x03;
+       }
+       memcpy( result_dcs, &dcs, sizeof ( unsigned char ) );
+}
+
+unsigned char sms_util_encode_validity( unsigned char *validity, SmsVp *vp )
+{
+       unsigned char pos = 0;
+
+       switch( vp->vp_type ) {
+       case SMS_VP_NOT_USED:
+       case SMS_VP_ENHANCED:
+               break;
+       case SMS_VP_RELATIVE:
+               validity[pos] = (unsigned char) vp->vp_value;
+               pos ++;
+               break;
+       case SMS_VP_ABSOLUTE:
+               //TO DO
+               //SmsUtilEncodeTimeStamp( validity, vp->vpValue );
+               pos += 7;
+       }
+       return pos;
+}
+
diff --git a/test_src/sms_util.h b/test_src/sms_util.h
new file mode 100644 (file)
index 0000000..ca369b8
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <pthread.h>     /* pthread functions and data structures */
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include "assert.h"
+#include "glib.h"
+#include "menu.h"
+
+#define SMS_ADDRESS_LEN_MAX 20
+
+#define BASE_YEAR 70L /* 1970 is the base year */
+#define MAX_YEAR 130L /* 2030 is the max year */
+
+#define SET_TON_NPI(dest, ton, npi) { \
+       dest = 0x80; \
+       dest |= (ton & 0x07) << 4; \
+       dest |= npi & 0x0F; \
+}
+
+typedef enum
+{
+       SMS_CODGRP_SM_GENERAL_DCS,
+       SMS_CODGRP_CB_GENERAL_LANG,
+       SMS_CODGRP_CB_ALPHA,
+       SMS_CODGRP_CB_RES1,
+       SMS_CODGRP_CB_RES2,
+       SMS_CODGRP_SM_AUTO_DELETION, /* 01xx Bits 5..0 are coded the same as SM_GENERAL_DCS */
+       SMS_CODGRP_CB_GENERAL_DCS, /* 01xx behavior is as SM_GENERAL_DCS */
+       SMS_CODGRP_SM_WAITING_DISCARD,
+       SMS_CODGRP_SM_WAITING_STORE,
+       SMS_CODGRP_SM_WAITING_STORE_UCS2,
+       SMS_CODGRP_CB_WAP,
+       SMS_CODGRP_SM_CLASS_CODING,
+       SMS_CODGRP_CB_CLASS_CODING,
+       SMS_CODGRP_MAX
+} SmsCodingGroupType;
+
+typedef enum
+{
+        SMS_WAITING_VOICE_MSG, /* voice message waiting */
+        SMS_WAITING_FAX_MSG, /* FAX message waiting */
+        SMS_WAITING_EMAIL_MSG, /* E-mail waiting */
+        SMS_WAITING_OTHER_MSG, /* Other message waiting */
+        SMS_WAITING_MAX
+} SmsWaitingType;
+
+typedef enum
+{
+       SMS_ALPHABET_DEFAULT, /* GSM alphabet default 7bit */
+       SMS_ALPHABET_8BIT, /* 8bit */
+       SMS_ALPHABET_UCS2, /* 16bit ucs2 */
+       SMS_ALPHABET_KSC5601, /* for Korean */
+       SMS_ALPHABET_MAX
+} SmsAlphabetType;
+
+typedef enum
+{
+       SMS_CLASS_0, /* display immediately */
+       SMS_CLASS_1, /* may be stored */
+       SMS_CLASS_2, /* store in SIM */
+       SMS_CLASS_3, /* transfer to TE */
+       SMS_CLASS_NONE,
+       SMS_CLASS_MAX
+} SmsClassType;
+
+typedef enum
+{
+       SMS_TON_UNKNOWN = 0, /**< unknown */
+       SMS_TON_INTERNATIONAL=1, /**< international number */
+       SMS_TON_NATIONAL = 2, /**< national number */
+       SMS_TON_NETWORK_SPECIFIC = 3, /**< network specific number */
+       SMS_TON_DEDICATED_ACCESS = 4, /**< subscriber number */
+       SMS_TON_ALPHA_NUMERIC = 5, /**< alphanumeric, GSM 7-bit default alphabet) */
+       SMS_TON_ABBREVIATED_NUMBER = 6, /**< abbreviated number */
+       SMS_TON_RESERVED_FOR_EXT = 7 /**< reserved for extension */
+} SimTon;
+
+typedef enum
+{
+       SMS_TPDU_DELIVER = 0x00, // sc -> ms
+       SMS_TPDU_DELIVER_REPORT = 0x00, // ms -> sc
+       SMS_TPDU_SUBMIT = 0x01, // ms -> sc
+       SMS_TPDU_SUBMIT_REPORT = 0x01, // sc -> ms
+       SMS_TPDU_STATUS_REPORT = 0x02, // sc -> ms
+       SMS_TPDU_COMMAND = 0x02, // ms -> sc
+       SMS_PDU_INVALID_TYPE
+} SmsTpduType;
+
+typedef enum
+{
+       SMS_NPI_UNKNOWN = 0, /**< Unknown */
+       SMS_NPI_ISDN_TEL = 1, /**< ISDN/Telephone numbering plan */
+       SMS_NPI_DATA_NUMBERING_PLAN = 3, /**< Data numbering plan */
+       SMS_NPI_TELEX = 4, /**< Telex numbering plan */
+       SMS_NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /**< Service Center Specific plan */
+       SMS_NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6, /**< Service Center Specific plan */
+       SMS_NPI_NATIONAL = 8, /**< National numbering plan */
+       SMS_NPI_PRIVATE = 9, /**< Private numbering plan */
+       SMS_NPI_ERMES_NUMBERING_PLAN = 10, /**< ERMES numbering plan */
+       SMS_NPI_RESERVED_FOR_EXT = 0xF /**< Reserved for extension */
+} SimNumberingPlanIdentity;
+
+typedef enum
+{
+       SMS_VP_NOT_USED = 0, /**< validity period not used */
+       SMS_VP_RELATIVE = 2, /**< after a predetermined time period after the service center has received the message */
+       SMS_VP_ABSOLUTE = 3,
+       SMS_VP_ENHANCED = 1,
+       SMS_VP_MAX
+} SmsVpType;
+
+typedef enum
+{
+       SMS_VP_REL_1H,          /**< One hour */
+       SMS_VP_REL_6H,          /**< Six hours */
+       SMS_VP_REL_12H, /**< Twelve hours */
+       SMS_VP_REL_1D,          /**< One day */
+       SMS_VP_REL_3D,          /**< Three days */
+       SMS_VP_REL_1W,          /**< One week */
+       SMS_VP_REL_1M,          /**< One Month */
+       SMS_VP_REL_MAX          /**< Max = 63 weeks */
+} SmsVpRelValue;
+
+typedef struct
+{
+       gboolean compressed; /* if text is compressed this is TRUE */
+       gboolean bmsg_class_set; /* message class indication. if TRUE = bits 1..0, if FALSE = reserved */
+       gboolean bmsg_ind_active; /* message indication group. if TRUE = on, FALSE = off */
+       SmsCodingGroupType coding_group_type; /* Coding group, GSM 03.38 */
+       SmsWaitingType waiting_type; /* Type of message waiting */
+       SmsAlphabetType alphabet_type; /* How to encode a message. */
+       SmsClassType class_type; /* The message class */
+} SmsCodingScheme;
+
+typedef struct {
+       unsigned int dial_num_len; /**< length of address. If Service center address is not set, then this will be zero */
+       SimTon ton; /**< Type of number*/
+       SimNumberingPlanIdentity npi; /**<Numbering plan identification*/
+       unsigned char sz_dialling_num[SMS_ADDRESS_LEN_MAX + 1]; /**< destination address. If Address not set, then set to 0xFF */
+} SmsAddrInfo;
+
+typedef struct
+{
+       int year;
+       int month;
+       int day;
+       int hour;
+       int minute;
+       int second;
+} TmDateTime;
+
+typedef struct
+{
+       /************HEADER************/
+       SmsTpduType msg_type;   //bit 0 ,1
+       int mms; // bit 2
+       int rp; // bit 7
+       int udhi;  //bit 6
+       int sri; // bit , 5status_report_indication
+
+       /************BODY************/
+       SmsAddrInfo org_addr;
+       unsigned char  pid;
+       TmDateTime scts;
+       SmsCodingScheme dcs;
+       unsigned int udl;
+       char  *user_data;
+} TpduSmsDeliver;
+
+typedef struct {
+       unsigned int dial_num_len; /**< length of address. If Service center address is not set, then this will be zero */
+       SimTon ton; /**< Type of number*/
+       SimNumberingPlanIdentity npi; /**<Numbering plan identification*/
+       unsigned char dialling_num[SMS_ADDRESS_LEN_MAX + 1]; /**< destination address. If Address not set, then set to 0xFF */
+} SmsAddressInfo;
+
+typedef struct
+{
+       SmsVpType vp_type; /**< Validity period format */
+       SmsVpRelValue vp_rel_type; /**< Validity period value duration the message must retain in the service center while application attempts delivery */
+       unsigned long vp_value; /** Validity period value */
+} SmsVp;
+
+typedef struct
+{
+       /************HEADER************/
+       SmsTpduType  msg_type; /* bit 0 ,1 (message type) */
+       int rd; /* bit 2 (reject duplicates) */
+       SmsVpType vpf; /* bits 3, 4 (validity period format) */
+       int rp; /* bit 7 (reply path) */
+       int udhi; /* bit 6 (user data header indication) */
+       int  srr; /* bit 5 (status report request) */
+
+       /************BODY************/
+       unsigned int mr; /* (message reference) */
+       SmsAddressInfo dest_addr; /*(destination address) */
+       unsigned char pid; /* (protocol identifier) */
+       SmsCodingScheme dcs; /* (data coding scheme) */
+       SmsVp vp; /* (validity period) */
+       unsigned int udl; /* (user data length) */
+       char *user_data; /* (user data) */
+} TpduSmsSubmit;
+
+typedef struct
+{
+       /************HEADER************/
+       SmsTpduType msg_type; //bit 0 ,1
+       int udhi; //bit 6
+       int mms; //bit 2
+       int srq; //bit 5, status_report_qualifier
+
+       /************BODY************/
+       unsigned int mr;
+       SmsAddressInfo rcp_addr; //recipient_addr
+       TmDateTime scts;
+       TmDateTime dt; //discharge_time
+       unsigned char status;
+       unsigned char para_ind;
+       unsigned char pid;
+       SmsCodingScheme dcs;
+       unsigned int udl;
+       char * user_data;
+}TpduSmsStatusReport;
+
+void sms_util_decode_dcs(SmsCodingScheme *coding_scheme, unsigned char dcs);
+void sms_util_convert_bcd_2_digit( char* digits, char* bcd, int digit_len );
+char *sms_util_unpack_gsm_code(char *sz_data, const char *in, int in_len );
+int sms_util_decode_addr_field(char *dialling_num, char* addr_field, int *result_ton, int *result_npi);
+TmDateTime *sms_util_decode_time_stamp(char *time_stamp, TmDateTime *tm_date_time );
+void sms_util_convert_digit_2_bcd( char *bcd, char *digits, int digit_len );
+int sms_util_pack_gsm_code( unsigned char *out, const char *data, int in_len );
+int sms_util_encode_addr_field(unsigned char *addr_field, char* dialling_num,
+       int dial_num_len, int ton, int npi);
+void sms_util_encode_dcs( unsigned char *result_dcs, SmsCodingScheme *coding_scheme );
+unsigned char sms_util_encode_validity( unsigned char *validity, SmsVp *vp );
+
diff --git a/test_src/ss.c b/test_src/ss.c
new file mode 100644 (file)
index 0000000..e4b6a2a
--- /dev/null
@@ -0,0 +1,639 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <tapi.h>
+#include <tapi_ss.h>
+#include <tapi_events.h>
+
+#include "menu.h"
+#include "ss.h"
+
+#define CHECK_RESULT(result) \
+{\
+       if (result < TEL_SS_RESULT_SUCCESS || result > TEL_SS_RESULT_OPERATION_NOT_PERMITTED) { \
+               msg("API failed with result : %d", result); \
+               return; \
+       } else { \
+               msg("Result[%d] :[%s] ", result, dbg_ss_result[result]); \
+       } \
+       if (result != TEL_SS_RESULT_SUCCESS) \
+               return; \
+}
+
+static char* dbg_ss_result[] = {
+       "TEL_SS_RESULT_SUCCESS",
+       "TEL_SS_RESULT_FAILURE",
+       "TEL_SS_RESULT_INVALID_PARAMETER",
+       "TEL_SS_RESULT_MEMORY_FAILURE",
+       "TEL_SS_RESULT_OPERATION_NOT_SUPPORTED",
+       "TEL_SS_RESULT_SERVICE_NOT_AVAILABLE",
+       "TEL_SS_RESULT_OPERATION_NOT_ALLOWED",
+       "TEL_SS_RESULT_INCORRECT_OPERATION",
+       "TEL_SS_RESULT_INVALID_PASSWORD",
+       "TEL_SS_RESULT_PASSWORD_BLOCKED",
+       "TEL_SS_RESULT_OPERATION_NOT_PERMITTED"
+};
+
+static char data_ss_set_barring_class[MENU_DATA_SIZE + 1] = "10";
+static char data_ss_set_barring_enable[MENU_DATA_SIZE + 1] = "0";
+static char data_ss_set_barring_type[MENU_DATA_SIZE + 1] = "1";
+static char data_ss_set_barring_password[MENU_DATA_SIZE + 1] = "1111";
+
+static char data_ss_get_barring_status_class[MENU_DATA_SIZE + 1] = "16";
+static char data_ss_get_barring_status_type[MENU_DATA_SIZE + 1] = "1";
+
+static char data_ss_change_barring_password_old[MENU_DATA_SIZE + 1] = "1111";
+static char data_ss_change_barring_password_new[MENU_DATA_SIZE + 1] = "1234";
+
+static char data_ss_set_forward_class[MENU_DATA_SIZE + 1] = "16";
+static char data_ss_set_forward_mode[MENU_DATA_SIZE + 1] = "1";
+static char data_ss_set_forward_condition[MENU_DATA_SIZE + 1] = "5";
+static char data_ss_set_forward_timer[MENU_DATA_SIZE + 1] = "5";
+static char data_ss_set_forward_number[MENU_DATA_SIZE + 1] = "01030018655";
+
+static char data_ss_get_forward_status_class[MENU_DATA_SIZE + 1] = "16";
+static char data_ss_get_forward_status_condition[MENU_DATA_SIZE + 1] = "1";
+
+static char data_ss_set_waiting_class[MENU_DATA_SIZE + 1] = "16";
+static char data_ss_set_waiting_enable[MENU_DATA_SIZE + 1] = "0";
+
+static char data_ss_get_waiting_status_class[MENU_DATA_SIZE + 1] = "16";
+
+static char data_ss_set_cli_status_type[MENU_DATA_SIZE + 1] = "1";
+static char data_ss_set_cli_device_status[MENU_DATA_SIZE + 1] = "0";
+
+static char data_ss_get_cli_status_type[MENU_DATA_SIZE + 1] = "0";
+
+static char data_ss_ussd_request_type[MENU_DATA_SIZE + 1] = "1";
+static char data_ss_ussd_request_string[MENU_DATA_SIZE + 1] = "";
+
+static void on_noti_ss_ussd(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelSsUssdNoti *noti = data;
+
+       if (g_strcmp0(noti_id, TEL_NOTI_SS_USSD) == 0) {
+               msg("Event (%s) received !!", TEL_NOTI_SS_USSD);
+       } else {
+               msg("Wrong Event Recieved : (%s)", noti_id);
+               return;
+       }
+
+       if (noti) {
+               msg(" USSD Noti Response - Status : [%d],  String : [%s]", noti->status, noti->str);
+       } else {
+               msg("USSD Noti data is NULL.");
+       }
+}
+
+static void on_response_ss_set_barring(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_response_ss_set_barring :");
+       CHECK_RESULT(result);
+}
+
+static int run_ss_set_barring(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsBarringInfo info;
+
+       msg("call tapi_ss_set_barring()");
+
+       memset(&info, 0, sizeof(TelSsBarringInfo));
+
+       info.class = atoi(data_ss_set_barring_class);
+       info.type = atoi(data_ss_set_barring_type);
+       info.enable = atoi(data_ss_set_barring_enable);
+       if ( g_strlcpy(info.pwd, data_ss_set_barring_password, TEL_SS_BARRING_PASSWORD_LEN_MAX + 1) > TEL_SS_BARRING_PASSWORD_LEN_MAX) {
+               msg ("Entered Password exceeds maximum permissible length(4). Exiting!");
+               return 0;
+       }
+
+       msg("barring class : (%d)", info.class);
+       msg("barring type : (%d)", info.type);
+       msg("barring enable : (%d)", info.enable);
+       msg("barring password : (%s)", info.pwd);
+
+       result = tapi_ss_set_barring(handle, &info, on_response_ss_set_barring, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_get_barring_status(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsBarringResp *resp = data;
+       unsigned int iter;
+
+       msg("on_response_ss_get_barring_status :");
+       CHECK_RESULT(result);
+
+       if (resp) {
+               msg(" No. of records = %u", resp->record_num);
+               for (iter = 0; iter < resp->record_num; ++iter) {
+                       msg("Record : [%d] - Class : [%d], Enable : [%d], Type : [%d]",
+                               iter,
+                               resp->records[iter].class,
+                               resp->records[iter].enable,
+                               resp->records[iter].type);
+               }
+       }
+       else {
+               msg("Response data is NULL");
+       }
+}
+
+static int run_ss_get_barring_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsBarringGetInfo info;
+
+       msg("call tapi_ss_get_barring_status()");
+
+       memset(&info, 0, sizeof(TelSsBarringGetInfo));
+
+       info.class = atoi(data_ss_get_barring_status_class);
+       info.type = atoi(data_ss_get_barring_status_type);
+
+       msg("barring class : (%d)", info.class);
+       msg("barring type : (%d)", info.type);
+
+       result = tapi_ss_get_barring_status(handle, &info, on_response_ss_get_barring_status, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_change_barring_password(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_response_ss_change_barring_password :");
+       CHECK_RESULT(result);
+}
+
+static int run_ss_change_barring_password(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsBarringPwdInfo info;
+
+       msg("call tapi_ss_change_barring_password()");
+
+       if ( g_strlcpy(info.old_pwd, data_ss_change_barring_password_old, TEL_SS_BARRING_PASSWORD_LEN_MAX + 1) > TEL_SS_BARRING_PASSWORD_LEN_MAX) {
+               msg ("Entered Password exceeds maximum permissible length(4). Exiting!");
+               return 0;
+       }
+       if ( g_strlcpy(info.new_pwd, data_ss_change_barring_password_new, TEL_SS_BARRING_PASSWORD_LEN_MAX + 1) > TEL_SS_BARRING_PASSWORD_LEN_MAX) {
+               msg ("Entered Password exceeds maximum permissible length(4). Exiting!");
+               return 0;
+       }
+
+       msg("old barring password : (%s)", info.old_pwd);
+       msg("new barring password : (%s)", info.new_pwd);
+
+       result = tapi_ss_change_barring_password(handle, &info, on_response_ss_change_barring_password, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_set_forward(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_response_ss_set_forward :");
+       CHECK_RESULT(result);
+}
+
+static int run_ss_set_forward(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsForwardInfo info;
+
+       msg("call tapi_ss_set_forwarding()");
+
+       memset(&info, 0, sizeof(TelSsForwardInfo));
+
+       info.class = atoi(data_ss_set_forward_class);
+       info.mode = atoi(data_ss_set_forward_mode);
+       info.condition = atoi(data_ss_set_forward_condition);
+       if (g_strlcpy(info.number, data_ss_set_forward_number, TEL_SS_NUMBER_LEN_MAX + 1) > TEL_SS_NUMBER_LEN_MAX) {
+               msg("Entered Number exceeds maximum permissible length (82). Exiting!");
+               return 0;
+       }
+       info.wait_time = atoi(data_ss_set_forward_timer);
+
+       msg("forward class : (%d)", info.class);
+       msg("forward mode : (%d)", info.mode);
+       msg("forward condition : (%d)", info.condition);
+       msg("forward number : (%s)", info.number);
+       msg("forward wait_time : (%u)", info.wait_time);
+
+       result = tapi_ss_set_forwarding(handle, &info, on_response_ss_set_forward, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_get_forward_status(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsForwardingResp *resp = data;
+       unsigned int iter;
+
+       msg("on_response_ss_get_forward_status :");
+       CHECK_RESULT(result);
+
+       if (resp) {
+               msg(" No. of records = %u", resp->record_num);
+               for (iter = 0; iter < resp->record_num; ++iter) {
+                       msg(" Record : [%u] - Class : [%d], Enable : [%d], Condition : [%d], Number : [%s], Wait_Time : [%d]",
+                                       iter,
+                                       resp->records[iter].class,
+                                       resp->records[iter].enable,
+                                       resp->records[iter].condition,
+                                       resp->records[iter].number,
+                                       resp->records[iter].wait_time);
+                       msg("");
+               }
+       } else {
+               msg("Response data is NULL");
+       }
+}
+
+static int run_ss_get_forward_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsForwardGetInfo info;
+
+       msg("call tapi_ss_get_forwarding_status()");
+
+       info.class = atoi(data_ss_get_forward_status_class);
+       info.condition = atoi(data_ss_get_forward_status_condition);
+
+       msg("forward class : (%d)", info.class);
+       msg("forward condition : (%d)", info.condition);
+
+       result = tapi_ss_get_forwarding_status(handle, &info, on_response_ss_get_forward_status, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_set_waiting(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_response_ss_set_waiting :");
+       CHECK_RESULT(result);
+}
+
+static int run_ss_set_waiting(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsWaitingInfo info;
+
+       msg("call tapi_ss_set_waiting()");
+
+       memset(&info, 0, sizeof(TelSsWaitingInfo));
+
+       info.class = atoi(data_ss_set_waiting_class);
+       info.enable= atoi(data_ss_set_waiting_enable);
+
+       msg("waiting class : (%d)", info.class);
+       msg("waiting enable : (%d)", info.enable);
+
+       result = tapi_ss_set_waiting(handle, &info, on_response_ss_set_waiting, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_get_waiting_status(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsWaitingResp *resp = data;
+       unsigned int iter;
+
+       msg("on_response_ss_get_waiting_status :");
+       CHECK_RESULT(result);
+
+       if (resp) {
+               msg(" No. of records = %d", resp->record_num);
+               for (iter = 0; iter < resp->record_num; ++iter) {
+                       msg(" Record : [%u] - Class : [%d], Enable : [%d]",
+                               iter,
+                               resp->records[iter].class,
+                               resp->records[iter].enable);
+               }
+       } else {
+               msg("Response data is NULL");
+       }
+}
+
+static int run_ss_get_waiting_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsClass class;
+
+       msg("call tapi_ss_get_waiting_status()");
+
+       class = atoi(data_ss_get_waiting_status_class);
+
+       msg("waiting class : (%d)", class);
+
+       result = tapi_ss_get_waiting_status(handle, class, on_response_ss_get_waiting_status, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_set_cli(TelHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_response_ss_set_cli :");
+       CHECK_RESULT(result);
+}
+
+static int run_ss_set_cli(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsCliInfo info;
+
+       msg("call tapi_ss_set_cli()");
+
+       info.type= atoi(data_ss_set_cli_status_type);
+
+       msg("cli type : (%d)", info.type);
+
+       switch (info.type) {
+               case TEL_SS_CLI_CLIP:
+                       info.status.clip = atoi(data_ss_set_cli_device_status);
+                       msg("CLIP status : (%d)", info.status.clip);
+                       break;
+               case TEL_SS_CLI_CLIR:
+                       info.status.clir = atoi(data_ss_set_cli_device_status);
+                       msg("CLIR status : (%d)", info.status.clir);
+                       break;
+               case TEL_SS_CLI_COLP:
+                       info.status.colp = atoi(data_ss_set_cli_device_status);
+                       msg("COLP status : (%d)", info.status.colp);
+                       break;
+               case TEL_SS_CLI_COLR:
+                       info.status.colr = atoi(data_ss_set_cli_device_status);
+                       msg("COLR status : (%d)", info.status.colr);
+                       break;
+               case TEL_SS_CLI_CDIP:
+                       info.status.cdip = atoi(data_ss_set_cli_device_status);
+                       msg("CDIP status : (%d)", info.status.cdip);
+                       break;
+               case TEL_SS_CLI_CNAP:
+                       info.status.cnap = atoi(data_ss_set_cli_device_status);
+                       msg("CNAP status : (%d)", info.status.cnap);
+       }
+
+       result = tapi_ss_set_cli(handle, &info, on_response_ss_set_cli, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_get_cli_status(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsCliResp *resp = data;
+
+       msg("on_response_ss_get_cli_status :");
+       CHECK_RESULT(result);
+
+       if (resp) {
+               switch (resp->type) {
+                       case TEL_SS_CLI_CLIP:
+                               msg(" CLIP Response - Device : (%d), Network : (%d)",
+                                       resp->status.clip.dev_status,
+                                       resp->status.clip.net_status);
+                               break;
+                       case TEL_SS_CLI_CLIR:
+                               msg(" CLIR Response - Device : (%d), Network : (%d)",
+                               resp->status.clir.dev_status,
+                               resp->status.clir.net_status);
+                               break;
+                       case TEL_SS_CLI_COLP:
+                               msg(" COLP Response - Device : (%d), Network : (%d)",
+                                       resp->status.colp.dev_status,
+                                       resp->status.colp.net_status);
+                               break;
+                       case TEL_SS_CLI_COLR:
+                               msg(" COLR Response - Device : (%d), Network : (%d)",
+                                       resp->status.colr.dev_status,
+                                       resp->status.colr.net_status);
+                               break;
+                       case TEL_SS_CLI_CDIP:
+                               msg(" CDIP Response - Device : (%d), Network : (%d)",
+                                       resp->status.cdip.dev_status,
+                                       resp->status.cdip.net_status);
+                               break;
+                       case TEL_SS_CLI_CNAP:
+                               msg(" CNAP Response - Device : (%d), Network : (%d)",
+                                       resp->status.cnap.dev_status,
+                                       resp->status.cnap.net_status);
+               }
+       } else {
+               msg("Response data is NULL");
+       }
+}
+
+static int run_ss_get_cli_status(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsCliType type;
+
+       msg("call tapi_ss_get_cli_status()");
+
+       type = atoi(data_ss_get_cli_status_type);
+
+       msg("cli type : (%d)", type);
+
+       result = tapi_ss_get_cli_status(handle, type, on_response_ss_get_cli_status, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static void on_response_ss_send_ussd_request(TelHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsUssdResp *resp = data;
+
+       msg("on_response_ss_send_ussd_request :");
+       CHECK_RESULT(result);
+
+       if (resp) {
+               msg(" Type : [%d] Status : [%d], String : [%s]",
+                               resp->type,
+                               resp->status,
+                               resp->str);
+       } else {
+               msg("No Callback data present.");
+       }
+}
+
+static int run_ss_send_ussd_request(MManager *mm, struct menu_data *menu)
+{
+       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TelReturn result;
+       TelSsUssdInfo info;
+
+       msg("call tapi_ss_send_ussd_request()");
+
+       memset(&info, 0, sizeof(TelSsUssdInfo));
+
+       info.type = atoi(data_ss_ussd_request_type);
+       info.str = (unsigned char *) &data_ss_ussd_request_string;
+
+       msg("ussd type : (%d)", info.type);
+       msg("ussd string : (%s)", info.str);
+
+       result = tapi_ss_send_ussd_request(handle, &info, on_response_ss_send_ussd_request, NULL);
+       CHECK_RT(result);
+
+       return 0;
+}
+
+static struct menu_data menu_ss_set_barring[] = {
+       { "1", "class (0=All Teleservices bearer, \n" \
+                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
+                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
+                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_set_barring_class},
+       { "2", "enable (0=No, 1=Yes)", NULL, NULL, data_ss_set_barring_enable},
+       { "3", "type (0=BOAC, 1=BOIC, 2=BOIC Not HC 3=BAIC, 4=BIC Roam, 5=NS, 6=AB, 7=AOB, 8=AIB)", NULL, NULL, data_ss_set_barring_type},
+       { "4", "password", NULL, NULL, data_ss_set_barring_password},
+       { "5", "run", NULL, run_ss_set_barring, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_get_barring_status[] = {
+       { "1", "class (0=All Teleservices bearer, \n" \
+                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
+                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
+                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_get_barring_status_class},
+       { "2", "type (0=BOAC, 1=BOIC, 2=BOIC Not HC 3=BAIC, 4=BIC Roam, 5=NS, 6=AB, 7=AOB, 8=AIB)", NULL, NULL, data_ss_get_barring_status_type},
+       { "3", "run", NULL, run_ss_get_barring_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_change_barring_password[] = {
+       { "1", "old password", NULL, NULL, data_ss_change_barring_password_old},
+       { "2", "new password", NULL, NULL, data_ss_change_barring_password_new},
+       { "3", "run", NULL, run_ss_change_barring_password, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_set_forward[] = {
+       { "1", "class (0=All Teleservices bearer, \n" \
+                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
+                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
+                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_set_forward_class},
+       { "2", "mode (0=Disable, 1=Enable, 2=Register, 3=Deregister)", NULL, NULL, data_ss_set_forward_mode},
+       { "3", "condition (0=CFU, 1=CFB, 2=CFNRY, 3=CFNRC, 4=ALL, 5=ALL_CFC)", NULL, NULL, data_ss_set_forward_condition},
+       { "4", "number", NULL, NULL, data_ss_set_forward_number},
+       { "5", "wait time (1-30 seconds)", NULL, NULL, data_ss_set_forward_timer},
+       { "6", "run", NULL, run_ss_set_forward, NULL},
+
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_get_forward_status[] = {
+       { "1", "class (0=All Teleservices bearer, \n" \
+                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
+                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
+                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_get_forward_status_class},
+       { "2", "condition (0=CFU, 1=CFB, 2=CFNRY, 3=CFNRC, 4=ALL, 5=ALL_CFC)", NULL, NULL, data_ss_get_forward_status_condition},
+       { "3", "run", NULL, run_ss_get_forward_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_set_waiting[] = {
+       { "1", "class (0=All Teleservices bearer, \n" \
+                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
+                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
+                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_set_waiting_class},
+       { "2", "enable (0=Deactivate, 1=Activate)", NULL, NULL, data_ss_set_waiting_enable},
+       { "3", "run", NULL, run_ss_set_waiting, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_get_waiting_status[] = {
+       { "1", "class (0=All Teleservices bearer, \n" \
+                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
+                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
+                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_get_waiting_status_class},
+       { "2", "run", NULL, run_ss_get_waiting_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_set_cli[] = {
+       { "1", "type (0=clir, 1=clip, 2=colp, 3=colr, 4=cdip, 5=cnap)", NULL, NULL, data_ss_set_cli_status_type},
+       { "2", "device status ( CLIR : 0=Default, 1=Invocation, 2=Suppression, \n" \
+                       "\t Others : 0=Disable, 1=Enable)", NULL, NULL, data_ss_set_cli_device_status},
+       { "3", "run", NULL, run_ss_set_cli, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_get_cli_status[] = {
+       { "1", "type (0=CLIP, 1=CLIR, 2=COLP, 3=COLR, 4=CDIP, 5=CNAP)", NULL, NULL, data_ss_get_cli_status_type},
+       { "2", "run", NULL, run_ss_get_cli_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_ss_send_ussd_request[] = {
+       { "1", "type (0=INIT, 1=RSP, 2=REL)", NULL, NULL, data_ss_ussd_request_type},
+       { "2", "ussd string", NULL, NULL, data_ss_ussd_request_string},
+       { "3", "run", NULL, run_ss_send_ussd_request, NULL},
+       { NULL, NULL, },
+};
+
+struct menu_data menu_ss[] = {
+       { "1", "tapi_ss_set_barring", menu_ss_set_barring, NULL, NULL},
+       { "2", "tapi_ss_get_barring_status", menu_ss_get_barring_status, NULL, NULL},
+       { "3", "tapi_ss_change_barring_password", menu_ss_change_barring_password, NULL, NULL},
+       { "4", "tapi_ss_set_forwarding", menu_ss_set_forward, NULL, NULL},
+       { "5", "tapi_ss_get_forwarding_status", menu_ss_get_forward_status, NULL, NULL},
+       { "6", "tapi_ss_set_waiting", menu_ss_set_waiting, NULL, NULL},
+       { "7", "tapi_ss_get_waiting_status", menu_ss_get_waiting_status, NULL, NULL},
+       { "8", "tapi_ss_set_cli", menu_ss_set_cli, NULL, NULL},
+       { "9", "tapi_ss_get_cli_status", menu_ss_get_cli_status, NULL, NULL},
+       { "10", "tapi_ss_send_ussd_request", menu_ss_send_ussd_request, NULL, NULL},
+       { NULL, NULL, },
+};
+
+void register_ss_event(TelHandle *handle)
+{
+       TelReturn ret;
+
+       ret = tapi_register_event_id (handle, TEL_NOTI_SS_USSD, on_noti_ss_ussd, NULL);
+       if (ret != TEL_RETURN_SUCCESS) {
+               msg("TEL_NOTI_SS_USSD - register event failed: [%d]", ret);
+       }
+}
diff --git a/test_src/ss.h b/test_src/ss.h
new file mode 100644 (file)
index 0000000..4b3175d
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
+ * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SS_H__
+#define __SS_H__
+
+
+void register_ss_event(TelHandle *handle);
+
+#endif