Tizen Native API
7.0
|
The contacts record API provides the set of definitions and interfaces that enable application developers to get/set records list data.
Required Header
#include <contacts.h>
Functions | |
int | contacts_list_create (contacts_list_h *contacts_list) |
Creates a contacts list. | |
int | contacts_list_destroy (contacts_list_h contacts_list, bool delete_child) |
Destroys a contacts list and releases its all resources. | |
int | contacts_list_get_count (contacts_list_h contacts_list, int *count) |
Retrieves the number of contact entities from a contacts list. | |
int | contacts_list_add (contacts_list_h contacts_list, contacts_record_h record) |
Adds a record to a contacts list. | |
int | contacts_list_remove (contacts_list_h contacts_list, contacts_record_h record) |
Removes a record from the contacts list. | |
int | contacts_list_get_current_record_p (contacts_list_h contacts_list, contacts_record_h *record) |
Retrieves a record from the contacts list. | |
int | contacts_list_prev (contacts_list_h contacts_list) |
Moves a contacts list to the previous position. | |
int | contacts_list_next (contacts_list_h contacts_list) |
Moves a contacts list to the next position. | |
int | contacts_list_first (contacts_list_h contacts_list) |
Moves a contacts list to the first position. | |
int | contacts_list_last (contacts_list_h contacts_list) |
Moves a contacts list to the last position. |
Function Documentation
int contacts_list_add | ( | contacts_list_h | contacts_list, |
contacts_record_h | record | ||
) |
Adds a record to a contacts list.
- Since :
- 2.3
- Remarks:
- Same kind of record can be added.
- Parameters:
-
[in] contacts_list The contacts list handle [in] record The record handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_remove()
int contacts_list_create | ( | contacts_list_h * | contacts_list | ) |
Creates a contacts list.
- Since :
- 2.3
- Remarks:
- You must release contacts_list using contacts_list_destroy().
- Parameters:
-
[out] contacts_list The contacts list handle
- 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_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_destroy()
int contacts_list_destroy | ( | contacts_list_h | contacts_list, |
bool | delete_child | ||
) |
Destroys a contacts list and releases its all resources.
- Since :
- 2.3
- Parameters:
-
[in] contacts_list The contacts list handle [in] delete_child Set true
to destroy child records automatically, otherwise setfalse
to not destroy child records automatically
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_create()
int contacts_list_first | ( | contacts_list_h | contacts_list | ) |
Moves a contacts list to the first position.
- Since :
- 2.3
- Parameters:
-
[in] contacts_list The contacts list handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_last()
int contacts_list_get_count | ( | contacts_list_h | contacts_list, |
int * | count | ||
) |
Retrieves the number of contact entities from a contacts list.
- Since :
- 2.3
- Parameters:
-
[in] contacts_list The contacts list handle [out] count The count of contact entity
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_add()
int contacts_list_get_current_record_p | ( | contacts_list_h | contacts_list, |
contacts_record_h * | record | ||
) |
Retrieves a record from the contacts list.
The default current record is the first record.
- Since :
- 2.3
- Remarks:
- You MUST NOT destroy the record. It is destroyed automatically when the contacts_list is destroyed.
- Parameters:
-
[in] contacts_list The contacts list handle [out] record The record handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
int contacts_list_last | ( | contacts_list_h | contacts_list | ) |
Moves a contacts list to the last position.
- Since :
- 2.3
- Parameters:
-
[in] contacts_list The contacts list handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_first()
int contacts_list_next | ( | contacts_list_h | contacts_list | ) |
Moves a contacts list to the next position.
- Since :
- 2.3
- Parameters:
-
[in] contacts_list The contacts list handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_prev()
int contacts_list_prev | ( | contacts_list_h | contacts_list | ) |
Moves a contacts list to the previous position.
- Since :
- 2.3
- Parameters:
-
[in] contacts_list The contacts list handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_next()
int contacts_list_remove | ( | contacts_list_h | contacts_list, |
contacts_record_h | record | ||
) |
Removes a record from the contacts list.
If the record is current record, then current record is changed the next record.
If the record is the last record, then current record will be NULL
.
- Since :
- 2.3
- Parameters:
-
[in] contacts_list The contacts list handle [in] record The record handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONTACTS_ERROR_NONE Successful CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter CONTACTS_ERROR_NO_DATA Requested data does not exist CONTACTS_ERROR_NOT_SUPPORTED Not supported CONTACTS_ERROR_SYSTEM Internal system module error
- See also:
- contacts_list_add()