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