Tizen Native API  7.0

The calendar filter API provides the set of the definitions and interfaces that enable you to handle filter.

Required Header

#include <calendar.h>

Functions

int calendar_filter_create (const char *view_uri, calendar_filter_h *filter)
 Creates a filter handle.
int calendar_filter_destroy (calendar_filter_h filter)
 Destroys a filter handle.
int calendar_filter_add_str (calendar_filter_h filter, unsigned int property_id, calendar_match_str_flag_e match, const char *match_value)
 Adds a condition for the string type property.
int calendar_filter_add_int (calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, int match_value)
 Adds a condition for the integer type property.
int calendar_filter_add_double (calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, double match_value)
 Adds a condition for the double type property.
int calendar_filter_add_lli (calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, long long int match_value)
 Adds a condition for the long long int type property.
int calendar_filter_add_caltime (calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, calendar_time_s match_value)
 Adds a condition for the calendar_time_s type property.
int calendar_filter_add_filter (calendar_filter_h parent_filter, calendar_filter_h child_filter)
 Adds a child filter to a parent filter.
int calendar_filter_add_operator (calendar_filter_h filter, calendar_filter_operator_e operator_type)
 Adds an operator between conditions.

Defines

#define CALENDAR_BOOK_FILTER_ALL   -1
 Definition for all calendar books.

Define Documentation

#define CALENDAR_BOOK_FILTER_ALL   -1

Definition for all calendar books.

Since :
3.0

Enumeration Type Documentation

Enumeration for a filter operator.

Since :
3.0
Enumerator:
CALENDAR_FILTER_OPERATOR_AND 

AND

CALENDAR_FILTER_OPERATOR_OR 

OR

CALENDAR_FILTER_OPERATOR_MAX 

Calendar filter operator max enum count

Enumeration for the filter match type of an integer.

Since :
3.0
Enumerator:
CALENDAR_MATCH_EQUAL 

'='

CALENDAR_MATCH_GREATER_THAN 

'>'

CALENDAR_MATCH_GREATER_THAN_OR_EQUAL 

'>='

CALENDAR_MATCH_LESS_THAN 

'<'

CALENDAR_MATCH_LESS_THAN_OR_EQUAL 

'<='

CALENDAR_MATCH_NOT_EQUAL 

'<>', this flag can yield poor performance

CALENDAR_MATCH_NONE 

IS NULL

CALENDAR_MATCH_INT_MAX 

Calendar match integer flag max enum count

Enumeration for the filter match type of a string.

Since :
3.0
Enumerator:
CALENDAR_MATCH_EXACTLY 

Full string, case-sensitive

CALENDAR_MATCH_FULLSTRING 

Full string, case-insensitive

CALENDAR_MATCH_CONTAINS 

Sub string, case-insensitive

CALENDAR_MATCH_STARTSWITH 

Start with, case-insensitive

CALENDAR_MATCH_ENDSWITH 

End with, case-insensitive

CALENDAR_MATCH_EXISTS 

IS NOT NULL

CALENDAR_MATCH_STR_MAX 

Calendar match string flag max enum count


Function Documentation

int calendar_filter_add_caltime ( calendar_filter_h  filter,
unsigned int  property_id,
calendar_match_int_flag_e  match,
calendar_time_s  match_value 
)

Adds a condition for the calendar_time_s type property.

Since :
3.0
Parameters:
[in]filterThe filter handle
[in]property_idThe property ID to add a condition
[in]matchThe match flag
[in]match_valueThe match value
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_add_operator()
int calendar_filter_add_double ( calendar_filter_h  filter,
unsigned int  property_id,
calendar_match_int_flag_e  match,
double  match_value 
)

Adds a condition for the double type property.

Since :
3.0
Parameters:
[in]filterThe filter handle
[in]property_idThe property ID to add a condition
[in]matchThe match flag
[in]match_valueThe match value
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_add_operator()
int calendar_filter_add_filter ( calendar_filter_h  parent_filter,
calendar_filter_h  child_filter 
)

Adds a child filter to a parent filter.

Since :
3.0
Parameters:
[in]parent_filterThe parent filter handle
[in]child_filterThe child filter handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_add_operator()
int calendar_filter_add_int ( calendar_filter_h  filter,
unsigned int  property_id,
calendar_match_int_flag_e  match,
int  match_value 
)

Adds a condition for the integer type property.

Since :
3.0
Parameters:
[in]filterThe filter handle
[in]property_idThe property ID to add a condition
[in]matchThe match flag
[in]match_valueThe match value
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_add_operator()
int calendar_filter_add_lli ( calendar_filter_h  filter,
unsigned int  property_id,
calendar_match_int_flag_e  match,
long long int  match_value 
)

Adds a condition for the long long int type property.

Since :
3.0
Parameters:
[in]filterThe filter handle
[in]property_idThe property ID to add a condition
[in]matchThe match flag
[in]match_valueThe match value
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_add_operator()

Adds an operator between conditions.

Since :
3.0
Parameters:
[in]filterThe filter handle
[in]operator_typeThe operator type
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_add_str()
calendar_filter_add_int()
calendar_filter_add_double()
calendar_filter_add_caltime()
calendar_filter_add_filter()
int calendar_filter_add_str ( calendar_filter_h  filter,
unsigned int  property_id,
calendar_match_str_flag_e  match,
const char *  match_value 
)

Adds a condition for the string type property.

Since :
3.0
Parameters:
[in]filterThe filter handle
[in]property_idThe property ID to add a condition
[in]matchThe match flag
[in]match_valueThe match value
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_add_operator()
int calendar_filter_create ( const char *  view_uri,
calendar_filter_h filter 
)

Creates a filter handle.

Since :
3.0
Remarks:
You must release filter using calendar_filter_destroy().
Parameters:
[in]view_uriThe view URI of a filter
[out]filterThe filter handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_OUT_OF_MEMORYOut of memory
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
Precondition:
calendar_connect() should be called to initialize.
See also:
calendar_filter_destroy()

Destroys a filter handle.

Since :
3.0
Parameters:
[in]filterThe filter handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_filter_create()