From 8dcafbd691acb3e6d412328d5736330e183f797a Mon Sep 17 00:00:00 2001 From: Jeesun Kim Date: Mon, 19 Dec 2016 19:31:25 +0900 Subject: [PATCH] 3.0 Native API reference english examination Change-Id: Ic704e6dd6919dffa143fdf3a3528cbbf18101a5a --- doc/calendar_doc.h | 285 ++++++----------- include/calendar.h | 1 + include/calendar_db.h | 748 +++++++++++++++++++------------------------ include/calendar_errors.h | 29 +- include/calendar_filter.h | 177 +++++----- include/calendar_list.h | 172 ++++------ include/calendar_query.h | 113 +++---- include/calendar_record.h | 387 ++++++++++------------ include/calendar_reminder.h | 47 ++- include/calendar_service.h | 106 +++--- include/calendar_types.h | 338 +++++++++---------- include/calendar_vcalendar.h | 92 +++--- include/calendar_view.h | 22 +- 13 files changed, 1093 insertions(+), 1424 deletions(-) diff --git a/doc/calendar_doc.h b/doc/calendar_doc.h index 1822429..a1d2cf8 100644 --- a/doc/calendar_doc.h +++ b/doc/calendar_doc.h @@ -17,26 +17,25 @@ * */ + #ifndef __TIZEN_SOCIAL_CALENDAR_DOC_H__ #define __TIZEN_SOCIAL_CALENDAR_DOC_H__ + /** * @ingroup CAPI_SOCIAL_FRAMEWORK * @defgroup CAPI_SOCIAL_CALENDAR_SVC_MODULE Calendar - * * @brief The Calendar Service API provides functions for managing calendars(including events, to-dos). - * This API allows you not only to store information about calendar but also to query calendar information. - * + * This API allows you not only to store information about calendar but also to query calendar information. * @section CAPI_SOCIAL_CALENDARS_SVC_MODULE_HEADER Required Header - * \#include - * + * \#include * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_OVERVIEW Overview - * A calendar is a system of organizing days for social purposes and is composed of records like events and todos. + * A calendar is a system of organizing days for social purposes and is composed of records like events and to-dos. * These records are made up of another sub records like alarms, attendees or extended ones. * Events could have recurrence rule, instances would be generated. - * @image html calendar_model.png "Figure: Calendar model" * + * @image html calendar_model.png "Figure: Calendar model" * The Calendar-Service provides an interface to manage the information of records. * * @@ -50,7 +49,6 @@ * * *
Table: Calendar service properties.
- * * Calendar service module works in a way similar to client-service architecture. * In this architecture Tizen application is a client side and has to connect to service before using calendar service APIs. * Connection/disconnection MUST be done with use of calendar_connect() / calendar_disconnect(). @@ -58,7 +56,7 @@ * @code * calendar_connect(); * - * // jobs for records + * // Jobs for records * * calendar_disconnect(); * * @endcode @@ -66,7 +64,7 @@ * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Entities Entities * Calendar service manages information related to following entities. * - Calendar books - * - Represents where event and todo should belong to. + * - Represents where event and to-do should belong to. * - Created by one of calendars sources below * -# Local device, which has no account. * -# Service providers such as Google or Yahoo, with account. @@ -75,10 +73,11 @@ * - Events * - Have properties like summary, start_time, description. * - Single entry can be available on each calendar book. - * - Todos + * - To-dos * - Similar with event entry. * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Entities_Relationship_between_entities Relationship between entities + * * @image html entities.png "Figure: Relationship between entities" * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Entities_Multiple_Address_books_from_Accounts Multiple Address books from Accounts @@ -90,9 +89,7 @@ * To access and handle entities, views are provided.
* According to data-view declarations, generic access functions are used (calendar_db_insert_record(), calendar_record_get_int(), …).
* Data-View is almost same as database "VIEW" which limits access and guarantees the performance by offering various views for the proper purpose. - * * _calendar_instance_utime, _calendar_instance_localtime views are not offered but combination with another view are provided. - * * * * @@ -122,10 +119,7 @@ * * *
Table: Calendar views
- * - * * _calendar_updated_info is used when identifying record changes depending on version. - * * The other read only views are combination of editable views for UI convenience.
* _calendar_event + _calendar_book = _calendar_event_calendar_book
* _calendar_instance_utime + _calendar_book = _calendar_instance_utime_calendar_book
@@ -135,25 +129,23 @@ * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Views_Properties Properties * Record types which have *_id as their properties, hold identifiers of other records - e.g. attendee and alarm views hold id of their corresponding events or to-dos in event_id or todo_id property respectively (as children of the corresponding events or to-dos record). * Properties of type 'record' are other records. For example, a event record has 'attendee' and 'alarm', which means that records of those types can be children of event type records. + * In calendar_view.h header file, view macros are found and below figure shows what macro means. * - * In calendar_view.h header file, view macros are found and below figure. show what macro means. * @image html view_property.png "Figure: Properties" * * There is an example how to create event with view. * * @code - * // create an event with _calendar_event view. + * // Create an event with _calendar_event view * calendar_record_h event = NULL; * calendar_record_create(_calendar_event._uri, &event); * - * // set event summary to _calendar_event view. + * // Set event summary to _calendar_event view * calendar_record_set_str(event, _calendar_event.summary, "Meeting"); * @endcode * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Views_Version Version - * - * Calendar service uses version system in bellow APIs. - * + * Calendar service uses version system in below APIs. * * * @@ -165,53 +157,48 @@ * * *
Table: Version related APIs
- * * Whenever modifications are in DB, version number is increased every time.
- * If sync applications like google, facebook sync at version 13 and they try to sync again every 1 minute, they want to get changes from version 14 to current version.
+ * If sync applications like Google, Facebook sync at version 13 and they try to sync again every 1 minute, they want to get changes from version 14 to current version.
* To get current version, calendar_db_get_current_version() is used and calendar_db_get_changes_by_version() is used to get the modified record list. calendar_db_get_changes_exception_by_version() is used to get modified instances in recurring event. * (see exception in Events and instances) * - * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Records Records * An important concept in Calendar service APIs is a record. * It may be helpful to know that a record represents an actual record in the internal database, but in general, you can think of a record as a structure describing a single (but complex) view, like a calendar event or a time zone. - * * A record has many properties, for example, a to-do record has the to-do's description, priority, progress, created, last modified and completed time, plus many others.
* A record can also contain an identifier field, which holds an identifier of another record. Setting this field's value establishes a relation between the records, for example, a calendar event contains the identifier of a calendar book to which it belongs. * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Records_URI URI - * * A record's type is identified by a structure called the view. * For example, the _calendar_event view describes the properties of the calendar event record. * Every view has a special field - _uri - that uniquely identifies the view. * In many cases you will need to provide the _uri value to indicate what type of record you wish to create or operate on. + * * @code - * // create an event and get handle + * // Create an event and get handle * calendar_record_h event = NULL; * calendar_record_create(_calendar_event._uri, &event); * @endcode * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Records_Record_handle Record handle - * * To use a record, you must obtain its handle. - * There are many ways to obtains it, including creating a new record and referring to child records of a record. + * There are many ways to obtain it, including creating a new record and referring to child records of a record. + * * @code - * // create an event and get handle + * // Create an event and get handle * calendar_record_h event = NULL; * calendar_record_create(_calendar_event._uri, &event); * - * // get record handle with id + * // Get record handle with ID * calendar_record_h event2 = NULL * calendar_db_get_record(_calendar_event._uri, event_id, &event2); * @endcode * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Records_Basic_types Basic types - * * Records contain properties of basic types: integer, lli (long integer, long long int), double, * string and calendar_time_s.
* The calendar_time_s type holds either a long long int, or three integers (year, month, day). * There are setter and getter functions for each type: - * * * * @@ -245,7 +232,6 @@ * * *
Table: Setter and getter functions
calendar_record_get_caltime
- * * A record's type is identified by a structure called the view. For example, * the _calendar_event view describes the properties of the calendar event record. * Every view has a special field - _uri - that uniquely identifies the view. @@ -253,42 +239,39 @@ * type of record you wish to create or operate on. * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Records_Child Child - * * Records of certain type also hold 'child list' properties. * If a record has property of this type, it can be a parent of other records, called child records. * For example, attendee records can hold an event's identifier in their event_id property. * The event is the parent record of the child attendee records. - * * To use a record, you must obtain its handle. There are many ways to obtains it, * including creating a new record and referring to child records of a record. - * * Sample code:
* the code below creates an event and inserts it into default event book * (see below on calendar books). * * @code - * // create an event + * // Create an event * calendar_record_h event; * calendar_record_create(_calendar_event._uri, &event); * - * // set event summary + * // Set event summary * calendar_record_set_str(event, _calendar_event.summary, "Meeting"); * - * // put the event into the default calendar book for events + * // Put the event into the default calendar book for events * calendar_record_set_int(event, _calendar_event.calendar_book_id, book_id); * - * // add alarm as child + * // Add alarm as child * calendar_record_h alarm = NULL; * calendar_record_create(_calendar_alarm._uri, &alarm); * calendar_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_MINUTE); * calendar_record_set_int(alarm, _calendar_alarm.tick, 5); * calendar_record_add_child_record(event, _calendar_event.calendar_alarm, alarm); * - * // insert calendar book into the database + * // Insert calendar book into the database * int event_id = 0; * calendar_db_insert_record(event, &event_id); * - * // destroy + * // Destroy * calendar_record_destroy(event, true); * @endcode * @@ -311,7 +294,6 @@ * Birthday book * * - * * There is an example how calendar book id is set. * * @code @@ -319,15 +301,15 @@ * * calendar_record_create(_calendar_event._uri, &event); * - * // set default calendar book id + * // Set default calendar book ID * calendar_record_set_int(event, _calendar_event.calendar_id, DEFAULT_EVENT_CALENDAR_BOOK_ID); * - * // set other fields + * // Set other fields * * int event_id = 0; * calendar_db_insert_record(event &event_id); * - * // destroy + * // Destroy * calendar_record_destroy(event, true); * @endcode * @@ -338,7 +320,6 @@ * calendar_db_get_all_records(_calendar_calendar_book._uri, 0, 0, &calendar_book_list); * @endcode * - * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Events_and_instances Events and Instances * Two important concepts are event and instance. An event record describes * various properties of the event, like description, categories, priority @@ -347,8 +328,8 @@ * corresponding instance record.
* If event is inserted with rrule, alarm and attendee, its data is saved to each database. * Generated instances based on rrule are also stored in instance database. - * @image html view_db.png "Figure: Views and databases" * + * @image html view_db.png "Figure: Views and databases" * For example, if an event has the following properties: * * @@ -370,15 +351,12 @@ * * *
Table: Event and instance example
- * * Interval is a multiplier of frequency, which means that if it is set to N, * instances occur every N weeks (or whatever was set in frequency attribute). - * * The recurrence model in Calendar API is compliant with iCalendar specification * (www.ietf.org/rfc/rfc2445.txt). * The following event properties have the same functionality as their corresponding * values in iCalendar: - * * * * @@ -428,7 +406,6 @@ *
Table: Recurrence rules.
* * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Events_and_instances_Exceptions Exceptions - * * If one of instances is modified in summary, date… or deleted, this is called exception.
* For example, if 2nd instance date is modified from 16th to 17th, 17th is the exception. * @@ -454,15 +431,13 @@ * * *
- * * To get changes in exception, calendar_db_get_changes_exception_by_version() is called. These instances and exceptions are deleted together when original event is deleted. * - * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Calendar_time_structure Calendar Time Structure * The calendar time structure, calendar_caltime_s, is defined as follows: * * @code - * typedef struct + * struct calendar_time_s; * { * calendar_time_type_e type; * union { @@ -473,18 +448,17 @@ * int mday; * } date; * } time; - * } calendar_time_s; + * } + * typedef struct calendar_time_s; * @endcode * * The structure should be used when setting the calendar time type * (_CALENDAR_PROPERTY_CALTIME) properties of records. - * * It can hold two types of data: UTC time (long long int) and date, * given as year, month and day of the month (three integers). These types * are identified by values of calendar_time_type_e, which are CALENDAR_TIME_UTIME * and CALENDAR_TIME_LOCALTIME, respectively. The data type determines the usage * of the structure. - * * * * @@ -507,17 +481,13 @@ * *
Table: Data types
* - * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Calendar_time_structure_UTC_time_usage UTC Time Usage - * * Structures with UTC time should be used for non-all-day events. * In such cases, the API user should convert local time to UTC time. The local * time zone identifier should be stored in the record, in the corresponding * property. - * * For example, when setting starting time of an event, the local * time zone should be stored in start_tzid. - * * When converting local time to UTC time, the function below can be useful. * The function converts the given date and time to the corresponding * UTC time, considering the given time zone (first argument). @@ -525,7 +495,8 @@ * @code * #define ms2sec(ms) (long long int)(ms / 1000.0) * - * long long int _time_convert_itol(char *tzid, int y, int mon, int d, int h, int min, int s) + * long long int + * _time_convert_itol(char *tzid, int y, int mon, int d, int h, int min, int s) * { * int ret = 0; * i18n_uchar utf16_timezone[CAL_STR_SHORT_LEN64] = {0}; @@ -537,6 +508,7 @@ * ret = i18n_ucalendar_create(utf16_timezone, -1, loc_default, I18N_UCALENDAR_GREGORIAN, &ucal); * if (I18N_ERROR_NONE != ret) { * dlog_print(DLOG_DEBUG, LOG_TAG, "i18n_ucalendar_create() Fail (%d)\n", ret); + * * return -1; * } * @@ -547,6 +519,7 @@ * if (I18N_ERROR_NONE != ret) { * dlog_print(DLOG_DEBUG, LOG_TAG, "i18n_ucalendar_create() Fail (%d)\n", ret); * i18n_ucalendar_destroy(ucal); + * * return -1; * } * i18n_ucalendar_destroy(ucal); @@ -557,7 +530,7 @@ * * Sample code:
* @code - * // fill calendar time structures (start and end time) + * // Fill calendar time structures (start and end time) * calendar_time_s st = {0}; * calendar_time_s et = {0}; * @@ -567,23 +540,21 @@ * et.type = CALENDAR_TIME_UTIME; * et.time.utime = _time_convert_itol("Asia/Seoul", 2012, 9, 15, 12, 0, 0); * - * // create an event record - * // ... + * // Create an event record * - * // set local time zone of start time + * // Set local time zone of start time * calendar_record_set_str(event, _calendar_event.start_tzid, "Asia/Seoul"); * - * // set start time + * // Set start time * calendar_record_set_caltime(event, _calendar_event.start_time, st); * - * // set local time zone of end time + * // Set local time zone of end time * calendar_record_set_str(event, _calendar_event.end_tzid, "Asia/Seoul"); * - * // set end time + * // Set end time * calendar_record_set_caltime(event, _calendar_event.end_time, et); * @endcode * - * * @subsection CAPI_SOCIAL_CALENDAR_SVC_MODULE_Calendar_time_structure_Date_usage Date Usage * Another usage of time structure is an all day event. * In case of such events, the structure's type field MUST be set to CALENDAR_TIME_LOCALTIME. @@ -592,7 +563,7 @@ * The end date value MUST be later in time than the value of the start date. * * @code - * // range is 2days: 2014/02/17 00:00:00 ~ 2014/02/19 00:00:00 + * // Range is 2 days: 2014/02/17 00:00:00 ~ 2014/02/19 00:00:00 * * calendar_time_s st = {0}; * st.type = CALENDAR_TIME_LOCALTIME; @@ -606,11 +577,9 @@ * et.time.date.month = 2; * et.time.date.mday = 19; * - * // create an event record - * // ... + * // Create an event record * @endcode * - * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Creating_a_recurring_event Recurring Events * To create a recurring event in Calendar API, you MUST set frequency. * There is a sample code how to create recurring event. Firstly, set start and end time. @@ -628,7 +597,6 @@ * Then, the remaining properties should be set. * Each frequency needs other proper fields except daily event. * If other values are not inserted, these values are calculated based on start time. - * * * * @@ -677,10 +645,8 @@ * * *
Table: Frequency properties
-
- * * If byday is not set in weekly event, default byday is followed start day of week. * By the same token, default interval is 1 and default range type is endless. - * * * * @@ -732,18 +698,14 @@ * The criteria are defined by creating filters and adding conditions to them, joining them * with logical operators. Also, instead of a condition, another filter can be added, * which can be used to create more complex filters. - * * Operator precedence in filters determined by the order in which the * conditions and filters are added. - * * When a filter is ready, it can be set as a property of a query. * Other query properties allow configuring how the returned results * are grouped and sorted. - * * Operator precedence in filters is determined by the order in which the * conditions and filters are added are added. * For example, if the following sequence is added: - * *
Table: Range types
* * @@ -784,23 +746,22 @@ * * *
Table: Filter and conditions
- * * The following code creates a filter, accepting events with high priority * or those that include the word "meeting" in their description. * * @code * calendar_filter_h filter = NULL; * - * // create a filter returning event type records + * // Create a filter returning event type records * calendar_filter_create(_calendar_event._uri, &filter); * - * // add 'priority equals high' condition + * // Add 'priority equals high' condition * calendar_filter_add_int(filter, _calendar_event.priority, CALENDAR_MATCH_EQUAL, CALENDAR_EVENT_PRIORITY_HIGH); * - * // add OR operator + * // Add OR operator * calendar_filter_add_operator(filter, CALENDAR_FILTER_OPERATOR_OR); * - * // add 'description contains "meeting"' condition + * // Add 'description contains "meeting"' condition * calendar_filter_add_str(filter, _calendar_event.description, CALENDAR_MATCH_CONTAINS, "meeting"); * @endcode * @@ -810,20 +771,19 @@ * calendar_query_h query = NULL; * calendar_list_h list = NULL; * - * // create a query returning event type records + * // Create a query returning event type records * calendar_query_create(_calendar_event._uri, &query); * - * // add the filter + * // Add the filter * calendar_query_set_filter(query, filter); * - * // execute the query, results are returned in a list + * // Execute the query, results are returned in a list * calendar_db_get_records_with_query(query, 0, 0, &list); * * calendar_filter_destroy(filter); * calendar_query_destroy(query); * - * // use the list - * // ... + * // Use the list * * calendar_list_destroy(list, true); * @endcode @@ -832,8 +792,7 @@ * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Projections Projections * Useful concept in Calendar service APIs is projection, related to searching with filters and queries. * Projection allows you to query the Data for just those specific properties of a record that you actually need, at lower latency - * and cost than retrieving the entire properties - * + * and cost than retrieving the entire properties. * Sample code:
* create filter which will get event id, summary and start time from the record with its summary has “test” (string filter). * Create a query and add the filter to it. Results are received in a list. @@ -842,38 +801,35 @@ * calendar_query_h query = NULL; * calendar_filter_h filter = NULL; * - * // set query with filter + * // Set query with filter * calendar_query_create(_calendar_event_calendar_book_attendee._uri, &query); * calendar_filter_create(_calendar_event_calendar_book_attendee._uri, &filter); * calendar_filter_add_str(filter, _calendar_event.summary, CALENDAR_MATCH_CONTAINS, "test"); * calendar_query_set_filter(query, filter); * - * // set projection + * // Set projection * unsigned int projection[3]; * projection[0]=_calendar_event_calendar_book_attendee.event_id; * projection[1]=_calendar_event_calendar_book_attendee.summary; * projection[2]=_calendar_event_calendar_book_attendee.start_time; * - * // get list + * // Get list * calendar_query_set_projection(query, projection, 3); * calendar_db_get_records_with_query(query, 0, 0, &list); * - * // destroy handle + * // Destroy handle * calendar_filter_destroy(filter); * calendar_query_destroy(query); * calendar_list_destroy(list, true); * @endcode * - * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Reminders Reminders - * Alarm and reminder is the similar terminology but reminder is used as package name storages in below figure 5. + * Alarm and reminder is the similar terminology but reminder is used as package name storages, shown in below figure 5. * When alarm alerts, calendar-service sends notification to all packages which is registered in reminder DB table with calendar_reminder_add_receiver(). - * * This shows how to set alarm and how alarm works. * * @image html alarm_process.png "Figure: Alarm process" * After adding receiver, registered alarm would be alerted on reserved time by inserting alarm as child. - * * * * @@ -907,44 +863,43 @@ * * *
Table: Alarm fields
The number of minutes before start time
- * * Below example shows the alarm which is set 1 minute before start time. * * @code - // set alarm with normal unit + * // Set alarm with normal unit * calendar_record_h alarm = NULL; * calendar_record_create(_calendar_alarm._uri, &alarm); * calendar_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_MINUTE); - * calendar_record_set_int(alarm, _calendar_alarm.tick, 1); // before 1min (60secs) + * calendar_record_set_int(alarm, _calendar_alarm.tick, 1); // Before 1 min (60 secs) * - * // add alarm as child + * // Add alarm as child * calendar_record_add_child_record(event, _calendar_event.calendar_alarm, alarm); * @endcode * * With CALENDAR_ALARM_TIME_UNIT_SPECIFIC, the alarm could be set regardless of the start time. * * @code - // set alarm with specific unit + * // Set alarm with specific unit * calendar_record_h alarm = NULL; * calendar_record_create(_calendar_alarm._uri, &alarm); * calendar_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_SPECIFIC); - * // suppose start time is 1404036000(Sun, 29 Jun 2014 10:00:00 GMT) and alarm is set 60secs after from start time. + * // Suppose start time is 1404036000 (Sun, 29 Jun 2014 10:00:00 GMT) and alarm is set 60 secs after from start time * calendar_time_s ct; * ct.type = CALENDAR_TIME_UTIME; * ct.time.utime = 1404036000 + 60; * calendar_record_set_caltime(alarm, _calendar_alarm.alarm_time, ct); * - * // add alarm as child + * // Add alarm as child * calendar_record_add_child_record(event, _calendar_event.calendar_alarm, alarm); * @endcode * * How to register package as reminder. - * * In manifest.xml file, below code must be inserted. + * * @code * - * - * + * + * * * @endcode * @@ -962,47 +917,40 @@ * * int i = 0; * for (i = 0; i < len; i++) { - * // "id" is the key to get detail value - * char *value = NULL; - * app_control_get_extra_data(b, ids[i], &value); - * if (NULL == value) { - * continue; - * } - * // parse detail data - * - * // free - * free(ids[i]); - * ids[i] = NULL; + * // "id" is the key to get detail value + * char *value = NULL; + * app_control_get_extra_data(b, ids[i], &value); + * if (NULL == value) + * continue; + * + * // Parse detail data + * + * // Free + * free(ids[i]); + * ids[i] = NULL; * } * * free(ids); * @endcode * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Db_change_noties Database Change Notifications - * * Applications add/remove callback function to detect/ignore the calendar DB changes * with calendar_db_add_changed_cb() / calendar_db_remove_changed_cb().
- * Clients wait calendar change notification on client side. + * Clients await calendar change notification on client side. * If calendar is changed by another module, server publishes inotify event. Inotify module broadcasts to subscribe modules. * Internal inotify handler is called at client side. User callback function is called with user data. * * @code - * // add callback function - * void __event_changed_cb(const char *view_uri, void *user_data) - * { - * } - * // add changed noti callback + * // Add callback function + * void __event_changed_cb(const char *view_uri, void *user_data) {} + * // Add changed noti callback * calendar_db_add_changed_cb(_calendar_event._uri, __event_changed_cb, NULL); * @endcode * - * * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_Vcalendar Vcalendar - * * To exchange of personal calendaring and scheduling information, vcalendar is used. * In order to avoid confusion with this referenced work, this is to be known as the vcalendar specification. * Vcalendar ver2.0 is known as icalendar. - * - * * * * @@ -1019,132 +967,114 @@ * * *
Table: Vcalendar example ( http://www.ietf.org/rfc/rfc2445.txt )
- * * Calendar service provides APIs to compose vcalendar stream. * With stream, file could be made or data could be transmitted with json data. * * @code * calendar_list_h list = NULL; - * // create or get list to make vcalendar stream + * // Create or get list to make vcalendar stream * * char *stream = NULL; * calendar_vcalendar_make_from_records(list, &stream); * - * // jobs for stream + * // Jobs for stream * - * // free + * // Free * free(stream); * @endcode * * Vcalendar could be parsed with calendar service APIs as well. * * @code - * // read stream from file + * // Read stream from file * * calendar_list_h list = NULL; * calendar_vcalendar_parse_to_calendar(stream, &list); * - * // jobs for list… + * // Jobs for list * calendar_list_destroy(list, true); * @endcode - * */ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_DATABASE_MODULE Database - * * @brief The calendar database API provides the set of the definitions and interfaces that enable you to handle calendar database. - * * @section CAPI_SOCIAL_CALENDAR_SVC_DATABASE_MODULE_HEADER Required Header - * \#include - * + * \#include *
*/ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_FILTER_MODULE Filter - * * @brief The calendar filter API provides the set of the definitions and interfaces that enable you to handle filter. - * * @section CAPI_SOCIAL_CALENDAR_SVC_FILTER_MODULE_HEADER Required Header - * \#include - * + * \#include *
*/ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_LIST_MODULE List - * * @brief The calendar list API provides the set of the definitions and interfaces that enable you to handle list. - * * @section CAPI_SOCIAL_CALENDAR_SVC_LIST_MODULE_HEADER Required Header - * \#include - * + * \#include *
*/ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_QUERY_MODULE Query - * * @brief The calendar query API provides the set of the definitions and interfaces that enable you to handle query. - * * @section CAPI_SOCIAL_CALENDAR_SVC_QUERY_MODULE_HEADER Required Header - * \#include - * + * \#include *
*/ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_RECORD_MODULE Record - * * @brief The calendar record API provides the set of the definitions and interfaces that enable you to get/set data from/to calendar record handle. - * * @section CAPI_SOCIAL_CALENDAR_SVC_RECORD_MODULE_HEADER Required Header * \#include - * *
*/ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_REMINDER_MODULE Reminder - * * @brief The calendar reminder API provides the interface to set/unset reminder callback. - * * @section CAPI_SOCIAL_CALENDAR_SVC_REMINDER_MODULE_HEADER Required Header - * \#include - * + * \#include *
*/ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_VCALENDAR_MODULE vCalendar - * * @brief The calendar vcalendar API provides the set of the definitions and interfaces that enable you to get/set data from/to vCalendar. - * * @section CAPI_SOCIAL_CALENDAR_SVC_VCALENDAR_MODULE_HEADER Required Header - * \#include - * + * \#include *
*/ + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - * * @brief This page provides information about views with properties. - * * @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_OVERVIEW Overview * A view is a structure which describes properties of a record. * A record can have basic properties of four types: integer, string, long integer. Each property * of basic type has functions to operate on it: - * * * * @@ -1177,23 +1107,18 @@ * * *
Property calendar_record_get_caltime
- * * For long long integer functions, "lli" stands for long long int, ususally used to hold UTC time. - * * Below you can find tables with view properties. - * * Properties of type 'record' are other records. For example, the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event * has a 'calendar_alarm' property of type 'record'. This means that records of type calendar_alarm (@ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm) * can be children of the event record. If a name record holds the identifier * of a event record in its 'event_id' property, it is the child record of the corresponding * event record. - * * Records can have many children of a given type. - * * Please refer to the main section of Calendar API for a more detailed explanation and examples. - * * @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_HEADER Required Header - * \#include + * \#include */ + #endif /* __TIZEN_SOCIAL_CALENDAR_DOC_H__ */ diff --git a/include/calendar.h b/include/calendar.h index 27d0b6e..3059635 100644 --- a/include/calendar.h +++ b/include/calendar.h @@ -16,6 +16,7 @@ * limitations under the License. * */ + #ifndef __TIZEN_SOCIAL_CALENDAR_H__ #define __TIZEN_SOCIAL_CALENDAR_H__ diff --git a/include/calendar_db.h b/include/calendar_db.h index 8acb4bd..9911d7f 100644 --- a/include/calendar_db.h +++ b/include/calendar_db.h @@ -38,37 +38,31 @@ extern "C" { /** * @brief Called when a designated view changes. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] view_uri The view URI - * @param[in] user_data The user data passed from the callback registration function - * + * @param[in] view_uri The view URI + * @param[in] user_data The user data passed from the callback registration function * @see calendar_db_add_changed_cb() */ typedef void (*calendar_db_changed_cb)(const char* view_uri, void* user_data); + /** * @brief Inserts a record into the calendar database. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] record The record handle - * @param[out] record_id The record ID - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] record The record handle + * @param[out] record_id The record ID + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_record() * @see calendar_db_delete_record() @@ -76,65 +70,55 @@ typedef void (*calendar_db_changed_cb)(const char* view_uri, void* user_data); */ int calendar_db_insert_record(calendar_record_h record, int* record_id); + /** * @brief Gets a record from the calendar database. - * * @details This function creates a new record handle from the calendar database by the given @a record_id. \n * @a record will be created and filled with record information. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * * @remarks You must release @a record using calendar_record_destroy(). - * - * @param[in] view_uri The view URI of a record - * @param[in] record_id The record ID - * @param[out] record The record handle associated with the record ID - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] view_uri The view URI of a record + * @param[in] record_id The record ID + * @param[out] record The record handle associated with the record ID + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_record_destroy() */ int calendar_db_get_record(const char* view_uri, int record_id, calendar_record_h* record); + /** * @brief Updates a record in the calendar database. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] record The record handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] record The record handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_record() * @see calendar_db_delete_record() @@ -142,447 +126,382 @@ int calendar_db_get_record(const char* view_uri, int record_id, calendar_record_ */ int calendar_db_update_record(calendar_record_h record); + /** * @brief Deletes a record from the calendar database with related child records. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] view_uri The view URI of a record - * @param[in] record_id The record ID to be deleted - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] view_uri The view URI of a record + * @param[in] record_id The record ID to be deleted + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_record() */ int calendar_db_delete_record(const char* view_uri, int record_id); + /** * @brief Retrieves all records as a list. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * * @remarks You must release @a record_list using calendar_list_destroy(). - * - * @param[in] view_uri The view URI to get records from - * @param[in] offset The index from which results are received - * @param[in] limit The maximum number of results(value 0 is used for all records) - * @param[out] record_list The record list - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] view_uri The view URI to get records from + * @param[in] offset The index from which results are received + * @param[in] limit The maximum number of results(value 0 is used for all records) + * @param[out] record_list The record list + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() */ int calendar_db_get_all_records(const char* view_uri, int offset, int limit, calendar_list_h* record_list); + /** * @brief Retrieves records using a query handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * * @remarks You must release @a record_list using calendar_list_destroy(). - * - * @param[in] query The query handle used to filter results - * @param[in] offset The index from which results are received - * @param[in] limit The maximum number of results(value 0 is used for all records) - * @param[out] record_list The record list - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] query The query handle used to filter results + * @param[in] offset The index from which results are received + * @param[in] limit The maximum number of results(value 0 is used for all records) + * @param[out] record_list The record list + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() */ int calendar_db_get_records_with_query(calendar_query_h query, int offset, int limit, calendar_list_h* record_list); + /** * @brief Gets the record count of a specific view. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * - * @param[in] view_uri The view URI to get records from - * @param[out] count The number of records - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre This function requires an open connection to the calendar service using calendar_connect2(). - * + * @param[in] view_uri The view URI to get records from + * @param[out] count The number of records + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre This function requires an open connection to the calendar service using calendar_connect2(). * @see calendar_connect() */ int calendar_db_get_count(const char* view_uri, int *count); + /** * @brief Gets the record count with a query handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * - * @param[in] query The query handle used for filtering the results - * @param[out] count The number of records - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre This function requires an open connection to the calendar service using calendar_connect2(). - * + * @param[in] query The query handle used for filtering the results + * @param[out] count The number of records + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre This function requires an open connection to the calendar service using calendar_connect2(). * @see calendar_connect2() */ int calendar_db_get_count_with_query(calendar_query_h query, int *count); + /** * @brief Inserts multiple records into the calendar database as a batch operation. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] record_list The record list handle - * @param[out] record_id_array The array of record IDs - * @param[out] count The number of record IDs - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] record_list The record list handle + * @param[out] record_id_array The array of record IDs + * @param[out] count The number of record IDs + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_records() * @see calendar_db_delete_records() */ int calendar_db_insert_records(calendar_list_h record_list, int** record_id_array, int* count); + /** * @brief Updates multiple records into the calendar database as a batch operation. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] record_list The record list handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] record_list The record list handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_records() * @see calendar_db_delete_records() */ int calendar_db_update_records(calendar_list_h record_list); + /** - * @brief Deletes multiple records with related child records from the calendar database as a batch operation. - * + * @brief Deletes multiple records with related child records from the calendar database as a batch operation. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] view_uri The view URI of the records to delete - * @param[in] record_id_array The record IDs to delete - * @param[in] count The number of records - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] view_uri The view URI of the records to delete + * @param[in] record_id_array The record IDs to delete + * @param[in] count The number of records + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_records() * @see calendar_db_delete_records() */ int calendar_db_delete_records(const char* view_uri, int record_id_array[], int count); + /** - * @brief Gets the current calendar database version. - * + * @brief Gets the current calendar database version. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * - * @param[out] calendar_db_version The calendar database version - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval ##CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * - * @pre This function requires an open connection to the calendar service using calendar_connect(). - * + * @param[out] calendar_db_version The calendar database version + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval ##CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @pre This function requires an open connection to the calendar service using calendar_connect(). * @see calendar_connect() * @see calendar_db_get_changes_by_version() */ int calendar_db_get_current_version(int* calendar_db_version); + /** * @brief Registers a callback function to be invoked when a record changes. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel 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 @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book view, @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event view, - * @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo view. - * - * @param[in] view_uri The view URI of the record to subscribe for change notifications - * @param[in] callback The callback function to register - * @param[in] user_data The user data to be passed to the callback function - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * - * @pre This function requires an open connection to the calendar service using calendar_connect(). - * @post calendar_db_changed_cb() will be invoked when the designated view changes. - * + * 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 @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book view, @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event view, + * @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo view. + * @param[in] view_uri The view URI of the record to subscribe for change notifications + * @param[in] callback The callback function to register + * @param[in] user_data The user data to be passed to the callback function + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Error from another modules + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @pre This function requires an open connection to the calendar service using calendar_connect(). + * @post calendar_db_changed_cb() will be invoked when the designated view changes. * @see calendar_connect() * @see calendar_db_changed_cb() * @see calendar_db_remove_changed_cb() */ int calendar_db_add_changed_cb(const char* view_uri, calendar_db_changed_cb callback, void* user_data); + /** * @brief Unregisters a callback function. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * - * @param[in] view_uri The view URI of the record to subscribe for change notifications - * @param[in] callback The callback function to register - * @param[in] user_data The user data to be passed to the callback function - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * - * @pre This function requires an open connection to the calendar service using calendar_connect(). - * + * @param[in] view_uri The view URI of the record to subscribe for change notifications + * @param[in] callback The callback function to register + * @param[in] user_data The user data to be passed to the callback function + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Error from another modules + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @pre This function requires an open connection to the calendar service using calendar_connect(). * @see calendar_connect() * @see calendar_db_changed_cb() * @see calendar_db_add_changed_cb() */ int calendar_db_remove_changed_cb(const char* view_uri, calendar_db_changed_cb callback, void* user_data); + /** * @brief Retrieves records with the given calendar database version. - * - * @details This function finds all the changed records since the given @a calendar_db_version. - * + * @details This function finds all the changed records since the given @a calendar_db_version. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * * @remarks You must release @a change_record_list using calendar_list_destroy(). - * - * @param[in] view_uri The view URI to get records from - * @param[in] calendar_book_id The calendar book ID to filter - * @param[in] calendar_db_version The calendar database version - * @param[out] record_list The record list - * @param[out] current_calendar_db_version The current calendar database version - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] view_uri The view URI to get records from + * @param[in] calendar_book_id The calendar book ID to filter + * @param[in] calendar_db_version The calendar database version + * @param[out] record_list The record list + * @param[out] current_calendar_db_version The current calendar database version + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() */ 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); + /** * @brief Inserts a vcalendar stream into the calendar database. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] vcalendar_stream The vcalendar stream - * @param[out] record_id_array The record IDs to delete - * @param[out] count The number of record ID arrays - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] vcalendar_stream The vcalendar stream + * @param[out] record_id_array The record IDs to delete + * @param[out] count The number of record ID arrays + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_replace_vcalendars() */ int calendar_db_insert_vcalendars(const char* vcalendar_stream, int **record_id_array, int *count); + /** * @brief Replaces a vcalendar stream in the calendar database. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] vcalendar_stream The vcalendar stream - * @param[in] record_id_array The record IDs to replace - * @param[in] count The number of record ID arrays - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * - * @pre This function requires an open connection to the calendar service by calendar_connect(). - * + * @param[in] vcalendar_stream The vcalendar stream + * @param[in] record_id_array The record IDs to replace + * @param[in] count The number of record ID arrays + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @pre This function requires an open connection to the calendar service by calendar_connect(). * @see calendar_connect() * @see calendar_db_replace_vcalendars() */ int calendar_db_replace_vcalendars(const char* vcalendar_stream, int *record_id_array, int count); + /** * @brief Replaces a record in the calendar database. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] record The record handle - * @param[in] record_id The record ID - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] record The record handle + * @param[in] record_id The record ID + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_record() * @see calendar_db_delete_record() @@ -590,30 +509,26 @@ int calendar_db_replace_vcalendars(const char* vcalendar_stream, int *record_id_ */ int calendar_db_replace_record(calendar_record_h record, int record_id); + /** * @brief Replaces multiple records in the calendar database as a batch operation. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - * - * @param[in] record_list The record list handle - * @param[in] record_id_array The record IDs - * @param[in] count The number of record ID arrays - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] record_list The record list handle + * @param[in] record_id_array The record IDs + * @param[in] count The number of record ID arrays + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_records() * @see calendar_db_delete_records() @@ -621,88 +536,75 @@ int calendar_db_replace_record(calendar_record_h record, int record_id); */ int calendar_db_replace_records(calendar_list_h record_list, int *record_id_array, int count); + /** * @brief Gets the last successful change version of the database on the current connection. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * - * @param[out] last_change_version The calendar database version on the current connection - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * - * @pre This function requires an open connection to the calendar service using calendar_connect(). - * + * @param[out] last_change_version The calendar database version on the current connection + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @pre This function requires an open connection to the calendar service using calendar_connect(). * @see calendar_connect() * @see calendar_db_get_current_version() */ int calendar_db_get_last_change_version(int* last_change_version); + /** * @brief Retrieves changed exception records since the given calendar database version. * Exceptions are the modified or deleted instances in a recurring event. - * * @details This function finds all the changed records since the given @a calendar_db_version. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * * @remarks You must release @a change_record_list using calendar_list_destroy(). - * - * @param[in] view_uri The view URI to get records from - * @param[in] original_event_id The original event ID - * @param[in] calendar_db_version The calendar database version starting from which to get records - * @param[out] list The record list - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] view_uri The view URI to get records from + * @param[in] original_event_id The original event ID + * @param[in] calendar_db_version The calendar database version starting from which to get records + * @param[out] list The record list + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() */ int calendar_db_get_changes_exception_by_version(const char* view_uri, int original_event_id, int calendar_db_version, calendar_list_h* list); + /** * @brief Cleans the data after sync. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/calendar.write - - * @param[in] calendar_book_id The calendar book ID - * @param[in] calendar_db_version The calendar database version - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied - * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_NO_DATA Data does not exist - * - * @pre calendar_connect() should be called to open a connection to the calendar service. - * + * @param[in] calendar_book_id The calendar book ID + * @param[in] calendar_db_version The calendar database version + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied + * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() */ int calendar_db_clean_after_sync(int calendar_book_id, int calendar_db_version); + /** * @} */ diff --git a/include/calendar_errors.h b/include/calendar_errors.h index c29fff8..94924ad 100644 --- a/include/calendar_errors.h +++ b/include/calendar_errors.h @@ -40,22 +40,23 @@ extern "C" { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - CALENDAR_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - CALENDAR_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - CALENDAR_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< Requested data does not exist */ - CALENDAR_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Operation now in progress */ - CALENDAR_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Operation already in progress */ - CALENDAR_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED, /**< Operation not permitted */ - CALENDAR_ERROR_FILE_NO_SPACE = TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE, /**< FS is full */ - CALENDAR_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - CALENDAR_ERROR_DB_FAILED = TIZEN_ERROR_CALENDAR | 0x02, /**< No access to the database */ - CALENDAR_ERROR_ITERATOR_END = TIZEN_ERROR_CALENDAR | 0x04, /**< Iterator is on the last position */ - CALENDAR_ERROR_DB_RECORD_NOT_FOUND = TIZEN_ERROR_CALENDAR | 0x05, /**< Database not found */ - CALENDAR_ERROR_IPC = TIZEN_ERROR_CALENDAR | 0xBF, /**< Unknown IPC error */ - CALENDAR_ERROR_SYSTEM = TIZEN_ERROR_CALENDAR | 0xEF, /**< Error from another modules */ + CALENDAR_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + CALENDAR_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + CALENDAR_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + CALENDAR_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< Requested data does not exist */ + CALENDAR_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Operation now in progress */ + CALENDAR_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Operation already in progress */ + CALENDAR_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED, /**< Operation not permitted */ + CALENDAR_ERROR_FILE_NO_SPACE = TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE, /**< FS is full */ + CALENDAR_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + CALENDAR_ERROR_DB_FAILED = TIZEN_ERROR_CALENDAR | 0x02, /**< No access to the database */ + CALENDAR_ERROR_ITERATOR_END = TIZEN_ERROR_CALENDAR | 0x04, /**< Iterator is on the last position */ + CALENDAR_ERROR_DB_RECORD_NOT_FOUND = TIZEN_ERROR_CALENDAR | 0x05, /**< Database not found */ + CALENDAR_ERROR_IPC = TIZEN_ERROR_CALENDAR | 0xBF, /**< Unknown IPC error */ + CALENDAR_ERROR_SYSTEM = TIZEN_ERROR_CALENDAR | 0xEF, /**< Error from another modules */ } calendar_error_e; + /** * @} */ diff --git a/include/calendar_filter.h b/include/calendar_filter.h index 4be7d95..58b02bc 100644 --- a/include/calendar_filter.h +++ b/include/calendar_filter.h @@ -37,167 +37,137 @@ extern "C" { /** * @brief Creates a filter handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You must release @a filter using calendar_filter_destroy(). - * - * @param[in] view_uri The view URI of a filter - * @param[out] filter The filter handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre calendar_connect() should be called to initialize. - * + * @param[in] view_uri The view URI of a filter + * @param[out] filter The filter handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre calendar_connect() should be called to initialize. * @see calendar_filter_destroy() */ int calendar_filter_create(const char* view_uri, calendar_filter_h* filter); + /** * @brief Destroys a filter handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] filter The filter handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] filter The filter handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_create() */ int calendar_filter_destroy(calendar_filter_h filter); + /** * @brief Adds a condition for the string type property. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] filter The filter handle - * @param[in] property_id The property ID to add a condition - * @param[in] match The match flag - * @param[in] match_value The match value - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] filter The filter handle + * @param[in] property_id The property ID to add a condition + * @param[in] match The match flag + * @param[in] match_value The match value + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_add_operator() */ int calendar_filter_add_str(calendar_filter_h filter, unsigned int property_id, calendar_match_str_flag_e match, const char* match_value); + /** * @brief Adds a condition for the integer type property. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] filter The filter handle - * @param[in] property_id The property ID to add a condition - * @param[in] match The match flag - * @param[in] match_value The match value - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] filter The filter handle + * @param[in] property_id The property ID to add a condition + * @param[in] match The match flag + * @param[in] match_value The match value + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_add_operator() */ int calendar_filter_add_int(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, int match_value); + /** * @brief Adds a condition for the double type property. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] filter The filter handle - * @param[in] property_id The property ID to add a condition - * @param[in] match The match flag - * @param[in] match_value The match value - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] filter The filter handle + * @param[in] property_id The property ID to add a condition + * @param[in] match The match flag + * @param[in] match_value The match value + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_add_operator() */ int calendar_filter_add_double(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, double match_value); + /** * @brief Adds a condition for the long long int type property. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] filter The filter handle - * @param[in] property_id The property ID to add a condition - * @param[in] match The match flag - * @param[in] match_value The match value - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] filter The filter handle + * @param[in] property_id The property ID to add a condition + * @param[in] match The match flag + * @param[in] match_value The match value + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_add_operator() */ int calendar_filter_add_lli(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, long long int match_value); + /** * @brief Adds a condition for the calendar_time_s type property. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] filter The filter handle - * @param[in] property_id The property ID to add a condition - * @param[in] match The match flag - * @param[in] match_value The match value - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] filter The filter handle + * @param[in] property_id The property ID to add a condition + * @param[in] match The match flag + * @param[in] match_value The match value + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_add_operator() */ int calendar_filter_add_caltime(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, calendar_time_s match_value); + /** * @brief Adds a child filter to a parent filter. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] parent_filter The parent filter handle - * @param[in] child_filter The child filter handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] parent_filter The parent filter handle + * @param[in] child_filter The child filter handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_add_operator() */ int calendar_filter_add_filter(calendar_filter_h parent_filter, calendar_filter_h child_filter); + /** * @brief Adds an operator between conditions. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] filter The filter handle - * @param[in] operator_type The operator type - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] filter The filter handle + * @param[in] operator_type The operator type + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_filter_add_str() * @see calendar_filter_add_int() * @see calendar_filter_add_double() @@ -206,6 +176,7 @@ int calendar_filter_add_filter(calendar_filter_h parent_filter, calendar_filter_ */ int calendar_filter_add_operator(calendar_filter_h filter, calendar_filter_operator_e operator_type); + /** * @} */ diff --git a/include/calendar_list.h b/include/calendar_list.h index 50c8454..8f734f2 100644 --- a/include/calendar_list.h +++ b/include/calendar_list.h @@ -33,37 +33,29 @@ extern "C" { /** * @brief Creates a calendar list handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You must release @a calendar_list using calendar_list_destroy(). - * - * @param[out] out_list The calendar list handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[out] out_list The calendar list handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_list_destroy() */ int calendar_list_create(calendar_list_h* out_list); + /** * @brief Destroys a calendar list handle and releases all its resources. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * @param[in] delete_record If @c true, child records are destroyed automatically, - * otherwise @c false - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] list The calendar list handle + * @param[in] delete_record If @c true, child records are destroyed automatically, + * otherwise @c false + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_list_create() */ int calendar_list_destroy(calendar_list_h list, bool delete_record); @@ -71,144 +63,120 @@ int calendar_list_destroy(calendar_list_h list, bool delete_record); /** * @brief Retrieves the number of calendar entities in a calendar list. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * @param[out] count The count of the calendar entity - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] list The calendar list handle + * @param[out] count The count of the calendar entity + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_list_add() */ int calendar_list_get_count(calendar_list_h list, int *count); + /** * @brief Adds a record to the calendar list. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * @param[in] record The record handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] list The calendar list handle + * @param[in] record The record handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_list_remove() */ int calendar_list_add(calendar_list_h list, calendar_record_h record); + /** * @brief Removes a record from the calendar list. * @details If the record is the current record, then the current record is changed to the next record.\n * If the record is the last record then the current record will be @c NULL. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * @param[in] record The record handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - * + * @param[in] list The calendar list handle + * @param[in] record The record handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist * @see calendar_list_add() */ int calendar_list_remove(calendar_list_h list, calendar_record_h record); + /** * @brief Retrieves a record from the calendar list. * @details The default current record is the first record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You MUST NOT destroy the @a record handle. * It is destroyed automatically when the @a list is destroyed. - * - * @param[in] list The calendar list handle - * @param[out] record The record handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @param[in] list The calendar list handle + * @param[out] record The record handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist */ int calendar_list_get_current_record_p(calendar_list_h list, calendar_record_h* record); + /** * @brief Moves a calendar list to the previous position. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - * + * @param[in] list The calendar list handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist * @see calendar_list_next() */ int calendar_list_prev(calendar_list_h list); + /** * @brief Moves a calendar list to the next position. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - * + * @param[in] list The calendar list handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist * @see calendar_list_prev() */ int calendar_list_next(calendar_list_h list); + /** * @brief Moves a calendar list to the first position. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] list The calendar list handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_list_last() */ int calendar_list_first(calendar_list_h list); + /** * @brief Moves a calendar list to the last position. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] list The calendar list handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] list The calendar list handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_list_first() */ int calendar_list_last(calendar_list_h list); + /** * @} */ diff --git a/include/calendar_query.h b/include/calendar_query.h index 6d641c7..3b2bb6f 100644 --- a/include/calendar_query.h +++ b/include/calendar_query.h @@ -37,108 +37,89 @@ extern "C" { /** * @brief Creates a query handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You must release @a query using calendar_query_destroy(). - * - * @param[in] view_uri The view URI of a query - * @param[out] query The filter handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * - * @pre calendar_connect() should be called to initialize. - * + * @param[in] view_uri The view URI of a query + * @param[out] query The filter handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @pre calendar_connect() should be called to initialize. * @see calendar_query_destroy() */ int calendar_query_create(const char* view_uri, calendar_query_h* query); + /** * @brief Destroys a query handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] query The query handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * + * @param[in] query The query handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @see calendar_query_create() */ int calendar_query_destroy(calendar_query_h query); + /** * @brief Adds property IDs for projection. - * * @details Property IDs can be of one of the properties of view_uri which is used in calendar_query_create(). - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] query The query handle - * @param[in] property_id_array The property ID array - * @param[in] count The number of property IDs - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] query The query handle + * @param[in] property_id_array The property ID array + * @param[in] count The number of property IDs + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter */ int calendar_query_set_projection(calendar_query_h query, unsigned int property_id_array[], int count); + /** * @brief Sets the "distinct" option for projection. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] query The query handle - * @param[in] set If @c true it is set, - * otherwise if @c false it is unset - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] query The query handle + * @param[in] set If @c true it is set, + * otherwise if @c false it is unset + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter */ int calendar_query_set_distinct(calendar_query_h query, bool set); + /** * @brief Sets the filter for a query. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] query The query handle - * @param[in] filter The filter handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - * + * @param[in] query The query handle + * @param[in] filter The filter handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist * @see calendar_query_add_operator() */ int calendar_query_set_filter(calendar_query_h query, calendar_filter_h filter); + /** * @brief Sets the sort mode for a query. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] query The query handle - * @param[in] property_id The property ID to sort - * @param[in] is_ascending If @c true it sorts in the ascending order, - * otherwise if @c false it sorts in the descending order - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @param[in] query The query handle + * @param[in] property_id The property ID to sort + * @param[in] is_ascending If @c true it sorts in the ascending order, + * otherwise if @c false it sorts in the descending order + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter */ int calendar_query_set_sort(calendar_query_h query, unsigned int property_id, bool is_ascending); diff --git a/include/calendar_record.h b/include/calendar_record.h index db855d7..c03c00d 100644 --- a/include/calendar_record.h +++ b/include/calendar_record.h @@ -37,400 +37,335 @@ extern "C" { /** * @brief Creates a record handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You must release @a record using calendar_record_destroy(). - * - * @param[in] view_uri The view URI - * @param[out] out_record The record handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * - * @pre calendar_connect() should be called to initialize. - * + * @param[in] view_uri The view URI + * @param[out] out_record The record handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @pre calendar_connect() should be called to initialize. * @see calendar_record_destroy() */ int calendar_record_create(const char* view_uri, calendar_record_h* out_record); + /** * @brief Destroys a record handle and releases all its resources. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] delete_child If @c true, child records are destroyed automatically, - * otherwise @c false - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The record handle + * @param[in] delete_child If @c true, child records are destroyed automatically, + * otherwise @c false + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_create() */ int calendar_record_destroy(calendar_record_h record, bool delete_child); + /** * @brief Makes a clone of a record handle. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You must release @a cloned_record using calendar_record_destroy(). - * - * @param[in] record The record handle - * @param[out] out_record The cloned record handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The record handle + * @param[out] out_record The cloned record handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_destroy() */ int calendar_record_clone(calendar_record_h record, calendar_record_h* out_record); + /** * @brief Gets a URI string from a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[out] uri The URI of the record - * + * @param[in] record The record handle + * @param[out] uri The URI of the record * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter */ int calendar_record_get_uri_p(calendar_record_h record, char** uri); + /** * @brief Gets a string from a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You must release @a value using free(). - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[out] out_str The result value - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[out] out_str The result value * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_get_str_p() * @see calendar_record_set_str() */ int calendar_record_get_str(calendar_record_h record, unsigned int property_id, char** out_str); + /** * @brief Gets a string pointer from a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You MUST NOT release @a value. - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[out] out_str The result value - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[out] out_str The result value * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_get_str() * @see calendar_record_set_str() */ int calendar_record_get_str_p(calendar_record_h record, unsigned int property_id, char** out_str); + /** * @brief Gets an integer value from a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[out] out_value The result value - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[out] out_value The result value * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_set_int() */ int calendar_record_get_int(calendar_record_h record, unsigned int property_id, int* out_value); + /** * @brief Gets a double value from a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[out] out_value The result value - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[out] out_value The result value * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_set_double() */ int calendar_record_get_double(calendar_record_h record, unsigned int property_id, double* out_value); + /** * @brief Gets a long long integer value from a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[out] out_value The result value - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[out] out_value The result value * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_set_lli() */ int calendar_record_get_lli(calendar_record_h record, unsigned int property_id, long long int* out_value); + /** * @brief Gets a calendar_caltime_s value from a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[out] out_value The result value - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[out] out_value The result value * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_set_caltime() */ int calendar_record_get_caltime(calendar_record_h record, unsigned int property_id, calendar_time_s* out_value); + /** * @brief Sets a string to a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[in] value The value to be set - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[in] value The value to be set + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_get_str() * @see calendar_record_get_str_p() */ int calendar_record_set_str(calendar_record_h record, unsigned int property_id, const char* value); + /** * @brief Sets an integer value to a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[in] value The value to be set - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[in] value The value to be set + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_get_int() */ int calendar_record_set_int(calendar_record_h record, unsigned int property_id, int value); + /** * @brief Sets a double value to a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[in] value The value to be set - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[in] value The value to be set + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_get_double() */ int calendar_record_set_double(calendar_record_h record, unsigned int property_id, double value); + /** * @brief Sets a long long integer value to a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[in] value The value to be set - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[in] value The value to be set + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_get_lli() */ int calendar_record_set_lli(calendar_record_h record, unsigned int property_id, long long int value); + /** * @brief Sets a calendar_time_s value to a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[in] value The value to be set - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[in] value The value to be set + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_get_caltime() */ int calendar_record_set_caltime(calendar_record_h record, unsigned int property_id, calendar_time_s value); + /** * @brief Adds a child record to the parent record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The parent record handle - * @param[in] property_id The property ID - * @param[in] child_record The handle of the child record to be added to the parent record - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The parent record handle + * @param[in] property_id The property ID + * @param[in] child_record The handle of the child record to be added to the parent record + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_remove_child_record() */ int calendar_record_add_child_record(calendar_record_h record, unsigned int property_id, calendar_record_h child_record); + /** * @brief Removes a child record from the parent record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The parent record handle - * @param[in] property_id The property ID - * @param[in] child_record The handle of the child record to be removed from the parent record - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @param[in] record The parent record handle + * @param[in] property_id The property ID + * @param[in] child_record The handle of the child record to be removed from the parent record + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_add_child_record() */ int calendar_record_remove_child_record(calendar_record_h record, unsigned int property_id, calendar_record_h child_record); + /** * @brief Gets the number of child records in a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The parent record handle - * @param[in] property_id The property ID - * @param[out] count The child record count - * + * @param[in] record The parent record handle + * @param[in] property_id The property ID + * @param[out] count The child record count * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_add_child_record() * @see calendar_record_remove_child_record() */ int calendar_record_get_child_record_count(calendar_record_h record, unsigned int property_id, unsigned int* count); + /** * @brief Gets a child record handle pointer from the parent record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @remarks You MUST NOT release @a child_record. \n It is released when the parent record handle is destroyed. - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[in] index The index of the child record - * @param[out] child_record The child record handle pointer - * + * @remarks You MUST NOT release @a child_record. \n + * It is released when the parent record handle is destroyed. + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[in] index The index of the child record + * @param[out] child_record The child record handle pointer * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_record_add_child_record() * @see calendar_record_remove_child_record() * @see calendar_record_get_child_record_count() */ int calendar_record_get_child_record_at_p(calendar_record_h record, unsigned int property_id, int index, calendar_record_h* child_record); + /** * @brief Makes a clone of a given record's child record list. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks You must release @a cloned_list using calendar_list_destroy(). - * - * @param[in] record The record handle - * @param[in] property_id The property ID - * @param[out] out_list The cloned list handle - * + * @param[in] record The record handle + * @param[in] property_id The property ID + * @param[out] out_list The cloned list handle * @return @c 0 on success, * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_list_destroy() */ int calendar_record_clone_child_record_list(calendar_record_h record, unsigned int property_id, calendar_list_h* out_list); + /** * @} */ diff --git a/include/calendar_reminder.h b/include/calendar_reminder.h index e885f34..524f54a 100644 --- a/include/calendar_reminder.h +++ b/include/calendar_reminder.h @@ -37,55 +37,46 @@ extern "C" { /** * @brief Called when an alarm is alerted. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] param Value string like id=value&time=value&tick=value&unit=value&type=value - * @param[in] user_data The user data passed from the callback registration function - * + * @param[in] param Value string like id=value&time=value&tick=value&unit=value&type=value + * @param[in] user_data The user data passed from the callback registration function * @see calendar_reminder_add_cb() */ typedef void (*calendar_reminder_cb)(const char *param, void* user_data); + /** * @brief Adds a callback to get a notification when an alarm alerts. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @privlevel public * @privilege %http://tizen.org/privilege/calendar.read - * - * @param[in] callback The callback to be added - * @param[in] user_data The user data - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * + * @param[in] callback The callback to be added + * @param[in] user_data The user data + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @see calendar_reminder_remove_cb() */ int calendar_reminder_add_cb(calendar_reminder_cb callback, void *user_data); + /** * @brief Removes a callback to get a notification when an alarm alerts. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] callback The callback to be removed - * @param[in] user_data The user data - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * + * @param[in] callback The callback to be removed + * @param[in] user_data The user data + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure * @see calendar_reminder_add_cb() */ int calendar_reminder_remove_cb(calendar_reminder_cb callback, void *user_data); + /** * @} */ diff --git a/include/calendar_service.h b/include/calendar_service.h index 1534f64..ce4711c 100644 --- a/include/calendar_service.h +++ b/include/calendar_service.h @@ -32,118 +32,100 @@ extern "C" { * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @defgroup CAPI_SOCIAL_CALENDAR_SVC_COMMON_MODULE Common * @brief The calendar common API provides the set of definitions and interfaces to initialize and deinitialize. - * * @section CAPI_SOCIAL_CALENDAR_SVC_COMMON_MODULE_HEADER Required Header - * \#include - * + * \#include *
* @{ */ /** * @brief Connects to the calendar service. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks Opening the connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n * The execution of calendar_connect() and calendar_disconnect() could slow down your application, so you are recommended not to call them frequently. - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules - * + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Error from another modules * @see calendar_disconnect() */ int calendar_connect(void); + /** * @brief Disconnects from the calendar service. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks If there is no opened connection, this function returns #CALENDAR_ERROR_DB_FAILED. - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @see calendar_connect() */ int calendar_disconnect(void); + /** * @brief Connects to the calendar service on a thread. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n * On a thread environment with calendar_connect(), request in one thread could fail, while another request connection is working in the other thread. * To prevent request failure, calendar_connect_on_thread() is recommended. - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - * + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method * @see calendar_disconnect_on_thread() */ int calendar_connect_on_thread(void); + /** * @brief Disconnects from the calendar service on a thread. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks If there is no opened connection, this function returns #CALENDAR_ERROR_DB_FAILED. - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @see calendar_connect_on_thread() */ int calendar_disconnect_on_thread(void); + /** * @brief Connects to the calendar service. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * * @remarks Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n * Before the calendar-service daemon is ready, if you call calendar_connect(), it could fail. * It is recommended to call this API with #CALENDAR_CONNECT_FLAG_RETRY flags in such a situation. - * - * @param[in] flags calendar_connect_flag - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules - * + * @param[in] flags calendar_connect_flag + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Error from another modules * @see calendar_disconnect(), CALENDAR_CONNECT_FLAG_RETRY */ int calendar_connect_with_flags(unsigned int flags); + /** * @} */ diff --git a/include/calendar_types.h b/include/calendar_types.h index a66d97f..7c5d9da 100644 --- a/include/calendar_types.h +++ b/include/calendar_types.h @@ -30,11 +30,11 @@ extern "C" { #define _CALENDAR_BEGIN_VIEW() \ typedef struct { \ const char* _uri; -#define _CALENDAR_PROPERTY_INT(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_STR(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_DOUBLE(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_LLI(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_CALTIME(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_INT(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_STR(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_DOUBLE(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_LLI(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_CALTIME(property_id_name) unsigned int property_id_name; #define _CALENDAR_PROPERTY_CHILD_MULTIPLE(property_id_name) unsigned int property_id_name; #define _CALENDAR_END_VIEW(name) } name##_property_ids; \ extern __attribute__ ((visibility("default"))) const name##_property_ids name; @@ -42,16 +42,16 @@ extern "C" { #define _CALENDAR_BEGIN_READ_ONLY_VIEW() \ typedef struct { \ const char* _uri; -#define _CALENDAR_PROPERTY_PROJECTION_INT(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_PROJECTION_STR(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_PROJECTION_DOUBLE(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_PROJECTION_LLI(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_PROJECTION_CALTIME(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_FILTER_INT(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_FILTER_STR(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_FILTER_DOUBLE(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_FILTER_LLI(property_id_name) unsigned int property_id_name; -#define _CALENDAR_PROPERTY_FILTER_CALTIME(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_PROJECTION_INT(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_PROJECTION_STR(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_PROJECTION_DOUBLE(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_PROJECTION_LLI(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_PROJECTION_CALTIME(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_FILTER_INT(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_FILTER_STR(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_FILTER_DOUBLE(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_FILTER_LLI(property_id_name) unsigned int property_id_name; +#define _CALENDAR_PROPERTY_FILTER_CALTIME(property_id_name) unsigned int property_id_name; #define _CALENDAR_END_READ_ONLY_VIEW(name) } name##_property_ids; \ extern __attribute__ ((visibility("default"))) const name##_property_ids name; @@ -69,408 +69,413 @@ _CALENDAR_HANDLE(calendar_h) * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_DATABASE_MODULE * @{ */ + /** * @brief Definition for a calendar connect flag. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define CALENDAR_CONNECT_FLAG_NONE 0x00000000 + + /** * @brief Definition for a calendar connect flag. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define CALENDAR_CONNECT_FLAG_RETRY 0x00000001 + /** * @brief Definition for a default event calendar book database ID. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define DEFAULT_EVENT_CALENDAR_BOOK_ID 1 + /** * @brief Definition for a default to-do calendar book database ID. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define DEFAULT_TODO_CALENDAR_BOOK_ID 2 + /** * @brief Definition for a default birthday calendar book database ID. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define DEFAULT_BIRTHDAY_CALENDAR_BOOK_ID 3 + /** * @brief Definition for no due date of a to-do. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define CALENDAR_TODO_NO_DUE_DATE INT64_MAX + /** * @brief Definition for no start date of a to-do. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define CALENDAR_TODO_NO_START_DATE (-INT64_MAX) + /** * @brief Definition for no until of a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define CALENDAR_RECORD_NO_UNTIL INT64_MAX + /** * @brief Definition for no coordinate(latitude/longitude) of a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define CALENDAR_RECORD_NO_COORDINATE 1000.0 + /** * @} */ + /** * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_FILTER_MODULE * @{ */ + /** * @brief Definition for all calendar books. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ #define CALENDAR_BOOK_FILTER_ALL -1 + /** * @brief Enumeration for the filter match type of a string. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_MATCH_EXACTLY, /**< Full string, case-sensitive */ - CALENDAR_MATCH_FULLSTRING, /**< Full string, case-insensitive */ - CALENDAR_MATCH_CONTAINS, /**< Sub string, case-insensitive */ - CALENDAR_MATCH_STARTSWITH, /**< Start with, case-insensitive */ - CALENDAR_MATCH_ENDSWITH, /**< End with, case-insensitive */ - CALENDAR_MATCH_EXISTS, /**< IS NOT NULL */ - CALENDAR_MATCH_STR_MAX /**< Calendar match string flag max enum count */ + CALENDAR_MATCH_EXACTLY, /**< Full string, case-sensitive */ + CALENDAR_MATCH_FULLSTRING, /**< Full string, case-insensitive */ + CALENDAR_MATCH_CONTAINS, /**< Sub string, case-insensitive */ + CALENDAR_MATCH_STARTSWITH, /**< Start with, case-insensitive */ + CALENDAR_MATCH_ENDSWITH, /**< End with, case-insensitive */ + CALENDAR_MATCH_EXISTS, /**< IS NOT NULL */ + CALENDAR_MATCH_STR_MAX /**< Calendar match string flag max enum count */ } calendar_match_str_flag_e; + /** * @brief Enumeration for the filter match type of an integer. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_MATCH_EQUAL, /**< '=' */ - CALENDAR_MATCH_GREATER_THAN, /**< '>' */ - CALENDAR_MATCH_GREATER_THAN_OR_EQUAL, /**< '>=' */ - CALENDAR_MATCH_LESS_THAN, /**< '<' */ - CALENDAR_MATCH_LESS_THAN_OR_EQUAL, /**< '<=' */ - CALENDAR_MATCH_NOT_EQUAL, /**< '<>', this flag can yield poor performance */ - CALENDAR_MATCH_NONE, /**< IS NULL */ - CALENDAR_MATCH_INT_MAX /**< Calendar match integer flag max enum count */ + CALENDAR_MATCH_EQUAL, /**< '=' */ + CALENDAR_MATCH_GREATER_THAN, /**< '>' */ + CALENDAR_MATCH_GREATER_THAN_OR_EQUAL, /**< '>=' */ + CALENDAR_MATCH_LESS_THAN, /**< '<' */ + CALENDAR_MATCH_LESS_THAN_OR_EQUAL, /**< '<=' */ + CALENDAR_MATCH_NOT_EQUAL, /**< '<>', this flag can yield poor performance */ + CALENDAR_MATCH_NONE, /**< IS NULL */ + CALENDAR_MATCH_INT_MAX /**< Calendar match integer flag max enum count */ } calendar_match_int_flag_e; + /** * @brief Enumeration for a filter operator. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_FILTER_OPERATOR_AND, /**< AND */ - CALENDAR_FILTER_OPERATOR_OR, /**< OR */ - CALENDAR_FILTER_OPERATOR_MAX /**< Calendar filter operator max enum count */ + CALENDAR_FILTER_OPERATOR_AND, /**< AND */ + CALENDAR_FILTER_OPERATOR_OR, /**< OR */ + CALENDAR_FILTER_OPERATOR_MAX /**< Calendar filter operator max enum count */ } calendar_filter_operator_e; + /** * @} */ + /** * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_RECORD_MODULE * @{ */ + /** * @brief Enumeration for the calendar book type. - * * @details "OR"ing is supported. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_BOOK_TYPE_NONE = 0, /**< Default calendar book type */ - CALENDAR_BOOK_TYPE_EVENT = 1<<0, /**< Event calendar book type */ - CALENDAR_BOOK_TYPE_TODO = 1<<1 /**< To-do calendar book type */ + CALENDAR_BOOK_TYPE_NONE = 0, /**< Default calendar book type */ + CALENDAR_BOOK_TYPE_EVENT = 1<<0, /**< Event calendar book type */ + CALENDAR_BOOK_TYPE_TODO = 1<<1 /**< To-do calendar book type */ } calendar_book_type_e; + /** * @brief Enumeration for the calendar sensitivity type. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_SENSITIVITY_PUBLIC = 0, /**< Public Sensitivity */ - CALENDAR_SENSITIVITY_PRIVATE, /**< Private Sensitivity */ - CALENDAR_SENSITIVITY_CONFIDENTIAL /**< Confidential Sensitivity */ + CALENDAR_SENSITIVITY_PUBLIC = 0, /**< Public Sensitivity */ + CALENDAR_SENSITIVITY_PRIVATE, /**< Private Sensitivity */ + CALENDAR_SENSITIVITY_CONFIDENTIAL /**< Confidential Sensitivity */ } calendar_sensitivity_e; + /** * @brief Enumeration for the attendee status. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_ATTENDEE_STATUS_PENDING = 0, /**< Pending status */ - CALENDAR_ATTENDEE_STATUS_ACCEPTED, /**< Accepted status */ - CALENDAR_ATTENDEE_STATUS_DECLINED, /**< Declined status */ - CALENDAR_ATTENDEE_STATUS_TENTATIVE, /**< Tentative status */ - CALENDAR_ATTENDEE_STATUS_DELEGATED, /**< Delegated status */ - CALENDAR_ATTENDEE_STATUS_COMPLETED, /**< Completed status */ - CALENDAR_ATTENDEE_STATUS_IN_PROCESS, /**< In process status */ - CALENDAR_ATTENDEE_STATUS_MAX, /**< Calendar attendee status max enum count */ + CALENDAR_ATTENDEE_STATUS_PENDING = 0, /**< Pending status */ + CALENDAR_ATTENDEE_STATUS_ACCEPTED, /**< Accepted status */ + CALENDAR_ATTENDEE_STATUS_DECLINED, /**< Declined status */ + CALENDAR_ATTENDEE_STATUS_TENTATIVE, /**< Tentative status */ + CALENDAR_ATTENDEE_STATUS_DELEGATED, /**< Delegated status */ + CALENDAR_ATTENDEE_STATUS_COMPLETED, /**< Completed status */ + CALENDAR_ATTENDEE_STATUS_IN_PROCESS, /**< In process status */ + CALENDAR_ATTENDEE_STATUS_MAX, /**< Calendar attendee status max enum count */ } calendar_attendee_status_e; + /** * @brief Enumeration for the attendee role. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT = 0, /**< Participation is required */ - CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT, /**< Accepted status */ - CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT, /**< Non-Participant */ - CALENDAR_ATTENDEE_ROLE_CHAIR, /**< Chairperson */ - CALENDAR_ATTENDEE_ROLE_MAX, /**< Calendar attendee role max enum count */ + CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT = 0, /**< Participation is required */ + CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT, /**< Accepted status */ + CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT, /**< Non-Participant */ + CALENDAR_ATTENDEE_ROLE_CHAIR, /**< Chairperson */ + CALENDAR_ATTENDEE_ROLE_MAX, /**< Calendar attendee role max enum count */ } calendar_attendee_role_e; + /** * @brief Enumeration for the attendee cutype. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL = 0, /**< Individual cutype */ - CALENDAR_ATTENDEE_CUTYPE_GROUP, /**< Group cutype */ - CALENDAR_ATTENDEE_CUTYPE_RESOURCE, /**< Resource cutype */ - CALENDAR_ATTENDEE_CUTYPE_ROOM, /**< Room cutype */ - CALENDAR_ATTENDEE_CUTYPE_UNKNOWN, /**< Unknown cutype */ - CALENDAR_ATTENDEE_CUTYPE_MAX, /**< Calendar attendee cutype max enum count */ + CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL = 0, /**< Individual cutype */ + CALENDAR_ATTENDEE_CUTYPE_GROUP, /**< Group cutype */ + CALENDAR_ATTENDEE_CUTYPE_RESOURCE, /**< Resource cutype */ + CALENDAR_ATTENDEE_CUTYPE_ROOM, /**< Room cutype */ + CALENDAR_ATTENDEE_CUTYPE_UNKNOWN, /**< Unknown cutype */ + CALENDAR_ATTENDEE_CUTYPE_MAX, /**< Calendar attendee cutype max enum count */ } calendar_attendee_cutyep_e; + /** * @brief Enumeration for the alarm time unit type of an event, such as minutes, hours, days, and so on. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_ALARM_NONE = -1, /**< No reminder set */ - CALENDAR_ALARM_TIME_UNIT_SPECIFIC = 1, /**< Specific in seconds */ - CALENDAR_ALARM_TIME_UNIT_MINUTE = 60, /**< Alarm time unit in minutes */ - CALENDAR_ALARM_TIME_UNIT_HOUR = 3600, /**< Alarm time unit in hours */ - CALENDAR_ALARM_TIME_UNIT_DAY = 86400, /**< Alarm time unit in days */ - CALENDAR_ALARM_TIME_UNIT_WEEK = 604800, /**< Alarm time unit in weeks */ + CALENDAR_ALARM_NONE = -1, /**< No reminder set */ + CALENDAR_ALARM_TIME_UNIT_SPECIFIC = 1, /**< Specific in seconds */ + CALENDAR_ALARM_TIME_UNIT_MINUTE = 60, /**< Alarm time unit in minutes */ + CALENDAR_ALARM_TIME_UNIT_HOUR = 3600, /**< Alarm time unit in hours */ + CALENDAR_ALARM_TIME_UNIT_DAY = 86400, /**< Alarm time unit in days */ + CALENDAR_ALARM_TIME_UNIT_WEEK = 604800, /**< Alarm time unit in weeks */ } calendar_alarm_time_unit_type_e; + /** * @brief Enumeration for the alarm action. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { CALENDAR_ALARM_ACTION_AUDIO = 0, /**< Audio action */ - CALENDAR_ALARM_ACTION_DISPLAY, /**< Display action */ - CALENDAR_ALARM_ACTION_EMAIL, /**< Email action */ - CALENDAR_ALARM_ACTION_MAX, /**< Calendar alarm action max enum count */ + CALENDAR_ALARM_ACTION_DISPLAY, /**< Display action */ + CALENDAR_ALARM_ACTION_EMAIL, /**< Email action */ + CALENDAR_ALARM_ACTION_MAX, /**< Calenar alarm action max enum count */ } calendar_alarm_action_e; + /** * @brief Enumeration for the frequency of an event's recurrence. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_RECURRENCE_NONE, /**< No recurrence event */ - CALENDAR_RECURRENCE_DAILY, /**< An event occurs every day */ - CALENDAR_RECURRENCE_WEEKLY, /**< An event occurs on the same day of every week \n According to the week flag, the event will recur every day of the week */ - CALENDAR_RECURRENCE_MONTHLY, /**< An event occurs on the same day of every month */ - CALENDAR_RECURRENCE_YEARLY /**< An event occurs on the same day of every year */ + CALENDAR_RECURRENCE_NONE, /**< No recurrence event */ + CALENDAR_RECURRENCE_DAILY, /**< An event occurs every day */ + CALENDAR_RECURRENCE_WEEKLY, /**< An event occurs on the same day of every week. According to the week flag, the event will recur every day of the week */ + CALENDAR_RECURRENCE_MONTHLY, /**< An event occurs on the same day of every month */ + CALENDAR_RECURRENCE_YEARLY /**< An event occurs on the same day of every year */ } calendar_recurrence_frequency_e; + /** * @brief Enumeration for the event status. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_EVENT_STATUS_NONE = 0x01, /**< No status */ - CALENDAR_EVENT_STATUS_TENTATIVE = 0x02, /**< The event is tentative */ - CALENDAR_EVENT_STATUS_CONFIRMED = 0x04, /**< The event is confirmed */ - CALENDAR_EVENT_STATUS_CANCELLED = 0x08 /**< The event is canceled */ + CALENDAR_EVENT_STATUS_NONE = 0x01, /**< No status */ + CALENDAR_EVENT_STATUS_TENTATIVE = 0x02, /**< The event is tentative */ + CALENDAR_EVENT_STATUS_CONFIRMED = 0x04, /**< The event is confirmed */ + CALENDAR_EVENT_STATUS_CANCELLED = 0x08 /**< The event is canceled */ } calendar_event_status_e; + /** * @brief Enumeration for the busy status of an event. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_EVENT_BUSY_STATUS_FREE = 0, /**< The free status */ - CALENDAR_EVENT_BUSY_STATUS_BUSY, /**< The busy status */ - CALENDAR_EVENT_BUSY_STATUS_UNAVAILABLE, /**< The unavailable status */ - CALENDAR_EVENT_BUSY_STATUS_TENTATIVE /**< The tentative status */ + CALENDAR_EVENT_BUSY_STATUS_FREE = 0, /**< The free status */ + CALENDAR_EVENT_BUSY_STATUS_BUSY, /**< The busy status */ + CALENDAR_EVENT_BUSY_STATUS_UNAVAILABLE, /**< The unavailable status */ + CALENDAR_EVENT_BUSY_STATUS_TENTATIVE /**< The tentative status */ } calendar_event_busy_status_e; + + /** * @brief Enumeration for the calendar event item's priority. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_EVENT_PRIORITY_NONE = 0x01, /**< No priority */ - CALENDAR_EVENT_PRIORITY_LOW = 0x08, /**< Low priority */ - CALENDAR_EVENT_PRIORITY_NORMAL = 0x04, /**< Normal priority */ - CALENDAR_EVENT_PRIORITY_HIGH = 0x02, /**< High priority */ + CALENDAR_EVENT_PRIORITY_NONE = 0x01, /**< No priority */ + CALENDAR_EVENT_PRIORITY_LOW = 0x08, /**< Low priority */ + CALENDAR_EVENT_PRIORITY_NORMAL = 0x04, /**< Normal priority */ + CALENDAR_EVENT_PRIORITY_HIGH = 0x02, /**< High priority */ } calendar_event_priority_e; + /** * @brief Enumeration for the calendar to-do item's priority. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_TODO_PRIORITY_NONE = 0x01, /**< No priority */ - CALENDAR_TODO_PRIORITY_LOW = 0x08, /**< Low priority */ - CALENDAR_TODO_PRIORITY_NORMAL = 0x04, /**< Normal priority */ - CALENDAR_TODO_PRIORITY_HIGH = 0x02, /**< High priority */ + CALENDAR_TODO_PRIORITY_NONE = 0x01, /**< No priority */ + CALENDAR_TODO_PRIORITY_LOW = 0x08, /**< Low priority */ + CALENDAR_TODO_PRIORITY_NORMAL = 0x04, /**< Normal priority */ + CALENDAR_TODO_PRIORITY_HIGH = 0x02, /**< High priority */ } calendar_todo_priority_e; + /** * @brief Enumeration for the status of a to-do. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_TODO_STATUS_NONE = 0x0100, /**< No status */ - CALENDAR_TODO_STATUS_NEEDS_ACTION = 0x0200, /**< Needs action status */ - CALENDAR_TODO_STATUS_COMPLETED = 0x0400, /**< Completed status */ - CALENDAR_TODO_STATUS_IN_PROCESS = 0x0800, /**< Work in process status */ - CALENDAR_TODO_STATUS_CANCELED = 0x1000 /**< Canceled status */ + CALENDAR_TODO_STATUS_NONE = 0x0100, /**< No status */ + CALENDAR_TODO_STATUS_NEEDS_ACTION = 0x0200, /**< Needs action status */ + CALENDAR_TODO_STATUS_COMPLETED = 0x0400, /**< Completed status */ + CALENDAR_TODO_STATUS_IN_PROCESS = 0x0800, /**< Work in process status */ + CALENDAR_TODO_STATUS_CANCELED = 0x1000 /**< Canceled status */ } calendar_todo_status_e; + /** * @brief Enumeration for the time type. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_TIME_UTIME = 0, /**< Unix time */ - CALENDAR_TIME_LOCALTIME, /**< Local time */ + CALENDAR_TIME_UTIME = 0, /**< Unix time */ + CALENDAR_TIME_LOCALTIME, /**< Local time */ } calendar_time_type_e; + /** * @brief Enumeration for the range type. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_RANGE_UNTIL, /**< Range until */ - CALENDAR_RANGE_COUNT, /**< Range count */ - CALENDAR_RANGE_NONE, /**< No range */ + CALENDAR_RANGE_UNTIL, /**< Range until */ + CALENDAR_RANGE_COUNT, /**< Range count */ + CALENDAR_RANGE_NONE, /**< No range */ } calendar_range_type_e; + /** * @brief Enumeration for the system type. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_SYSTEM_NONE, /**< Locale's default calendar */ - CALENDAR_SYSTEM_GREGORIAN, /**< Locale's default calendar */ + CALENDAR_SYSTEM_NONE, /**< Locale's default calendar */ + CALENDAR_SYSTEM_GREGORIAN, /**< Locale's default calendar */ CALENDAR_SYSTEM_EAST_ASIAN_LUNISOLAR, /**< East asian lunisolar calendar */ } calendar_system_type_e; + /** * @brief Enumeration for the meeting status. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_MEETING_STATUS_NOTMEETING = 0, /**< No meeting */ - CALENDAR_MEETING_STATUS_MEETING, /**< Meeting exists */ - CALENDAR_MEETING_STATUS_RECEIVED, /**< Meeting received */ - CALENDAR_MEETING_STATUS_CANCELED, /**< Meeting canceled */ + CALENDAR_MEETING_STATUS_NOTMEETING = 0, /**< No meeting */ + CALENDAR_MEETING_STATUS_MEETING, /**< Meeting exists */ + CALENDAR_MEETING_STATUS_RECEIVED, /**< Meeting received */ + CALENDAR_MEETING_STATUS_CANCELED, /**< Meeting canceled */ } calendar_meeting_status_e; + /** * @brief Enumeration for weekdays. * @details Same value as UCalendarDaysOfWeek in ICU. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_SUNDAY = 1, /**< Sunday */ - CALENDAR_MONDAY, /**< Monday */ - CALENDAR_TUESDAY, /**< Tuesday */ - CALENDAR_WEDNESDAY, /**< Wednesday */ - CALENDAR_THURSDAY, /**< Thursday */ - CALENDAR_FRIDAY, /**< Friday */ - CALENDAR_SATURDAY, /**< Saturday */ + CALENDAR_SUNDAY = 1, /**< Sunday */ + CALENDAR_MONDAY, /**< Monday */ + CALENDAR_TUESDAY, /**< Tuesday */ + CALENDAR_WEDNESDAY, /**< Wednesday */ + CALENDAR_THURSDAY, /**< Thursday */ + CALENDAR_FRIDAY, /**< Friday */ + CALENDAR_SATURDAY, /**< Saturday */ } calendar_days_of_week_e; + /** * @brief Enumeration for the modified status of a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_RECORD_MODIFIED_STATUS_INSERTED = 0, /**< The record is inserted */ - CALENDAR_RECORD_MODIFIED_STATUS_UPDATED, /**< The record is updated */ - CALENDAR_RECORD_MODIFIED_STATUS_DELETED /**< The record is deleted */ + CALENDAR_RECORD_MODIFIED_STATUS_INSERTED = 0, /**< The record is inserted */ + CALENDAR_RECORD_MODIFIED_STATUS_UPDATED, /**< The record is updated */ + CALENDAR_RECORD_MODIFIED_STATUS_DELETED /**< The record is deleted */ } calendar_record_modified_status_e; + /** * @brief The structure of time. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef struct { - calendar_time_type_e type; /**< type */ + calendar_time_type_e type; /**< type */ union { - long long int utime; /**< utime */ + long long int utime; /**< utime */ struct { - int year; /**< year */ - int month; /**< month */ - int mday; /**< mday */ - int hour; /**< hour */ - int minute; /**< minute */ - int second; /**< second */ + int year; /**< year */ + int month; /**< month */ + int mday; /**< mday */ + int hour; /**< hour */ + int minute; /**< minute */ + int second; /**< second */ bool is_leap_month; /**< Deprecated since 2.4:leap month */ } date; } time; } calendar_time_s; + /** * @brief Enumeration for the type of a record. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_RECORD_TYPE_NONE = 0, /**< No record type */ - CALENDAR_RECORD_TYPE_CALENDAR_BOOK, /**< Book type */ - CALENDAR_RECORD_TYPE_EVENT, /**< Event type */ - CALENDAR_RECORD_TYPE_TODO, /**< Todo type */ + CALENDAR_RECORD_TYPE_NONE = 0, /**< No record type */ + CALENDAR_RECORD_TYPE_CALENDAR_BOOK, /**< Book type */ + CALENDAR_RECORD_TYPE_EVENT, /**< Event type */ + CALENDAR_RECORD_TYPE_TODO, /**< Todo type */ } calendar_record_type_e; + /** * @brief Enumeration for the book mode. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { @@ -478,17 +483,18 @@ typedef enum { CALENDAR_BOOK_MODE_RECORD_READONLY, /**< All modules can only read records of this calendar book */ } calendar_book_mode_e; + /** * @brief Enumeration for the sync event type. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif */ typedef enum { - CALENDAR_BOOK_SYNC_EVENT_FOR_ME = 0, /**< This book would not be synced to others except me */ - CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_DELETE, /**< This book would be sync to everyone and deleted events would be disappeared on time */ - CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_REMAIN, /**< This book would be sync to everyone but deleted events would be remained. deleted events is removed by calendar_db_clean_after_sync() API*/ + CALENDAR_BOOK_SYNC_EVENT_FOR_ME = 0, /**< 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*/ } calendar_book_sync_event_type_e; + /** * @} */ diff --git a/include/calendar_vcalendar.h b/include/calendar_vcalendar.h index c7ef3a4..558e169 100644 --- a/include/calendar_vcalendar.h +++ b/include/calendar_vcalendar.h @@ -16,6 +16,7 @@ * limitations under the License. * */ + #ifndef __TIZEN_SOCIAL_CALENDAR_VCALENDAR_H__ #define __TIZEN_SOCIAL_CALENDAR_VCALENDAR_H__ @@ -36,85 +37,70 @@ extern "C" { /** * @brief Retrieves a vcalendar stream from a calendar list. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] calendar_list The calendar list handle - * @param[out] vcalendar_stream The vcalendar stream - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @param[in] calendar_list The calendar list handle + * @param[out] vcalendar_stream The vcalendar stream + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist */ int calendar_vcalendar_make_from_records(calendar_list_h calendar_list, char **vcalendar_stream); + /** * @brief Retrieves all calendars from a vcalendar stream. - * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] vcalendar_stream The vcalendar stream - * @param[out] calendar_list The calendar list handle - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - * - * @pre calendar_connect() should be called to initialize. - * + * @param[in] vcalendar_stream The vcalendar stream + * @param[out] calendar_list The calendar list handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @pre calendar_connect() should be called to initialize. */ int calendar_vcalendar_parse_to_calendar(const char* vcalendar_stream, calendar_list_h *calendar_list); + /** - * @brief Called to get a record handle of - * \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo. - * + * @brief Called to get a record handle of + * \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] record The record handle (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) - * @param[in] user_data The user data passed from the foreach function - * - * @return @c true to continue with the next iteration of the loop, - * otherwise @c false to break out of the loop - * + * @param[in] record The record handle (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) + * @param[in] user_data The user data passed from the foreach function + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop * @pre calendar_vcalendar_parse_to_calendar_foreach() will invoke this callback. - * * @see calendar_vcalendar_parse_to_calendar_foreach() * @see calendar_record_get_uri_p() */ typedef bool (*calendar_vcalendar_parse_cb)(calendar_record_h record, void *user_data); + /** - * @brief Retrieves all events or to-dos - * (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) from a vCalendar file. - * + * @brief Retrieves all events or to-dos + * (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) from a vCalendar file. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - * - * @param[in] vcalendar_file_path The file path of the vCalendar stream file - * @param[in] callback The callback function to be invoked - * @param[in] user_data The user data to be passed to the callback function - * - * @return @c 0 on success, - * otherwise a negative error value - * @retval #CALENDAR_ERROR_NONE Successful - * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * - * @pre calendar_connect() should be called to initialize. - * + * @param[in] vcalendar_file_path The file path of the vCalendar stream file + * @param[in] callback The callback function to be invoked + * @param[in] user_data The user data to be passed to the callback function + * @return @c 0 on success, + * otherwise a negative error value + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @pre calendar_connect() should be called to initialize. * @post This function invokes calendar_vcalendar_parse_cb(). - * * @see calendar_vcalendar_parse_cb() * @see calendar_record_get_uri_p() */ int calendar_vcalendar_parse_to_calendar_foreach(const char *vcalendar_file_path, calendar_vcalendar_parse_cb callback, void *user_data); + /** * @} */ diff --git a/include/calendar_view.h b/include/calendar_view.h index 2590dc9..eaa3a1a 100644 --- a/include/calendar_view.h +++ b/include/calendar_view.h @@ -14,15 +14,19 @@ * limitations under the License. */ + #ifndef __TIZEN_SOCIAL_CALENDAR_VIEW_H__ #define __TIZEN_SOCIAL_CALENDAR_VIEW_H__ + #include + #ifdef __cplusplus extern "C" { #endif + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -70,6 +74,7 @@ _CALENDAR_BEGIN_VIEW() _CALENDAR_PROPERTY_INT(mode) _CALENDAR_END_VIEW(_calendar_book) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -88,7 +93,7 @@ _CALENDAR_END_VIEW(_calendar_book) * string description read, write The description of the event * string location read, write The location of the event * string categories read, write The category of the event. For example APPOINTMENT, BIRTHDAY - * string exdate read, write The exception list of the event. If this event has a recurrence rule, the instance of the exdate is removed. Format is "YYYYMMDD"(allday event) or "YYYYMMDDTHHMMSS". Multiple exceptions can be included with a comma + * string exdate read, write The exception list of the event. If this event has a recurrence rule, the instance of the exdate is removed. Format is "YYYYMMDD"(allday event) or "YYYYMMDDTHHMMSS". Multiple exceptions can be included with a comma * integer event_status read, write Refer to the @ref calendar_event_status_e * integer priority read, write Refer to the @ref calendar_event_priority_e * integer timezone read, write The timezone_id of the event if it exists. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone @@ -201,6 +206,7 @@ _CALENDAR_BEGIN_VIEW() _CALENDAR_PROPERTY_INT(is_allday) /* read only */ _CALENDAR_END_VIEW(_calendar_event) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -314,6 +320,7 @@ _CALENDAR_BEGIN_VIEW() _CALENDAR_PROPERTY_INT(is_allday) /* read only */ _CALENDAR_END_VIEW(_calendar_todo) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -361,6 +368,7 @@ _CALENDAR_BEGIN_VIEW() _CALENDAR_PROPERTY_INT(day_light_bias) /* diff between standard and daylight(minute) */ _CALENDAR_END_VIEW(_calendar_timezone) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -405,6 +413,7 @@ _CALENDAR_BEGIN_VIEW() _CALENDAR_PROPERTY_STR(member) _CALENDAR_END_VIEW(_calendar_attendee) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -440,6 +449,7 @@ _CALENDAR_BEGIN_VIEW() _CALENDAR_PROPERTY_CALTIME(alarm_time) _CALENDAR_END_VIEW(_calendar_alarm) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -464,6 +474,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_INT(version) _CALENDAR_END_READ_ONLY_VIEW(_calendar_updated_info) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -586,6 +597,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_FILTER_INT(calendar_book_account_id) _CALENDAR_END_READ_ONLY_VIEW(_calendar_event_calendar_book) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -689,6 +701,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_FILTER_INT(calendar_book_account_id) _CALENDAR_END_READ_ONLY_VIEW(_calendar_todo_calendar_book) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -817,6 +830,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_FILTER_STR(attendee_member) _CALENDAR_END_READ_ONLY_VIEW(_calendar_event_calendar_book_attendee) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -872,6 +886,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_STR(sync_data1) _CALENDAR_END_READ_ONLY_VIEW(_calendar_instance_utime_calendar_book) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -929,6 +944,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_INT(is_allday) _CALENDAR_END_READ_ONLY_VIEW(_calendar_instance_localtime_calendar_book) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -995,6 +1011,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_STR(sync_data4) _CALENDAR_END_READ_ONLY_VIEW(_calendar_instance_utime_calendar_book_extended) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -1062,6 +1079,7 @@ _CALENDAR_BEGIN_READ_ONLY_VIEW() _CALENDAR_PROPERTY_STR(sync_data4) _CALENDAR_END_READ_ONLY_VIEW(_calendar_instance_localtime_calendar_book_extended) + /** * @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property @@ -1089,8 +1107,10 @@ _CALENDAR_BEGIN_VIEW() _CALENDAR_PROPERTY_STR(value) _CALENDAR_END_VIEW(_calendar_extended_property) + #ifdef __cplusplus } #endif + #endif /* __TIZEN_SOCIAL_CALENDAR_VIEW_H__ */ -- 2.7.4