Tizen Native API
5.0
|
The calendar query API provides the set of the definitions and interfaces that enable you to handle query.
#include <calendar.h>
Functions | |
int | calendar_query_create (const char *view_uri, calendar_query_h *query) |
Creates a query handle. | |
int | calendar_query_destroy (calendar_query_h query) |
Destroys a query handle. | |
int | calendar_query_set_projection (calendar_query_h query, unsigned int property_id_array[], int count) |
Adds property IDs for projection. | |
int | calendar_query_set_distinct (calendar_query_h query, bool set) |
Sets the "distinct" option for projection. | |
int | calendar_query_set_filter (calendar_query_h query, calendar_filter_h filter) |
Sets the filter for a query. | |
int | calendar_query_set_sort (calendar_query_h query, unsigned int property_id, bool is_ascending) |
Sets the sort mode for a query. |
int calendar_query_create | ( | const char * | view_uri, |
calendar_query_h * | query | ||
) |
Creates a query handle.
[in] | view_uri | The view URI of a query |
[out] | query | The filter handle |
0
on success, otherwise a negative error value CALENDAR_ERROR_NONE | Successful |
CALENDAR_ERROR_INVALID_PARAMETER | Invalid parameter |
CALENDAR_ERROR_OUT_OF_MEMORY | Out of memory |
CALENDAR_ERROR_SYSTEM | Internal system module error |
CALENDAR_ERROR_NOT_SUPPORTED | Not supported |
int calendar_query_destroy | ( | calendar_query_h | query | ) |
Destroys a query handle.
[in] | query | The query handle |
0
on success, otherwise a negative error value CALENDAR_ERROR_NONE | Successful |
CALENDAR_ERROR_INVALID_PARAMETER | Invalid parameter |
CALENDAR_ERROR_SYSTEM | Internal system module error |
CALENDAR_ERROR_NOT_SUPPORTED | Not supported |
int calendar_query_set_distinct | ( | calendar_query_h | query, |
bool | set | ||
) |
Sets the "distinct" option for projection.
[in] | query | The query handle |
[in] | set | If true it is set, otherwise if false it is unset |
0
on success, otherwise a negative error value CALENDAR_ERROR_NONE | Successful |
CALENDAR_ERROR_INVALID_PARAMETER | Invalid parameter |
CALENDAR_ERROR_SYSTEM | Internal system module error |
CALENDAR_ERROR_NOT_SUPPORTED | Not supported |
int calendar_query_set_filter | ( | calendar_query_h | query, |
calendar_filter_h | filter | ||
) |
Sets the filter for a query.
[in] | query | The query handle |
[in] | filter | The filter handle |
0
on success, otherwise a negative error value CALENDAR_ERROR_NONE | Successful |
CALENDAR_ERROR_INVALID_PARAMETER | Invalid parameter |
CALENDAR_ERROR_NO_DATA | Requested data does not exist |
CALENDAR_ERROR_SYSTEM | Internal system module error |
CALENDAR_ERROR_NOT_SUPPORTED | Not supported |
int calendar_query_set_projection | ( | calendar_query_h | query, |
unsigned int | property_id_array[], | ||
int | count | ||
) |
Adds property IDs for projection.
Property IDs can be of one of the properties of view_uri which is used in calendar_query_create().
[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 CALENDAR_ERROR_NONE | Successful |
CALENDAR_ERROR_INVALID_PARAMETER | Invalid parameter |
CALENDAR_ERROR_SYSTEM | Internal system module error |
CALENDAR_ERROR_NOT_SUPPORTED | Not supported |
int calendar_query_set_sort | ( | calendar_query_h | query, |
unsigned int | property_id, | ||
bool | is_ascending | ||
) |
Sets the sort mode for a query.
[in] | query | The query handle |
[in] | property_id | The property ID to sort |
[in] | is_ascending | If true it sorts in the ascending order, otherwise if false it sorts in the descending order |
0
on success, otherwise a negative error value CALENDAR_ERROR_NONE | Successful |
CALENDAR_ERROR_INVALID_PARAMETER | Invalid parameter |
CALENDAR_ERROR_SYSTEM | Internal system module error |
CALENDAR_ERROR_NOT_SUPPORTED | Not supported |