Tizen Native API
4.0
|
The contacts Query API provides the set of definitions and interfaces that enable application developers to make query to get list.
#include <contacts.h>
Functions | |
int | contacts_query_create (const char *view_uri, contacts_query_h *query) |
Creates a query. | |
int | contacts_query_destroy (contacts_query_h query) |
Destroys a query. | |
int | contacts_query_set_projection (contacts_query_h query, unsigned int property_id_array[], int count) |
Adds property IDs for projection. | |
int | contacts_query_set_distinct (contacts_query_h query, bool set) |
Sets the "distinct" option for projection. | |
int | contacts_query_set_filter (contacts_query_h query, contacts_filter_h filter) |
Sets a filter for query. | |
int | contacts_query_set_sort (contacts_query_h query, unsigned int property_id, bool is_ascending) |
Sets a sort mode for query. |
int contacts_query_create | ( | const char * | view_uri, |
contacts_query_h * | query | ||
) |
Creates a query.
[in] | view_uri | The view URI of a query |
[out] | query | The filter handle |
0
on success, otherwise a negative error value CONTACTS_ERROR_NONE | Successful |
CONTACTS_ERROR_INVALID_PARAMETER | Invalid parameter |
CONTACTS_ERROR_OUT_OF_MEMORY | Out of memory |
CONTACTS_ERROR_NOT_SUPPORTED | Not supported |
CONTACTS_ERROR_SYSTEM | Internal system module error |
int contacts_query_destroy | ( | contacts_query_h | query | ) |
Destroys a query.
[in] | query | The query handle |
0
on success, otherwise a negative error value CONTACTS_ERROR_NONE | Successful |
CONTACTS_ERROR_INVALID_PARAMETER | Invalid parameter |
CONTACTS_ERROR_NOT_SUPPORTED | Not supported |
CONTACTS_ERROR_SYSTEM | Internal system module error |
int contacts_query_set_distinct | ( | contacts_query_h | query, |
bool | set | ||
) |
Sets the "distinct" option for projection.
[in] | query | The query handle |
[in] | set | Set true to set the distinct option for projection, otherwise false to unset the distinct option |
0
on success, otherwise a negative error value CONTACTS_ERROR_NONE | Successful |
CONTACTS_ERROR_INVALID_PARAMETER | Invalid parameter |
CONTACTS_ERROR_NOT_SUPPORTED | Not supported |
CONTACTS_ERROR_SYSTEM | Internal system module error |
int contacts_query_set_filter | ( | contacts_query_h | query, |
contacts_filter_h | filter | ||
) |
Sets a filter for query.
[in] | query | The query handle |
[in] | filter | The filter handle |
0
on success, otherwise a negative error value CONTACTS_ERROR_NONE | Successful |
CONTACTS_ERROR_INVALID_PARAMETER | Invalid parameter |
CONTACTS_ERROR_NOT_SUPPORTED | Not supported |
CONTACTS_ERROR_SYSTEM | Internal system module error |
int contacts_query_set_projection | ( | contacts_query_h | query, |
unsigned int | property_id_array[], | ||
int | count | ||
) |
Adds property IDs for projection.
[in] | query | The query handle |
[in] | property_id_array | The property ID array |
[in] | count | The number of property IDs |
0
on success, otherwise a negative error value CONTACTS_ERROR_NONE | Successful |
CONTACTS_ERROR_INVALID_PARAMETER | Invalid parameter |
CONTACTS_ERROR_NOT_SUPPORTED | Not supported |
CONTACTS_ERROR_SYSTEM | Internal system module error |
int contacts_query_set_sort | ( | contacts_query_h | query, |
unsigned int | property_id, | ||
bool | is_ascending | ||
) |
Sets a sort mode for query.
[in] | query | The query handle |
[in] | property_id | The property ID to sort |
[in] | is_ascending | Set true for ascending sort mode, otherwise false for descending sort mode |
0
on success, otherwise a negative error value CONTACTS_ERROR_NONE | Successful |
CONTACTS_ERROR_INVALID_PARAMETER | Invalid parameter |
CONTACTS_ERROR_NOT_SUPPORTED | Not supported |
CONTACTS_ERROR_SYSTEM | Internal system module error |