Tizen Native API  5.0

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

Required Header

#include <calendar.h>

Functions

int calendar_list_create (calendar_list_h *out_list)
 Creates a calendar list handle.
int calendar_list_destroy (calendar_list_h list, bool delete_record)
 Destroys a calendar list handle and releases all its resources.
int calendar_list_get_count (calendar_list_h list, int *count)
 Retrieves the number of calendar entities in a calendar list.
int calendar_list_add (calendar_list_h list, calendar_record_h record)
 Adds a record to the calendar list.
int calendar_list_remove (calendar_list_h list, calendar_record_h record)
 Removes a record from the calendar list.
int calendar_list_get_current_record_p (calendar_list_h list, calendar_record_h *record)
 Retrieves a record from the calendar list.
int calendar_list_prev (calendar_list_h list)
 Moves a calendar list to the previous position.
int calendar_list_next (calendar_list_h list)
 Moves a calendar list to the next position.
int calendar_list_first (calendar_list_h list)
 Moves a calendar list to the first position.
int calendar_list_last (calendar_list_h list)
 Moves a calendar list to the last position.

Function Documentation

int calendar_list_add ( calendar_list_h  list,
calendar_record_h  record 
)

Adds a record to the calendar list.

Since :
2.3
Parameters:
[in]listThe calendar list handle
[in]recordThe record 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_list_remove()
int calendar_list_create ( calendar_list_h *  out_list)

Creates a calendar list handle.

Since :
2.3
Remarks:
You must release calendar_list using calendar_list_destroy().
Parameters:
[out]out_listThe calendar list handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_OUT_OF_MEMORYOut of memory
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_list_destroy()
int calendar_list_destroy ( calendar_list_h  list,
bool  delete_record 
)

Destroys a calendar list handle and releases all its resources.

Since :
2.3
Parameters:
[in]listThe calendar list handle
[in]delete_recordIf true, child records are destroyed automatically, otherwise false
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_list_create()
int calendar_list_first ( calendar_list_h  list)

Moves a calendar list to the first position.

Since :
2.3
Parameters:
[in]listThe calendar list 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_list_last()
int calendar_list_get_count ( calendar_list_h  list,
int *  count 
)

Retrieves the number of calendar entities in a calendar list.

Since :
2.3
Parameters:
[in]listThe calendar list handle
[out]countThe count of the calendar entity
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_list_add()
int calendar_list_get_current_record_p ( calendar_list_h  list,
calendar_record_h *  record 
)

Retrieves a record from the calendar list.

The default current record is the first record.

Since :
2.3
Remarks:
You MUST NOT destroy the record handle. It is destroyed automatically when the list is destroyed.
Parameters:
[in]listThe calendar list handle
[out]recordThe record handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_NO_DATARequested data does not exist
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
int calendar_list_last ( calendar_list_h  list)

Moves a calendar list to the last position.

Since :
2.3
Parameters:
[in]listThe calendar list 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_list_first()
int calendar_list_next ( calendar_list_h  list)

Moves a calendar list to the next position.

Since :
2.3
Parameters:
[in]listThe calendar list handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_NO_DATARequested data does not exist
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_list_prev()
int calendar_list_prev ( calendar_list_h  list)

Moves a calendar list to the previous position.

Since :
2.3
Parameters:
[in]listThe calendar list handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_NO_DATARequested data does not exist
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_list_next()
int calendar_list_remove ( calendar_list_h  list,
calendar_record_h  record 
)

Removes a record from the calendar list.

If the record is the current record, then the current record is changed to the next record.
If the record is the last record then the current record will be NULL.

Since :
2.3
Parameters:
[in]listThe calendar list handle
[in]recordThe record handle
Returns:
0 on success, otherwise a negative error value
Return values:
CALENDAR_ERROR_NONESuccessful
CALENDAR_ERROR_INVALID_PARAMETERInvalid parameter
CALENDAR_ERROR_NO_DATARequested data does not exist
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
See also:
calendar_list_add()