Tizen Native API
7.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 :
- 3.0
- Parameters:
-
[in] record The record handle (_calendar_event view or _calendar_todo view) [in] user_data The user data passed from the foreach function
- Returns:
true
to continue with the next iteration of the loop, otherwisefalse
to break out of the loop
- Precondition:
- calendar_vcalendar_parse_to_calendar_foreach() will invoke this callback.
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 :
- 3.0
- Parameters:
-
[in] calendar_list The calendar list handle [out] vcalendar_stream The vcalendar stream
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_OUT_OF_MEMORY Out of memory 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_vcalendar_parse_to_calendar | ( | const char * | vcalendar_stream, |
calendar_list_h * | calendar_list | ||
) |
Retrieves all calendars from a vcalendar stream.
- Since :
- 3.0
- Parameters:
-
[in] vcalendar_stream The vcalendar stream [out] calendar_list The calendar list handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_OUT_OF_MEMORY Out of memory 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
- 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 :
- 3.0
- Parameters:
-
[in] vcalendar_file_path The file path of the vCalendar stream file [in] callback The callback function to be invoked [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to initialize.
- Postcondition:
- This function invokes calendar_vcalendar_parse_cb().