3.0 Native API reference english examination 01/115201/1
authorJeesun Kim <iamjs.kim@samsung.com>
Fri, 17 Feb 2017 00:13:43 +0000 (09:13 +0900)
committerJeesun Kim <iamjs.kim@samsung.com>
Fri, 17 Feb 2017 00:15:37 +0000 (09:15 +0900)
comment is modified in calendar_doc.h

Change-Id: Icc8895a0e8d3212723714d991189b5afac9ac714

doc/calendar_doc.h

index a1d2cf8..0cdb842 100644 (file)
@@ -56,7 +56,7 @@
  * @code
  * calendar_connect();
  *
- * // Jobs for records
+ * // jobs for records
  *
  * calendar_disconnect(); *
  * @endcode
  * In calendar_view.h header file, view macros are found and below figure shows 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
  *
  * 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
  * 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
  * (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
  *
  *
  * 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
  *
  * The calendar time structure, calendar_caltime_s, is defined as follows:
  *
  * @code
- * struct calendar_time_s;
+ * typedef struct
  * {
  *     calendar_time_type_e type;
  *     union {
  *             int mday;
  *         } date;
  *     } time;
- * }
- * typedef struct calendar_time_s;
+ * } calendar_time_s;
  * @endcode
  *
  * The structure should be used when setting the calendar time type
  * @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};
  *     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;
  *     }
  *
  *     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);
  *
  * Sample code:<br>
  * @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};
  *
  * 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
  *
  * The end date value MUST be later in time than the value of the start date.
  *
  * @code
- * // Range is 2 days: 2014/02/17 00:00:00 ~ 2014/02/19 00:00:00
+ * // range is 2days: 2014/02/17 00:00:00 ~ 2014/02/19 00:00:00
  *
  * calendar_time_s st = {0};
  * st.type = CALENDAR_TIME_LOCALTIME;
  * 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
  * @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
  *
  * 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
  * 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);
  * 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 1 min (60 secs)
+ * calendar_record_set_int(alarm, _calendar_alarm.tick, 1); // before 1min (60secs)
  *
- * // 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 60 secs after from start time
+ * // suppose start time is 1404036000(Sun, 29 Jun 2014 10:00:00 GMT) and alarm is set 60secs 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
  *
  *
  * @code
  * <app-control>
- *    <operation name="http://tizen.org/appcontrol/operation/view"/>
- *    <mime name="application/x-tizen.calendar.reminder"/>
+ *    <operation name="http://tizen.org/appcontrol/operation/view" />
+ *    <mime name="application/x-tizen.calendar.reminder" />
  * </app-control>
  * @endcode
  *
  *
  * 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);
  * 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
  *
  *
  * @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
  */