Tizen Native API  6.5

The contacts setting API provides the set of definitions and interfaces that enable application developers to set up contacts features.

Required Header

#include <contacts.h>

Functions

int contacts_setting_get_name_display_order (contacts_name_display_order_e *name_display_order)
 Gets the contacts name display order.
int contacts_setting_set_name_display_order (contacts_name_display_order_e name_display_order)
 Sets the contacts name display order.
int contacts_setting_get_name_sorting_order (contacts_name_sorting_order_e *name_sorting_order)
 Gets the contacts name sorting order in which contacts are returned.
int contacts_setting_set_name_sorting_order (contacts_name_sorting_order_e name_sorting_order)
 Sets the contacts name sorting order in which contacts are returned.
int contacts_setting_add_name_display_order_changed_cb (contacts_setting_name_display_order_changed_cb callback, void *user_data)
 Registers a callback function.
int contacts_setting_remove_name_display_order_changed_cb (contacts_setting_name_display_order_changed_cb callback, void *user_data)
 Unregisters a callback function.
int contacts_setting_add_name_sorting_order_changed_cb (contacts_setting_name_sorting_order_changed_cb callback, void *user_data)
 Registers a callback function.
int contacts_setting_remove_name_sorting_order_changed_cb (contacts_setting_name_sorting_order_changed_cb callback, void *user_data)
 Unregisters a callback function.

Typedefs

typedef void(* contacts_setting_name_display_order_changed_cb )(contacts_name_display_order_e name_display_order, void *user_data)
 Called when a designated view changes.
typedef void(* contacts_setting_name_sorting_order_changed_cb )(contacts_name_sorting_order_e name_sorting_order, void *user_data)
 Called when a designated view changes.

Typedef Documentation

typedef void(* contacts_setting_name_display_order_changed_cb)(contacts_name_display_order_e name_display_order, void *user_data)

Called when a designated view changes.

Since :
2.3
Parameters:
[in]name_display_orderThe name display order setting value
[in]user_dataThe user data passed from the callback registration function
Precondition:
The callback must be registered using contacts_setting_add_name_display_order_changed_cb(). contacts_setting_set_name_display_order() must be called to invoke this callback.
See also:
contacts_setting_add_name_display_order_changed_cb()
contacts_setting_remove_name_display_order_changed_cb()
typedef void(* contacts_setting_name_sorting_order_changed_cb)(contacts_name_sorting_order_e name_sorting_order, void *user_data)

Called when a designated view changes.

Since :
2.3
Parameters:
[in]name_sorting_orderThe name sorting order setting value
[in]user_dataThe user data passed from the callback registration function
Precondition:
The callback must be registered using contacts_setting_add_name_sorting_order_changed_cb(). contacts_setting_set_name_sorting_order() must be called to invoke this callback.
See also:
contacts_setting_add_name_sorting_order_changed_cb()
contacts_setting_remove_name_sorting_order_changed_cb()

Enumeration Type Documentation

Enumeration for name display order.

Since :
2.3
Enumerator:
CONTACTS_NAME_DISPLAY_ORDER_FIRSTLAST 

First name comes at the first

CONTACTS_NAME_DISPLAY_ORDER_LASTFIRST 

First name comes at the last

Enumeration for name sorting order.

Since :
2.3
Enumerator:
CONTACTS_NAME_SORTING_ORDER_FIRSTLAST 

Contacts are first sorted based on the first name

CONTACTS_NAME_SORTING_ORDER_LASTFIRST 

Contacts are first sorted based on the last name


Function Documentation

Registers a callback function.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.read
Parameters:
[in]callbackThe callback function to register
[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_IPCUnknown IPC error
CONTACTS_ERROR_INTERNALImplementation Error, Temporary Use
CONTACTS_ERROR_PERMISSION_DENIEDPermission denied. This application does not have the privilege to call this method
CONTACTS_ERROR_NOT_SUPPORTEDNot supported
CONTACTS_ERROR_SYSTEMInternal system module error
Precondition:
contacts_connect() should be called to open a connection to the contacts service.
Postcondition:
contacts_setting_name_display_order_changed_cb() will be called under certain conditions, after calling contacts_setting_set_name_display_order().
See also:
contacts_connect()
contacts_setting_remove_name_display_order_changed_cb()

Registers a callback function.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.read
Parameters:
[in]callbackThe callback function to register
[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_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_INTERNALImplementation Error, Temporary Use
CONTACTS_ERROR_SYSTEMInternal system module error
Precondition:
contacts_connect() should be called to open a connection to the contacts service.
Postcondition:
contacts_setting_name_sorting_order_changed_cb() will be called under certain conditions, after calling contacts_setting_set_name_sorting_order().
See also:
contacts_connect()
contacts_setting_remove_name_sorting_order_changed_cb()

Gets the contacts name display order.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.read
Parameters:
[out]name_display_orderThe name display order
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()

Gets the contacts name sorting order in which contacts are returned.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.read
Parameters:
[out]name_sorting_orderThe name sorting order
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()

Unregisters a callback function.

Since :
2.3
Parameters:
[in]callbackThe callback function to register
[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_NOT_SUPPORTEDNot supported
CONTACTS_ERROR_INTERNALImplementation Error, Temporary Use
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_setting_add_name_display_order_changed_cb()

Unregisters a callback function.

Since :
2.3
Parameters:
[in]callbackThe callback function to register
[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_NOT_SUPPORTEDNot supported
CONTACTS_ERROR_INTERNALImplementation Error, Temporary Use
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_setting_add_name_sorting_order_changed_cb()

Sets the contacts name display order.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.write
Parameters:
[in]name_display_orderThe name display order
Returns:
0 on success, otherwise a negative error value
Return values:
CONTACTS_ERROR_NONESuccessful
CONTACTS_ERROR_OUT_OF_MEMORYOut of memory
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.
Postcondition:
contacts_setting_name_display_order_changed_cb() callback will be called upon success.
See also:
contacts_connect()

Sets the contacts name sorting order in which contacts are returned.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.write
Parameters:
[in]name_sorting_orderThe name sorting order
Returns:
0 on success, otherwise a negative error value
Return values:
CONTACTS_ERROR_NONESuccessful
CONTACTS_ERROR_OUT_OF_MEMORYOut of memory
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.
Postcondition:
contacts_setting_name_sorting_order_changed_cb() callback will be called upon success.
See also:
contacts_connect()