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
Enumeration for Contacts person properties.
- Since :
- 2.3
- Enumerator:
CONTACTS_PERSON_PROPERTY_NAME_CONTACT |
Default contacts record
|
CONTACTS_PERSON_PROPERTY_NUMBER |
Default number record
|
CONTACTS_PERSON_PROPERTY_EMAIL |
Default email record
|
CONTACTS_PERSON_PROPERTY_IMAGE |
Default image record
|
Function Documentation
Gets aggregation suggestions.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.read
- 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:
-
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
Gets a default property for a record.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.read
- Parameters:
-
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
Links a person to another person.
- Since :
- 2.3
- 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:
-
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
Resets a person's usage count.
The person is no longer in the most frequently contacted person list.
- Since :
- 2.3
- 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:
-
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
Sets a record's default property.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/contact.write
- Parameters:
-
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
Sets the order of a (favorite) contact.
- Since :
- 2.3
- 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:
-
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()
Unlinks a contact from a person.
- Since :
- 2.3
- 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:
-
- Precondition:
- contacts_connect() should be called to open a connection to the contacts service.
- See also:
- contacts_connect()