Tizen(Headed) Native API  6.5

The contacts group API provides the set of definitions and interfaces that enable application developers to add/remove contact as group member.

Required Header

#include <contacts.h>

Functions

int contacts_group_add_contact (int group_id, int contact_id)
 Adds a contact and a group relationship to the contacts database.
int contacts_group_remove_contact (int group_id, int contact_id)
 Removes a contact and a group relationship from the contacts database.
int contacts_group_set_group_order (int group_id, int previous_group_id, int next_group_id)
 Sets a group between the previous group and the next group.

Function Documentation

int contacts_group_add_contact ( int  group_id,
int  contact_id 
)

Adds a contact and a group relationship to the contacts database.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.write
Parameters:
[in]group_idThe group ID
[in]contact_idThe contact ID
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_DBDatabase operation failure
CONTACTS_ERROR_IPCIPC 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_group_remove_contact()
int contacts_group_remove_contact ( int  group_id,
int  contact_id 
)

Removes a contact and a group relationship from the contacts database.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.write
Parameters:
[in]group_idThe group ID
[in]contact_idThe contact ID
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_DBDatabase operation failure
CONTACTS_ERROR_IPCIPC 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_group_add_contact()
int contacts_group_set_group_order ( int  group_id,
int  previous_group_id,
int  next_group_id 
)

Sets a group between the previous group and the next group.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/contact.write
Parameters:
[in]group_idThe group ID to move
[in]previous_group_idThe previous group ID
[in]next_group_idThe back group ID
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_DBDatabase operation failure
CONTACTS_ERROR_IPCIPC 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()