Tizen Native API
4.0
|
The calendar record API provides the set of the definitions and interfaces that enable you to get/set data from/to calendar record handle.
Required Header
#include <calendar.h>
Functions | |
int | calendar_record_create (const char *view_uri, calendar_record_h *out_record) |
Creates a record handle. | |
int | calendar_record_destroy (calendar_record_h record, bool delete_child) |
Destroys a record handle and releases all its resources. | |
int | calendar_record_clone (calendar_record_h record, calendar_record_h *out_record) |
Makes a clone of a record handle. | |
int | calendar_record_get_uri_p (calendar_record_h record, char **uri) |
Gets a URI string from a record. | |
int | calendar_record_get_str (calendar_record_h record, unsigned int property_id, char **out_str) |
Gets a string from a record. | |
int | calendar_record_get_str_p (calendar_record_h record, unsigned int property_id, char **out_str) |
Gets a string pointer from a record. | |
int | calendar_record_get_int (calendar_record_h record, unsigned int property_id, int *out_value) |
Gets an integer value from a record. | |
int | calendar_record_get_double (calendar_record_h record, unsigned int property_id, double *out_value) |
Gets a double value from a record. | |
int | calendar_record_get_lli (calendar_record_h record, unsigned int property_id, long long int *out_value) |
Gets a long long integer value from a record. | |
int | calendar_record_get_caltime (calendar_record_h record, unsigned int property_id, calendar_time_s *out_value) |
Gets a calendar_caltime_s value from a record. | |
int | calendar_record_set_str (calendar_record_h record, unsigned int property_id, const char *value) |
Sets a string to a record. | |
int | calendar_record_set_int (calendar_record_h record, unsigned int property_id, int value) |
Sets an integer value to a record. | |
int | calendar_record_set_double (calendar_record_h record, unsigned int property_id, double value) |
Sets a double value to a record. | |
int | calendar_record_set_lli (calendar_record_h record, unsigned int property_id, long long int value) |
Sets a long long integer value to a record. | |
int | calendar_record_set_caltime (calendar_record_h record, unsigned int property_id, calendar_time_s value) |
Sets a calendar_time_s value to a record. | |
int | calendar_record_add_child_record (calendar_record_h record, unsigned int property_id, calendar_record_h child_record) |
Adds a child record to the parent record. | |
int | calendar_record_remove_child_record (calendar_record_h record, unsigned int property_id, calendar_record_h child_record) |
Removes a child record from the parent record. | |
int | calendar_record_get_child_record_count (calendar_record_h record, unsigned int property_id, unsigned int *count) |
Gets the number of child records in a record. | |
int | calendar_record_get_child_record_at_p (calendar_record_h record, unsigned int property_id, int index, calendar_record_h *child_record) |
Gets a child record handle pointer from the parent record. | |
int | calendar_record_clone_child_record_list (calendar_record_h record, unsigned int property_id, calendar_list_h *out_list) |
Makes a clone of a given record's child record list. |
Enumeration Type Documentation
Enumeration for the alarm time unit type of an event, such as minutes, hours, days, and so on.
- Since :
- 3.0
- Enumerator:
Enumeration for the attendee cutype.
- Since :
- 3.0
- Enumerator:
Enumeration for the attendee role.
- Since :
- 3.0
Enumeration for the attendee status.
- Since :
- 3.0
- Enumerator:
enum calendar_book_mode_e |
Enumeration for the sync event type.
- Since :
- 3.0
- Enumerator:
CALENDAR_BOOK_SYNC_EVENT_FOR_ME This book would not be synced to others except me
CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_DELETE This book would be synced to everyone and deleted events would be deleted on time
CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_REMAIN This book would be synced to everyone but deleted events would be retained. Deleted events are removed by calendar_db_clean_after_sync() API
enum calendar_book_type_e |
Enumeration for the frequency of an event's recurrence.
- Since :
- 3.0
- Enumerator:
enum calendar_time_type_e |
Enumeration for the status of a to-do.
- Since :
- 3.0
Function Documentation
int calendar_record_add_child_record | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
calendar_record_h | child_record | ||
) |
Adds a child record to the parent record.
- Since :
- 3.0
- Parameters:
-
[in] record The parent record handle [in] property_id The property ID [in] child_record The handle of the child record to be added to the parent record
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
int calendar_record_clone | ( | calendar_record_h | record, |
calendar_record_h * | out_record | ||
) |
Makes a clone of a record handle.
- Since :
- 3.0
- Remarks:
- You must release cloned_record using calendar_record_destroy().
- Parameters:
-
[in] record The record handle [out] out_record The cloned 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_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_destroy()
int calendar_record_clone_child_record_list | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
calendar_list_h * | out_list | ||
) |
Makes a clone of a given record's child record list.
- Since :
- 3.0
- Remarks:
- You must release cloned_list using calendar_list_destroy().
- Parameters:
-
[in] record The record handle [in] property_id The property ID [out] out_list The cloned 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_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_list_destroy()
int calendar_record_create | ( | const char * | view_uri, |
calendar_record_h * | out_record | ||
) |
Creates a record handle.
- Since :
- 3.0
- Remarks:
- You must release record using calendar_record_destroy().
- Parameters:
-
[in] view_uri The view URI [out] out_record The record 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_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- calendar_connect() should be called to initialize.
- See also:
- calendar_record_destroy()
int calendar_record_destroy | ( | calendar_record_h | record, |
bool | delete_child | ||
) |
Destroys a record handle and releases all its resources.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] delete_child If true
, child records are destroyed automatically, otherwisefalse
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_create()
int calendar_record_get_caltime | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
calendar_time_s * | out_value | ||
) |
Gets a calendar_caltime_s value from a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [out] out_value The result value
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_set_caltime()
int calendar_record_get_child_record_at_p | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
int | index, | ||
calendar_record_h * | child_record | ||
) |
Gets a child record handle pointer from the parent record.
- Since :
- 3.0
- Remarks:
- You MUST NOT release child_record.
It is released when the parent record handle is destroyed.
- Parameters:
-
[in] record The record handle [in] property_id The property ID [in] index The index of the child record [out] child_record The child record handle pointer
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
int calendar_record_get_child_record_count | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
unsigned int * | count | ||
) |
Gets the number of child records in a record.
- Since :
- 3.0
- Parameters:
-
[in] record The parent record handle [in] property_id The property ID [out] count The child record count
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
int calendar_record_get_double | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
double * | out_value | ||
) |
Gets a double value from a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [out] out_value The result value
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_set_double()
int calendar_record_get_int | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
int * | out_value | ||
) |
Gets an integer value from a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [out] out_value The result value
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_set_int()
int calendar_record_get_lli | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
long long int * | out_value | ||
) |
Gets a long long integer value from a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [out] out_value The result value
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_set_lli()
int calendar_record_get_str | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
char ** | out_str | ||
) |
Gets a string from a record.
- Since :
- 3.0
- Remarks:
- You must release value using free().
- Parameters:
-
[in] record The record handle [in] property_id The property ID [out] out_str The result value
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
int calendar_record_get_str_p | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
char ** | out_str | ||
) |
Gets a string pointer from a record.
- Since :
- 3.0
- Remarks:
- You MUST NOT release value.
- Parameters:
-
[in] record The record handle [in] property_id The property ID [out] out_str The result value
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
int calendar_record_get_uri_p | ( | calendar_record_h | record, |
char ** | uri | ||
) |
Gets a URI string from a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [out] uri The URI of the record
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
int calendar_record_remove_child_record | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
calendar_record_h | child_record | ||
) |
Removes a child record from the parent record.
- Since :
- 3.0
- Parameters:
-
[in] record The parent record handle [in] property_id The property ID [in] child_record The handle of the child record to be removed from the parent record
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_add_child_record()
int calendar_record_set_caltime | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
calendar_time_s | value | ||
) |
Sets a calendar_time_s value to a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [in] value The value to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_get_caltime()
int calendar_record_set_double | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
double | value | ||
) |
Sets a double value to a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [in] value The value to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_get_double()
int calendar_record_set_int | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
int | value | ||
) |
Sets an integer value to a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [in] value The value to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_get_int()
int calendar_record_set_lli | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
long long int | value | ||
) |
Sets a long long integer value to a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [in] value The value to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported
- See also:
- calendar_record_get_lli()
int calendar_record_set_str | ( | calendar_record_h | record, |
unsigned int | property_id, | ||
const char * | value | ||
) |
Sets a string to a record.
- Since :
- 3.0
- Parameters:
-
[in] record The record handle [in] property_id The property ID [in] value The value to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_SYSTEM Internal system module error CALENDAR_ERROR_NOT_SUPPORTED Not supported