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.
30 * @addtogroup CAPI_TELEPHONY_SERVICE_SIM
34 #include <tapi_common.h>
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
46 * <b> Sync (or) Async: </b> This is a Synchronous API.\n
48 * <b> Prospective Clients: </b> External Apps.
52 * @privilege %http://tizen.org/privilege/telephony
54 * @remarks Card identification value is available in case of #TAPI_SIM_STATUS_SIM_INIT_COMPLETED only.
56 * @param[in] handle The handle from tel_init()
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.
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.
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)
69 int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status, int *card_changed);
72 * @brief Gets the card type (SIM/USIM).
73 * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
75 * <b> Prospective Clients: </b> External Apps.
79 * @privilege %http://tizen.org/privilege/telephony
81 * @param[in] handle The handle from tel_init()
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
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)
93 int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type);
96 * @brief Gets IMSI information.
97 * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
99 * <b> Prospective Clients: </b> External Apps.
103 * @privilege %http://tizen.org/privilege/telephony
105 * @remarks IMSI value is the value that security requires.
107 * @param[in] handle The handle from tel_init()
109 * @param[out] imsi The IMSI information \n
110 * Refer #TelSimImsiInfo_t.
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)
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).
119 int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi);
122 * @brief Gets ECC(SIM) or UECC(USIM) data.
123 * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
125 * <b> Prospective Clients: </b> External Apps.
129 * @privilege %http://tizen.org/privilege/telephony
131 * @param[in] handle The handle from tel_init()
133 * @param[out] ecc The SIM emergency call code information like ECC length, service type, and the number of ECC records
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)
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).
142 int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc);
145 * @brief Gets the unique identification number of the (U)ICC.
146 * @details ICC means Integrated Circuit Card.\n
148 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
150 * <b> Prospective Clients: </b> External Apps.
154 * @privilege %http://tizen.org/privilege/telephony
156 * @remarks ICC number value is the value that security needs.
158 * @param[in] handle The handle from tel_init()
160 * @param[in] callback To register a callback function for result
162 * @param[in] user_data The user data for user specification
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)
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).
171 int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data);
174 * @brief Gets language preference(indication) information.
175 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
177 * <b> Prospective Clients: </b> External Apps.
181 * @privilege %http://tizen.org/privilege/telephony
183 * @param[in] handle The handle from tel_init()
185 * @param[in] callback To register a callback function for result
187 * @param[in] user_data The user data for user specification
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)
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).
196 int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data);
199 * @brief Updates language preference information to the SIM card.
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
205 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
207 * <b> Prospective Clients: </b> External Apps.
210 * @privlevel platform
211 * @privilege %http://tizen.org/privilege/telephony.admin
213 * @remarks This function updates SIM Language information directly and can have an effect on the device language setting. Use carefully.
215 * @param[in] handle The handle from tel_init()
217 * @param[in] language The language preference information
219 * @param[in] callback To register a callback function for result
221 * @param[in] user_data The user data for user specification
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)
228 int tel_set_sim_language(TapiHandle *handle, TelSimLanguagePreferenceCode_t language, tapi_response_cb callback, void *user_data);
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
234 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
236 * <b> Prospective Clients: </b> External Apps.
240 * @privilege %http://tizen.org/privilege/telephony
242 * @param[in] handle The handle from tel_init()
244 * @param[in] callback To register a callback function for result
246 * @param[in] user_data The user data for user specification
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)
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).
255 int tel_get_sim_callforwarding_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
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
261 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
263 * <b> Prospective Clients: </b> External Apps.
266 * @privlevel platform
267 * @privilege %http://tizen.org/privilege/telephony.admin
269 * @param[in] handle The handle from tel_init()
271 * @param[in] req_cf The data requesting for call forwarding
273 * @param[in] callback To register a callback function for result
275 * @param[in] user_data The user data for user specification
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)
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).
284 int tel_set_sim_callforwarding_info(TapiHandle *handle, TelSimCallForwardingReq_t *req_cf, tapi_response_cb callback, void *user_data);
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
290 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
292 * <b> Prospective Clients: </b> External Apps.
296 * @privilege %http://tizen.org/privilege/telephony
298 * @param[in] handle The handle from tel_init()
300 * @param[in] callback To register a callback function for result
302 * @param[in] user_data The user data for user specification
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)
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).
311 int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
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
317 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
319 * <b> Prospective Clients: </b> External Apps.
322 * @privlevel platform
323 * @privilege %http://tizen.org/privilege/telephony.admin
325 * @param[in] handle The handle from tel_init()
327 * @param[in] req_mw The data requesting for message waiting
329 * @param[in] callback To register a callback function for result
331 * @param[in] user_data The user data for user specification
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)
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).
340 int tel_set_sim_messagewaiting_info(TapiHandle *handle, TelSimMessageWaitingReq_t *req_mw, tapi_response_cb callback, void *user_data);
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
346 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
348 * <b> Prospective Clients: </b> External Apps.
352 * @privilege %http://tizen.org/privilege/telephony
354 * @param[in] handle The handle from tel_init()
356 * @param[in] callback To register a callback function for result
358 * @param[in] user_data The user data for user specification
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)
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).
367 int tel_get_sim_mailbox_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
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
373 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
375 * <b> Prospective Clients: </b> External Apps.
378 * @privlevel platform
379 * @privilege %http://tizen.org/privilege/telephony.admin
381 * @param[in] handle The handle from tel_init()
383 * @param[in] req_mb The data requesting for mailbox info
385 * @param[in] callback To register a callback function for result
387 * @param[in] user_data The user data for user specification
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)
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).
396 int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb, tapi_response_cb callback, void *user_data);
399 * @brief Gets SIM CPHS specific data.
400 * @details This data is required for CPHS related functionality in the handset.\n
402 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
404 * <b> Prospective Clients: </b> External Apps.
408 * @privilege %http://tizen.org/privilege/telephony
410 * @param[in] handle The handle from tel_init()
412 * @param[in] callback To register a callback function for result
414 * @param[in] user_data The user data for user specification
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)
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).
423 int tel_get_sim_cphs_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
426 * @brief Gets the SIM Service Table.
427 * @details This data is required to know which SIM services are enabled or disabled.\n
429 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
431 * <b> Prospective Clients: </b> External Apps.
435 * @privilege %http://tizen.org/privilege/telephony
437 * @param[in] handle The handle from tel_init()
439 * @param[in] callback To register a callback function for result
441 * @param[in] user_data The user data for user specification
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)
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).
450 int tel_get_sim_service_table(TapiHandle *handle, tapi_response_cb callback, void *user_data);
453 * @brief Gets SIM MSISDN data.
454 * @details Regarding 3GPP specification, the current value is optional.\n
456 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
458 * <b> Prospective Clients: </b> External Apps.
462 * @privilege %http://tizen.org/privilege/telephony
464 * @param[in] handle The handle from tel_init()
466 * @param[in] callback To register a callback function for result
468 * @param[in] user_data The user data for user specification
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)
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).
477 int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
480 * @brief Gets SIM OPLMNWACT(Operator controlled PLMN Selector with Access Technology) data.
481 * @details Regarding 3GPP specification, the current value is optional.\n
483 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
485 * <b> Prospective Clients: </b> External Apps.
489 * @privilege %http://tizen.org/privilege/telephony
491 * @param[in] handle The handle from tel_init()
493 * @param[in] callback To register a callback function for result
495 * @param[in] user_data The user data for user specification
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)
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).
504 int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback, void *user_data);
507 * @brief Gets SIM SPN data.
508 * @details Regarding 3GPP specification, the current value is optional.\n
510 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
512 * <b> Prospective Clients: </b> External Apps.
516 * @privilege %http://tizen.org/privilege/telephony
518 * @param[in] handle The handle from tel_init()
520 * @param[in] callback To register a callback function for result
522 * @param[in] user_data The user data for user specification
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)
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).
531 int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
534 * @brief Gets SIM CPHS NETNAME data.
535 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
537 * <b> Prospective Clients: </b> External Apps.
541 * @privilege %http://tizen.org/privilege/telephony
543 * @param[in] handle The handle from tel_init()
545 * @param[in] callback To register a callback function for result
547 * @param[in] user_data The user data for user specification
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)
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).
556 int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback, void *user_data);
559 * @brief Executes an authentication procedure by using SIM.
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
566 * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
568 * <b> Prospective Clients: </b> External Apps.
571 * @privlevel platform
572 * @privilege %http://tizen.org/privilege/telephony.admin
574 * @param[in] handle The handle from tel_init()
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.
579 * @param[in] callback To register a callback function for result
581 * @param[in] user_data The user data for user specification
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)
588 int tel_req_sim_authentication(TapiHandle *handle, TelSimAuthenticationData_t *authentication_data, tapi_response_cb callback, void *user_data);
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
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.
600 * <b> Sync (or) Async: </b> This is an Asynchronous API.
602 * <b> Prospective Clients: </b> External Apps.
605 * @privlevel platform
606 * @privilege %http://tizen.org/privilege/telephony.admin
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.
611 * @param[in] handle The handle from tel_init()
613 * @param[in] pin_data The PIN code, entered by the user \n
614 * You should make all the parameters.
616 * @param[in] callback To register a callback function for result
618 * @param[in] user_data The user data for user specification
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)
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.
627 int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data, tapi_response_cb callback, void *user_data);
630 * @brief Performs PIN1/PIN2 unblocking operation based on PUK information passed along with
631 * unblock information entered by the user.
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.
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.
641 * <b> Sync (or) Async: </b> This is an Asynchronous API.
643 * <b> Prospective Clients: </b> External Apps.
646 * @privlevel platform
647 * @privilege %http://tizen.org/privilege/telephony.admin
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.
653 * @param[in] handle The handle from tel_init()
655 * @param[in] puk_data The unblocking PIN password #TelSimSecPw_t
657 * @param[in] new_pin_data The PIN password to use after the unblocking operation #TelSimSecPw_t
659 * @param[in] callback To register a callback function for result
661 * @param[in] user_data The user data for user specification
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)
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.
670 * @post After success on unblocking for PIN1 or PIN2, each pin check facility is enabled even if the previous facility is disabled.
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);
675 * @brief Changes the PIN1/PIN2 code based on the PIN type passed along with old PIN data and new PIN data.
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.
681 * <b> Sync (or) Async: </b> This is an Asynchronous API.
683 * <b> Prospective Clients: </b> External Apps.
686 * @privlevel platform
687 * @privilege %http://tizen.org/privilege/telephony.admin
689 * @remarks The user should set the same PIN type for both @a old_pin and @a new_pin.
691 * @param[in] handle The handle from tel_init()
693 * @param[in] old_pin The old PIN code entered by the user \n
694 * Refer #TelSimSecPw_t.
696 * @param[in] new_pin The new PIN code entered by the user \n
697 * Refer #TelSimSecPw_t.
699 * @param[in] callback To register a callback function for result
701 * @param[in] user_data The user data for user specification
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)
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).
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);
713 * @brief Disables the SIM facility.
714 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
716 * <b> Prospective Clients: </b> External Apps.
719 * @privlevel platform
720 * @privilege %http://tizen.org/privilege/telephony.admin
722 * @param[in] handle The handle from tel_init()
724 * @param[in] pw A structure which contains the facility type and password
726 * @param[in] callback To register a callback function for result
728 * @param[in] user_data The user data for user specification
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)
735 int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
738 * @brief Enables the SIM facility.
739 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
741 * <b> Prospective Clients: </b> External Apps.
744 * @privlevel platform
745 * @privilege %http://tizen.org/privilege/telephony.admin
747 * @param[in] handle The handle from tel_init()
749 * @param[in] pw A structure which contains the facility type and password
751 * @param[in] callback To register a callback function for result
753 * @param[in] user_data The user data for user specification
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)
760 int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
763 * @brief Gets the SIM facility.
764 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
766 * <b> Prospective Clients: </b> External Apps.
770 * @privilege %http://tizen.org/privilege/telephony
772 * @param[in] handle The handle from tel_init()
774 * @param[in] type The type of security lock
776 * @param[in] callback To register a callback function for result
778 * @param[in] user_data The user data for user specification
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)
785 int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
788 * @brief Gets SIM LOCK TYPE info.
789 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
791 * <b> Prospective Clients: </b> External Apps.
795 * @privilege %http://tizen.org/privilege/telephony
797 * @param[in] handle The handle from tel_init()
799 * @param[in] type The type of security lock
801 * @param[in] callback To register a callback function for result
803 * @param[in] user_data The user data for user specification
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)
810 int tel_get_sim_lock_info(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
813 * @brief Sets the SIM power state.
815 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
817 * <b> Prospective Clients: </b> External Apps.
820 * @privlevel platform
821 * @privilege %http://tizen.org/privilege/telephony.admin
823 * @param [in] handle The handle from tel_init()
825 * @param[in] state The state of SIM to be set \n
826 * It is either ON or OFF.
828 * @param [in] callback To register a callback function for result
830 * @param [in] user_data The user data for user specification
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)
836 * @par Prospective Clients:
839 int tel_set_sim_power_state(TapiHandle *handle, TelSimPowerState_t state, tapi_response_cb callback, void *user_data);
842 * @brief Provides a common interface for accessing SIM data.
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.
847 * This API provides only an interface to send APDU. The user should know well how to use APDU.
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.
853 * <b> Sync (or) Async: </b> This is an Asynchronous API.
855 * <b> Prospective Clients: </b> External Apps.
858 * @privlevel platform
859 * @privilege %http://tizen.org/privilege/telephony.admin
861 * @param[in] handle The handle from tel_init()
863 * @param[in] apdu_data The APDU data
865 * @param[in] callback To register a callback function for result
867 * @param[in] user_data The user data for user specification
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)
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).
876 int tel_req_sim_apdu(TapiHandle *handle, TelSimApdu_t* apdu_data, tapi_response_cb callback, void *user_data);
879 * @brief Provides a common interface to get the SIM ATR(Answer To Reset) value.
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.
885 * <b> Sync (or) Async: </b> This is an Asynchronous API.
887 * <b> Prospective Clients: </b> External Apps.
891 * @privilege %http://tizen.org/privilege/telephony
893 * @param[in] handle The handle from tel_init()
895 * @param[in] callback To register a callback function for result
897 * @param[in] user_data The user data for user specification
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)
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).
906 int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
912 #endif /* _ITAPI_SIM_H_ */