The contacts Query API provides the set of definitions and interfaces that enable application developers to make query to get list.
Required Header
#include <contacts.h>
Function Documentation
Creates a query.
- Since :
- 2.3
- Parameters:
-
[in] | view_uri | The view URI of a query |
[out] | query | The filter handle |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- contacts_connect() should be called to initialize
- See also:
- contacts_query_destroy()
Destroys a query.
- Since :
- 2.3
- Parameters:
-
[in] | query | The query handle |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- See also:
- contacts_query_create()
Sets the "distinct" option for projection.
- Since :
- 2.3
- Parameters:
-
[in] | query | The query handle |
[in] | set | Set true to set the distinct option for projection, otherwise false to unset the distinct option |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Sets a filter for query.
- Since :
- 2.3
- Parameters:
-
[in] | query | The query handle |
[in] | filter | The filter handle |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- See also:
- contacts_filter_create()
Adds property IDs for projection.
- Since :
- 2.3
- Parameters:
-
[in] | query | The query handle |
[in] | property_id_array | The property ID array |
[in] | count | The number of property IDs |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Sets a sort mode for query.
- Since :
- 2.3
- Parameters:
-
[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 |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-