4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 * @ingroup TelephonyAPI
24 * @addtogroup SS_TAPI SS(Supplementary services)
29 @brief This file serves as a "C" header file defines functions for Tapi Supplementary services\n
30 It contains a sample set of function prototypes that would be required by applications.
36 #include <tapi_common.h>
38 #include <TelDefines.h>
46 * @brief This function sends a request to activate/deactivate call barring.
48 * This service makes it possible for a mobile subscriber
49 * to activate barring of certain categories of outgoing or incoming calls according to a barring program which is selected from a set
50 * of one or more barring programs chosen at provision time and is valid for all outgoing or incoming calls, or just those associated
51 * with a specific basic service group. Also this API allows deactivating call barring based on categories set.
52 * If the user call this function with wrong password 3 times subsequently, the barring service can be blocked.
53 * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
54 * the service request has been granted or not.
56 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
57 * However it just means that the API request has been transfered to the CP successfully.
58 * The actual operation result is delivered with the async response as below.
60 * @par Sync (or) Async:
61 * This is an Asynchronous API.
63 * @par Important Notes:
70 * - handle from tel_init().
73 * - Contains the information about call barring
75 * @param [in] callback
76 * - To register callback function for result.
78 * @param [in] user_data
79 * - user_data for user specification.
81 * @par Async Response Message:
82 * Asynchronous return status is indicated by #TelSsBarringResp_t.
85 * - Initialize Dbus connection with #tel_init
86 * - Register caller's application name with #tel_register_app_name
87 * - Register telephony events to listen
88 * - A event loop is running to listen events
93 * @return Return Type (int) \n
94 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
95 * - Refer #TapiResult_t for failure and error code
97 * @par Prospective Clients:
100 * \see tel_get_ss_barring_status, tel_change_ss_barring_password
103 * #include<ITapiSS.h>
105 * int ret_status = -1;
106 * TelSsCallBarringInfo_t pBarringInfo;// = {0,};
108 * char bar_pwd[5]="0000";
109 * TapiHandle *handle; // Handle given by tel_init()
110 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
112 * pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
113 * pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
114 * pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
115 * strcpy(pBarringInfo.szPassword,bar_pwd);
116 * ret_status = tel_set_ss_barring (handle,&pBarringInfo,callback,user_data);
124 /*================================================================================================*/
125 int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data);
129 * @brief This function gets call barring status.
131 * The mobile subscriber may determine by subscription of a set of one or more unique barring
132 * programs what kind of outgoing or incoming calls should be barred.
133 * If this function is called normally, the asynchronous response comes in a few second from network.
134 * The response indicates the service status.
136 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
137 * However it just means that the API request has been transfered to the CP successfully.
138 * The actual operation result is delivered with the async response as below.
140 * @par Sync (or) Async:
141 * This is an Asynchronous API.
143 * @par Important Notes:
150 * - handle from tel_init().
152 * @param [in] ss_class
153 * - Specifies the type of call i.e. Voice call, Video Call etc.
156 * - Specifies barring type i.e. Outgoing international, outgoing all, Incoming all etc.
158 * @param [in] callback
159 * - To register callback function for result.
161 * @param [in] user_data
162 * - user_data for user specification.
164 * @par Async Response Message:
165 * Asynchronous return status is indicated by #TelSsBarringResp_t.
168 * - Initialize Dbus connection with #tel_init
169 * - Register caller's application name with #tel_register_app_name
170 * - Register telephony events to listen
171 * - A event loop is running to listen events
176 * @return Return Type (#TapiResult_t) \n
177 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
178 * - Refer #TapiResult_t for failure and error code
180 * @par Prospective Clients:
183 * \see tel_set_ss_barring, tel_change_ss_barring_password
186 * #include<ITapiSS.h>
189 * TelSsCallBarType_t BarType =TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
190 * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
192 * TapiHandle *handle; // Handle given by tel_init()
193 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
195 * ret_status = tel_get_ss_barring_status(handle,CallType,BarType,callback,user_data); // get barring status
196 * printf ("The return value is %d\n", ret_status);
206 /*================================================================================================*/
207 int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data);
211 * @brief This function allows changing of the barring password in Network.
213 * User can request network to change his own barring password. If the old password is not same with
214 * what network knows, it will be rejected by network. Also new password should be same with another new password
215 * which is to confirm user input. Otherwise the request must be rejected by Telephony Sever.
216 * If the user call this function with wrong old password 3 times subsequently, the barring service can be blocked.
217 * If this function is called normally, the asynchronous response comes in a few second from network.
218 * The response indicates the service request has been granted or not.
220 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
221 * However it just means that the API request has been transfered to the CP successfully.
222 * The actual operation result is delivered with the async response as below.
225 * @par Sync (or) Async:
226 * This is an Asynchronous API.
228 * @par Important Notes:
229 * - Based on 3GPP TS 22.030 section 6.5.4 Registration of New Password. Only one Change Barring Password request is allowed
230 * at a time and TS might return TAPI_API_REQUEST_MAX_IN_PROGRESS if another request is received.
236 * - handle from tel_init().
238 * @param [in] old_password
239 * - Old password set for Barring in Network. This is Null terminated string
241 * @param [in] new_password
242 * - New password for Barring to be set in Network. This is Null terminated string.
244 * @param [in] new_password_again
245 * - New password again. This is Null terminated string.
247 * @param [in] callback
248 * - To register callback function for result.
250 * @param [in] user_data
251 * - user_data for user specification.
253 * @par Async Response Message:
254 * Asynchronous return status will be succes or failure.
257 * - Initialize Dbus connection with #tel_init
258 * - Register caller's application name with #tel_register_app_name
259 * - Register telephony events to listen
260 * - A event loop is running to listen events
265 * @return Return Type (int) \n
266 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
267 * - Refer #TapiResult_t for failure and error code
268 * @par Prospective Clients:
275 * #include<ITapiSS.h>
279 * TapiHandle *handle; // Handle given by tel_init()
280 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
282 * ret_status = tel_change_ss_barring_password (handle,"0000","1111","1111",callback,user_data); // change barring password
291 /*================================================================================================*/
292 int tel_change_ss_barring_password(TapiHandle *handle,
293 const char *old_password,
294 const char *new_password,
295 const char *new_password_again,
296 tapi_response_cb callback, void *user_data);
300 * @brief This function allows to set (register/erase/activate/deactivate) call forwarding option at the Network.
302 * This enables to forward the calls to another party. This service permits a called mobile subscriber
303 * to have the network send all incoming calls, or just those associated with a specific Basic service group,
304 * addressed to the called mobile subscriber's directory number and which meet
305 * various call FORWARD condition to another directory number.
306 * The ability of the served mobile subscriber to originate calls is unaffected.
307 * If the service is activated, a call is forwarded only if under this call forward condition.
308 * Application has to call this API in order to explicitly register/erase/activate/deactivate
309 * the call forwarding. Request will be passed irrespective of whether already
310 * another SS call forward is ongoing.
312 * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
313 * the service request has been granted or not.
315 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
316 * However it just means that the API request has been transfered to the CP successfully.
317 * The actual operation result is delivered with the async response as below.
320 * @par Sync (or) Async:
321 * This is an Asynchronous API.
323 * @par Important Notes:
330 * - handle from tel_init().
333 * - Contains the Call forward information like forward mode, forward type, etc.
335 * @param [in] callback
336 * - To register callback function for result.
338 * @param [in] user_data
339 * - user_data for user specification.
341 * @par Async Response Message:
342 * Asynchronous return status is indicated by #TelSsForwardResp_t.
345 * - Initialize Dbus connection with #tel_init
346 * - Register caller's application name with #tel_register_app_name
347 * - Register telephony events to listen
348 * - A event loop is running to listen events
353 * @return Return Type (int) \n
354 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
355 * - Refer #TapiResult_t for failure and error code
356 * @par Prospective Clients:
360 * \image html CallForward.jpg
361 * \image latex CallForward.jpg
363 * \see tel_get_ss_forward_status
366 * #include<ITapiSS.h>
370 * TelSsForwardInfo_t pForwardInfo;
371 * pForwardInfo.Mode =TAPI_CALL_FORWARD_MODE_ENABLE_EV;
372 * pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
373 * pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
374 * pForwardInfo.NoReplyConditionTimer = 10;
376 * char cf_number[20]= {"9986529874"};//number to which calles need to be forwarded.
377 * TapiHandle *handle; // Handle given by tel_init()
378 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
380 * len = strlen(cf_number);
381 * printf("Length of CF number :%d \n",len);
382 * memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
384 * ret_status = tel_set_ss_forward (handle,&pForwardInfo,callback,user_data);
392 /*================================================================================================*/
393 int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data);
397 * @brief This function provides option to get the call forwarding status of different calls from Network.
399 * The data request procedure enables the mobile subscriber to obtain information about the data stored in the PLMN.
400 * After having requested this procedure the network shall return the following information:
401 * - in response to a general data request the served mobile subscriber should be given a list of all Basic service groups
402 * to which call forwarding unconditional is registered, including information whether or not it is active and operative,
403 * and the associated forwarded-to numbers
404 * - in response to a specific request concerning one particular Basic service group,
405 * the served mobile subscriber should be informed whether or not call forwarding unconditional is registered,
406 * including information whether or not it is active and operative for that Basic service group.
407 * If CFU is registered, the associated forwarded-to number shall be given.
409 * If this function is called normally, the asynchronous response comes in a few second from network.
410 * The response indicates the service status.
412 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
413 * However it just means that the API request has been transfered to the CP successfully.
414 * The actual operation result is delivered with the async response as below.
417 * @par Sync (or) Async:
418 * This is an Asynchronous API.
420 * @par Important Notes:
427 * - handle from tel_init().
429 * @param [in] ss_class
430 * - Specifying the Forward call type i.e. voice call, Video Call, Data Calls etc.
432 * @param [in] condition
433 * - Used to specify the forward condition i.e. unconditional, When no reply, when busy, when not reachable etc.
435 * @param [in] callback
436 * - To register callback function for result.
438 * @param [in] user_data
439 * - user_data for user specification.
441 * @par Async Response Message:
442 * Asynchronous return status is indicated by #TelSsForwardResp_t.
445 * - Initialize Dbus connection with #tel_init
446 * - Register caller's application name with #tel_register_app_name
447 * - Register telephony events to listen
448 * - A event loop is running to listen events
453 * @return Return Type (int) \n
454 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
455 * - Refer #TapiResult_t for failure and error code
457 * @par Prospective Clients:
460 * \see tel_set_ss_forward
463 * #include<ITapiSS.h>
464 * int ret_status = 0;
465 * TelSsForwardType_t type =TAPI_CS_FORWARD_TYPE_VOICE_EV;
466 * TelSsForwardWhen_t condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
468 * TapiHandle *handle; // Handle given by tel_init()
469 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
471 * ret_status = tel_get_ss_forward_status(handle,type,condition,callback,user_data); // get forward status
479 /*================================================================================================*/
480 int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data);
484 * @brief This function activates/deactivates the call waiting service.
485 * The call waiting service permits a mobile to be notified of an incoming
486 * call (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
487 * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
488 * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
489 * the service request has been granted or not.
491 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
492 * However it just means that the API request has been transfered to the CP successfully.
493 * The actual operation result is delivered with the async response as below.
496 * @par Sync (or) Async:
497 * This is an Asynchronous API.
499 * @par Important Notes:
507 * - handle from tel_init().
510 * - Specifies the status of call-waiting service i.e. On (TRUE) or off (FALSE)
512 * @param [in] callback
513 * - To register callback function for result.
515 * @param [in] user_data
516 * - user_data for user specification.
518 * @par Async Response Message:
519 * Asynchronous return status is indicated by #TelSsWaitingResp_t.
522 * - Initialize Dbus connection with #tel_init
523 * - Register caller's application name with #tel_register_app_name
524 * - Register telephony events to listen
525 * - A event loop is running to listen events
530 * @return Return Type (int) \n
531 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
532 * - Refer #TapiResult_t for failure and error code
534 * @par Prospective Clients:
537 * \see tel_get_ss_waiting_status
540 * #include<ITapiSS.h>
543 * TelSsWaitingInfo_t waitInfo;
544 * waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
545 * waitInfo.CallType =TAPI_CALL_TYPE_VOICE_EV;
547 * TapiHandle *handle; // Handle given by tel_init()
548 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
550 * ret_status = tel_set_ss_waiting (handle,&waitInfo,callback,user_data); // set call waiting
558 /*================================================================================================*/
559 int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data);
563 * @brief This function queries the status of call waiting service.
566 * The call waiting service permits a mobile to be notified of an incoming call
567 * (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
568 * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
569 * If this function is called normally, the asynchronous response comes in a few second from network.
570 * The response indicates the service status.
572 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
573 * However it just means that the API request has been transfered to the CP successfully.
574 * The actual operation result is delivered with the async response as below.
577 * @par Sync (or) Async:
578 * This is an Asynchronous API.
580 * @par Important Notes:
588 * - handle from tel_init().
590 * @param [in] ss_class
591 * - enum data defines call type
593 * @param [in] callback
594 * - To register callback function for result.
596 * @param [in] user_data
597 * - user_data for user specification.
599 * @par Async Response Message:
600 * Asynchronous return status is indicated by #TelSsWaitingResp_t.
603 * - Initialize Dbus connection with #tel_init
604 * - Register caller's application name with #tel_register_app_name
605 * - Register telephony events to listen
606 * - A event loop is running to listen events
611 * @return Return Type (int) \n
612 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
613 * - Refer #TapiResult_t for failure and error code
614 * @par Prospective Clients:
617 * \see tel_set_ss_waiting
619 * #include<ITapiSS.h>
622 * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
624 * TapiHandle *handle; // Handle given by tel_init()
625 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
627 * ret_status = tel_get_ss_waiting_status (handle,CallType,callback,user_data); // get call waiting info
635 /*================================================================================================*/
636 int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t ss_class, tapi_response_cb callback, void *user_data);
640 * @brief This function activates/deactivates the status of calling line identity service.
643 * The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:
644 * CLIP - Calling line identification presentation
645 * This Supplementary Service provides for the ability to indicate the line identity of the calling party to the called party.
646 * The network shall deliver the calling line identity to the called party at call set-up time,
647 * regardless of the terminal capability to handle the information.
648 * CLIR - Calling line identification restriction
649 * the CLIR Supplementary Service is a Supplementary Service offered to the calling party
650 * to prevent presentation of the calling party's line identity, to the called party.
651 * COLP - Connected line identification presentation
652 * This Supplementary Service is not a dialing check but an indication to the calling subscriber
653 * of the connected line identity in a full ISDN/PLMN environment,
654 * the connected line identity shall include all the information necessary to unambiguously identify the connected party.
655 * The network shall deliver the connected line identity to the calling party
656 * regardless of the terminal capability to handle the information.
657 * COLR - Connected line identification restriction
658 * The COLR Supplementary Service is a Supplementary Service offered
659 * to the connected party to prevent presentation of the connected line identity, to the calling party.
660 * In the case where the calling party has an override category.
661 * CDIP - Called line identification presentation
662 * CNAP - Calling name presentation
663 * This function queries the service status with #TelSsCliType_t
665 * If this function is called normally, the asynchronous response comes in a few second from network.
666 * The response indicates the service status.
668 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
669 * However it just means that the API request has been transfered to the CP successfully.
670 * The actual operation result is delivered with the async response as below.
673 * @par Sync (or) Async:
674 * This is an Asynchronous API.
676 * @par Important Notes:
683 * - handle from tel_init().
686 * - enum data defines Cli service type
689 * - enum data defines Cli Status
691 * @param [in] callback
692 * - To register callback function for result.
694 * @param [in] user_data
695 * - user_data for user specification.
697 * @par Async Response Message:
698 * Asynchronous return status is indicated by #TelSsCliResp_t.
701 * - Initialize Dbus connection with #tel_init
702 * - Register caller's application name with #tel_register_app_name
703 * - Register telephony events to listen
704 * - A event loop is running to listen events
709 * @return Return Type (int) \n
710 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
711 * - Refer #TapiResult_t for failure and error code
713 * @par Prospective Clients:
717 * #include<ITapiSS.h>
719 * int ret_status = 0;
720 * TelSsCliType_t CliType =TAPI_SS_CLI_CDIP;
722 * TapiHandle *handle; // Handle given by tel_init()
723 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
725 * ret_status = tel_set_ss_cli_status(handle,CliType,CliStatus,callback,user_data); // get cli info
736 /*================================================================================================*/
737 int tel_set_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, TelSsCliStatus_t status, tapi_response_cb callback, void *user_data);
741 * @brief This function queries the status of calling line identity service.
744 * The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:
745 * CLIP - Calling line identification presentation
746 * This Supplementary Service provides for the ability to indicate the line identity of the calling party to the called party.
747 * The network shall deliver the calling line identity to the called party at call set-up time,
748 * regardless of the terminal capability to handle the information.
749 * CLIR - Calling line identification restriction
750 * the CLIR Supplementary Service is a Supplementary Service offered to the calling party
751 * to prevent presentation of the calling party's line identity, to the called party.
752 * COLP - Connected line identification presentation
753 * This Supplementary Service is not a dialing check but an indication to the calling subscriber
754 * of the connected line identity in a full ISDN/PLMN environment,
755 * the connected line identity shall include all the information necessary to unambiguously identify the connected party.
756 * The network shall deliver the connected line identity to the calling party
757 * regardless of the terminal capability to handle the information.
758 * COLR - Connected line identification restriction
759 * The COLR Supplementary Service is a Supplementary Service offered
760 * to the connected party to prevent presentation of the connected line identity, to the calling party.
761 * In the case where the calling party has an override category.
762 * CDIP - Called line identification presentation
763 * CNAP - Calling name presentation
764 * This function queries the service status with #TelSsCliType_t
766 * If this function is called normally, the asynchronous response comes in a few second from network.
767 * The response indicates the service status.
769 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
770 * However it just means that the API request has been transfered to the CP successfully.
771 * The actual operation result is delivered with the async response as below.
774 * @par Sync (or) Async:
775 * This is an Asynchronous API.
777 * @par Important Notes:
784 * - handle from tel_init().
787 * - enum data defines Cli service type
789 * @param [in] callback
790 * - To register callback function for result.
792 * @param [in] user_data
793 * - user_data for user specification.
795 * @par Async Response Message:
796 * Asynchronous return status is indicated by #TelSsCliResp_t.
799 * - Initialize Dbus connection with #tel_init
800 * - Register caller's application name with #tel_register_app_name
801 * - Register telephony events to listen
802 * - A event loop is running to listen events
807 * @return Return Type (int) \n
808 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
809 * - Refer #TapiResult_t for failure and error code
811 * @par Prospective Clients:
815 * #include<ITapiSS.h>
817 * int ret_status = 0;
818 * TelSsCliType_t CliType =TAPI_SS_CLI_CDIP;
820 * TapiHandle *handle; // Handle given by tel_init()
821 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
823 * ret_status = tel_get_ss_cli_status(handle,CliType,callback,user_data); // get cli info
834 /*================================================================================================*/
835 int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data);
839 * @brief This function is used to send a USSD string or User response to the Network.
841 * The unstructured supplementary service data (USSD) mechanism allows the Mobile Station (MS) user and
842 * a PLMN operator defined application to communicate in a way which is transparent
843 * to the MS and to intermediate network entities.
844 * The mechanism allows development of PLMN specific supplementary services.
845 * USSD string is like *109, *109*72348937857623#.
846 * There are two modes of USSD: MMI-mode and application mode.
847 * MMI-mode USSD is for the transparent transport of MMI strings entered by the user to the network using this function
848 * and for the transparent transport of text strings from the network that are displayed
849 * by the mobile for user information.
850 * Application mode USSD is for the transparent transport of data between the network and the UE.
851 * Application mode USSD is intended to be used by applications in the network and their peer applications in the UE.
852 * The peer application in the UE send response with #tel_send_ss_ussd_response
854 * If this function is called normally, the asynchronous response comes in a few second from the telephony server.
855 * The response indicates whether the sending request is successfully delivered or not.
857 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
858 * However it just means that the API request has been transfered to the CP successfully.
859 * The actual operation result is delivered with the async response as below.
860 * @par Sync (or) Async:
861 * This is an Asynchronous API.
863 * @par Important Notes:
870 * - handle from tel_init().
873 * - Data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038)
874 * - USSD String data length
875 * - ANSI string passed by the client
877 * @param [in] callback
878 * - To register callback function for result.
880 * @param [in] user_data
881 * - user_data for user specification.
883 * @par Async Response Message:
884 * Asynchronous return status is indicated by #TelSsUssdResp_t.
887 * - Initialize Dbus connection with #tel_init
888 * - Register caller's application name with #tel_register_app_name
889 * - Register telephony events to listen
890 * - A event loop is running to listen events
891 * - No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application
892 * with an error (USSD_BUSY)
897 * @return Return Type (int) \n
898 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
899 * - Refer #TapiResult_t for failure and error code
901 * @par Prospective Clients:
904 * \see #tel_send_ss_ussd_response, #tel_send_ss_ussd_cancel
906 *\image html ussd.jpg
907 *\image latex ussd.jpg
910 * #include<ITapiSS.h>
912 * char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
914 * TapiHandle *handle; // Handle given by tel_init()
915 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
918 * memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
919 * strcpy(ussdString , "*124#");
921 * ret = tel_send_ss_ussd_request(handle,ussdString,callback,user_data); // request ussd
929 /*================================================================================================*/
930 int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data);
934 * @brief This function is used to Read AOC parameter values on the SIM.
937 * This supplementary service provides the MS with the information to produce an estimate
938 * of the cost of the service used. Charges are indicated for the call(s) in progress
939 * when mobile originated or for the roaming leg only when mobile terminated.
940 * Any charges for non-call related transactions, and for certain supplementary services,
941 * such as Call Forwarding are not indicated.
942 * The MS will receive at the beginning of each call (and as necessary during the call)
943 * a message, the Charge Advice Information. This message contains the elements which together define
944 * the rate at which the call is to be charged, time dependence,
945 * data dependence and for unit increments - see TS 22.024 [3].
946 * The MS shall still indicate appropriate charges even when roaming, based on Home PLMN units.
947 * Where applicable, the volume charge for Packet data service,
948 * in addition to the normal time dependent and incremental charges, shall be indicated.
949 * To indicate the charge per call the Mobile station shall display the units consumed
950 * 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.
951 * Where required to indicate the total accumulated charge, the MS shall be able to display,
952 * and the SIM/USIM shall store in the ACM, the running cumulative unit charge.
953 * This value must be stored securely, and all reasonable steps shall be taken to ensure that
954 * the written value cannot be interrupted, reset or corrupted (except resetting under control of the unblocking key).
955 * This function get the AOC configuration information from PLMN
957 * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
958 * The response indicates whether the query is delivered successfully to network or not.
960 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
961 * However it just means that the API request has been transfered to the CP successfully.
962 * The actual operation result is being delivered asynchronously.
964 * @par Sync (or) Async:
965 * This is an Asynchronous API.
967 * @par Important Notes:
975 * - handle from tel_init().
977 * @param [in] AocType
978 * - Specifies which type of Advice of charge information to be read namely Maximum ACM,
979 * Price per unit currency, Current call meter and Accumulated call meter values.
981 * @param [in] callback
982 * - To register callback function for result.
984 * @param [in] user_data
985 * - user_data for user specification.
987 * @par Async Response Message:
991 * - Advice of charge depends on the SIM for setting or reading AOC parameters.
992 * - Setting of AOC needs PIN2 Verification
997 * @return Return Type (int) \n
998 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
999 * - Refer #TapiResult_t for failure and error code
1001 * @par Prospective Clients:
1004 * \see tel_set_ss_aoc_info
1006 *\image html ussd.jpg
1007 *\image latex ussd.jpg
1009 * #include<ITapiSS.h>
1011 * TelSsAocType_t AocType = TAPI_SS_AOC_TYPE_ACM;
1012 * TapiHandle *handle; // Handle given by tel_init()
1013 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
1016 * ret_status = tel_get_ss_aoc_info (handle,AocType,callback,user_data); // get AOC info
1024 /*================================================================================================*/
1025 int tel_get_ss_aoc_info(TapiHandle *handle, TelSsAocType_t AocType, tapi_response_cb callback, void *user_data);
1029 * @brief This function is used to Read AOC parameter values on the SIM.
1032 * Refer #tel_get_ss_aoc_info
1034 * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
1035 * The response indicates whether the query is delivered successfully to network or not.
1037 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
1038 * However it just means that the API request has been transfered to the CP successfully.
1039 * The actual operation result is being delivered asynchronously.
1041 * @par Sync (or) Async:
1042 * This is an Asynchronous API.
1044 * @par Important Notes:
1051 * @param [in] handle
1052 * - handle from tel_init().
1054 * @param [in] AocSetInfo
1055 * - Specifies which type of Advice of charge information to be set namely Maximum ACM,
1056 * Price per unit currency, Current call meter and Accumulated call meter values.
1058 * @param [in] callback
1059 * - To register callback function for result.
1061 * @param [in] user_data
1062 * - user_data for user specification.
1064 * @par Async Response Message:
1068 * - Advice of charge depends on the SIM for setting or reading AOC parameters.
1069 * - Setting of AOC needs PIN2 Verification
1074 * @return Return Type (int) \n
1075 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1076 * - Refer #TapiResult_t for failure and error code
1078 * @par Prospective Clients:
1081 * \see tel_get_ss_aoc_info
1083 *\image html ussd.jpg
1084 *\image latex ussd.jpg
1086 * #include<ITapiSS.h>
1088 * TelCallAocInfo_t *pAocSetInfo;
1090 * pAocSetInfo = (TelCallAocInfo_t *)calloc(1,sizeof(TelCallAocInfo_t));
1091 * pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
1092 * int ret_status =0;
1093 * TapiHandle *handle; // Handle given by tel_init()
1094 * tapi_response_cb callback; //Initialized call-back function pointer in which response is returned
1096 * ret = tel_set_ss_aoc_info (handle,pAocSetInfo,callback,user_data); // set aoc info
1105 /*================================================================================================*/
1106 int tel_set_ss_aoc_info(TapiHandle *handle, TelCallAocInfo_t *AocSetInfo, tapi_response_cb callback, void *user_data);
1112 #endif /* _ITAPI_SS_H_ */