Tizen Native API
5.0
|
The calendar database API provides the set of the definitions and interfaces that enable you to handle calendar database.
Required Header
#include <calendar.h>
Functions | |
int | calendar_db_insert_record (calendar_record_h record, int *record_id) |
Inserts a record into the calendar database. | |
int | calendar_db_get_record (const char *view_uri, int record_id, calendar_record_h *record) |
Gets a record from the calendar database. | |
int | calendar_db_update_record (calendar_record_h record) |
Updates a record in the calendar database. | |
int | calendar_db_delete_record (const char *view_uri, int record_id) |
Deletes a record from the calendar database with related child records. | |
int | calendar_db_get_all_records (const char *view_uri, int offset, int limit, calendar_list_h *record_list) |
Retrieves all records as a list. | |
int | calendar_db_get_records_with_query (calendar_query_h query, int offset, int limit, calendar_list_h *record_list) |
Retrieves records using a query handle. | |
int | calendar_db_get_count (const char *view_uri, int *count) |
Gets the record count of a specific view. | |
int | calendar_db_get_count_with_query (calendar_query_h query, int *count) |
Gets the record count with a query handle. | |
int | calendar_db_insert_records (calendar_list_h record_list, int **record_id_array, int *count) |
Inserts multiple records into the calendar database as a batch operation. | |
int | calendar_db_update_records (calendar_list_h record_list) |
Updates multiple records into the calendar database as a batch operation. | |
int | calendar_db_delete_records (const char *view_uri, int record_id_array[], int count) |
Deletes multiple records with related child records from the calendar database as a batch operation. | |
int | calendar_db_get_current_version (int *calendar_db_version) |
Gets the current calendar database version. | |
int | calendar_db_add_changed_cb (const char *view_uri, calendar_db_changed_cb callback, void *user_data) |
Registers a callback function to be invoked when a record changes. | |
int | calendar_db_remove_changed_cb (const char *view_uri, calendar_db_changed_cb callback, void *user_data) |
Unregisters a callback function. | |
int | calendar_db_get_changes_by_version (const char *view_uri, int calendar_book_id, int calendar_db_version, calendar_list_h *record_list, int *current_calendar_db_version) |
Retrieves records with the given calendar database version. | |
int | calendar_db_insert_vcalendars (const char *vcalendar_stream, int **record_id_array, int *count) |
Inserts a vcalendar stream into the calendar database. | |
int | calendar_db_replace_vcalendars (const char *vcalendar_stream, int *record_id_array, int count) |
Replaces a vcalendar stream in the calendar database. | |
int | calendar_db_replace_record (calendar_record_h record, int record_id) |
Replaces a record in the calendar database. | |
int | calendar_db_replace_records (calendar_list_h record_list, int *record_id_array, int count) |
Replaces multiple records in the calendar database as a batch operation. | |
int | calendar_db_get_last_change_version (int *last_change_version) |
Gets the last successful change version of the database on the current connection. | |
int | calendar_db_get_changes_exception_by_version (const char *view_uri, int original_event_id, int calendar_db_version, calendar_list_h *list) |
Retrieves changed exception records since the given calendar database version. Exceptions are the modified or deleted instances in a recurring event. | |
int | calendar_db_clean_after_sync (int calendar_book_id, int calendar_db_version) |
Cleans the data after sync. | |
int | calendar_db_link_record (int base_id, int record_id) |
Links a record to another record. | |
int | calendar_db_unlink_record (int record_id) |
Unlinks a record from base record. | |
Typedefs | |
typedef void(* | calendar_db_changed_cb )(const char *view_uri, void *user_data) |
Called when a designated view changes. | |
Defines | |
#define | CALENDAR_CONNECT_FLAG_NONE 0x00000000 |
Definition for a calendar connect flag. | |
#define | CALENDAR_CONNECT_FLAG_RETRY 0x00000001 |
Definition for a calendar connect flag. | |
#define | DEFAULT_EVENT_CALENDAR_BOOK_ID 1 |
Definition for a default event calendar book database ID. | |
#define | DEFAULT_TODO_CALENDAR_BOOK_ID 2 |
Definition for a default to-do calendar book database ID. | |
#define | DEFAULT_BIRTHDAY_CALENDAR_BOOK_ID 3 |
Definition for a default birthday calendar book database ID. | |
#define | CALENDAR_TODO_NO_DUE_DATE INT64_MAX |
Definition for no due date of a to-do. | |
#define | CALENDAR_TODO_NO_START_DATE (-INT64_MAX) |
Definition for no start date of a to-do. | |
#define | CALENDAR_RECORD_NO_UNTIL INT64_MAX |
Definition for no until of a record. | |
#define | CALENDAR_RECORD_NO_COORDINATE 1000.0 |
Definition for no coordinate(latitude/longitude) of a record. |
Define Documentation
#define CALENDAR_CONNECT_FLAG_NONE 0x00000000 |
Definition for a calendar connect flag.
- Since :
- 2.3
#define CALENDAR_CONNECT_FLAG_RETRY 0x00000001 |
Definition for a calendar connect flag.
- Since :
- 2.3
#define CALENDAR_RECORD_NO_COORDINATE 1000.0 |
Definition for no coordinate(latitude/longitude) of a record.
- Since :
- 2.3
#define CALENDAR_RECORD_NO_UNTIL INT64_MAX |
Definition for no until of a record.
- Since :
- 2.3
#define CALENDAR_TODO_NO_DUE_DATE INT64_MAX |
Definition for no due date of a to-do.
- Since :
- 2.3
#define CALENDAR_TODO_NO_START_DATE (-INT64_MAX) |
Definition for no start date of a to-do.
- Since :
- 2.3
#define DEFAULT_BIRTHDAY_CALENDAR_BOOK_ID 3 |
Definition for a default birthday calendar book database ID.
- Since :
- 2.3
#define DEFAULT_EVENT_CALENDAR_BOOK_ID 1 |
Definition for a default event calendar book database ID.
- Since :
- 2.3
#define DEFAULT_TODO_CALENDAR_BOOK_ID 2 |
Definition for a default to-do calendar book database ID.
- Since :
- 2.3
Typedef Documentation
typedef void(* calendar_db_changed_cb)(const char *view_uri, void *user_data) |
Called when a designated view changes.
- Since :
- 2.3
- Parameters:
-
[in] view_uri The view URI [in] user_data The user data passed from the callback registration function
- See also:
- calendar_db_add_changed_cb()
Function Documentation
int calendar_db_add_changed_cb | ( | const char * | view_uri, |
calendar_db_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be invoked when a record changes.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Remarks:
- If successive change notification produced on the view_uri are identical, then they are coalesced into a single notification if the older notification has not yet been called because default main loop is doing something. But it means that a callback function is not called to reliably count of change. This API supports only _calendar_book view view, _calendar_event view view, _calendar_todo view view.
- Parameters:
-
[in] view_uri The view URI of the record to subscribe for change notifications [in] callback The callback function to register [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_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- This function requires an open connection to the calendar service using calendar_connect().
- Postcondition:
- calendar_db_changed_cb() will be invoked when the designated view changes.
int calendar_db_clean_after_sync | ( | int | calendar_book_id, |
int | calendar_db_version | ||
) |
Cleans the data after sync.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] calendar_book_id The calendar book ID [in] calendar_db_version The calendar database version
- 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_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
- See also:
- calendar_connect()
int calendar_db_delete_record | ( | const char * | view_uri, |
int | record_id | ||
) |
Deletes a record from the calendar database with related child records.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] view_uri The view URI of a record [in] record_id The record ID to be deleted
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_delete_records | ( | const char * | view_uri, |
int | record_id_array[], | ||
int | count | ||
) |
Deletes multiple records with related child records from the calendar database as a batch operation.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] view_uri The view URI of the records to delete [in] record_id_array The record IDs to delete [in] count The number of records
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_IPC Unknown IPC error 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 open a connection to the calendar service.
int calendar_db_get_all_records | ( | const char * | view_uri, |
int | offset, | ||
int | limit, | ||
calendar_list_h * | record_list | ||
) |
Retrieves all records as a list.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Remarks:
- You must release record_list using calendar_list_destroy().
- Parameters:
-
[in] view_uri The view URI to get records from [in] offset The index from which results are received [in] limit The maximum number of results(value 0 is used for all records) [out] record_list The record list
- 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_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_get_changes_by_version | ( | const char * | view_uri, |
int | calendar_book_id, | ||
int | calendar_db_version, | ||
calendar_list_h * | record_list, | ||
int * | current_calendar_db_version | ||
) |
Retrieves records with the given calendar database version.
This function finds all the changed records since the given calendar_db_version.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Remarks:
- You must release change_record_list using calendar_list_destroy().
- Parameters:
-
[in] view_uri The view URI to get records from [in] calendar_book_id The calendar book ID to filter [in] calendar_db_version The calendar database version [out] record_list The record list [out] current_calendar_db_version The current calendar database version
- 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_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_get_changes_exception_by_version | ( | const char * | view_uri, |
int | original_event_id, | ||
int | calendar_db_version, | ||
calendar_list_h * | list | ||
) |
Retrieves changed exception records since the given calendar database version. Exceptions are the modified or deleted instances in a recurring event.
This function finds all the changed records since the given calendar_db_version.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Remarks:
- You must release change_record_list using calendar_list_destroy().
- Parameters:
-
[in] view_uri The view URI to get records from [in] original_event_id The original event ID [in] calendar_db_version The calendar database version starting from which to get records [out] list The record list
- 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_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_get_count | ( | const char * | view_uri, |
int * | count | ||
) |
Gets the record count of a specific view.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Parameters:
-
[in] view_uri The view URI to get records from [out] count The number of records
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- This function requires an open connection to the calendar service using calendar_connect2().
- See also:
- calendar_connect()
int calendar_db_get_count_with_query | ( | calendar_query_h | query, |
int * | count | ||
) |
Gets the record count with a query handle.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Parameters:
-
[in] query The query handle used for filtering the results [out] count The number of records
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- This function requires an open connection to the calendar service using calendar_connect2().
- See also:
- calendar_connect2()
int calendar_db_get_current_version | ( | int * | calendar_db_version | ) |
Gets the current calendar database version.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Parameters:
-
[out] calendar_db_version The calendar database version
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- This function requires an open connection to the calendar service using calendar_connect().
int calendar_db_get_last_change_version | ( | int * | last_change_version | ) |
Gets the last successful change version of the database on the current connection.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Parameters:
-
[out] last_change_version The calendar database version on the current connection
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- This function requires an open connection to the calendar service using calendar_connect().
int calendar_db_get_record | ( | const char * | view_uri, |
int | record_id, | ||
calendar_record_h * | record | ||
) |
Gets a record from the calendar database.
This function creates a new record handle from the calendar database by the given record_id.
record will be created and filled with record information.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Remarks:
- You must release record using calendar_record_destroy().
- Parameters:
-
[in] view_uri The view URI of a record [in] record_id The record ID [out] record The record handle associated with the record ID
- 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_FILE_NO_SPACE File system is full CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_get_records_with_query | ( | calendar_query_h | query, |
int | offset, | ||
int | limit, | ||
calendar_list_h * | record_list | ||
) |
Retrieves records using a query handle.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Remarks:
- You must release record_list using calendar_list_destroy().
- Parameters:
-
[in] query The query handle used to filter results [in] offset The index from which results are received [in] limit The maximum number of results(value 0 is used for all records) [out] record_list The record list
- 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_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_insert_record | ( | calendar_record_h | record, |
int * | record_id | ||
) |
Inserts a record into the calendar database.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] record The record handle [out] record_id The record ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_insert_records | ( | calendar_list_h | record_list, |
int ** | record_id_array, | ||
int * | count | ||
) |
Inserts multiple records into the calendar database as a batch operation.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] record_list The record list handle [out] record_id_array The array of record IDs [out] count The number of record IDs
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist 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 open a connection to the calendar service.
int calendar_db_insert_vcalendars | ( | const char * | vcalendar_stream, |
int ** | record_id_array, | ||
int * | count | ||
) |
Inserts a vcalendar stream into the calendar database.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] vcalendar_stream The vcalendar stream [out] record_id_array The record IDs to delete [out] count The number of record ID arrays
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_link_record | ( | int | base_id, |
int | record_id | ||
) |
Links a record to another record.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] base_id The base record ID [in] record_id The record ID to link to
- 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_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
- See also:
- calendar_connect()
int calendar_db_remove_changed_cb | ( | const char * | view_uri, |
calendar_db_changed_cb | callback, | ||
void * | user_data | ||
) |
Unregisters a callback function.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.read
- Parameters:
-
[in] view_uri The view URI of the record to subscribe for change notifications [in] callback The callback function to register [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_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- This function requires an open connection to the calendar service using calendar_connect().
int calendar_db_replace_record | ( | calendar_record_h | record, |
int | record_id | ||
) |
Replaces a record in the calendar database.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] record The record handle [in] record_id The record ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error 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 open a connection to the calendar service.
int calendar_db_replace_records | ( | calendar_list_h | record_list, |
int * | record_id_array, | ||
int | count | ||
) |
Replaces multiple records in the calendar database as a batch operation.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] record_list The record list handle [in] record_id_array The record IDs [in] count The number of record ID arrays
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error 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 open a connection to the calendar service.
int calendar_db_replace_vcalendars | ( | const char * | vcalendar_stream, |
int * | record_id_array, | ||
int | count | ||
) |
Replaces a vcalendar stream in the calendar database.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] vcalendar_stream The vcalendar stream [in] record_id_array The record IDs to replace [in] count The number of record ID arrays
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- This function requires an open connection to the calendar service by calendar_connect().
int calendar_db_unlink_record | ( | int | record_id | ) |
Unlinks a record from base record.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] record_id The record ID to unlink
- 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_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied CALENDAR_ERROR_FILE_NO_SPACE File system is full CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
- See also:
- calendar_connect()
int calendar_db_update_record | ( | calendar_record_h | record | ) |
Updates a record in the calendar database.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] record The record handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.
int calendar_db_update_records | ( | calendar_list_h | record_list | ) |
Updates multiple records into the calendar database as a batch operation.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/calendar.write
- Parameters:
-
[in] record_list The record list handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_NO_DATA Data does not exist CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to open a connection to the calendar service.