Tizen Native API  4.0
SIM

The contacts SIM API provides the set of definitions and interfaces that enable application developers to get/set data from/to SIM card.

Required Header

#include <contacts.h>

Related Features

This API is related with the following features:

Functions

int contacts_sim_import_all_contacts (void) TIZEN_DEPRECATED_API
 Imports all contacts from first SIM to Contacts Database.
int contacts_sim_get_initialization_status (bool *completed) TIZEN_DEPRECATED_API
 Checks whether first SIM initialization is completed.
int contacts_sim_import_all_contacts_by_sim_slot_no (int sim_slot_no, contacts_sim_import_progress_cb callback, void *user_data)
 Imports all contacts from SIM of the given SIM slot number to the Contacts Database.
int contacts_sim_get_initialization_status_by_sim_slot_no (int sim_slot_no, bool *completed)
 Checks whether SIM of the given SIM slot number is initialized.

Typedefs

typedef bool(* contacts_sim_import_progress_cb )(int total, int imported_cnt, void *user_data)
 Called whenever a contact is imported.

Typedef Documentation

typedef bool(* contacts_sim_import_progress_cb)(int total, int imported_cnt, void *user_data)

Called whenever a contact is imported.

Since :
3.0
Parameters:
[in]totalThe number of contacts that will be imported
[in]imported_cntThe number of already imported contacts
[in]user_dataThe user data passed from the callback registration function
Returns:
true to continue with the import of contacts otherwise false to stop the import of contacts
Precondition:
contacts_sim_import_all_contacts_by_sim_slot_no() will invoke this callback.
See also:
contacts_sim_import_all_contacts_by_sim_slot_no()

Function Documentation

int contacts_sim_get_initialization_status ( bool *  completed)

Checks whether first SIM initialization is completed.

Deprecated:
Deprecated since 3.0. Use contacts_sim_get_initialization_status_by_sim_slot_no() instead.
Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.read
Parameters:
[out]completedtrue if SIM is initialized, otherwise false if SIM is not initialized
Returns:
0 on success, otherwise a negative error value
Return values:
CONTACTS_ERROR_NONESuccessful
CONTACTS_ERROR_INVALID_PARAMETERInvalid parameter
CONTACTS_ERROR_PERMISSION_DENIEDPermission denied. This application does not have the privilege to call this method.
CONTACTS_ERROR_NOT_SUPPORTEDNot supported
CONTACTS_ERROR_IPCUnknown IPC error
CONTACTS_ERROR_SYSTEMInternal system module error
Precondition:
contacts_connect() should be called to open a connection to the contacts service.
See also:
contacts_connect()
int contacts_sim_get_initialization_status_by_sim_slot_no ( int  sim_slot_no,
bool *  completed 
)

Checks whether SIM of the given SIM slot number is initialized.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.read
Parameters:
[in]sim_slot_noThe SIM slot number; 0 means first SIM, 1 means second SIM
[out]completedtrue if SIM is initialized, otherwise false if SIM is not initialized
Returns:
0 on success, otherwise a negative error value
Return values:
CONTACTS_ERROR_NONESuccessful
CONTACTS_ERROR_INVALID_PARAMETERInvalid parameter
CONTACTS_ERROR_PERMISSION_DENIEDPermission denied. This application does not have the privilege to call this method
CONTACTS_ERROR_NOT_SUPPORTEDNot supported
CONTACTS_ERROR_IPCUnknown IPC error
CONTACTS_ERROR_SYSTEMInternal system module error
Precondition:
contacts_connect() should be called to open a connection to the contacts service.
See also:
contacts_connect()

Imports all contacts from first SIM to Contacts Database.

Deprecated:
Deprecated since 3.0. Use contacts_sim_import_all_contacts_by_sim_slot_no() instead.
Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.write
Returns:
0 on success, otherwise a negative error value
Return values:
CONTACTS_ERROR_NONESuccessful
CONTACTS_ERROR_INVALID_PARAMETERInvalid parameter
CONTACTS_ERROR_NO_DATARequested data does not exist
CONTACTS_ERROR_PERMISSION_DENIEDPermission denied. This application does not have the privilege to call this method.
CONTACTS_ERROR_NOT_SUPPORTEDNot supported
CONTACTS_ERROR_IPCUnknown IPC error
CONTACTS_ERROR_SYSTEMInternal system module error
CONTACTS_ERROR_INTERNALImplementation Error, Temporary Use
Precondition:
contacts_connect() should be called to open a connection to the contacts service.
See also:
contacts_connect()
int contacts_sim_import_all_contacts_by_sim_slot_no ( int  sim_slot_no,
contacts_sim_import_progress_cb  callback,
void *  user_data 
)

Imports all contacts from SIM of the given SIM slot number to the Contacts Database.

This function invokes contacts_sim_import_progress_cb() to indicate the progress of imports whenever a contact is imported.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.write
Parameters:
[in]sim_slot_noThe SIM slot number; 0 means first SIM, 1 means second SIM
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
CONTACTS_ERROR_NONESuccessful
CONTACTS_ERROR_INVALID_PARAMETERInvalid parameter
CONTACTS_ERROR_NO_DATARequested data does not exist
CONTACTS_ERROR_PERMISSION_DENIEDPermission denied. This application does not have the privilege to call this method
CONTACTS_ERROR_NOT_SUPPORTEDNot supported
CONTACTS_ERROR_IPCUnknown IPC error
CONTACTS_ERROR_SYSTEMInternal system module error
Precondition:
contacts_connect() should be called to open a connection to the contacts service.
See also:
contacts_connect()
contacts_sim_import_progress_cb()