Tizen Native API
4.0
|
The calendar query API provides the set of the definitions and interfaces that enable you to handle query.
Required Header
#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. |
Function Documentation
int calendar_query_create | ( | const char * | view_uri, |
calendar_query_h * | query | ||
) |
Creates a query handle.
- Since :
- 3.0
- Remarks:
- You must release query using calendar_query_destroy().
- 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:
-
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
- Precondition:
- calendar_connect() should be called to initialize.
- See also:
- calendar_query_destroy()
int calendar_query_destroy | ( | calendar_query_h | query | ) |
Destroys a query handle.
- Since :
- 3.0
- Parameters:
-
[in] query The query handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_query_create()
int calendar_query_set_distinct | ( | calendar_query_h | query, |
bool | set | ||
) |
Sets the "distinct" option for projection.
- Since :
- 3.0
- Parameters:
-
[in] query The query handle [in] set If true
it is set, otherwise iffalse
it is unset
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 3.0
- Parameters:
-
[in] query The query handle [in] filter The filter handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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
- See also:
- calendar_query_add_operator()
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().
- Since :
- 3.0
- 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:
-
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.
- Since :
- 3.0
- Parameters:
-
[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 iffalse
it sorts in the descending order
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported