Initialize Tizen 2.3
[framework/telephony/libslp-tapi.git] / mobile / include / ITapiNetText.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  */
20
21 /**
22 * @open
23 * @ingroup              TelephonyAPI
24 * @addtogroup   NetText_TAPI    NetText(SMS)
25 * @{
26  *
27 * @file ITapiNettext.h
28
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.
31
32  */
33
34 #ifndef _ITAPI_NETTEXT_H_
35 #define _ITAPI_NETTEXT_H_
36
37 #include <tapi_common.h>
38 #include <TelSms.h>
39 #include <TelDefines.h>
40
41 #ifdef __cplusplus
42 extern "C"
43 {
44 #endif
45
46  /**
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).
51  *
52  * @par Sync (or) Async:
53  * This is an Asynchronous API.
54  *
55  * @par Important Notes:
56  * - None.
57  *
58  * @warning
59  * - None.
60  *
61  *
62  * @param [in] handle
63  * - handle from tel_init()
64  *
65  * @param [in] pDataPackage
66  *   - Contains SMS-SUBMIT TPDU
67  *
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.
71  *
72  * @param [in] callback
73  *   - To register callback function for result of this function.
74  *
75  * @param [in] user_data
76  *   - user data for user specification
77  *
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.
81  *
82  * @pre
83  *  - None.
84  *
85  * @post
86  *  - None.
87  *
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)
91  *
92  * @par Prospective Clients:
93  * External Apps.
94  *
95  * @code
96  * #include <ITapiNetText.h>
97  *
98  * TelSmsDatapackageInfo_t *pDataPackage;
99  * int ret_status;
100  * int RequestId = 0;
101  *
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);
107  * @endcode
108  *
109  * @see
110  *  - None.
111  *
112  * @remarks
113  *  - None.
114  *
115  *
116  */
117 /*================================================================================================*/
118 int tel_send_sms(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, tapi_response_cb callback, void* user_data);
119
120  /**
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).
125  *
126  * @par Sync (or) Async:
127  * This is an Asynchronous API.
128  *
129  * @par Important Notes:
130  * - None.
131  *
132  * @warning
133  * - None.
134  *
135  *
136  * @param [in] pSmsMsgInfo
137  *   - Contains parameter mask, message type and data.
138  *
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.
142  *
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.
147  *
148  *
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.
152  *
153  * @pre
154  *  - None.
155  *
156  * @post
157  *  - None.
158  *
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)
162  *
163  * @par Prospective Clients:
164  * External Apps.
165  *
166  * @code
167  * #include <ITapiNetText.h>
168  * int ret_status = TAPI_API_SUCCESS;
169  * int requestId = 0;
170  * TelSmsMsgInfo_t pMsgInfo={0,};
171  * char* diallingNum;
172  * int dialNumLen;
173  * TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
174  *
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;
178  *
179  * ret_status = tel_send_sms_msg(pDataPackage, 0 ,&requestId);
180  *
181  * @endcode
182  *
183  * @see
184  *  - None.
185  *
186  * @remarks
187  *  - None.
188  *
189  *
190  */
191 /*================================================================================================*/
192 //int tel_send_sms_msg(const TelSmsMsgInfo_t *pSmsMsgInfo, int MoreMsgToSend, int *pRequestId);
193
194  /**
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).
198  *
199  * @par Sync (or) Async:
200  * This is an Asynchronous API.
201  *
202  * @par Important Notes:
203  * - None.
204  *
205  * @warning
206  * - None.
207  *
208  *
209  * @param [in] handle
210  * - handle from tel_init()
211  *
212  * @param [in] index
213  *  -  Index number of the message to be read
214  *
215  * @param [in] callback
216  *   - To register callback function for result of this function.
217  *
218  * @param [in] user_data
219  *   - user data for user specification
220  *
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
223  *  by #TelSmsCause_t.
224  *
225  * @pre
226  *  - None.
227  *
228  * @post
229  *  - None.
230  *
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)
234  *
235  * @par Prospective Clients:
236  * External Apps.
237  *
238  * @code
239  * #include <ITapiNetText.h>
240  * int ret_status = TAPI_API_SUCCESS;
241  * int RequestId = 0;
242  *
243  * ret_status = tel_read_sms_in_sim(0, &RequestId); //index value which is located in SIM
244  *
245  * @endcode
246  *
247  * @see
248  *  - None.
249  *
250  * @remarks
251  *  - None.
252  *
253  *
254  */
255 /*================================================================================================*/
256  int tel_read_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
257
258  /**
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).
261  *
262  * @par Sync (or) Async:
263  * This is an Asynchronous API.
264  *
265  * @par Important Notes:
266  * - None.
267  *
268  * @warning
269  * - None.
270  *
271  *
272  * @param [in] handle
273  * - handle from tel_init()
274  *
275  * @param [in] pWriteData
276  *  - SMS message structure.
277  *
278  * @param [in] callback
279  *   - To register callback function for result of this function.
280  *
281  * @param [in] user_data
282  *   - user data for user specification
283  *
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.
287  *
288  * @pre
289  *  - None.
290  *
291  * @post
292  *  - None.
293  *
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)
297  *
298  * @par Prospective Clients:
299  * External Apps.
300  *
301  * @code
302  * #include <ITapiNetText.h>
303  *
304  * int ret_status = TAPI_API_SUCCESS;
305  * int RequestId = 0;
306  * TelSmsData_t *pWriteData;
307  * char *msg = "This is an Test SMS";
308  * char *SCA = "821091";
309  *
310  * pWriteData = malloc(sizeof(TelSmsData_t));
311  *
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;
316  *
317  * ret_status = tel_write_sms_in_sim (pWriteData, &RequestId);
318  * @endcode
319  *
320  * @see
321  *  - None.
322  *
323  * @remarks
324  *  - None.
325  *
326  *
327  */
328 /*================================================================================================*/
329 int tel_write_sms_in_sim(TapiHandle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data);
330
331  /**
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).
334  *
335  * @par Sync (or) Async:
336  * This is an Asynchronous API.
337  *
338  * @par Important Notes:
339  * - None.
340  *
341  * @warning
342  * - None.
343  *
344  *
345  * @param [in] handle
346  * - handle from tel_init()
347  *
348  * @param [in] Index
349  *  - Message index to delete.
350  *
351  * @param [in] callback
352  *   - To register callback function for result of this function.
353  *
354  * @param [in] user_data
355  *   - user data for user specification
356  *
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.
360  *
361  * @pre
362  *  - None.
363  *
364  * @post
365  *  - None.
366  *
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:
371  *  External Apps.
372  *
373  * @code
374  * #include <ITapiNetText.h>
375  *
376  * int ret_status = TAPI_API_SUCCESS;
377  * int RequestId = 0;
378  *
379  * ret_status = tel_delete_sms_in_sim(1, &RequestId); //index which is located in SIM
380  *
381  * @endcode
382  *
383  * @see
384  *  - None.
385  *
386  * @remarks
387  *  - None.
388  *
389  *
390  */
391 /*================================================================================================*/
392 int tel_delete_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
393
394  /**
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.
399  *
400  * @par Sync (or) Async:
401  * This is an Asynchronous API.
402  *
403  * @par Important Notes:
404  * - None.
405  *
406  * @warning
407  * - None.
408  *
409  *
410  * @param [in] handle
411  * - handle from tel_init()
412  *
413  * @param [in] callback
414  *   - To register callback function for result of this function.
415  *
416  * @param [in] user_data
417  *   - user data for user specification
418
419  *
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.
423  *
424  * @pre
425  *  - None.
426  *
427  * @post
428  *  - None.
429  *
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:
434  * - External Apps.\n
435  *
436  * @code
437  * #include <ITapiNetText.h>
438  *
439  * int ret_status = TAPI_API_SUCCESS;
440  * int RequestId = 0;
441  *
442  * ret_status = tel_get_sms_count (&RequestId); //get sms count in SIM
443  * @endcode
444  *
445  * @see
446  *  - None.
447  *
448  * @remarks
449  *  - None.
450  *
451  *
452  */
453 /*================================================================================================*/
454 int tel_get_sms_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
455
456  /**
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.
460  *
461  * @par Sync (or) Async:
462  * This is an Asynchronous API.
463  *
464  * @par Important Notes:
465  * - None.
466  *
467  * @warning
468  * - None.
469  *
470  *
471  * @param [in] handle
472  * - handle from tel_init()
473  *
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
478  *           some of those.\n
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.
483  *
484  * @param [in] callback
485  *   - To register callback function for result of this function.
486  *
487  * @param [in] user_data
488  *   - user data for user specification
489  *
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.
493  *
494  * @pre
495  *  - None.
496  *
497  * @post
498  *  - None.
499  *
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)
503  *
504  * @par Prospective Clients:
505  * External Apps.\n
506  *
507  * @code
508  * #include <ITapiNetText.h>
509  *
510  * int ret_status = TAPI_API_SUCCESS;
511  * int RequestId = 0;
512  * TelSmsCbConfig_t *pCBConfig = NULL;
513  *
514  * pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
515  * pCBConfig->bCBEnabled = 1; //fill structure appropriately
516  * pCBConfig->SelectedId = 0x01;
517  * pCBConfig->MsgIdCount = 0x02;
518  *
519  * pCBConfig->MsgIDs[0] = 0x0c;
520  * pCBConfig->MsgIDs[1] = 0x0c;
521  * pCBConfig->MsgIDs[2] = 0xdf;
522  * pCBConfig->MsgIDs[3] = 0x00;
523  *
524  * ret_status = tel_set_sms_cb_config(pCBConfig, &RequestId);
525  *
526  * @endcode
527  *
528  * @see
529  *  - None.
530  *
531  * @remarks
532  *  - None.
533  *
534  *
535  */
536 /*================================================================================================*/
537 int tel_set_sms_cb_config(TapiHandle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data); 
538
539  /**
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).
542  *
543  * @par Sync (or) Async:
544  * This is an Asynchronous API.
545  *
546  * @par Important Notes:
547  * - None.
548  *
549  * @warning
550  * - None.
551  *
552  *
553  * @param [in] handle
554  * - handle from tel_init()
555  *
556  * @param [in] callback
557  *   - To register callback function for result of this function.
558  *
559  * @param [in] user_data
560  *   - user data for user specification
561  *
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.
565  *
566  * @pre
567  *  - None.
568  *
569  * @post
570  *  - None.
571  *
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:
576  * - External Apps.\n
577  *
578  * @code
579  * #include <ITapiNetText.h>
580  *
581  * int ret_status = TAPI_API_SUCCESS;
582  * int RequestId = 0;
583  *
584  * ret_status = tel_get_sms_cb_config (&RequestId); //result will come with async response
585  * @endcode
586  *
587  * @see
588  *  - None.
589  *
590  * @remarks
591  *  - None.
592  *
593  *
594  */
595 /*================================================================================================*/
596 int tel_get_sms_cb_config(TapiHandle *handle, tapi_response_cb callback, void* user_data);
597
598
599  /**
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).
602  *
603  * @par Sync (or) Async:
604  * This is an Asynchronous API.
605  *
606  * @par Important Notes:
607  * - None.
608  *
609  * @warning
610  * - None.
611  *
612  *
613  * @param [in] handle
614  * - handle from tel_init()
615  *
616  * @param [in] BearerType
617  *  - Specifies the bearer type.
618  *
619  * @param [in] callback
620  *   - To register callback function for result of this function.
621  *
622  * @param [in] user_data
623  *   - user data for user specification
624  *
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
628  *
629  * @pre
630  *  - None.
631  *
632  * @post
633  *  - None.
634  *
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:
639  * External Apps.
640  *
641  * @code
642  * #include <ITapiNetText.h>
643  * int ret_status = TAPI_API_SUCCESS;
644  * int RequestId = 0;
645  * TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
646  *
647  * ret_status = tel_set_sms_preferred_bearer(BearerType, &RequestId); //result will come with async response
648  *
649  * @endcode
650  *
651  * @see
652  *  - None.
653  *
654  * @remarks
655  *  - None.
656  *
657  *
658  */
659 /*================================================================================================*/
660 int tel_set_sms_preferred_bearer(TapiHandle *handle, TelSmsBearerType_t BearerType, tapi_response_cb callback, void* user_data);
661
662  /**
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).
665  *
666  * @par Sync (or) Async:
667  * This is an Asynchronous API.
668  *
669  * @par Important Notes:
670  * - None.
671  *
672  * @warning
673  * - None.
674  *
675  *
676  * @param [in] handle
677  * - handle from tel_init()
678  *
679  * @param [in] callback
680  *   - To register callback function for result of this function.
681  *
682  * @param [in] user_data
683  *   - user data for user specification
684  *
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.
688  *
689  * @pre
690  *  - None.
691  *
692  * @post
693  *  - None.
694  *
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:
699  * External Apps.
700  *
701  * @code
702  * #include <ITapiNetText.h>
703  *
704  * int ret_status = TAPI_API_SUCCESS;
705  * int RequestId = 0;
706  *
707  * ret_status = tel_get_sms_preferred_bearer(&RequestId); //result will come with async response
708  *
709  * @endcode
710  *
711  * @see
712  *  - None.
713  *
714  * @remarks
715  *  - None.
716  *
717  *
718  */
719 /*================================================================================================*/
720 int tel_get_sms_preferred_bearer(TapiHandle *handle, tapi_response_cb callback, void* user_data);
721
722  /**
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).
725  *
726  * @par Sync (or) Async:
727  * This is an Asynchronous API.
728  *
729  * @par Important Notes:
730  * - None.
731  *
732  * @warning
733  * - None.
734  *
735  *
736  * @param [in] handle
737  * - handle from tel_init()
738  *
739  * @param [in] index
740  *  - SIM index where the SMS is stored
741  *
742  * @param [in] callback
743  *   - To register callback function for result of this function.
744  *
745  * @param [in] user_data
746  *   - user data for user specification
747  *
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
751  *
752  * @pre
753  *  - None.
754  *
755  * @post
756  *  - None.
757  *
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:
762  * External Apps.
763  *
764  * @code
765  * #include <ITapiNetText.h>
766  *
767  * int ret_status = TAPI_API_SUCCESS;
768  * int RequestId = 0;
769  *
770  * ret_status = tel_get_sms_parameters(1, &RequestId); //result will come with async response
771  *
772  * @endcode
773  *
774  * @see
775  *  - None.
776  *
777  * @remarks
778  *  - None.
779  *
780  *
781  */
782 /*================================================================================================*/
783 int tel_get_sms_parameters(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
784
785  /**
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).
788  *
789  * @par Sync (or) Async:
790  * This is an Asynchronous API.
791  *
792  * @par Important Notes:
793  * - This API updates/sets SMS Parameters in EFsmsp file in the SIM storage
794  *
795  * @warning
796  * - None.
797  *
798  *
799  * @param [in] handle
800  * - handle from tel_init()
801  *
802  * @param [in] pSmsSetParameters
803  *  - Contains SMS header Parameter information like service center address, destination address, validity period, protocol identifier,
804  *     data coding scheme.
805  *
806  * @param [in] callback
807  *   - To register callback function for result of this function.
808  *
809  * @param [in] user_data
810  *   - user data for user specification
811  *
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
815  *
816  * @pre
817  *  - None.
818  *
819  * @post
820  *  - None.
821  *
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:
826  * External Apps.
827  *
828  * @code
829  * #include <ITapiNetText.h>
830  *
831  * int ret_status = TAPI_API_SUCCESS;
832  * int RequestId = 0;
833  * TelSmsParams_t SmsSetParameters = {0,};
834  *
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;
842  *
843  * ret_status = tel_set_sms_parameters(SmsSetParameters, &RequestId); //result will come with async response
844  *
845  * @endcode
846  *
847  * @see
848  *  - None.
849  *
850  * @remarks
851  *  - None.
852  *
853  *
854  */
855 /*================================================================================================*/
856 int tel_set_sms_parameters(TapiHandle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data);
857
858  /**
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.
861  *
862  * @par Sync (or) Async:
863  * This is a Asynchronous API.
864  *
865  * @par Important Notes:
866  * - None.
867  *
868  * @warning
869  * - None.
870  *
871  *
872  * @param [in] handle
873  * - handle from tel_init()
874  *
875  * @param [in] pDataPackage
876  *  - Contains SMS Data package..
877  *
878  * @param [in] RPCause
879  *  - Indicates the reason for SMS-DELIVER failure
880  *
881  * @param [in] callback
882  *   - To register callback function for result of this function.
883  *
884  * @param [in] user_data
885  *   - user data for user specification
886  *
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
890  *
891  * @pre
892  *  - SMS-DELIVER-REPORT message structure should be in TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
893  *
894  * @post
895  *  - None.
896  *
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:
901  * External Apps.
902  *
903  * @code
904  * #include <ITapiNetText.h>
905  *
906  * int ret_status = 0;
907  * Int requestId = -1;
908  * TelSmsResponse_t RPCause;
909  * TelSmsDatapackageInfo_t *del_report = NULL;
910  *
911  * del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
912  * memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
913  * //Encode Send Delivery Report here
914  * //EncodeSmsDeliveryReportTpdu();
915  *
916  * RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
917  * printf("***receive message (Api:SendDeliverreport)****\n");
918  *
919  * ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
920  *
921  * @endcode
922  *
923  * @see
924  *  - None.
925  *
926  * @remarks
927  *  - None.
928  *
929  *
930  */
931 /*================================================================================================*/
932 int tel_send_sms_deliver_report(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, tapi_response_cb callback, void* user_data);
933
934  /**
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).
937  *
938  * @par Sync (or) Async:
939  * This is an Asynchronous API.
940  *
941  * @par Important Notes:
942  * - This API updates/sets service center address in EFsmsp file in the SIM storage.
943  *
944  * @warning
945  * - None.
946  *
947  * @param [in] handle
948  * - handle from tel_init()
949  *
950  * @param [in] pSCA
951  * - Contains the service centre address informations.
952  *
953  * @param [in] Index
954  * - Contains the record index of the Service center address information in the EF.
955  *
956  * @param [in] callback
957  *   - To register callback function for result of this function.
958  *
959  * @param [in] user_data
960  *   - user data for user specification
961  *
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.
965  *
966  * @pre
967  *  - None.
968  *
969  * @post
970  *  - None.
971  *
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:
976  * External Apps.
977  *
978  * @code
979  * #include <ITapiNetText.h>
980  *
981  * int ret_status;
982  * int RequestId = 0;
983  * BYTE scabuf[512];
984  * char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
985  * BYTE scaNum_len =0;
986  * TelSmsAddressInfo_t *sc_addr = NULL;
987  * BYTE packet[500];
988  * int idx = 0;
989  * int i;
990  *
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;
1001  *
1002  * //idx = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
1003  * //get idx
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
1007  *
1008  * @endcode
1009  *
1010  * @see
1011  *  - None.
1012  *
1013  * @remarks
1014  *  - None.
1015  *
1016  *
1017  */
1018 /*================================================================================================*/
1019 int tel_set_sms_sca(TapiHandle *handle, const TelSmsAddressInfo_t *pSCA, int index, tapi_response_cb callback, void* user_data);
1020
1021  /**
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).
1024  *
1025  * @par Sync (or) Async:
1026  * This is a Asynchronous API.
1027  *
1028  * @par Important Notes:
1029  * - None.
1030  *
1031  * @warning
1032  * - None.
1033  *
1034  *
1035  * @param [in] handle
1036  * - handle from tel_init()
1037  *
1038  * @param [in] Index
1039  * - Contains the record index of the Service center address information in the EF.
1040  *
1041  * @param [in] callback
1042  *   - To register callback function for result of this function.
1043  *
1044  * @param [in] user_data
1045  *   - user data for user specification
1046  *
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.
1050  *
1051  * @pre
1052  *  - None.
1053  *
1054  * @post
1055  *  - None.
1056  *
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:
1061  * External Apps.
1062  *
1063  * @code
1064  * #include <ITapiNetText.h>
1065  *
1066  * int ret_status = TAPI_API_SUCCESS;
1067  * int RequestId = 0;
1068  *
1069  * ret_status = tel_get_sms_sca(0, &RequestId); //result will come with async response
1070  *
1071  * @endcode
1072  *
1073  * @see
1074  *  - None.
1075  *
1076  * @remarks
1077  *  - None.
1078  *
1079  *
1080  */
1081 /*================================================================================================*/
1082 int tel_get_sms_sca(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
1083
1084  /**
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.
1087  *
1088  * @par Sync (or) Async:
1089  * This is a Asynchronous API.
1090  *
1091  * @par Important Notes:
1092  * - None.
1093  *
1094  * @warning
1095  * - None.
1096  *
1097  *
1098  * @param [in] handle
1099  * - handle from tel_init()
1100  *
1101  * @param [in] memoryStatus
1102  *  - Contains Memory Status
1103  *
1104  * @param [in] callback
1105  *   - To register callback function for result of this function.
1106  *
1107  * @param [in] user_data
1108  *   - user data for user specification
1109  *
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
1113  *
1114  * @pre
1115  *  - None.
1116  *
1117  * @post
1118  *  - None.
1119  *
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:
1124  * External Apps.
1125  *
1126  * @code
1127  * #include <ITapiNetText.h>
1128  *
1129  * int ret_status = TAPI_API_SUCCESS;
1130  * int RequestId = 0;
1131  * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
1132  *
1133  * ret_status = tel_set_sms_memory_status(MemoryStatus, &RequestId); //result will come with async response
1134  *
1135  * @endcode
1136  *
1137  * @see
1138  *  - None.
1139  *
1140  * @remarks
1141  *  - None.
1142  *
1143  *
1144  */
1145 /*================================================================================================*/
1146 int tel_set_sms_memory_status(TapiHandle *handle, int memoryStatus, tapi_response_cb callback, void* user_data);
1147
1148  /**
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).
1151  *
1152  * @par Sync (or) Async:
1153  * This is a Asynchronous API.
1154  *
1155  * @par Important Notes:
1156  * - None.
1157  *
1158  * @warning
1159  * - None.
1160  *
1161  * 
1162  * @param [in] handle
1163  * - handle from tel_init()
1164  *
1165  * @param [in] Index
1166  *  - Index of the message whose status has to be set.
1167  *
1168  * @param [in] msgStatus
1169  *  - Status of the message to be set.
1170  *
1171  * @param [in] callback
1172  *   - To register callback function for result of this function.
1173  *
1174  * @param [in] user_data
1175  *   - user data for user specification
1176  *
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
1180  *
1181  * @pre
1182  *  - None.
1183  *
1184  * @post
1185  *  - None.
1186  *
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:
1191  * External Apps.
1192  *
1193  * @code
1194  * #include <ITapiNetText.h>
1195  *
1196  * int ret_status = TAPI_API_SUCCESS;
1197  * int RequestId = 0;
1198  * int index = 1;
1199  * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
1200  *
1201  * ret_status = tel_set_sms_memory_status(index, MemoryStatus, &RequestId); //result will come with async response
1202  *
1203  * @endcode
1204  *
1205  * @see
1206  *  - None.
1207  *
1208  * @remarks
1209  *  - None.
1210  *
1211  *
1212  */
1213 /*================================================================================================*/
1214 int tel_set_sms_message_status(TapiHandle *handle, int index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data);
1215
1216  /**
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.
1219  *
1220  * @par Sync (or) Async:
1221  * This is a Asynchronous API.
1222  *
1223  * @par Important Notes:
1224  * - None.
1225  *
1226  * @warning
1227  * - None.
1228  *
1229  * 
1230  * @param [in] handle
1231  * - handle from tel_init()
1232  *
1233  * @param [in] callback
1234  *   - To register callback function for result of this function.
1235  *
1236  * @param [in] user_data
1237  *   - user data for user specification
1238  *
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
1242  *
1243  * @pre
1244  *  - None.
1245  *
1246  * @post
1247  *  - None.
1248  *
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:
1253  * External Apps.
1254  *
1255  * @code
1256  * #include <ITapiNetText.h>
1257  *
1258  * int ret_status = TAPI_API_SUCCESS;
1259  * int RequestId = 0;
1260  *
1261  * ret_status = tel_get_sms_parameter_count (&RequestId); //result will come with async response
1262  * @endcode
1263  *
1264  * @see
1265  *  - None.
1266  *
1267  * @remarks
1268  *  - None.
1269  *
1270  *
1271  */
1272 /*================================================================================================*/
1273 int tel_get_sms_parameter_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
1274
1275
1276 /**
1277  * @brief This function is used by the applications check the sms ready status (whether ready or not) .
1278  *
1279  * @par Sync (or) Async:
1280  * This is a Synchronous API.
1281  *
1282  * @par Important Notes:
1283  * - None.
1284  *
1285  * @warning
1286  * - None.
1287  *
1288  * 
1289  * @param [in] handle
1290  * - handle from tel_init()
1291  *
1292  * @param [out] pReadyStatus
1293  * - Contains Ready Status
1294  *
1295  * @par Async Response Message:
1296  *  None.
1297  *
1298  * @pre
1299  *  - None.
1300  *
1301  * @post
1302  *  - None.
1303  *
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:
1308  * External Apps.
1309  *
1310  */
1311 int tel_check_sms_device_status(TapiHandle *handle, int *pReadyStatus);
1312
1313 /**
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).
1316  *
1317  *
1318  * @par Sync (or) Async:
1319  * This is a Asynchronous API.
1320  *
1321  * @par Important Notes:
1322  * - None.
1323  *
1324  * @warning
1325  * - None.
1326  *
1327  *
1328  * @param [in]
1329  *  - None
1330  *
1331  * @param [out]
1332  *  - None
1333  *
1334  * @par Async Response Message:
1335  *  None.
1336  *
1337  * @pre
1338  *  - None.
1339  *
1340  * @post
1341  *  - None.
1342  *
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:
1347  * External Apps.
1348  *
1349  */
1350 int tel_set_sms_device_status(void);
1351
1352 #ifdef __cplusplus
1353 }
1354 #endif
1355
1356 #endif  /* _ITAPI_NETTEXT_H_ */
1357
1358 /**
1359 * @}
1360 */