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 NetText_TAPI NetText(SMS)
27 * @file ITapiNettext.h
29 @brief This file serves as a "C" header file defines functions for Tapi Nettext\n
30 It contains a sample set of function prototypes that would be required by applications.
34 #ifndef _ITAPI_NETTEXT_H_
35 #define _ITAPI_NETTEXT_H_
37 #include <tapi_common.h>
39 #include <TelDefines.h>
47 * @brief This API is used to send an SMS message to the network. This API interface allows transmitting SMS PDU as defined by
48 * 3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to lower layers. This API allows keeping the dedicated link at lower layers
49 * by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
50 * used for transmission. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
52 * @par Sync (or) Async:
53 * This is an Asynchronous API.
55 * @par Important Notes:
63 * - handle from tel_init()
65 * @param [in] pDataPackage
66 * - Contains SMS-SUBMIT TPDU
68 * @param [in] bMoreMsgToSend
69 * - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
70 * message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
72 * @param [in] callback
73 * - To register callback function for result of this function.
75 * @param [in] user_data
76 * - user data for user specification
78 * @par Async Response Message:
79 * SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_CNF and the event data associated with this event
80 * 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.
88 * @return Return Type (int) \n
89 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
90 * - Else it will return failure and error code (Refer #TapiResult_t)
92 * @par Prospective Clients:
96 * #include <ITapiNetText.h>
98 * TelSmsDatapackageInfo_t *pDataPackage;
102 * pDataPackage = (TelSmsDatapackageInfo_t*) malloc(sizeof(TelSmsDatapackageInfo_t));
103 * // fill the structure appropriately
104 * // Sca parameter is optional. If you don't provide Service center address, you should fill "00" in sca array.
105 * // MsgLength is length of szData//fill the szData in TelSmsDatapackageInfo_t with SMS-SUBMIT or SMS-COMMAND TPDU.
106 * ret_status = tel_send_sms (pDataPackage, 0, &RequestId);
117 /*================================================================================================*/
118 int tel_send_sms(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, tapi_response_cb callback, void* user_data);
121 * @brief This API is used to send an SMS message to the network. This API interface allows transmitting SMS PDU as defined by
122 * 3GPP2 C.S0015 (SMS-SUBMIT, SMS-ACK, SMS-CANCEL) to lower layers. This API allows keeping the dedicated link at lower layers
123 * by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
124 * used for transmission. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
126 * @par Sync (or) Async:
127 * This is an Asynchronous API.
129 * @par Important Notes:
136 * @param [in] pSmsMsgInfo
137 * - Contains parameter mask, message type and data.
139 * @param [in] MoreMsgToSend
140 * - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
141 * message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
143 * @param [out] pRequestId
144 * - Unique identifier for a particular request.
145 * - pRequestId value can be any value from 0 to 255 if the API is returned successfully
146 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
149 * @par Async Response Message:
150 * SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF and the event data associated with this event
151 * is #TelSmsIs637CauseCode_t. Asynchronous return status is indicated by #TelSmsResponse_t.
159 * @return Return Type (int) \n
160 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
161 * - Else it will return failure and error code (Refer #TapiResult_t)
163 * @par Prospective Clients:
167 * #include <ITapiNetText.h>
168 * int ret_status = TAPI_API_SUCCESS;
170 * TelSmsMsgInfo_t pMsgInfo={0,};
173 * TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
175 * memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
176 * pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT; //fill structure appropriately
177 * pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
179 * ret_status = tel_send_sms_msg(pDataPackage, 0 ,&requestId);
191 /*================================================================================================*/
192 //int tel_send_sms_msg(const TelSmsMsgInfo_t *pSmsMsgInfo, int MoreMsgToSend, int *pRequestId);
195 * @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
196 * to read particular SMS message. Total number of messages can be retrieved by #TelTapiSmsGetCount function.
197 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
199 * @par Sync (or) Async:
200 * This is an Asynchronous API.
202 * @par Important Notes:
210 * - handle from tel_init()
213 * - Index number of the message to be read
215 * @param [in] callback
216 * - To register callback function for result of this function.
218 * @param [in] user_data
219 * - user data for user specification
221 * @par Async Response Message:
222 * The event associated is TAPI_EVENT_NETTEXT_READ_SMS_CNF and the event data is #TelSmsData_t. Asynchronous return status is indicated
231 * @return Return Type (int) \n
232 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
233 * - Else it will return failure and error code (Refer #TapiResult_t)
235 * @par Prospective Clients:
239 * #include <ITapiNetText.h>
240 * int ret_status = TAPI_API_SUCCESS;
243 * ret_status = tel_read_sms_in_sim(0, &RequestId); //index value which is located in SIM
255 /*================================================================================================*/
256 int tel_read_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
259 * @brief This function writes a message to SIM storage area.
260 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
262 * @par Sync (or) Async:
263 * This is an Asynchronous API.
265 * @par Important Notes:
273 * - handle from tel_init()
275 * @param [in] pWriteData
276 * - SMS message structure.
278 * @param [in] callback
279 * - To register callback function for result of this function.
281 * @param [in] user_data
282 * - user data for user specification
284 * @par Async Response Message:
285 * TAPI library will send TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF asynchronous event for this request when received from TS.
286 * The associated data is SIM Index in which the message stored. Asynchronous return status is indicated by #TelSmsCause_t.
294 * @return Return Type (int) \n
295 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
296 * - Else it will return failure and error code (Refer #TapiResult_t)
298 * @par Prospective Clients:
302 * #include <ITapiNetText.h>
304 * int ret_status = TAPI_API_SUCCESS;
306 * TelSmsData_t *pWriteData;
307 * char *msg = "This is an Test SMS";
308 * char *SCA = "821091";
310 * pWriteData = malloc(sizeof(TelSmsData_t));
312 * conv_service_center_address(pWriteData->SmsData.Sca, SCA); //convert service center address
313 * conv_msg_into_tpdu(pWriteData->SmsData.szData, pWriteData->SmsData.MsgLength, msg); // convert message into TPDU
314 * pWrite->MsgStatus = TAPI_NETTEXT_STATUS_READ;
315 * pWrite->SimIndex = -1;
317 * ret_status = tel_write_sms_in_sim (pWriteData, &RequestId);
328 /*================================================================================================*/
329 int tel_write_sms_in_sim(TapiHandle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data);
332 * @brief This function deletes a message specified by index (SIM index used when storing the SMS)
333 * 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).
335 * @par Sync (or) Async:
336 * This is an Asynchronous API.
338 * @par Important Notes:
346 * - handle from tel_init()
349 * - Message index to delete.
351 * @param [in] callback
352 * - To register callback function for result of this function.
354 * @param [in] user_data
355 * - user data for user specification
357 * @par Async Response Message:
358 * The asynchronous event associated is TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF and the event data is SIM index from which
359 * the message has been deleted. Asynchronous return status is indicated by #TelSmsCause_t.
367 * @return Return Type (int) \n
368 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
369 * - Else it will return failure and error code (Refer #TapiResult_t).\n
370 * @par Prospective Clients:
374 * #include <ITapiNetText.h>
376 * int ret_status = TAPI_API_SUCCESS;
379 * ret_status = tel_delete_sms_in_sim(1, &RequestId); //index which is located in SIM
391 /*================================================================================================*/
392 int tel_delete_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
395 * @brief This function is used to retrieve message count information like Total record count,
396 * used record count and the indices list for SIM Storage. This is an asynchronous function and
397 * the response will be sent back by event notification. Access to this API is limited, we recommend you use Message Framework API(MAPI) besides.
398 * Access to this API is limited to in-house application.
400 * @par Sync (or) Async:
401 * This is an Asynchronous API.
403 * @par Important Notes:
411 * - handle from tel_init()
413 * @param [in] callback
414 * - To register callback function for result of this function.
416 * @param [in] user_data
417 * - user data for user specification
420 * @par Async Response Message:
421 * The event associated is TAPI_EVENT_NETTEXT_GET_COUNT_CNF and the event data is #TelSmsStoredMsgCountInfo_t.
422 * Asynchronous return status is indicated by #TelSmsCause_t.
430 * @return Return Type (int) \n
431 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
432 * - Else it will return failure and error code (Refer #TapiResult_t)
433 * @par Prospective Clients:
437 * #include <ITapiNetText.h>
439 * int ret_status = TAPI_API_SUCCESS;
442 * ret_status = tel_get_sms_count (&RequestId); //get sms count in SIM
453 /*================================================================================================*/
454 int tel_get_sms_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
457 * @brief This function is used to set SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
458 * This function also indicates underlying provider to enable or disable CB Channel on which CB messages are received.
459 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI) besides.
461 * @par Sync (or) Async:
462 * This is an Asynchronous API.
464 * @par Important Notes:
472 * - handle from tel_init()
474 * @param [in] pCBConfig
475 * - This structure contains parameters to set SMS CB configuration \n
476 * (i) Cell broadcast service state. (Enabled/disabled.) \n
477 * (ii) Cell broadcast message identifier, which denotes whether all cell broadcast message identifiers are selected or only
479 * (iii) The list count of message identifiers to be set.\n
480 * (iv) The actual list of message identifiers to be set. Each identifier occupies 2 bytes. And the list ranges from 0x00 to 0xff. \n
481 * These message identifiers denote the source and type of the CB message. Based on the message identifiers set in the SIM,
482 * the ME receives CB messages with selected message identifiers.
484 * @param [in] callback
485 * - To register callback function for result of this function.
487 * @param [in] user_data
488 * - user data for user specification
490 * @par Async Response Message:
491 * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
492 * Asynchronous return status is indicated by #TelSmsCause_t.
500 * @return Return Type (int) \n
501 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
502 * - Else it will return failure and error code (Refer #TapiResult_t)
504 * @par Prospective Clients:
508 * #include <ITapiNetText.h>
510 * int ret_status = TAPI_API_SUCCESS;
512 * TelSmsCbConfig_t *pCBConfig = NULL;
514 * pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
515 * pCBConfig->bCBEnabled = 1; //fill structure appropriately
516 * pCBConfig->SelectedId = 0x01;
517 * pCBConfig->MsgIdCount = 0x02;
519 * pCBConfig->MsgIDs[0] = 0x0c;
520 * pCBConfig->MsgIDs[1] = 0x0c;
521 * pCBConfig->MsgIDs[2] = 0xdf;
522 * pCBConfig->MsgIDs[3] = 0x00;
524 * ret_status = tel_set_sms_cb_config(pCBConfig, &RequestId);
536 /*================================================================================================*/
537 int tel_set_sms_cb_config(TapiHandle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data);
540 * @brief This function is used to retrieve SMS CB configuration options from EFcbmi file in the SIM.
541 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
543 * @par Sync (or) Async:
544 * This is an Asynchronous API.
546 * @par Important Notes:
554 * - handle from tel_init()
556 * @param [in] callback
557 * - To register callback function for result of this function.
559 * @param [in] user_data
560 * - user data for user specification
562 * @par Async Response Message:
563 * The event associated is TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF and the event data is #TelSmsCbConfig_t.
564 * Asynchronous return status is indicated by #TelSmsCause_t.
572 * @return Return Type (int) \n
573 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
574 * - Else it will return failure and error code (Refer #TapiResult_t)
575 * @par Prospective Clients:
579 * #include <ITapiNetText.h>
581 * int ret_status = TAPI_API_SUCCESS;
584 * ret_status = tel_get_sms_cb_config (&RequestId); //result will come with async response
595 /*================================================================================================*/
596 int tel_get_sms_cb_config(TapiHandle *handle, tapi_response_cb callback, void* user_data);
600 * @brief This function is used to set SMS preferred bearer on which SMS has to be transmitted.
601 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
603 * @par Sync (or) Async:
604 * This is an Asynchronous API.
606 * @par Important Notes:
614 * - handle from tel_init()
616 * @param [in] BearerType
617 * - Specifies the bearer type.
619 * @param [in] callback
620 * - To register callback function for result of this function.
622 * @param [in] user_data
623 * - user data for user specification
625 * @par Async Response Message:
626 * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
627 * Asynchronous return status is indicated by #TelSmsCause_t
635 * @return Return Type (int) \n
636 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
637 * - Else it will return failure and error code (Refer #TapiResult_t)
638 * @par Prospective Clients:
642 * #include <ITapiNetText.h>
643 * int ret_status = TAPI_API_SUCCESS;
645 * TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
647 * ret_status = tel_set_sms_preferred_bearer(BearerType, &RequestId); //result will come with async response
659 /*================================================================================================*/
660 int tel_set_sms_preferred_bearer(TapiHandle *handle, TelSmsBearerType_t BearerType, tapi_response_cb callback, void* user_data);
663 * @brief This function is used to get SMS preferred bearer on which SMS has to be transmitted.
664 * This is an asynchronous function. Access to this API is limited to in-house application and , we recommend you use Message Framework API(MAPI).
666 * @par Sync (or) Async:
667 * This is an Asynchronous API.
669 * @par Important Notes:
677 * - handle from tel_init()
679 * @param [in] callback
680 * - To register callback function for result of this function.
682 * @param [in] user_data
683 * - user data for user specification
685 * @par Async Response Message:
686 * The event associated is TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF and the associated event data is #TelSmsBearerType_t.
687 * Asynchronous return status is indicated by #TelSmsCause_t.
695 * @return Return Type (int) \n
696 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
697 * - Else it will return failure and error code (Refer #TapiResult_t)
698 * @par Prospective Clients:
702 * #include <ITapiNetText.h>
704 * int ret_status = TAPI_API_SUCCESS;
707 * ret_status = tel_get_sms_preferred_bearer(&RequestId); //result will come with async response
719 /*================================================================================================*/
720 int tel_get_sms_preferred_bearer(TapiHandle *handle, tapi_response_cb callback, void* user_data);
723 * @brief This function is used to get the SMS parameters for a particular SMS (sent/received)
724 * 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).
726 * @par Sync (or) Async:
727 * This is an Asynchronous API.
729 * @par Important Notes:
737 * - handle from tel_init()
740 * - SIM index where the SMS is stored
742 * @param [in] callback
743 * - To register callback function for result of this function.
745 * @param [in] user_data
746 * - user data for user specification
748 * @par Async Response Message:
749 * The event associated is TAPI_EVENT_NETTEXT_GET_PARAM_CNF and the event data is #TelSmsParams_t. Asynchronous return status
750 * is indicated by #TelSmsCause_t
758 * @return Return Type (int) \n
759 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
760 * - Else it will return failure and error code (Refer #TapiResult_t)
761 * @par Prospective Clients:
765 * #include <ITapiNetText.h>
767 * int ret_status = TAPI_API_SUCCESS;
770 * ret_status = tel_get_sms_parameters(1, &RequestId); //result will come with async response
782 /*================================================================================================*/
783 int tel_get_sms_parameters(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
786 * @brief This function is used to set the short message service header parameters which are
787 * 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).
789 * @par Sync (or) Async:
790 * This is an Asynchronous API.
792 * @par Important Notes:
793 * - This API updates/sets SMS Parameters in EFsmsp file in the SIM storage
800 * - handle from tel_init()
802 * @param [in] pSmsSetParameters
803 * - Contains SMS header Parameter information like service center address, destination address, validity period, protocol identifier,
804 * data coding scheme.
806 * @param [in] callback
807 * - To register callback function for result of this function.
809 * @param [in] user_data
810 * - user data for user specification
812 * @par Async Response Message:
813 * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event. Asynchronous
814 * return status is indicated by #TelSmsCause_t
822 * @return Return Type (int) \n
823 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
824 * - Else it will return failure and error code (Refer #TapiResult_t)
825 * @par Prospective Clients:
829 * #include <ITapiNetText.h>
831 * int ret_status = TAPI_API_SUCCESS;
833 * TelSmsParams_t SmsSetParameters = {0,};
835 * SmsSetParameters.RecordIndex = 0x01;
836 * SmsSetParameters.RecordLen = 28;
837 * memcpy(SmsSetParameters.TpDestAddr.szDiallingNum, "9986529874", 10);
838 * printf("\ndial no is %s\n", SmsSetParameters.TpDestAddr.szDiallingNum);
839 * SmsSetParameters.TpDestAddr.DialNumLen = 10;
840 * SmsSetParameters.TpDestAddr.Ton = TAPI_SIM_TON_NATIONAL;//national no
841 * SmsSetParameters.TpDestAddr.Npi = TAPI_SIM_NPI_NATIONAL;
843 * ret_status = tel_set_sms_parameters(SmsSetParameters, &RequestId); //result will come with async response
855 /*================================================================================================*/
856 int tel_set_sms_parameters(TapiHandle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data);
859 * @brief This function is used to send a delivery report for the received incoming SMS to the network.
860 * Access to this API is limited to in-house application.
862 * @par Sync (or) Async:
863 * This is a Asynchronous API.
865 * @par Important Notes:
873 * - handle from tel_init()
875 * @param [in] pDataPackage
876 * - Contains SMS Data package..
878 * @param [in] RPCause
879 * - Indicates the reason for SMS-DELIVER failure
881 * @param [in] callback
882 * - To register callback function for result of this function.
884 * @param [in] user_data
885 * - user data for user specification
887 * @par Async Response Message:
888 * The event associated is TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF and there is no associated event data. Asynchronous return status
889 * is indicated by #TelSmsResponse_t
892 * - SMS-DELIVER-REPORT message structure should be in TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
897 * @return Return Type (int) \n
898 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
899 * - Else it will return failure and error code (Refer #TapiResult_t)
900 * @par Prospective Clients:
904 * #include <ITapiNetText.h>
906 * int ret_status = 0;
907 * Int requestId = -1;
908 * TelSmsResponse_t RPCause;
909 * TelSmsDatapackageInfo_t *del_report = NULL;
911 * del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
912 * memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
913 * //Encode Send Delivery Report here
914 * //EncodeSmsDeliveryReportTpdu();
916 * RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
917 * printf("***receive message (Api:SendDeliverreport)****\n");
919 * ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
931 /*================================================================================================*/
932 int tel_send_sms_deliver_report(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, tapi_response_cb callback, void* user_data);
935 * @brief This function is used to set SMS Service Centre Address information in order to send the SMS.
936 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
938 * @par Sync (or) Async:
939 * This is an Asynchronous API.
941 * @par Important Notes:
942 * - This API updates/sets service center address in EFsmsp file in the SIM storage.
948 * - handle from tel_init()
951 * - Contains the service centre address informations.
954 * - Contains the record index of the Service center address information in the EF.
956 * @param [in] callback
957 * - To register callback function for result of this function.
959 * @param [in] user_data
960 * - user data for user specification
962 * @par Async Response Message:
963 * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
964 * Asynchronous return status is indicated by #TelSmsResponse_t.
972 * @return Return Type (int) \n
973 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
974 * - Else it will return failure and error code (Refer #TapiResult_t).
975 * @par Prospective Clients:
979 * #include <ITapiNetText.h>
984 * char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
985 * BYTE scaNum_len =0;
986 * TelSmsAddressInfo_t *sc_addr = NULL;
991 * printf("***Setting the SCA(Api:SetSCA)****\n");
992 * sc_addr = (TelSmsAddressInfo_t *)malloc(sizeof(TelSmsAddressInfo_t));
993 * memset(sc_addr, 0, sizeof(sc_addr));
994 * memset(scaNum, 0, sizeof(scaNum));
995 * memset(scabuf, 0, sizeof(scabuf));
996 * sprintf(scaNum, "821091");
997 * scaNum_len = strlen(scaNum);
998 * scaNum_len = strlen(scaNum);
999 * scaNum[scaNum_len] = 0;
1000 * scaNum_len = scaNum_len - 1;
1002 * //idx = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
1004 * sc_addr->DialNumLen = idx ;
1005 * memcpy(sc_addr->szDiallingNum, packet, (unsigned int)idx);
1006 * ret_status = tel_set_sms_sca(sc_addr, 0, &RequestId); //result will come with async response
1018 /*================================================================================================*/
1019 int tel_set_sms_sca(TapiHandle *handle, const TelSmsAddressInfo_t *pSCA, int index, tapi_response_cb callback, void* user_data);
1022 * @brief This function is used to get current SMS Service Centre Address information.
1023 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
1025 * @par Sync (or) Async:
1026 * This is a Asynchronous API.
1028 * @par Important Notes:
1035 * @param [in] handle
1036 * - handle from tel_init()
1039 * - Contains the record index of the Service center address information in the EF.
1041 * @param [in] callback
1042 * - To register callback function for result of this function.
1044 * @param [in] user_data
1045 * - user data for user specification
1047 * @par Async Response Message:
1048 * The event associated is TAPI_EVENT_NETTEXT_GET_SCA_CNF and there is no data associated with this event.
1049 * Asynchronous return status is indicated by #TelSmsResponse_t.
1057 * @return Return Type (int) \n
1058 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1059 * - Else it will return failure and error code (Refer #TapiResult_t)
1060 * @par Prospective Clients:
1064 * #include <ITapiNetText.h>
1066 * int ret_status = TAPI_API_SUCCESS;
1067 * int RequestId = 0;
1069 * ret_status = tel_get_sms_sca(0, &RequestId); //result will come with async response
1081 /*================================================================================================*/
1082 int tel_get_sms_sca(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
1085 * @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 .
1086 * Access to this API is limited to in-house application.
1088 * @par Sync (or) Async:
1089 * This is a Asynchronous API.
1091 * @par Important Notes:
1098 * @param [in] handle
1099 * - handle from tel_init()
1101 * @param [in] memoryStatus
1102 * - Contains Memory Status
1104 * @param [in] callback
1105 * - To register callback function for result of this function.
1107 * @param [in] user_data
1108 * - user data for user specification
1110 * @par Async Response Message:
1111 * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
1112 * is indicated by #TelSmsResponse_t
1120 * @return Return Type (int) \n
1121 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1122 * - Else it will return failure and error code (Refer #TapiResult_t)
1123 * @par Prospective Clients:
1127 * #include <ITapiNetText.h>
1129 * int ret_status = TAPI_API_SUCCESS;
1130 * int RequestId = 0;
1131 * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
1133 * ret_status = tel_set_sms_memory_status(MemoryStatus, &RequestId); //result will come with async response
1145 /*================================================================================================*/
1146 int tel_set_sms_memory_status(TapiHandle *handle, int memoryStatus, tapi_response_cb callback, void* user_data);
1149 * @brief This function is used by the applications to set the message status in the SIM EF.
1150 * Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
1152 * @par Sync (or) Async:
1153 * This is a Asynchronous API.
1155 * @par Important Notes:
1162 * @param [in] handle
1163 * - handle from tel_init()
1166 * - Index of the message whose status has to be set.
1168 * @param [in] msgStatus
1169 * - Status of the message to be set.
1171 * @param [in] callback
1172 * - To register callback function for result of this function.
1174 * @param [in] user_data
1175 * - user data for user specification
1177 * @par Async Response Message:
1178 * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
1179 * is indicated by #TelSmsResponse_t
1187 * @return Return Type (int) \n
1188 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1189 * - Else it will return failure and error code (Refer #TapiResult_t)
1190 * @par Prospective Clients:
1194 * #include <ITapiNetText.h>
1196 * int ret_status = TAPI_API_SUCCESS;
1197 * int RequestId = 0;
1199 * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
1201 * ret_status = tel_set_sms_memory_status(index, MemoryStatus, &RequestId); //result will come with async response
1213 /*================================================================================================*/
1214 int tel_set_sms_message_status(TapiHandle *handle, int index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data);
1217 * @brief This function is used by the applications to get the count of SMS parameter records stored in SIM EF.
1218 * Access to this API is limited to in-house application.
1220 * @par Sync (or) Async:
1221 * This is a Asynchronous API.
1223 * @par Important Notes:
1230 * @param [in] handle
1231 * - handle from tel_init()
1233 * @param [in] callback
1234 * - To register callback function for result of this function.
1236 * @param [in] user_data
1237 * - user data for user specification
1239 * @par Async Response Message:
1240 * The event associated is TAPI_EVENT_NETTEXT_PARAM_COUNT_IND and there is no associated event data. Asynchronous return status
1241 * is indicated by #TelSmsResponse_t
1249 * @return Return Type (int) \n
1250 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1251 * - Else it will return failure and error code (Refer #TapiResult_t)
1252 * @par Prospective Clients:
1256 * #include <ITapiNetText.h>
1258 * int ret_status = TAPI_API_SUCCESS;
1259 * int RequestId = 0;
1261 * ret_status = tel_get_sms_parameter_count (&RequestId); //result will come with async response
1272 /*================================================================================================*/
1273 int tel_get_sms_parameter_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
1277 * @brief This function is used by the applications check the sms ready status (whether ready or not) .
1279 * @par Sync (or) Async:
1280 * This is a Synchronous API.
1282 * @par Important Notes:
1289 * @param [in] handle
1290 * - handle from tel_init()
1292 * @param [out] pReadyStatus
1293 * - Contains Ready Status
1295 * @par Async Response Message:
1304 * @return Return Type (int) \n
1305 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1306 * - Else it will return failure and error code (Refer #TapiResult_t)
1307 * @par Prospective Clients:
1311 int tel_check_sms_device_status(TapiHandle *handle, int *pReadyStatus);
1314 * @brief This function is used by the applications to inform modem about the PDA status(whether PDA is ready to
1315 * recieve messages from network or not).
1318 * @par Sync (or) Async:
1319 * This is a Asynchronous API.
1321 * @par Important Notes:
1334 * @par Async Response Message:
1343 * @return Return Type (int) \n
1344 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1345 * - Else it will return failure and error code (Refer #TapiResult_t)
1346 * @par Prospective Clients:
1350 int tel_set_sms_device_status(void);
1356 #endif /* _ITAPI_NETTEXT_H_ */