Tizen Native API  8.0

The calendar vcalendar API provides the set of the definitions and interfaces that enable you to get/set data from/to vCalendar.

Required Header

#include <calendar.h>

Functions

int calendar_vcalendar_make_from_records (calendar_list_h calendar_list, char **vcalendar_stream)
 Retrieves a vcalendar stream from a calendar list.
int calendar_vcalendar_parse_to_calendar (const char *vcalendar_stream, calendar_list_h *calendar_list)
 Retrieves all calendars from a vcalendar stream.
int calendar_vcalendar_parse_to_calendar_foreach (const char *vcalendar_file_path, calendar_vcalendar_parse_cb callback, void *user_data)
 Retrieves all events or to-dos (_calendar_event view or _calendar_todo view) from a vCalendar file.

Typedefs

typedef bool(* calendar_vcalendar_parse_cb )(calendar_record_h record, void *user_data)
 Called to get a record handle of _calendar_event view or _calendar_todo view.

Typedef Documentation

typedef bool(* calendar_vcalendar_parse_cb)(calendar_record_h record, void *user_data)

Called to get a record handle of _calendar_event view or _calendar_todo view.

Since :
2.3
Parameters:
[in]recordThe record handle (_calendar_event view or _calendar_todo view)
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
calendar_vcalendar_parse_to_calendar_foreach() will invoke this callback.
See also:
calendar_vcalendar_parse_to_calendar_foreach()
calendar_record_get_uri_p()

Function Documentation

int calendar_vcalendar_make_from_records ( calendar_list_h  calendar_list,
char **  vcalendar_stream 
)

Retrieves a vcalendar stream from a calendar list.

Since :
2.3
Parameters:
[in]calendar_listThe calendar list handle
[out]vcalendar_streamThe vcalendar stream
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_NO_DATARequested data does not exist
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
int calendar_vcalendar_parse_to_calendar ( const char *  vcalendar_stream,
calendar_list_h calendar_list 
)

Retrieves all calendars from a vcalendar stream.

Since :
2.3
Parameters:
[in]vcalendar_streamThe vcalendar stream
[out]calendar_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_NO_DATARequested data does not exist
CALENDAR_ERROR_SYSTEMInternal system module error
CALENDAR_ERROR_NOT_SUPPORTEDNot supported
Precondition:
calendar_connect() should be called to initialize.
int calendar_vcalendar_parse_to_calendar_foreach ( const char *  vcalendar_file_path,
calendar_vcalendar_parse_cb  callback,
void *  user_data 
)

Retrieves all events or to-dos (_calendar_event view or _calendar_todo view) from a vCalendar file.

Since :
2.3
Parameters:
[in]vcalendar_file_pathThe file path of the vCalendar stream file
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
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
Precondition:
calendar_connect() should be called to initialize.
Postcondition:
This function invokes calendar_vcalendar_parse_cb().
See also:
calendar_vcalendar_parse_cb()
calendar_record_get_uri_p()