tizen 2.3.1 release
[framework/telephony/libslp-tapi.git] / include / ITapiNetText.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2014 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  * @file ITapiNetText.h
23  */
24
25 /**
26  * @internal
27  * @addtogroup CAPI_TELEPHONY_SERVICE_SMS
28  * @{
29  */
30
31 #ifndef _ITAPI_NETTEXT_H_
32 #define _ITAPI_NETTEXT_H_
33
34 #include <tapi_common.h>
35 #include <TelSms.h>
36
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41
42 /**
43  * @brief Sends an SMS message to the network.
44  *
45  * @details Allows transmitting SMS PDU as defined by 3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to lower layers.\n
46  * It allows keeping the dedicated link at lower layers by passing information as messages to send through parameters.\n
47  * This will enable to avoid releasing a dedicated connection used for transmission.
48  *
49  * <b> Sync (or) Async: </b> This is an Asynchronous API.
50  *
51  * <b> Prospective Clients: </b> External Apps.
52  *
53  * @since_tizen 2.3
54  * @privlevel platform
55  * @privilege %http://tizen.org/privilege/telephony.admin
56  *
57  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
58  *
59  * @param[in] handle The handle from tel_init()
60  * @param[in] pDataPackage The SMS-SUBMIT TPDU
61  * @param[in] bMoreMsgToSend If @c true there is more than one message to be sent or a multiple segmented concatenated
62  *                           message has to be sent, otherwise @c false \n
63  *                           This flag informs OEM that more messages have to be sent
64  * @param[in] callback To register a callback function for result
65  * @param[in] user_data The user data for user specification
66  *
67  * @return The return type (int)
68  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
69  *         else it will return failure and an error code (Refer #TapiResult_t)
70  */
71 int tel_send_sms(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, tapi_response_cb callback, void* user_data);
72
73 /**
74  * @brief Reads a message from the SIM card storage.
75  *
76  * @details The SIM index (index used when storing the SMS) is the number to be passed in order
77  *          to read a particular SMS message. Total number of messages can be retrieved by tel_get_sms_count function.
78  *
79  * <b> Sync (or) Async: </b> This is an Asynchronous API.
80  *
81  * <b> Prospective Clients: </b> External Apps.
82  *
83  * @since_tizen 2.3
84  * @privlevel public
85  * @privilege %http://tizen.org/privilege/telephony
86  *
87  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
88  *
89  * @param[in] handle The handle from tel_init()
90  * @param[in] read_index  The index number of the message to be read
91  * @param[in] callback To register a callback function for result
92  * @param[in] user_data The user data for user specification
93  *
94  * @return The return type (int)
95  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
96  *         else it will return failure and an error code (Refer #TapiResult_t)
97  */
98 int tel_read_sms_in_sim(TapiHandle *handle, int read_index, tapi_response_cb callback, void* user_data);
99
100 /**
101  * @brief Writes a message to the SIM storage area.
102  *
103  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
104  *
105  * <b> Prospective Clients: </b> External Apps.
106  *
107  * @since_tizen 2.3
108  * @privlevel platform
109  * @privilege %http://tizen.org/privilege/telephony.admin
110  *
111  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
112  *
113  * @param[in] handle The handle from tel_init()
114  * @param[in] pWriteData The SMS message structure
115  * @param[in] callback To register a callback function for result
116  * @param[in] user_data The user data for user specification
117  *
118  * @return The return type (int)
119  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
120  *         else it will return failure and an error code (Refer #TapiResult_t)
121  */
122 int tel_write_sms_in_sim(TapiHandle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data);
123
124 /**
125  * @brief Deletes the message specified by an index (SIM index used when storing the SMS)
126  *        number from the SIM storage area.
127  *
128  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
129  *
130  * <b> Prospective Clients: </b> External Apps.
131  *
132  * @since_tizen 2.3
133  * @privlevel platform
134  * @privilege %http://tizen.org/privilege/telephony.admin
135  *
136  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
137  *
138  * @param[in] handle The handle from tel_init()
139  * @param[in] del_index The message index to delete
140  * @param[in] callback To register a callback function for result
141  * @param[in] user_data The user data for user specification
142  *
143  * @return The return type (int)
144  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
145  *         else it will return failure and an error code (Refer #TapiResult_t)
146  */
147 int tel_delete_sms_in_sim(TapiHandle *handle, int del_index, tapi_response_cb callback, void* user_data);
148
149 /**
150  * @brief Retrieves message count information like total record count,
151  *        used record count, and indices list for SIM storage.
152  *
153  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
154  *
155  * <b> Prospective Clients: </b>  External Apps.
156  *
157  * @since_tizen 2.3
158  * @privlevel public
159  * @privilege %http://tizen.org/privilege/telephony
160  *
161  * @remarks This is an asynchronous function and the response will be sent back in the callback function.
162  *          Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
163  *
164  * @param[in] handle The handle from tel_init()
165  * @param[in] callback To register a callback function for result
166  * @param[in] user_data The user data for user specification
167  *
168  * @return The return type (int)
169  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
170  *         else it will return failure and an error code (Refer #TapiResult_t)
171  */
172 int tel_get_sms_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
173
174 /**
175  * @brief Sets SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in the (U)SIM.
176  *
177  * @details This function also indicates an underlying provider to enable or disable the CB Channel on which CB messages are received.
178  *
179  * <b> Sync (or) Async: </b> This is an Asynchronous API.
180  *
181  * <b> Prospective Clients: </b> External Apps.
182  *
183  * @since_tizen 2.3
184  * @privlevel platform
185  * @privilege %http://tizen.org/privilege/telephony.admin
186  *
187  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
188  *          @a pCBConfig contains parameters to set the SMS CB configuration.
189  *          (i)  Cell broadcast service state. (Enabled/disabled.)
190  *          (ii) Cell broadcast message identifier, which denotes whether all cell broadcast message identifiers are selected or only some of them.
191  *          (iii) The list count of message identifiers to be set.
192  *          (iv) The actual list of message identifiers to be set. Each identifier occupies 2 bytes. And the list ranges from 0x00 to 0xff.
193  *          These message identifiers denote the source and type of the CB message. Based on the message identifiers set in the SIM,
194  *          the ME receives CB messages with selected message identifiers.
195  *
196  * @param[in] handle The handle from tel_init()
197  * @param[in] pCBConfig The parameters of the SMS CB configuration
198  * @param[in] callback To register a callback function for result
199  * @param[in] user_data The user data for user specification
200  *
201  * @return The return type (int)
202  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
203  *         else it will return failure and an error code (Refer #TapiResult_t)
204  */
205 int tel_set_sms_cb_config(TapiHandle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data);
206
207 /**
208  * @brief Retrieves the SMS CB configuration parameters from the EFcbmi file in the SIM.
209  *
210  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
211  *
212  * <b> Prospective Clients: </b>  External Apps.
213  *
214  * @since_tizen 2.3
215  * @privlevel public
216  * @privilege %http://tizen.org/privilege/telephony
217  *
218  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
219  *
220  * @param[in] handle The handle from tel_init()
221  * @param[in] callback To register a callback function for result
222  * @param[in] user_data The user data for user specification
223  *
224  * @return The return type (int)
225  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
226  *         else it will return failure and an error code (Refer #TapiResult_t)
227  */
228 int tel_get_sms_cb_config(TapiHandle *handle, tapi_response_cb callback, void* user_data);
229
230 /**
231  * @brief Gets the SMS parameters for a particular SMS (sent/received)
232  * based on the SIM index where it is stored.
233  *
234  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
235  *
236  * <b> Prospective Clients: </b> External Apps.
237  *
238  * @since_tizen 2.3
239  * @privlevel public
240  * @privilege %http://tizen.org/privilege/telephony
241  *
242  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
243  *
244  * @param[in] handle The handle from tel_init()
245  * @param[in] get_index The SIM index where the SMS is stored
246  * @param[in] callback To register a callback function for result
247  * @param[in] user_data The user data for user specification
248  *
249  * @return The return type (int)
250  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
251  *         else it will return failure and an error code (Refer #TapiResult_t)
252  */
253 int tel_get_sms_parameters(TapiHandle *handle, int get_index, tapi_response_cb callback, void* user_data);
254
255 /**
256  * @brief Sets the short message service header parameters which are used in the origination of MO messages.
257  *
258  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
259  *
260  * <b> Important Notes: </b> This API updates/sets SMS Parameters in the EFsmsp file in the SIM storage.
261  *
262  * <b> Prospective Clients: </b> External Apps.
263  *
264  * @since_tizen 2.3
265  * @privlevel platform
266  * @privilege %http://tizen.org/privilege/telephony.admin
267  *
268  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
269  *          @a pSmsSetParameters contains SMS header parameters information like: service center address,
270  *          destination address, validity period, protocol identifier, and data coding scheme.
271  *
272  * @param[in] handle The handle from tel_init()
273  *
274  * @param[in] pSmsSetParameters The SMS header parameters information
275  * @param[in] callback To register a callback function for result
276  * @param[in] user_data The user data for user specification
277  *
278  * @return The return type (int)
279  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
280  *         else it will return failure and an error code (Refer #TapiResult_t)
281  */
282 int tel_set_sms_parameters(TapiHandle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data);
283
284 /**
285  * @brief Sends a delivery report for the received incoming SMS to the network.
286  *
287  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
288  *
289  * <b> Prospective Clients: </b> External Apps.
290  *
291  * @since_tizen 2.3
292  * @privlevel platform
293  * @privilege %http://tizen.org/privilege/telephony.admin
294  *
295  * @remarks Access to this API is limited to in-house applications.
296  *
297  * @param[in] handle The handle from tel_init()
298  * @param[in] pDataPackage The SMS Data package
299  * @param[in] RPCause The reason for SMS-DELIVER failure
300  * @param[in] callback To register a callback function for result
301  * @param[in] user_data The user data for user specification
302  *
303  * @return The return type (int)
304  *         #TAPI_API_SUCCESS indicates that the operation has completed successfully,
305  *         else it will return failure and an error code (Refer #TapiResult_t)
306  *
307  * @pre The SMS-DELIVER-REPORT message structure should be in the TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
308  */
309 int tel_send_sms_deliver_report(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, tapi_response_cb callback, void* user_data);
310
311 /**
312  * @brief Sets SMS Service Centre Address information in order to send the SMS.
313  *
314  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
315  *
316  * <b> Important Notes: </b> This API updates/sets the service center address in the EFsmsp file in the SIM storage.
317  *
318  * <b> Prospective Clients: </b> External Apps.
319  *
320  * @since_tizen 2.3
321  * @privlevel platform
322  * @privilege %http://tizen.org/privilege/telephony.admin
323  *
324  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
325  *
326  * @param[in] handle The handle from tel_init()
327  * @param[in] pSCA The service centre address information
328  * @param[in] sca_index The record index of the Service center address information in the EF
329  * @param[in] callback To register a callback function for result
330  * @param[in] user_data The user data for user specification
331  *
332  * @return The return type (int)
333  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
334  *         else it will return failure and an error code (Refer #TapiResult_t)
335  */
336 int tel_set_sms_sca(TapiHandle *handle, const TelSmsAddressInfo_t *pSCA, int sca_index, tapi_response_cb callback, void* user_data);
337
338 /**
339  * @brief Gets current SMS Service Centre Address information.
340  *
341  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
342  *
343  * <b> Prospective Clients: </b> External Apps.
344  *
345  * @since_tizen 2.3
346  * @privlevel public
347  * @privilege %http://tizen.org/privilege/telephony
348  *
349  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
350  *
351  * @param[in] handle The handle from tel_init()
352  * @param[in] sca_index The record index of the Service center address information in the SIM EF
353  * @param[in] callback To register a callback function for result
354  * @param[in] user_data The user data for user specification
355  *
356  * @return The return type (int)
357  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
358  *         else it will return failure and an error code (Refer #TapiResult_t)
359  */
360 int tel_get_sms_sca(TapiHandle *handle, int sca_index, tapi_response_cb callback, void* user_data);
361
362 /**
363  * @brief Informs a modem about the memory status of the PDA (whether FULL or AVAILABLE) so that the modem can inform the network.
364  *
365  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
366  *
367  * <b> Prospective Clients: </b> External Apps.
368  *
369  * @since_tizen 2.3
370  * @privlevel platform
371  * @privilege %http://tizen.org/privilege/telephony.admin
372  *
373  * @remarks Access to this API is limited to in-house applications.
374  *
375  * @param[in] handle The handle from tel_init()
376  * @param[in] memoryStatus The Memory Status
377  * @param[in] callback To register a callback function for result
378  * @param[in] user_data The user data for user specification
379  *
380  * @return The return type (int)
381  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
382  *         else it will return failure and an error code (Refer #TapiResult_t)
383  */
384 int tel_set_sms_memory_status(TapiHandle *handle, int memoryStatus, tapi_response_cb callback, void* user_data);
385
386 /**
387  * @brief Sets the message status in the SIM EF.
388  *
389  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
390  *
391  * <b> Prospective Clients: </b> External Apps.
392  *
393  * @since_tizen 2.3
394  * @privlevel platform
395  * @privilege %http://tizen.org/privilege/telephony.admin
396  *
397  * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
398  *
399  * @param[in] handle The handle from tel_init()
400  * @param[in] set_index The index of the message whose status has to be set
401  * @param[in] msgStatus The status of the message to be set
402  * @param[in] callback To register a callback function for result
403  * @param[in] user_data The user data for user specification
404  *
405  * @return The return type (int)
406  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
407  *         else it will return failure and an error code (Refer #TapiResult_t)
408  */
409 int tel_set_sms_message_status(TapiHandle *handle, int set_index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data);
410
411 /**
412  * @brief Gets the count of the SMS parameter records stored in the SIM EF.
413  *
414  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
415  *
416  * <b> Prospective Clients: </b> External Apps.
417  *
418  * @since_tizen 2.3
419  * @privlevel public
420  * @privilege %http://tizen.org/privilege/telephony
421  *
422  * @remarks Access to this API is limited to in-house applications.
423  *
424  * @param[in] handle The handle from tel_init()
425  * @param[in] callback To register a callback function for result
426  * @param[in] user_data The user data for user specification
427  *
428  * @return The return type (int)
429  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
430  *         else it will return failure and an error code (Refer #TapiResult_t)
431  */
432 int tel_get_sms_parameter_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
433
434 /**
435  * @brief Checks the SMS ready status (whether ready or not).
436  *
437  * @details <b> Sync (or) Async: </b> This is a Synchronous API.
438  *
439  * <b> Prospective Clients: </b> External Apps.
440  *
441  * @since_tizen 2.3
442  * @privlevel public
443  * @privilege %http://tizen.org/privilege/telephony
444  *
445  * @param[in] handle The handle from tel_init()
446  * @param[out] pReadyStatus The Ready Status
447  *
448  * @return The return type (int)
449  *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
450  *         else it will return failure and an error code (Refer #TapiResult_t)
451  */
452 int tel_check_sms_device_status(TapiHandle *handle, int *pReadyStatus);
453
454 #ifdef __cplusplus
455 }
456 #endif
457
458 #endif  /* _ITAPI_NETTEXT_H_ */
459
460 /**
461  * @}
462  */