4 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 * @file ITapiNetText.h
27 * @addtogroup CAPI_TELEPHONY_SERVICE_SMS
31 #ifndef _ITAPI_NETTEXT_H_
32 #define _ITAPI_NETTEXT_H_
34 #include <tapi_common.h>
43 * @brief Sends an SMS message to the network.
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.
49 * <b> Sync (or) Async: </b> This is an Asynchronous API.
51 * <b> Prospective Clients: </b> External Apps.
55 * @privilege %http://tizen.org/privilege/telephony.admin
57 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
71 int tel_send_sms(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, tapi_response_cb callback, void* user_data);
74 * @brief Reads a message from the SIM card storage.
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.
79 * <b> Sync (or) Async: </b> This is an Asynchronous API.
81 * <b> Prospective Clients: </b> External Apps.
85 * @privilege %http://tizen.org/privilege/telephony
87 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
98 int tel_read_sms_in_sim(TapiHandle *handle, int read_index, tapi_response_cb callback, void* user_data);
101 * @brief Writes a message to the SIM storage area.
103 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
105 * <b> Prospective Clients: </b> External Apps.
108 * @privlevel platform
109 * @privilege %http://tizen.org/privilege/telephony.admin
111 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
122 int tel_write_sms_in_sim(TapiHandle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data);
125 * @brief Deletes the message specified by an index (SIM index used when storing the SMS)
126 * number from the SIM storage area.
128 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
130 * <b> Prospective Clients: </b> External Apps.
133 * @privlevel platform
134 * @privilege %http://tizen.org/privilege/telephony.admin
136 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
147 int tel_delete_sms_in_sim(TapiHandle *handle, int del_index, tapi_response_cb callback, void* user_data);
150 * @brief Retrieves message count information like total record count,
151 * used record count, and indices list for SIM storage.
153 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
155 * <b> Prospective Clients: </b> External Apps.
159 * @privilege %http://tizen.org/privilege/telephony
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.
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
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)
172 int tel_get_sms_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
175 * @brief Sets SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in the (U)SIM.
177 * @details This function also indicates an underlying provider to enable or disable the CB Channel on which CB messages are received.
179 * <b> Sync (or) Async: </b> This is an Asynchronous API.
181 * <b> Prospective Clients: </b> External Apps.
184 * @privlevel platform
185 * @privilege %http://tizen.org/privilege/telephony.admin
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.
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
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)
205 int tel_set_sms_cb_config(TapiHandle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data);
208 * @brief Retrieves the SMS CB configuration parameters from the EFcbmi file in the SIM.
210 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
212 * <b> Prospective Clients: </b> External Apps.
216 * @privilege %http://tizen.org/privilege/telephony
218 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
228 int tel_get_sms_cb_config(TapiHandle *handle, tapi_response_cb callback, void* user_data);
231 * @brief Gets the SMS parameters for a particular SMS (sent/received)
232 * based on the SIM index where it is stored.
234 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
236 * <b> Prospective Clients: </b> External Apps.
240 * @privilege %http://tizen.org/privilege/telephony
242 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
253 int tel_get_sms_parameters(TapiHandle *handle, int get_index, tapi_response_cb callback, void* user_data);
256 * @brief Sets the short message service header parameters which are used in the origination of MO messages.
258 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
260 * <b> Important Notes: </b> This API updates/sets SMS Parameters in the EFsmsp file in the SIM storage.
262 * <b> Prospective Clients: </b> External Apps.
265 * @privlevel platform
266 * @privilege %http://tizen.org/privilege/telephony.admin
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.
272 * @param[in] handle The handle from tel_init()
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
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)
282 int tel_set_sms_parameters(TapiHandle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data);
285 * @brief Sends a delivery report for the received incoming SMS to the network.
287 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
289 * <b> Prospective Clients: </b> External Apps.
292 * @privlevel platform
293 * @privilege %http://tizen.org/privilege/telephony.admin
295 * @remarks Access to this API is limited to in-house applications.
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
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)
307 * @pre The SMS-DELIVER-REPORT message structure should be in the TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
309 int tel_send_sms_deliver_report(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, tapi_response_cb callback, void* user_data);
312 * @brief Sets SMS Service Centre Address information in order to send the SMS.
314 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
316 * <b> Important Notes: </b> This API updates/sets the service center address in the EFsmsp file in the SIM storage.
318 * <b> Prospective Clients: </b> External Apps.
321 * @privlevel platform
322 * @privilege %http://tizen.org/privilege/telephony.admin
324 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
336 int tel_set_sms_sca(TapiHandle *handle, const TelSmsAddressInfo_t *pSCA, int sca_index, tapi_response_cb callback, void* user_data);
339 * @brief Gets current SMS Service Centre Address information.
341 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
343 * <b> Prospective Clients: </b> External Apps.
347 * @privilege %http://tizen.org/privilege/telephony
349 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
360 int tel_get_sms_sca(TapiHandle *handle, int sca_index, tapi_response_cb callback, void* user_data);
363 * @brief Informs a modem about the memory status of the PDA (whether FULL or AVAILABLE) so that the modem can inform the network.
365 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
367 * <b> Prospective Clients: </b> External Apps.
370 * @privlevel platform
371 * @privilege %http://tizen.org/privilege/telephony.admin
373 * @remarks Access to this API is limited to in-house applications.
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
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)
384 int tel_set_sms_memory_status(TapiHandle *handle, int memoryStatus, tapi_response_cb callback, void* user_data);
387 * @brief Sets the message status in the SIM EF.
389 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
391 * <b> Prospective Clients: </b> External Apps.
394 * @privlevel platform
395 * @privilege %http://tizen.org/privilege/telephony.admin
397 * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
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
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)
409 int tel_set_sms_message_status(TapiHandle *handle, int set_index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data);
412 * @brief Gets the count of the SMS parameter records stored in the SIM EF.
414 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
416 * <b> Prospective Clients: </b> External Apps.
420 * @privilege %http://tizen.org/privilege/telephony
422 * @remarks Access to this API is limited to in-house applications.
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
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)
432 int tel_get_sms_parameter_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
435 * @brief Checks the SMS ready status (whether ready or not).
437 * @details <b> Sync (or) Async: </b> This is a Synchronous API.
439 * <b> Prospective Clients: </b> External Apps.
443 * @privilege %http://tizen.org/privilege/telephony
445 * @param[in] handle The handle from tel_init()
446 * @param[out] pReadyStatus The Ready Status
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)
452 int tel_check_sms_device_status(TapiHandle *handle, int *pReadyStatus);
458 #endif /* _ITAPI_NETTEXT_H_ */