Tizen Native API
6.0
|
The contacts person API provides the set of definitions and interfaces that enable application developers to link/unlink person and contact.
Required Header
#include <contacts.h>
Functions | |
int | contacts_person_link_person (int base_person_id, int person_id) |
Links a person to another person. | |
int | contacts_person_unlink_contact (int person_id, int contact_id, int *unlinked_person_id) |
Unlinks a contact from a person. | |
int | contacts_person_reset_usage (int person_id, contacts_usage_type_e type) |
Resets a person's usage count. | |
int | contacts_person_set_favorite_order (int person_id, int previous_person_id, int next_person_id) |
Sets the order of a (favorite) contact. | |
int | contacts_person_set_default_property (contacts_person_property_e property, int person_id, int id) |
Sets a record's default property. | |
int | contacts_person_get_default_property (contacts_person_property_e property, int person_id, int *id) |
Gets a default property for a record. | |
int | contacts_person_get_aggregation_suggestions (int person_id, int limit, contacts_list_h *record_list) |
Gets aggregation suggestions. |
Enumeration Type Documentation
Function Documentation
int contacts_person_get_aggregation_suggestions | ( | int | person_id, |
int | limit, | ||
contacts_list_h * | record_list | ||
) |
Gets aggregation suggestions.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.read
- Remarks:
- You must release record_list using contacts_list_destroy().
- This may take a long time. If you need to use it in bulk, make sure the user experience is acceptable while running it.
- Parameters:
-
[in] person_id The person ID [in] limit The number to limit results(value 0 is used for get all records) [out] record_list The list of person records
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_OUT_OF_MEMORY Out of memory CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_FILE_NO_SPACE FS Full CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_DB Database operation failure CONTACTS_ERROR_IPC IPC error CONTACTS_ERROR_SYSTEM Internal system module error
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
int contacts_person_get_default_property | ( | contacts_person_property_e | property, |
int | person_id, | ||
int * | id | ||
) |
Gets a default property for a record.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.read
- Remarks:
- id can be contact_id, number_id, email_id, image_id.
- Parameters:
-
[in] property contacts_person_property_e [in] person_id The person ID [out] id The record ID of the property to be set as default
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_OUT_OF_MEMORY Out of memory CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_DB Database operation failure CONTACTS_ERROR_IPC IPC error CONTACTS_ERROR_SYSTEM Internal system module error
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
int contacts_person_link_person | ( | int | base_person_id, |
int | person_id | ||
) |
Links a person to another person.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.write
- Parameters:
-
[in] base_person_id The base person ID [in] person_id The person ID to link to
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_OUT_OF_MEMORY Out of memory CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_FILE_NO_SPACE FS Full CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_DB Database operation failure CONTACTS_ERROR_IPC IPC error CONTACTS_ERROR_SYSTEM Internal system module error
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
int contacts_person_reset_usage | ( | int | person_id, |
contacts_usage_type_e | type | ||
) |
Resets a person's usage count.
The person is no longer in the most frequently contacted person list.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.write
- Parameters:
-
[in] person_id The person ID [in] type The type to reset
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_OUT_OF_MEMORY Out of memory CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_FILE_NO_SPACE FS Full CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_DB Database operation failure CONTACTS_ERROR_IPC IPC error CONTACTS_ERROR_SYSTEM Internal system module error
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
int contacts_person_set_default_property | ( | contacts_person_property_e | property, |
int | person_id, | ||
int | id | ||
) |
Sets a record's default property.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.write
- Remarks:
- id can be contact_id, number_id, email_id, image_id.
- Parameters:
-
[in] property contacts_person_property_e [in] person_id The person ID [in] id The record ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_OUT_OF_MEMORY Out of memory CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_FILE_NO_SPACE FS Full CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_DB Database operation failure CONTACTS_ERROR_IPC IPC error CONTACTS_ERROR_SYSTEM Internal system module error
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
int contacts_person_set_favorite_order | ( | int | person_id, |
int | previous_person_id, | ||
int | next_person_id | ||
) |
Sets the order of a (favorite) contact.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.write
- Parameters:
-
[in] person_id The person ID to move [in] previous_person_id The previous person ID [in] next_person_id The back person ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_OUT_OF_MEMORY Out of memory CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_FILE_NO_SPACE FS Full CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_DB Database operation failure CONTACTS_ERROR_IPC IPC error CONTACTS_ERROR_SYSTEM Internal system module error
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
int contacts_person_unlink_contact | ( | int | person_id, |
int | contact_id, | ||
int * | unlinked_person_id | ||
) |
Unlinks a contact from a person.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.write
- Parameters:
-
[in] person_id The person ID [in] contact_id The contact ID to unlink [out] unlinked_person_id The person ID generated
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_OUT_OF_MEMORY Out of memory CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_FILE_NO_SPACE FS Full CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_DB Database operation failure CONTACTS_ERROR_IPC IPC error CONTACTS_ERROR_SYSTEM Internal system module error
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()