tizen 2.3 release
[framework/telephony/libslp-tapi.git] / include / ITapiSim.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 #ifndef _ITAPI_SIM_H_
22 #define _ITAPI_SIM_H_
23
24 /**
25  * @file ITapiSim.h
26  */
27
28 /**
29  * @internal
30  * @addtogroup CAPI_TELEPHONY_SERVICE_SIM
31  * @{
32  */
33
34 #include <tapi_common.h>
35 #include <TelSim.h>
36
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41
42 /**
43  * @brief Gets SIM card initialization status and SIM card identification.
44  * @details Most of the modules which require SIM data should definitely check SIM status before using it.\n
45  *
46  * <b> Sync (or) Async: </b> This is a Synchronous API.\n
47  *
48  * <b> Prospective Clients: </b> External Apps.
49  *
50  * @since_tizen 2.3
51  * @privlevel public
52  * @privilege %http://tizen.org/privilege/telephony
53  *
54  * @remarks Card identification value is available in case of #TAPI_SIM_STATUS_SIM_INIT_COMPLETED only.
55  *
56  * @param[in] handle The handle from tel_init()
57  *
58  * @param[out] sim_status The SIM initialization status from the Telephony server boot up time \n
59  *                        First, you can find SIM existence if the returned value is not in #TAPI_SIM_STATUS_CARD_NOT_PRESENT and #TAPI_SIM_STATUS_CARD_REMOVED.
60  *
61  * @param[out] card_changed The SIM card identification value when @a sim_status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED \n
62  *                          The @a card_changed value is present when the current inserted SIM card differs from the previous SIM.
63  *
64  * @return The return type (int)
65  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
66  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
67  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
68  */
69 int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status, int *card_changed);
70
71 /**
72  * @brief Gets the card type (SIM/USIM).
73  * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
74  *
75  * <b> Prospective Clients: </b> External Apps.
76  *
77  * @since_tizen 2.3
78  * @privlevel public
79  * @privilege %http://tizen.org/privilege/telephony
80  *
81  * @param[in] handle The handle from tel_init()
82  *
83  * @param[out] card_type The SIM card type information such as GSM SIM card, USIM, and other unknown types
84  *                       TAPI_SIM_CARD_TYPE_UNKNOWN
85  *                       TAPI_SIM_CARD_TYPE_GSM
86  *                       TAPI_SIM_CARD_TYPE_USIM
87  *
88  * @return The return type (int)
89  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
90  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
91  *         Positive integer : It provides an error code while actual operations (Refer #TelSimAccessResult_t)
92  */
93 int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type);
94
95 /**
96  * @brief Gets IMSI information.
97  * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
98  *
99  * <b> Prospective Clients: </b> External Apps.
100  *
101  * @since_tizen 2.3
102  * @privlevel public
103  * @privilege %http://tizen.org/privilege/telephony
104  *
105  * @remarks IMSI value is the value that security requires.
106  *
107  * @param[in] handle The handle from tel_init()
108  *
109  * @param[out] imsi The IMSI information \n
110  *                  Refer #TelSimImsiInfo_t.
111  *
112  * @return The return type (int)
113  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
114  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
115  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
116  *
117  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
118  */
119 int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi);
120
121 /**
122  * @brief Gets ECC(SIM) or UECC(USIM) data.
123  * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
124  *
125  * <b> Prospective Clients: </b> External Apps.
126  *
127  * @since_tizen 2.3
128  * @privlevel public
129  * @privilege %http://tizen.org/privilege/telephony
130  *
131  * @param[in] handle The handle from tel_init()
132  *
133  * @param[out] ecc The SIM emergency call code information like ECC length, service type, and the number of ECC records
134  *
135  * @return The return type (int)
136  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
137  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
138  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
139  *
140  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
141  */
142 int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc);
143
144 /**
145  * @brief Gets the unique identification number of the (U)ICC.
146  * @details ICC means Integrated Circuit Card.\n
147  *
148  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
149  *
150  * <b> Prospective Clients: </b> External Apps.
151  *
152  * @since_tizen 2.3
153  * @privlevel public
154  * @privilege %http://tizen.org/privilege/telephony
155  *
156  * @remarks ICC number value is the value that security needs.
157  *
158  * @param[in] handle The handle from tel_init()
159  *
160  * @param[in] callback To register a callback function for result
161  *
162  * @param[in] user_data The user data for user specification
163  *
164  * @return The return type (int)
165  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
166  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
167  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
168  *
169  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
170  */
171 int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data);
172
173 /**
174  * @brief Gets language preference(indication) information.
175  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
176  *
177  * <b> Prospective Clients: </b> External Apps.
178  *
179  * @since_tizen 2.3
180  * @privlevel public
181  * @privilege %http://tizen.org/privilege/telephony
182  *
183  * @param[in] handle The handle from tel_init()
184  *
185  * @param[in] callback To register a callback function for result
186  *
187  * @param[in] user_data The user data for user specification
188  *
189  * @return The return type (int)
190  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
191  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
192  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
193  *
194  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
195  */
196 int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data);
197
198 /**
199  * @brief Updates language preference information to the SIM card.
200  *
201  * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
202  *          However it just means that the API request has been transfered to the CP successfully.
203  *          The actual operation result is being delivered in the corresponding event asynchronously.\n
204  *
205  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
206  *
207  * <b> Prospective Clients: </b> External Apps.
208  *
209  * @since_tizen 2.3
210  * @privlevel platform
211  * @privilege %http://tizen.org/privilege/telephony.admin
212  *
213  * @remarks This function updates SIM Language information directly and can have an effect on the device language setting. Use carefully.
214  *
215  * @param[in] handle The handle from tel_init()
216  *
217  * @param[in] language The language preference information
218  *
219  * @param[in] callback To register a callback function for result
220  *
221  * @param[in] user_data The user data for user specification
222  *
223  * @return The return type (int)
224  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
225  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
226  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
227  */
228 int tel_set_sim_language(TapiHandle *handle, TelSimLanguagePreferenceCode_t language, tapi_response_cb callback, void *user_data);
229
230 /**
231  * @brief Gets SIM call forwarding indication related data(EF-CFIS and CPHS case).
232  * @details This data is required for Call forwarding related functionality in the handset.\n
233  *
234  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
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  * @param[in] handle The handle from tel_init()
243  *
244  * @param[in] callback To register a callback function for result
245  *
246  * @param[in] user_data The user data for user specification
247  *
248  * @return The return type (int)
249  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
250  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
251  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
252  *
253  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
254  */
255 int tel_get_sim_callforwarding_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
256
257 /**
258  * @brief Sets SIM call forwarding indication related data(EF-CFIS and CPHS case).
259  * @details This data is required for Call forwarding related functionality in the handset.\n
260  *
261  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
262  *
263  * <b> Prospective Clients: </b> External Apps.
264  *
265  * @since_tizen 2.3
266  * @privlevel platform
267  * @privilege %http://tizen.org/privilege/telephony.admin
268  *
269  * @param[in] handle The handle from tel_init()
270  *
271  * @param[in] req_cf The data requesting for call forwarding
272  *
273  * @param[in] callback To register a callback function for result
274  *
275  * @param[in] user_data The user data for user specification
276  *
277  * @return The return type (int)
278  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
279  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
280  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
281  *
282  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
283  */
284 int tel_set_sim_callforwarding_info(TapiHandle *handle, TelSimCallForwardingReq_t *req_cf, tapi_response_cb callback, void *user_data);
285
286 /**
287  * @brief Gets SIM message waiting indication related data(EF-MWIS and CPHS case).
288  * @details This data is required for Message waiting related functionality in the handset.\n
289  *
290  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
291  *
292  * <b> Prospective Clients: </b> External Apps.
293  *
294  * @since_tizen 2.3
295  * @privlevel public
296  * @privilege %http://tizen.org/privilege/telephony
297  *
298  * @param[in] handle The handle from tel_init()
299  *
300  * @param[in] callback To register a callback function for result
301  *
302  * @param[in] user_data The user data for user specification
303  *
304  * @return The return type (int)
305  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
306  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
307  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
308  *
309  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
310  */
311 int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
312
313 /**
314  * @brief Sets SIM message waiting indication related data(EF-MWIS and CPHS case).
315  * @details This data is required for Message waiting related functionality in the handset.\n
316  *
317  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
318  *
319  * <b> Prospective Clients: </b> External Apps.
320  *
321  * @since_tizen 2.3
322  * @privlevel platform
323  * @privilege %http://tizen.org/privilege/telephony.admin
324  *
325  * @param[in] handle The handle from tel_init()
326  *
327  * @param[in] req_mw The data requesting for message waiting
328  *
329  * @param[in] callback To register a callback function for result
330  *
331  * @param[in] user_data The user data for user specification
332  *
333  * @return The return type (int)
334  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
335  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
336  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
337  *
338  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
339  */
340 int tel_set_sim_messagewaiting_info(TapiHandle *handle, TelSimMessageWaitingReq_t *req_mw, tapi_response_cb callback, void *user_data);
341
342 /**
343  * @brief Gets SIM mailbox related data(EF-MBDN, MBDI, and CPHS case).
344  * @details This data is required for Mailbox related functionality in the handset.\n
345  *
346  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
347  *
348  * <b> Prospective Clients: </b> External Apps.
349  *
350  * @since_tizen 2.3
351  * @privlevel public
352  * @privilege %http://tizen.org/privilege/telephony
353  *
354  * @param[in] handle The handle from tel_init()
355  *
356  * @param[in] callback To register a callback function for result
357  *
358  * @param[in] user_data The user data for user specification
359  *
360  * @return The return type (int)
361  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
362  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
363  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
364  *
365  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
366  */
367 int tel_get_sim_mailbox_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
368
369 /**
370  * @brief Sets SIM mailbox related data(EF-MBDN, MBDI and CPHS case).
371  * @details This data is required for Mailbox related functionality in the handset.\n
372  *
373  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
374  *
375  * <b> Prospective Clients: </b> External Apps.
376  *
377  * @since_tizen 2.3
378  * @privlevel platform
379  * @privilege %http://tizen.org/privilege/telephony.admin
380  *
381  * @param[in] handle The handle from tel_init()
382  *
383  * @param[in] req_mb The data requesting for mailbox info
384  *
385  * @param[in] callback To register a callback function for result
386  *
387  * @param[in] user_data The user data for user specification
388  *
389  * @return The return type (int)
390  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
391  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
392  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
393  *
394  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
395  */
396 int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb, tapi_response_cb callback, void *user_data);
397
398 /**
399  * @brief Gets SIM CPHS specific data.
400  * @details This data is required for CPHS related functionality in the handset.\n
401  *
402  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
403  *
404  * <b> Prospective Clients: </b> External Apps.
405  *
406  * @since_tizen 2.3
407  * @privlevel public
408  * @privilege %http://tizen.org/privilege/telephony
409  *
410  * @param[in] handle The handle from tel_init()
411  *
412  * @param[in] callback To register a callback function for result
413  *
414  * @param[in] user_data The user data for user specification
415  *
416  * @return The return type (int)
417  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
418  *         Negative integer : it provides an error code before actual operations (Refer #TapiResult_t)
419  *         Positive integer : it provides an error code during actual operations (Refer #TelSimAccessResult_t)
420  *
421  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
422  */
423 int tel_get_sim_cphs_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
424
425 /**
426  * @brief Gets the SIM Service Table.
427  * @details This data is required to know which SIM services are enabled or disabled.\n
428  *
429  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
430  *
431  * <b> Prospective Clients: </b> External Apps.
432  *
433  * @since_tizen 2.3
434  * @privlevel public
435  * @privilege %http://tizen.org/privilege/telephony
436  *
437  * @param[in] handle The handle from tel_init()
438  *
439  * @param[in] callback To register a callback function for result
440  *
441  * @param[in] user_data The user data for user specification
442  *
443  * @return The return type (int)
444  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
445  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
446  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
447  *
448  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
449  */
450 int tel_get_sim_service_table(TapiHandle *handle, tapi_response_cb callback, void *user_data);
451
452 /**
453  * @brief Gets SIM MSISDN data.
454  * @details Regarding 3GPP specification, the current value is optional.\n
455  *
456  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
457  *
458  * <b> Prospective Clients: </b> External Apps.
459  *
460  * @since_tizen 2.3
461  * @privlevel public
462  * @privilege %http://tizen.org/privilege/telephony
463  *
464  * @param[in] handle The handle from tel_init()
465  *
466  * @param[in] callback To register a callback function for result
467  *
468  * @param[in] user_data The user data for user specification
469  *
470  * @return The return type (int)
471  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
472  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
473  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
474  *
475  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
476  */
477 int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
478
479 /**
480  * @brief Gets SIM OPLMNWACT(Operator controlled PLMN Selector with Access Technology) data.
481  * @details Regarding 3GPP specification, the current value is optional.\n
482  *
483  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
484  *
485  * <b> Prospective Clients: </b> External Apps.
486  *
487  * @since_tizen 2.3
488  * @privlevel public
489  * @privilege %http://tizen.org/privilege/telephony
490  *
491  * @param[in] handle The handle from tel_init()
492  *
493  * @param[in] callback To register a callback function for result
494  *
495  * @param[in] user_data The user data for user specification
496  *
497  * @return The return type (int)
498  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
499  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
500  *         Positive integer : It provides an error code while actual operations (Refer #TelSimAccessResult_t)
501  *
502  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
503  */
504 int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback, void *user_data);
505
506 /**
507  * @brief Gets SIM SPN data.
508  * @details Regarding 3GPP specification, the current value is optional.\n
509  *
510  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
511  *
512  * <b> Prospective Clients: </b> External Apps.
513  *
514  * @since_tizen 2.3
515  * @privlevel public
516  * @privilege %http://tizen.org/privilege/telephony
517  *
518  * @param[in] handle The handle from tel_init()
519  *
520  * @param[in] callback To register a callback function for result
521  *
522  * @param[in] user_data The user data for user specification
523  *
524  * @return The return type (int)
525  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
526  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
527  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
528  *
529  * @pre The user can get valid return value or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
530  */
531 int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
532
533 /**
534  * @brief Gets SIM CPHS NETNAME data.
535  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
536  *
537  * <b> Prospective Clients: </b> External Apps.
538  *
539  * @since_tizen 2.3
540  * @privlevel public
541  * @privilege %http://tizen.org/privilege/telephony
542  *
543  * @param[in] handle The handle from tel_init()
544  *
545  * @param[in] callback To register a callback function for result
546  *
547  * @param[in] user_data The user data for user specification
548  *
549  * @return The return type (int)
550  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
551  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
552  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
553  *
554  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
555  */
556 int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback, void *user_data);
557
558 /**
559  * @brief Executes an authentication procedure by using SIM.
560  *
561  * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
562  *          However it just means that the API request has been transfered to the CP successfully.
563  *          The actual operation result is delivered in the corresponding event asynchronously.\n
564  *          This function supports IMS, 3G, and GSM authentication.\n
565  *
566  * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
567  *
568  * <b> Prospective Clients: </b> External Apps.
569  *
570  * @since_tizen 2.3
571  * @privlevel platform
572  * @privilege %http://tizen.org/privilege/telephony.admin
573  *
574  * @param[in] handle The handle from tel_init()
575  *
576  * @param[in] authentication_data The authentication code to be validated by the ISIM, 3G, and GSM application in the SIM card \n
577  *                                Refer #TelSimAuthenticationData_t.
578  *
579  * @param[in] callback To register a callback function for result
580  *
581  * @param[in] user_data The user data for user specification
582  *
583  * @return The return type (int)
584  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
585  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
586  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
587  */
588 int tel_req_sim_authentication(TapiHandle *handle, TelSimAuthenticationData_t *authentication_data, tapi_response_cb callback, void *user_data);
589
590 /**
591  * @brief Performs PIN1/PIN2/SIM LOCK verification.
592  * @details This function performs PIN verification based on the PIN type passed along with @a pin_data:\n
593  *          PIN1 code: The SIM card has its own password to check access permissions.\n
594  *          SIM Lock code: Between Device and SIM card using a SIM password is only available on certain handsets to authorize.\n
595  *
596  *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
597  *          However it just means that the API request has been transfered to the CP successfully.
598  *          The actual operation result is delivered in the corresponding event asynchronously.
599  *
600  * <b> Sync (or) Async: </b> This is an Asynchronous API.
601  *
602  * <b> Prospective Clients: </b> External Apps.
603  *
604  * @since_tizen 2.3
605  * @privlevel platform
606  * @privilege %http://tizen.org/privilege/telephony.admin
607  *
608  * @remarks If the PIN status (PIN/PUK/SIM LOCK) is blocked, an unsolicited event #TAPI_EVENT_SIM_STATUS_IND will be published to Applications on Device boot time.
609  *          If the PIN status is PUK, you should use #tel_verify_sim_puks instead of this API.
610  *
611  * @param[in] handle The handle from tel_init()
612  *
613  * @param[in] pin_data The PIN code, entered by the user \n
614  *                     You should make all the parameters.
615  *
616  * @param[in] callback To register a callback function for result
617  *
618  * @param[in] user_data The user data for user specification
619  *
620  * @return The return type (int)
621  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
622  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
623  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
624  *
625  * @pre This API is used when #TelSimCardStatus_t is #TAPI_SIM_STATUS_SIM_PIN_REQUIRED or #TAPI_SIM_STATUS_SIM_LOCK_REQUIRED on boot time.
626  */
627 int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data, tapi_response_cb callback, void *user_data);
628
629 /**
630  * @brief Performs PIN1/PIN2 unblocking operation based on PUK information passed along with
631  *        unblock information entered by the user.
632  *
633  * @details If you get the SIM card status (#TAPI_SIM_STATUS_SIM_PUK_REQUIRED) using #tel_get_sim_init_info on boot time
634  *          or (#TAPI_SIM_PIN_STATUS_BLOCKED) using #tel_get_sim_facility after normal initialization for a specific operation,
635  *          you may unblock PIN1/PIN2.
636  *
637  *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
638  *          However it just means that the API request has been transfered to the CP successfully.
639  *          The actual operation result is delivered in the corresponding event asynchronously.
640  *
641  * <b> Sync (or) Async: </b> This is an Asynchronous API.
642  *
643  * <b> Prospective Clients: </b> External Apps.
644  *
645  * @since_tizen 2.3
646  * @privlevel platform
647  * @privilege %http://tizen.org/privilege/telephony.admin
648  *
649  * @remarks If the PIN status (PIN1/PIN2) is blocked, an unsolicited event #TAPI_EVENT_SIM_STATUS_IND
650  *          will be published to Applications on boot time.
651  *          If you exceed the specified number of attempts to unblock PIN, the SIM card will be blocked permanently.
652  *
653  * @param[in] handle The handle from tel_init()
654  *
655  * @param[in] puk_data The unblocking PIN password #TelSimSecPw_t
656  *
657  * @param[in] new_pin_data The PIN password to use after the unblocking operation #TelSimSecPw_t
658  *
659  * @param[in] callback To register a callback function for result
660  *
661  * @param[in] user_data The user data for user specification
662  *
663  * @return The return type (int)
664  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
665  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
666  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
667  *
668  * @pre PIN1 or PIN2 status should be #TAPI_SIM_PIN_STATUS_BLOCKED and Card status should be #TAPI_SIM_STATUS_SIM_PUK_REQUIRED on boot time.
669  *
670  * @post After success on unblocking for PIN1 or PIN2, each pin check facility is enabled even if the previous facility is disabled.
671  */
672 int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_data, const TelSimSecPw_t *new_pin_data, tapi_response_cb callback, void *user_data);
673
674 /**
675  * @brief Changes the PIN1/PIN2 code based on the PIN type passed along with old PIN data and new PIN data.
676  *
677  * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
678  *          However it just means that the API request has been transfered to the CP successfully.
679  *          The actual operation result is delivered in the corresponding event asynchronously.
680  *
681  * <b> Sync (or) Async: </b> This is an Asynchronous API.
682  *
683  * <b> Prospective Clients: </b> External Apps.
684  *
685  * @since_tizen 2.3
686  * @privlevel platform
687  * @privilege %http://tizen.org/privilege/telephony.admin
688  *
689  * @remarks The user should set the same PIN type for both @a old_pin and @a new_pin.
690  *
691  * @param[in] handle The handle from tel_init()
692  *
693  * @param[in] old_pin The old PIN code entered by the user \n
694  *                    Refer #TelSimSecPw_t.
695  *
696  * @param[in] new_pin The new PIN code entered by the user \n 
697  *                    Refer #TelSimSecPw_t.
698  *
699  * @param[in] callback To register a callback function for result
700  *
701  * @param[in] user_data The user data for user specification
702  *
703  * @return The return type (int)
704  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
705  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
706  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
707  *
708  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
709  */
710 int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_pin, const TelSimSecPw_t *new_pin, tapi_response_cb callback, void *user_data);
711
712 /**
713  * @brief Disables the SIM facility.
714  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
715  *
716  * <b> Prospective Clients: </b> External Apps.
717  *
718  * @since_tizen 2.3
719  * @privlevel platform
720  * @privilege %http://tizen.org/privilege/telephony.admin
721  *
722  * @param[in] handle The handle from tel_init()
723  *
724  * @param[in] pw A structure which contains the facility type and password
725  *
726  * @param[in] callback To register a callback function for result
727  *
728  * @param[in] user_data The user data for user specification
729  *
730  * @return The return type (int)
731  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
732  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
733  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
734  */
735 int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
736
737 /**
738  * @brief Enables the SIM facility.
739  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
740  *
741  * <b> Prospective Clients: </b> External Apps.
742  *
743  * @since_tizen 2.3
744  * @privlevel platform
745  * @privilege %http://tizen.org/privilege/telephony.admin
746  *
747  * @param[in] handle The handle from tel_init()
748  *
749  * @param[in] pw A structure which contains the facility type and password
750  *
751  * @param[in] callback To register a callback function for result
752  *
753  * @param[in] user_data The user data for user specification
754  *
755  * @return The return type (int)
756  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
757  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
758  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
759  */
760 int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
761
762 /**
763  * @brief Gets the SIM facility.
764  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
765  *
766  * <b> Prospective Clients: </b> External Apps.
767  *
768  * @since_tizen 2.3
769  * @privlevel public
770  * @privilege %http://tizen.org/privilege/telephony
771  *
772  * @param[in] handle The handle from tel_init()
773  *
774  * @param[in] type The type of security lock
775  *
776  * @param[in] callback To register a callback function for result
777  *
778  * @param[in] user_data The user data for user specification
779  *
780  * @return The return type (int)
781  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
782  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
783  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
784  */
785 int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
786
787 /**
788  * @brief Gets SIM LOCK TYPE info.
789  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
790  *
791  * <b> Prospective Clients: </b> External Apps.
792  *
793  * @since_tizen 2.3
794  * @privlevel public
795  * @privilege %http://tizen.org/privilege/telephony
796  *
797  * @param[in] handle The handle from tel_init()
798  *
799  * @param[in] type The type of security lock
800  *
801  * @param[in] callback To register a callback function for result
802  *
803  * @param[in] user_data The user data for user specification
804  *
805  * @return The return type (int)
806  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
807  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
808  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
809  */
810 int tel_get_sim_lock_info(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
811
812 /**
813  * @brief  Sets the SIM power state.
814  *
815  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
816  *
817  * <b> Prospective Clients: </b> External Apps.
818  *
819  * @since_tizen 2.3
820  * @privlevel platform
821  * @privilege %http://tizen.org/privilege/telephony.admin
822  *
823  * @param [in] handle The handle from tel_init()
824  *
825  * @param[in] state The state of SIM to be set \n
826  *                  It is either ON or OFF.
827  *
828  * @param [in] callback To register a callback function for result
829  *
830  * @param [in] user_data The user data for user specification
831  *
832  * @return The return type (int)
833  *         Integer '0' ( same with #TAPI_SIM_POWER_SET_SUCCESS ) - indicates that the operation has completed successfully
834  *         Positive integer : It provides an error code while actual operations (Refer #TelSimPowerSetResult_t)
835  *
836  * @par Prospective Clients:
837  * External Apps.
838  */
839 int tel_set_sim_power_state(TapiHandle *handle, TelSimPowerState_t state, tapi_response_cb callback, void *user_data);
840
841 /**
842  * @brief Provides a common interface for accessing SIM data.
843  *
844  * @details This function is based on the USIM generic command in ETSI TS 102 221
845  *          and 3GPP TS 31.102 Characteristics of the Universal Subscriber Identity Module (USIM) application.
846  *
847  *          This API provides only an interface to send APDU. The user should know well how to use APDU.
848  *
849  *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
850  *          However it just means that the API request has been transfered to the CP successfully.
851  *          The actual operation result is being delivered in the corresponding event asynchronously.
852  *
853  * <b> Sync (or) Async: </b> This is an Asynchronous API.
854  *
855  * <b> Prospective Clients: </b> External Apps.
856  *
857  * @since_tizen 2.3
858  * @privlevel platform
859  * @privilege %http://tizen.org/privilege/telephony.admin
860  *
861  * @param[in] handle The handle from tel_init()
862  *
863  * @param[in] apdu_data The APDU data
864  *
865  * @param[in] callback To register a callback function for result
866  *
867  * @param[in] user_data The user data for user specification
868  *
869  * @return The return type (int)
870  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS )  - indicates that the operation has completed successfully
871  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
872  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
873  *
874  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
875  */
876 int tel_req_sim_apdu(TapiHandle *handle, TelSimApdu_t* apdu_data, tapi_response_cb callback, void *user_data);
877
878 /**
879  * @brief Provides a common interface to get the SIM ATR(Answer To Reset) value.
880  *
881  * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
882  *          However it just means that the API request has been transfered to the CP successfully.
883  *          The actual operation result is delivered in the corresponding event asynchronously.
884  *
885  * <b> Sync (or) Async: </b> This is an Asynchronous API.
886  *
887  * <b> Prospective Clients: </b> External Apps.
888  *
889  * @since_tizen 2.3
890  * @privlevel public
891  * @privilege %http://tizen.org/privilege/telephony
892  *
893  * @param[in] handle The handle from tel_init()
894  *
895  * @param[in] callback To register a callback function for result
896  *
897  * @param[in] user_data The user data for user specification
898  *
899  * @return The return type (int)
900  *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
901  *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
902  *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
903  *
904  * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
905  */
906 int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
907
908 #ifdef __cplusplus
909 }
910 #endif
911
912 #endif /* _ITAPI_SIM_H_ */
913
914 /**
915  * @}
916  */