upload tizen1.0 source
[framework/telephony/libslp-tapi.git] / include / tapi / 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 <TapiCommon.h>
38 #include <TelNetText.h>
39
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44
45 /**
46  * @enum TelSmsDeviceStatus
47  * This defines the enumeration for device ready value
48  */
49 typedef enum {
50         TAPI_NETTEXT_DEVICE_READY = 0x01, /**< device is ready */
51         TAPI_NETTEXT_DEVICE_NOT_READY = 0x02 /**< Device not ready */
52 } TelSmsDeviceStatus;
53
54  /**
55  * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
56  *              3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to lower layers. This API allows keeping the dedicated link at lower layers
57  *              by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
58  *              used for transmission. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
59  *
60  * @par Sync (or) Async:
61  * This is an Asynchronous API.
62  *
63  * @par Important Notes:
64  * - None.
65  *
66  * @warning
67  * - None.
68  *
69  *
70  * @param [in] pDataPackage
71  *   - Contains SMS-SUBMIT TPDU
72  *
73  * @param [in] bMoreMsgToSend
74  *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
75  *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
76  *
77  * @param [out] pRequestId
78  * - Unique identifier for a particular request.
79  * - pRequestId value can be any value from 0 to 255 if the API is returned successfully
80  * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
81  *
82  *
83  * @par Async Response Message:
84  *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_CNF and the event data associated with this event
85  *  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.
86  *
87  * @pre
88  *  - None.
89  *
90  * @post
91  *  - None.
92  *
93  * @return Return Type (int) \n
94  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
95  * - Else it will return failure and error code (Refer #TapiResult_t)
96  *
97  * @par Prospective Clients:
98  * External Apps.
99  *
100  * @code
101  * #include <ITapiNetText.h>
102  *
103  * TelSmsDatapackageInfo_t *pDataPackage;
104  * int ret_status;
105  * int RequestId = 0;
106  *
107  * pDataPackage = (TelSmsDatapackageInfo_t*) malloc(sizeof(TelSmsDatapackageInfo_t));
108  * // fill the structure appropriately
109  * // Sca parameter is optional. If you don't provide Service center address, you should fill "00" in sca array.
110  * //  MsgLength is length of szData//fill the szData in TelSmsDatapackageInfo_t with SMS-SUBMIT or SMS-COMMAND TPDU.
111  * ret_status = tel_send_sms (pDataPackage, 0, &RequestId);
112  * @endcode
113  *
114  * @see
115  *  - None.
116  *
117  * @remarks
118  *  - None.
119  *
120  *
121  */
122 /*================================================================================================*/
123 int tel_send_sms(const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, int *pRequestId);
124
125  /**
126  * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
127  *              3GPP2 C.S0015 (SMS-SUBMIT, SMS-ACK, SMS-CANCEL) to lower layers. This API allows keeping the dedicated link at lower layers
128  *              by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
129  *              used for transmission. Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
130  *
131  * @par Sync (or) Async:
132  * This is an Asynchronous API.
133  *
134  * @par Important Notes:
135  * - None.
136  *
137  * @warning
138  * - None.
139  *
140  *
141  * @param [in] pSmsMsgInfo
142  *   - Contains parameter mask, message type and data.
143  *
144  * @param [in] MoreMsgToSend
145  *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
146  *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
147  *
148  * @param [out] pRequestId
149  * - Unique identifier for a particular request.
150  * - pRequestId value can be any value from 0 to 255 if the API is returned successfully
151  * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
152  *
153  *
154  * @par Async Response Message:
155  *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF and the event data associated with this event
156  *  is #TelSmsIs637CauseCode_t. Asynchronous return status is indicated by #TelSmsResponse_t.
157  *
158  * @pre
159  *  - None.
160  *
161  * @post
162  *  - None.
163  *
164  * @return Return Type (int) \n
165  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
166  * - Else it will return failure and error code (Refer #TapiResult_t)
167  *
168  * @par Prospective Clients:
169  * External Apps.
170  *
171  * @code
172  * #include <ITapiNetText.h>
173  * int ret_status = TAPI_API_SUCCESS;
174  * int requestId = 0;
175  * TelSmsMsgInfo_t pMsgInfo={0,};
176  * char* diallingNum;
177  * int dialNumLen;
178  * TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
179  *
180  * memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
181  * pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT; //fill structure appropriately
182  * pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
183  *
184  * ret_status = tel_send_sms_msg(pDataPackage, 0 ,&requestId);
185  *
186  * @endcode
187  *
188  * @see
189  *  - None.
190  *
191  * @remarks
192  *  - None.
193  *
194  *
195  */
196 /*================================================================================================*/
197 int tel_send_sms_msg(const TelSmsMsgInfo_t *pSmsMsgInfo, int MoreMsgToSend, int *pRequestId);
198
199  /**
200  * @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
201  *              to read particular SMS message. Total number of messages can be retrieved by #TelTapiSmsGetCount function.
202   *             Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
203  *
204  * @par Sync (or) Async:
205  * This is an Asynchronous API.
206  *
207  * @par Important Notes:
208  * - None.
209  *
210  * @warning
211  * - None.
212  *
213  * @param [in] Index
214  *  -  Index number of the message to be read
215  *
216  * @param [out] pRequestId
217  *      -  Unique identifier for a particular request.
218  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
219  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
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(int Index, int* pRequestId);
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] pWriteData
273  *  - SMS message structure.
274  *
275  * @param [out] pRequestId
276  *      -  Unique identifier for a particular request.
277  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
278  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
279  *
280  * @par Async Response Message:
281  *  TAPI library will send TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF asynchronous event for this request when received from TS.
282  *  The associated data is SIM Index in which the message stored. Asynchronous return status is indicated by #TelSmsCause_t.
283  *
284  * @pre
285  *  - None.
286  *
287  * @post
288  *  - None.
289  *
290  * @return Return Type (int) \n
291  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
292  * - Else it will return failure and error code (Refer #TapiResult_t)
293  *
294  * @par Prospective Clients:
295  * External Apps.
296  *
297  * @code
298  * #include <ITapiNetText.h>
299  *
300  * int ret_status = TAPI_API_SUCCESS;
301  * int RequestId = 0;
302  * TelSmsData_t *pWriteData;
303  * char *msg = "This is an Test SMS";
304  * char *SCA = "821091";
305  *
306  * pWriteData = malloc(sizeof(TelSmsData_t));
307  *
308  * conv_service_center_address(pWriteData->SmsData.Sca, SCA); //convert service center address
309  * conv_msg_into_tpdu(pWriteData->SmsData.szData, pWriteData->SmsData.MsgLength, msg); // convert message into TPDU
310  * pWrite->MsgStatus = TAPI_NETTEXT_STATUS_READ;
311  * pWrite->SimIndex = -1;
312  *
313  * ret_status = tel_write_sms_in_sim (pWriteData, &RequestId);
314  * @endcode
315  *
316  * @see
317  *  - None.
318  *
319  * @remarks
320  *  - None.
321  *
322  *
323  */
324 /*================================================================================================*/
325 int tel_write_sms_in_sim(const TelSmsData_t *pWriteData, int *pRequestId);
326
327  /**
328  * @brief  This function deletes a message specified by index (SIM index used when storing the SMS)
329  *           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).
330  *
331  * @par Sync (or) Async:
332  * This is an Asynchronous API.
333  *
334  * @par Important Notes:
335  * - None.
336  *
337  * @warning
338  * - None.
339  *
340  *
341  * @param [in] Index
342  *  - Message index to delete.
343  *
344  * @param [out] pRequestId
345  *      -  Unique identifier for a particular request.
346  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
347  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
348  *
349  * @par Async Response Message:
350  * The asynchronous event associated is TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF and the event data is SIM index from which
351  * the message has been deleted. Asynchronous return status is indicated by #TelSmsCause_t.
352  *
353  * @pre
354  *  - None.
355  *
356  * @post
357  *  - None.
358  *
359  * @return Return Type (int) \n
360  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
361  * - Else it will return failure and error code (Refer #TapiResult_t).\n
362  * @par Prospective Clients:
363  *  External Apps.
364  *
365  * @code
366  * #include <ITapiNetText.h>
367  *
368  * int ret_status = TAPI_API_SUCCESS;
369  * int RequestId = 0;
370  *
371  * ret_status = tel_delete_sms_in_sim(1, &RequestId); //index which is located in SIM
372  *
373  * @endcode
374  *
375  * @see
376  *  - None.
377  *
378  * @remarks
379  *  - None.
380  *
381  *
382  */
383 /*================================================================================================*/
384 int tel_delete_sms_in_sim(int Index, int *pRequestId);
385
386  /**
387  * @brief  This function is used to retrieve message count information like Total record count,
388  *  used record count and the indices list for SIM Storage. This is an asynchronous function and
389  *  the response will be sent back by event notification. Access to this API is limited, we recommend you use Message Framework API(MAPI) besides.
390  *  Access to this API is limited to in-house application.
391  *
392  * @par Sync (or) Async:
393  * This is an Asynchronous API.
394  *
395  * @par Important Notes:
396  * - None.
397  *
398  * @warning
399  * - None.
400  *
401  *
402  * @param [out] pRequestId
403  *      -  Unique identifier for a particular request.
404  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
405  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
406  *
407  * @par Async Response Message:
408  * The event associated is TAPI_EVENT_NETTEXT_GET_COUNT_CNF and the event data is #TelSmsStoredMsgCountInfo_t.
409  * Asynchronous return status is indicated by #TelSmsCause_t.
410  *
411  * @pre
412  *  - None.
413  *
414  * @post
415  *  - None.
416  *
417  * @return Return Type (int) \n
418  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
419  * - Else it will return failure and error code (Refer #TapiResult_t)
420  * @par Prospective Clients:
421  * - External Apps.\n
422  *
423  * @code
424  * #include <ITapiNetText.h>
425  *
426  * int ret_status = TAPI_API_SUCCESS;
427  * int RequestId = 0;
428  *
429  * ret_status = tel_get_sms_count (&RequestId); //get sms count in SIM
430  * @endcode
431  *
432  * @see
433  *  - None.
434  *
435  * @remarks
436  *  - None.
437  *
438  *
439  */
440 /*================================================================================================*/
441 int tel_get_sms_count(int *pRequestId);
442
443  /**
444  * @brief  This function is used to set SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
445  *              This function also indicates underlying provider to enable or disable CB Channel on which CB messages are received.
446  *              Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI) besides.
447  *
448  * @par Sync (or) Async:
449  * This is an Asynchronous API.
450  *
451  * @par Important Notes:
452  * - None.
453  *
454  * @warning
455  * - None.
456  *
457  *
458  * @param [in] pCBConfig
459  *  - This structure contains parameters to set SMS CB configuration \n
460  *      (i)  Cell broadcast service state. (Enabled/disabled.) \n
461  *      (ii) Cell broadcast message identifier, which denotes whether all cell broadcast message identifiers are selected or only
462  *           some of those.\n
463  *        (iii) The list count of message identifiers to be set.\n
464  *        (iv) The actual list of message identifiers to be set. Each identifier occupies 2 bytes. And the list ranges from 0x00 to 0xff. \n
465  *    These message identifiers denote the source and type of the CB message. Based on the message identifiers set in the SIM,
466  *    the ME receives CB messages with selected message identifiers.
467  *
468  * @param [out] pRequestId
469  *      -  Unique identifier for a particular request.
470  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
471  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
472  *
473  * @par Async Response Message:
474  * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
475  * Asynchronous return status is indicated by #TelSmsCause_t.
476  *
477  * @pre
478  *  - None.
479  *
480  * @post
481  *  - None.
482  *
483  * @return Return Type (int) \n
484  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
485  * - Else it will return failure and error code (Refer #TapiResult_t)
486  *
487  * @par Prospective Clients:
488  * External Apps.\n
489  *
490  * @code
491  * #include <ITapiNetText.h>
492  *
493  * int ret_status = TAPI_API_SUCCESS;
494  * int RequestId = 0;
495  * TelSmsCbConfig_t *pCBConfig = NULL;
496  *
497  * pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
498  * pCBConfig->bCBEnabled = 1; //fill structure appropriately
499  * pCBConfig->SelectedId = 0x01;
500  * pCBConfig->MsgIdCount = 0x02;
501  *
502  * pCBConfig->MsgIDs[0] = 0x0c;
503  * pCBConfig->MsgIDs[1] = 0x0c;
504  * pCBConfig->MsgIDs[2] = 0xdf;
505  * pCBConfig->MsgIDs[3] = 0x00;
506  *
507  * ret_status = tel_set_sms_cb_config(pCBConfig, &RequestId);
508  *
509  * @endcode
510  *
511  * @see
512  *  - None.
513  *
514  * @remarks
515  *  - None.
516  *
517  *
518  */
519 /*================================================================================================*/
520 int tel_set_sms_cb_config(const TelSmsCbConfig_t *pCBConfig, int *pRequestId);
521
522  /**
523  * @brief  This function is used to retrieve SMS CB configuration options from EFcbmi file in the SIM.
524  *              Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
525  *
526  * @par Sync (or) Async:
527  * This is an Asynchronous API.
528  *
529  * @par Important Notes:
530  * - None.
531  *
532  * @warning
533  * - None.
534  *
535  *
536  * @param [out] pRequestId
537  *      -  Unique identifier for a particular request.
538  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
539  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
540  *
541  * @par Async Response Message:
542  * The event associated is TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF and the event data is #TelSmsCbConfig_t.
543  * Asynchronous return status is indicated by #TelSmsCause_t.
544  *
545  * @pre
546  *  - None.
547  *
548  * @post
549  *  - None.
550  *
551  * @return Return Type (int) \n
552  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
553  * - Else it will return failure and error code (Refer #TapiResult_t)
554  * @par Prospective Clients:
555  * - External Apps.\n
556  *
557  * @code
558  * #include <ITapiNetText.h>
559  *
560  * int ret_status = TAPI_API_SUCCESS;
561  * int RequestId = 0;
562  *
563  * ret_status = tel_get_sms_cb_config (&RequestId); //result will come with async response
564  * @endcode
565  *
566  * @see
567  *  - None.
568  *
569  * @remarks
570  *  - None.
571  *
572  *
573  */
574 /*================================================================================================*/
575 int tel_get_sms_cb_config(int *pRequestId);
576
577
578  /**
579  * @brief This function is used to set SMS preferred bearer on which SMS has to be transmitted.
580  *            Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
581  *
582  * @par Sync (or) Async:
583  * This is an Asynchronous API.
584  *
585  * @par Important Notes:
586  * - None.
587  *
588  * @warning
589  * - None.
590  *
591  *
592  * @param [in] BearerType
593  *  - Specifies the bearer type.
594  *
595  * @param [out] pRequestId
596  *      -  Unique identifier for a particular request.
597  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
598  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
599  *
600  * @par Async Response Message:
601  * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
602  * Asynchronous return status is indicated by #TelSmsCause_t
603  *
604  * @pre
605  *  - None.
606  *
607  * @post
608  *  - None.
609  *
610  * @return Return Type (int) \n
611  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
612  * - Else it will return failure and error code (Refer #TapiResult_t)
613  * @par Prospective Clients:
614  * External Apps.
615  *
616  * @code
617  * #include <ITapiNetText.h>
618  * int ret_status = TAPI_API_SUCCESS;
619  * int RequestId = 0;
620  * TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
621  *
622  * ret_status = tel_set_sms_preferred_bearer(BearerType, &RequestId); //result will come with async response
623  *
624  * @endcode
625  *
626  * @see
627  *  - None.
628  *
629  * @remarks
630  *  - None.
631  *
632  *
633  */
634 /*================================================================================================*/
635 int tel_set_sms_preferred_bearer(TelSmsBearerType_t BearerType, int *pRequestId);
636
637  /**
638  * @brief  This function is used to get SMS preferred bearer on which SMS has to be transmitted.
639  *  This is an asynchronous function. Access to this API is limited to in-house application and , we recommend you use Message Framework API(MAPI).
640  *
641  * @par Sync (or) Async:
642  * This is an Asynchronous API.
643  *
644  * @par Important Notes:
645  * - None.
646  *
647  * @warning
648  * - None.
649  *
650  *
651  * @param [out] pRequestId
652  *      -  Unique identifier for a particular request.
653  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
654  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
655  *
656  * @par Async Response Message:
657  * The event associated is TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF and the associated event data is #TelSmsBearerType_t.
658  * Asynchronous return status is indicated by #TelSmsCause_t.
659  *
660  * @pre
661  *  - None.
662  *
663  * @post
664  *  - None.
665  *
666  * @return Return Type (int) \n
667  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
668  * - Else it will return failure and error code (Refer #TapiResult_t)
669  * @par Prospective Clients:
670  * External Apps.
671  *
672  * @code
673  * #include <ITapiNetText.h>
674  *
675  * int ret_status = TAPI_API_SUCCESS;
676  * int RequestId = 0;
677  *
678  * ret_status = tel_get_sms_preferred_bearer(&RequestId); //result will come with async response
679  *
680  * @endcode
681  *
682  * @see
683  *  - None.
684  *
685  * @remarks
686  *  - None.
687  *
688  *
689  */
690 /*================================================================================================*/
691 int tel_get_sms_preferred_bearer(int *pRequestId);
692
693  /**
694  * @brief This function is used to get the SMS parameters for a particular SMS (sent/received)
695  *  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).
696  *
697  * @par Sync (or) Async:
698  * This is an Asynchronous API.
699  *
700  * @par Important Notes:
701  * - None.
702  *
703  * @warning
704  * - None.
705  *
706  *
707  * @param [in] index
708  *  - SIM index where the SMS is stored
709  *
710  * @param [out] pRequestId
711  *      -  Unique identifier for a particular request.
712  *      -  pRequest Id value can be any value from 0 to 255 if the API is returned successfully
713  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
714  *
715  * @par Async Response Message:
716  * The event associated is TAPI_EVENT_NETTEXT_GET_PARAM_CNF and the event data is #TelSmsParams_t. Asynchronous return status
717  * is indicated by #TelSmsCause_t
718  *
719  * @pre
720  *  - None.
721  *
722  * @post
723  *  - None.
724  *
725  * @return Return Type (int) \n
726  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
727  * - Else it will return failure and error code (Refer #TapiResult_t)
728  * @par Prospective Clients:
729  * External Apps.
730  *
731  * @code
732  * #include <ITapiNetText.h>
733  *
734  * int ret_status = TAPI_API_SUCCESS;
735  * int RequestId = 0;
736  *
737  * ret_status = tel_get_sms_parameters(1, &RequestId); //result will come with async response
738  *
739  * @endcode
740  *
741  * @see
742  *  - None.
743  *
744  * @remarks
745  *  - None.
746  *
747  *
748  */
749 /*================================================================================================*/
750 int tel_get_sms_parameters(int index, int *pRequestId);
751
752  /**
753  * @brief  This function is used to set the short message service header parameters which are
754  *  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).
755  *
756  * @par Sync (or) Async:
757  * This is an Asynchronous API.
758  *
759  * @par Important Notes:
760  * - This API updates/sets SMS Parameters in EFsmsp file in the SIM storage
761  *
762  * @warning
763  * - None.
764  *
765  *
766  * @param [in] pSmsSetParameters
767  *  - Contains SMS header Parameter information like service center address, destination address, validity period, protocol identifier,
768  *     data coding scheme.
769  *
770  * @param [out] pRequestId
771  *      -  Unique identifier for a particular request.
772  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
773  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
774  *
775  * @par Async Response Message:
776  * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event. Asynchronous
777  * return status is indicated by #TelSmsCause_t
778  *
779  * @pre
780  *  - None.
781  *
782  * @post
783  *  - None.
784  *
785  * @return Return Type (int) \n
786  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
787  * - Else it will return failure and error code (Refer #TapiResult_t)
788  * @par Prospective Clients:
789  * External Apps.
790  *
791  * @code
792  * #include <ITapiNetText.h>
793  *
794  * int ret_status = TAPI_API_SUCCESS;
795  * int RequestId = 0;
796  * TelSmsParams_t SmsSetParameters = {0,};
797  *
798  * SmsSetParameters.RecordIndex = 0x01;
799  * SmsSetParameters.RecordLen = 28;
800  * memcpy(SmsSetParameters.TpDestAddr.szDiallingNum, "9986529874", 10);
801  * printf("\ndial no is %s\n", SmsSetParameters.TpDestAddr.szDiallingNum);
802  * SmsSetParameters.TpDestAddr.DialNumLen = 10;
803  * SmsSetParameters.TpDestAddr.Ton = TAPI_SIM_TON_NATIONAL;//national no
804  * SmsSetParameters.TpDestAddr.Npi = TAPI_SIM_NPI_NATIONAL;
805  *
806  * ret_status = tel_set_sms_parameters(SmsSetParameters, &RequestId); //result will come with async response
807  *
808  * @endcode
809  *
810  * @see
811  *  - None.
812  *
813  * @remarks
814  *  - None.
815  *
816  *
817  */
818 /*================================================================================================*/
819 int tel_set_sms_parameters(const TelSmsParams_t *pSmsSetParameters, int *pRequestId);
820
821  /**
822  * @brief This function is used to send a delivery report for the received incoming SMS to the network.
823  *          Access to this API is limited to in-house application.
824  *
825  * @par Sync (or) Async:
826  * This is a Asynchronous API.
827  *
828  * @par Important Notes:
829  * - None.
830  *
831  * @warning
832  * - None.
833  *
834  *
835  * @param [in] pDataPackage
836  *  - Contains SMS Data package..
837  *
838  * @param [in] RPCause
839  *  - Indicates the reason for SMS-DELIVER failure
840  *
841  * @param [out] pRequestId
842  *      -  Unique identifier for a particular request.
843  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
844  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
845  *
846  * @par Async Response Message:
847  * The event associated is TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF and there is no associated event data. Asynchronous return status
848  * is indicated by #TelSmsResponse_t
849  *
850  * @pre
851  *  - SMS-DELIVER-REPORT message structure should be in TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
852  *
853  * @post
854  *  - None.
855  *
856  * @return Return Type (int) \n
857  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
858  * - Else it will return failure and error code (Refer #TapiResult_t)
859  * @par Prospective Clients:
860  * External Apps.
861  *
862  * @code
863  * #include <ITapiNetText.h>
864  *
865  * int ret_status = 0;
866  * Int requestId = -1;
867  * TelSmsResponse_t RPCause;
868  * TelSmsDatapackageInfo_t *del_report = NULL;
869  *
870  * del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
871  * memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
872  * //Encode Send Delivery Report here
873  * //EncodeSmsDeliveryReportTpdu();
874  *
875  * RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
876  * printf("***receive message (Api:SendDeliverreport)****\n");
877  *
878  * ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
879  *
880  * @endcode
881  *
882  * @see
883  *  - None.
884  *
885  * @remarks
886  *  - None.
887  *
888  *
889  */
890 /*================================================================================================*/
891 int tel_send_sms_deliver_report(const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, int *pRequestId);
892
893  /**
894  * @brief  This function is used to set SMS Service Centre Address information in order to send the SMS.
895  *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
896  *
897  * @par Sync (or) Async:
898  * This is an Asynchronous API.
899  *
900  * @par Important Notes:
901  * - This API updates/sets service center address in EFsmsp file in the SIM storage.
902  *
903  * @warning
904  * - None.
905  *
906  *
907  * @param [in] pSCA
908  * - Contains the service centre address informations.
909  *
910  * @param [in] Index
911  * - Contains the record index of the Service center address information in the EF.
912  *
913  * @param [out] pRequestId
914  *      -  Unique identifier for a particular request.
915  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
916  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
917  *
918  * @par Async Response Message:
919  * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
920  * Asynchronous return status is indicated by #TelSmsResponse_t.
921  *
922  * @pre
923  *  - None.
924  *
925  * @post
926  *  - None.
927  *
928  * @return Return Type (int) \n
929  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
930  * - Else it will return failure and error code (Refer #TapiResult_t).
931  * @par Prospective Clients:
932  * External Apps.
933  *
934  * @code
935  * #include <ITapiNetText.h>
936  *
937  * int ret_status;
938  * int RequestId = 0;
939  * BYTE scabuf[512];
940  * char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
941  * BYTE scaNum_len =0;
942  * TelSmsAddressInfo_t *sc_addr = NULL;
943  * BYTE packet[500];
944  * int idx = 0;
945  * int i;
946  *
947  * printf("***Setting the SCA(Api:SetSCA)****\n");
948  * sc_addr = (TelSmsAddressInfo_t *)malloc(sizeof(TelSmsAddressInfo_t));
949  * memset(sc_addr, 0, sizeof(sc_addr));
950  * memset(scaNum, 0, sizeof(scaNum));
951  * memset(scabuf, 0, sizeof(scabuf));
952  * sprintf(scaNum, "821091");
953  * scaNum_len = strlen(scaNum);
954  * scaNum_len = strlen(scaNum);
955  * scaNum[scaNum_len] = 0;
956  * scaNum_len = scaNum_len - 1;
957  *
958  * //idx = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
959  * //get idx
960  * sc_addr->DialNumLen = idx ;
961  * memcpy(sc_addr->szDiallingNum, packet, (unsigned int)idx);
962  * ret_status = tel_set_sms_sca(sc_addr, 0, &RequestId); //result will come with async response
963  *
964  * @endcode
965  *
966  * @see
967  *  - None.
968  *
969  * @remarks
970  *  - None.
971  *
972  *
973  */
974 /*================================================================================================*/
975 int tel_set_sms_sca(const TelSmsAddressInfo_t *pSCA, int Index, int *pRequestId);
976
977  /**
978  * @brief  This function is used to get current SMS Service Centre Address information.
979  *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
980  *
981  * @par Sync (or) Async:
982  * This is a Asynchronous API.
983  *
984  * @par Important Notes:
985  * - None.
986  *
987  * @warning
988  * - None.
989  *
990  * @param [in] Index
991  * - Contains the record index of the Service center address information in the EF.
992  *
993  * @param [out] pRequestId
994  *      -  Unique identifier for a particular request.
995  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
996  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
997  *
998  * @par Async Response Message:
999  * The event associated is TAPI_EVENT_NETTEXT_GET_SCA_CNF and there is no data associated with this event.
1000  * Asynchronous return status is indicated by #TelSmsResponse_t.
1001  *
1002  * @pre
1003  *  - None.
1004  *
1005  * @post
1006  *  - None.
1007  *
1008  * @return Return Type (int) \n
1009  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1010  * - Else it will return failure and error code (Refer #TapiResult_t)
1011  * @par Prospective Clients:
1012  * External Apps.
1013  *
1014  * @code
1015  * #include <ITapiNetText.h>
1016  *
1017  * int ret_status = TAPI_API_SUCCESS;
1018  * int RequestId = 0;
1019  *
1020  * ret_status = tel_get_sms_sca(0, &RequestId); //result will come with async response
1021  *
1022  * @endcode
1023  *
1024  * @see
1025  *  - None.
1026  *
1027  * @remarks
1028  *  - None.
1029  *
1030  *
1031  */
1032 /*================================================================================================*/
1033 int tel_get_sms_sca(int Index, int *pRequestId);
1034
1035  /**
1036  * @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 .
1037  *           Access to this API is limited to in-house application.
1038  *
1039  * @par Sync (or) Async:
1040  * This is a Asynchronous API.
1041  *
1042  * @par Important Notes:
1043  * - None.
1044  *
1045  * @warning
1046  * - None.
1047  *
1048  *
1049  * @param [in] memoryStatus
1050  *  - Contains Memory Status
1051  *
1052  * @param [out] pRequestId
1053  *      -  Unique identifier for a particular request.
1054  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
1055  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
1056  *
1057  * @par Async Response Message:
1058  *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
1059  *  is indicated by #TelSmsResponse_t
1060  *
1061  * @pre
1062  *  - None.
1063  *
1064  * @post
1065  *  - None.
1066  *
1067  * @return Return Type (int) \n
1068  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1069  * - Else it will return failure and error code (Refer #TapiResult_t)
1070  * @par Prospective Clients:
1071  * External Apps.
1072  *
1073  * @code
1074  * #include <ITapiNetText.h>
1075  *
1076  * int ret_status = TAPI_API_SUCCESS;
1077  * int RequestId = 0;
1078  * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
1079  *
1080  * ret_status = tel_set_sms_memory_status(MemoryStatus, &RequestId); //result will come with async response
1081  *
1082  * @endcode
1083  *
1084  * @see
1085  *  - None.
1086  *
1087  * @remarks
1088  *  - None.
1089  *
1090  *
1091  */
1092 /*================================================================================================*/
1093 int  tel_set_sms_memory_status(int memoryStatus, int *pRequestId);
1094
1095  /**
1096  * @brief  This function is used by the applications to set the message status in the SIM EF.
1097  *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
1098  *
1099  * @par Sync (or) Async:
1100  * This is a Asynchronous API.
1101  *
1102  * @par Important Notes:
1103  * - None.
1104  *
1105  * @warning
1106  * - None.
1107  *
1108  *
1109  * @param [in] Index
1110  *  - Index of the message whose status has to be set.
1111  *
1112  *
1113  * @param [in] msgStatus
1114  *  - Status of the message to be set.
1115  *
1116  * @param [out] pRequestId
1117  *      -  Unique identifier for a particular request.
1118  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
1119  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
1120  *
1121  * @par Async Response Message:
1122  *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
1123  *  is indicated by #TelSmsResponse_t
1124  *
1125  * @pre
1126  *  - None.
1127  *
1128  * @post
1129  *  - None.
1130  *
1131  * @return Return Type (int) \n
1132  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1133  * - Else it will return failure and error code (Refer #TapiResult_t)
1134  * @par Prospective Clients:
1135  * External Apps.
1136  *
1137  * @code
1138  * #include <ITapiNetText.h>
1139  *
1140  * int ret_status = TAPI_API_SUCCESS;
1141  * int RequestId = 0;
1142  * int index = 1;
1143  * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
1144  *
1145  * ret_status = tel_set_sms_memory_status(index, MemoryStatus, &RequestId); //result will come with async response
1146  *
1147  * @endcode
1148  *
1149  * @see
1150  *  - None.
1151  *
1152  * @remarks
1153  *  - None.
1154  *
1155  *
1156  */
1157 /*================================================================================================*/
1158 int tel_set_sms_message_status(int Index, TelSmsMsgStatus_t msgStatus, int *pRequestId);
1159
1160  /**
1161  * @brief This function is used by the applications to get the count of SMS parameter records stored in SIM EF.
1162  *           Access to this API is limited to in-house application.
1163  *
1164  * @par Sync (or) Async:
1165  * This is a Asynchronous API.
1166  *
1167  * @par Important Notes:
1168  * - None.
1169  *
1170  * @warning
1171  * - None.
1172  *
1173  * @param [out] pRequestId
1174  *      -  Unique identifier for a particular request.
1175  *      -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
1176  *      -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
1177  *
1178  * @par Async Response Message:
1179  *  The event associated is TAPI_EVENT_NETTEXT_PARAM_COUNT_IND and there is no associated event data. Asynchronous return status
1180  *  is indicated by #TelSmsResponse_t
1181  *
1182  * @pre
1183  *  - None.
1184  *
1185  * @post
1186  *  - None.
1187  *
1188  * @return Return Type (int) \n
1189  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1190  * - Else it will return failure and error code (Refer #TapiResult_t)
1191  * @par Prospective Clients:
1192  * External Apps.
1193  *
1194  * @code
1195  * #include <ITapiNetText.h>
1196  *
1197  * int ret_status = TAPI_API_SUCCESS;
1198  * int RequestId = 0;
1199  *
1200  * ret_status = tel_get_sms_parameter_count (&RequestId); //result will come with async response
1201  * @endcode
1202  *
1203  * @see
1204  *  - None.
1205  *
1206  * @remarks
1207  *  - None.
1208  *
1209  *
1210  */
1211 /*================================================================================================*/
1212 int tel_get_sms_parameter_count(int *pRequestId);
1213
1214
1215 /**
1216  * @brief This function is used by the applications check the device status (whether ready or not) .
1217  *
1218  * @par Sync (or) Async:
1219  * This is a Synchronous API.
1220  *
1221  * @par Important Notes:
1222  * - None.
1223  *
1224  * @warning
1225  * - None.
1226  *
1227  *
1228  * @param [in]
1229  * - None
1230  *
1231  * @param [out] pDeviceStatus
1232  * - Contains Device Status
1233  *
1234  * @par Async Response Message:
1235  *  None.
1236  *
1237  * @pre
1238  *  - None.
1239  *
1240  * @post
1241  *  - None.
1242  *
1243  * @return Return Type (int) \n
1244  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1245  * - Else it will return failure and error code (Refer #TapiResult_t)
1246  * @par Prospective Clients:
1247  * External Apps.
1248  *
1249  */
1250 int tel_check_sms_device_status(int *pDeviceStatus);
1251
1252 /**
1253  * @brief This function is used by the applications to inform modem about the PDA status(whether PDA is ready to
1254  * recieve messages from network or not).
1255  *
1256  *
1257  * @par Sync (or) Async:
1258  * This is a Asynchronous API.
1259  *
1260  * @par Important Notes:
1261  * - None.
1262  *
1263  * @warning
1264  * - None.
1265  *
1266  *
1267  * @param [in]
1268  *  - None
1269  *
1270  * @param [out]
1271  *  - None
1272  *
1273  * @par Async Response Message:
1274  *  None.
1275  *
1276  * @pre
1277  *  - None.
1278  *
1279  * @post
1280  *  - None.
1281  *
1282  * @return Return Type (int) \n
1283  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1284  * - Else it will return failure and error code (Refer #TapiResult_t)
1285  * @par Prospective Clients:
1286  * External Apps.
1287  *
1288  */
1289 int tel_set_sms_device_status(void);
1290
1291 #ifdef __cplusplus
1292 }
1293 #endif
1294
1295 #endif  /* _ITAPI_NETTEXT_H_ */
1296
1297 /**
1298 * @}
1299 */