apply coding rule 87/53687/3
authorJongkyu Koo <jk.koo@samsung.com>
Tue, 8 Dec 2015 23:50:35 +0000 (08:50 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Wed, 9 Dec 2015 10:48:53 +0000 (19:48 +0900)
Change-Id: I12c360434cafd5e4171a4510e99a3b645f6c4826
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
60 files changed:
build-util/DB-schema-gen.c
client/cal_client_dbus.c
client/cal_client_service.c
client/cal_client_service_helper.c
common/cal_filter.c
common/cal_inotify.c
common/cal_list.c
common/cal_query.c
common/cal_record.c
common/cal_record_alarm.c
common/cal_record_attendee.c
common/cal_record_calendar.c
common/cal_record_event.c
common/cal_record_extended.c
common/cal_record_instance_allday.c
common/cal_record_instance_allday_extended.c
common/cal_record_instance_normal.c
common/cal_record_instance_normal_extended.c
common/cal_record_search.c
common/cal_record_timezone.c
common/cal_record_todo.c
common/cal_record_updated_info.c
common/cal_vcalendar.c
common/cal_vcalendar_make.c
common/cal_vcalendar_parse.c
common/cal_view.c
common/dbus/cal_dbus.c [deleted file]
common/dbus/cal_dbus.h [deleted file]
common/dbus/cal_dbus_helper.c
server/cal_access_control.c
server/cal_server.c
server/cal_server_account.c
server/cal_server_alarm.c
server/cal_server_calendar_delete.c
server/cal_server_contacts.c
server/cal_server_dbus.c
server/cal_server_schema.c
server/cal_server_service.c
server/cal_server_update.c
server/db/cal_db.c
server/db/cal_db_instance.c
server/db/cal_db_plugin_alarm.c
server/db/cal_db_plugin_alarm_helper.c
server/db/cal_db_plugin_attendee.c
server/db/cal_db_plugin_calendar.c
server/db/cal_db_plugin_calendar_helper.c
server/db/cal_db_plugin_event.c
server/db/cal_db_plugin_event_helper.c
server/db/cal_db_plugin_extended.c
server/db/cal_db_plugin_extended_helper.c
server/db/cal_db_plugin_instance_allday.c
server/db/cal_db_plugin_instance_allday_extended.c
server/db/cal_db_plugin_instance_normal.c
server/db/cal_db_plugin_instance_normal_extended.c
server/db/cal_db_plugin_search.c
server/db/cal_db_plugin_timezone.c
server/db/cal_db_plugin_todo.c
server/db/cal_db_query.c
server/db/cal_db_rrule.c
server/db/cal_db_util.c

index d3891b5..b96b30e 100755 (executable)
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
        if (NULL == fp)
                exit(EXIT_FAILURE);
 
-       do{
+       do {
                c = fgetc(fp);
                switch (c) {
                case '\n':
@@ -39,16 +39,17 @@ int main(int argc, char **argv)
                                while ('\n' != c && EOF != c)
                                        c = fgetc(fp);
                                printf("\\\n");
+                       } else {
+                               printf("-%c", c);
                        }
-                       else printf("-%c",c);
                        break;
                case EOF:
                        break;
                default:
-                       printf("%c",c);
+                       printf("%c", c);
                        break;
                }
-       }while (EOF != c);
+       } while (EOF != c);
 
        exit(EXIT_SUCCESS);
 }
index feaab63..c40d5cf 100644 (file)
        DBG("uri[%s]", uri); \
        int is_schedule = 0; \
        do { \
-               if (CAL_STRING_EQUAL == strncmp(uri, CALENDAR_VIEW_EVENT, strlen(CALENDAR_VIEW_EVENT))) \
-               { \
+               if (CAL_STRING_EQUAL == strncmp(uri, CALENDAR_VIEW_EVENT, strlen(CALENDAR_VIEW_EVENT))) { \
                        is_schedule = 1; \
                        struct timeval hold = {0}; \
                        struct timeval diff = {0}; \
                        gettimeofday(&hold, NULL); \
                        timersub(&hold, &__g_release_time, &diff); \
                        DBG("%ld.%ld sec", diff.tv_sec, diff.tv_usec); \
-                       if (diff.tv_sec / 1000 == 0 && diff.tv_usec < __CAL_CLIENT_ALLOW_USEC) \
-                       { \
-                               if (__g_access_count < __CAL_CLIENT_ACCESS_MAX) \
-                               { \
+                       if (diff.tv_sec / 1000 == 0 && diff.tv_usec < __CAL_CLIENT_ALLOW_USEC) { \
+                               if (__g_access_count < __CAL_CLIENT_ACCESS_MAX) { \
                                        __g_access_count++; \
                                        DBG("--count (%d)", __g_access_count); \
-                               } \
-                               else \
-                               { \
+                               } else { \
                                        DBG("--sleep"); \
                                        usleep(200000); \
                                        __g_access_count = 0; \
                                        timerclear(&__g_release_time); \
                                } \
-                       } \
-                       else \
-                       { \
+                       } else { \
                                DBG("--reset"); \
                                __g_access_count = 0; \
                                timerclear(&__g_release_time); \
@@ -72,8 +65,7 @@
 
 #define CAL_LIMIT_ACCESS_BACK \
        do { \
-               if (is_schedule) \
-               { \
+               if (is_schedule) { \
                        gettimeofday(&__g_release_time, NULL); \
                } \
        } while (0)
index 52ad680..3a2d9d5 100644 (file)
@@ -37,8 +37,7 @@ API int calendar_connect(void)
        if (CALENDAR_ERROR_NO_DATA == ret) {
                ret = cal_client_handle_create(id, &handle);
                RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "cal_client_handle_create() Fail(%d)", ret);
-       }
-       else if (CALENDAR_ERROR_NONE != ret) {
+       } else if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_client_handle_get_p_with_id() Fail(%d)", ret);
                return ret;
        }
@@ -55,8 +54,7 @@ API int calendar_disconnect(void)
        ret = cal_client_handle_get_p_with_id(id, &handle);
        if (CALENDAR_ERROR_NO_DATA == ret) {
                return CALENDAR_ERROR_NONE;
-       }
-       else if (CALENDAR_ERROR_NONE != ret) {
+       } else if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_client_handle_get_p_with_id() Fail(%d)", ret);
                return ret;
        }
@@ -75,8 +73,7 @@ API int calendar_connect_on_thread(void)
        if (CALENDAR_ERROR_NO_DATA == ret) {
                ret = cal_client_handle_create(id, &handle);
                RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "cal_client_handle_create() Fail(%d)", ret);
-       }
-       else if (CALENDAR_ERROR_NONE != ret) {
+       } else if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_client_handle_get_p_with_id() Fail(%d)", ret);
                return ret;
        }
@@ -93,8 +90,7 @@ API int calendar_disconnect_on_thread(void)
        ret = cal_client_handle_get_p_with_id(id, &handle);
        if (CALENDAR_ERROR_NO_DATA == ret) {
                return CALENDAR_ERROR_NONE;
-       }
-       else if (CALENDAR_ERROR_NONE != ret) {
+       } else if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_client_handle_get_p_with_id() Fail(%d)", ret);
                return ret;
        }
@@ -113,8 +109,7 @@ API int calendar_connect_with_flags(unsigned int flags)
        if (CALENDAR_ERROR_NO_DATA == ret) {
                ret = cal_client_handle_create(id, &handle);
                RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "cal_client_handle_create() Fail(%d)", ret);
-       }
-       else if (CALENDAR_ERROR_NONE != ret) {
+       } else if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_client_handle_get_p_with_id() Fail(%d)", ret);
                return ret;
        }
index 3a7d59c..e029281 100644 (file)
@@ -45,15 +45,11 @@ int cal_client_connect(calendar_h handle, unsigned int id, int *connection_count
        cal_mutex_lock(CAL_MUTEX_CONNECTION);
        cal_s *h = (cal_s *)handle;
 
-       if (0 == h->connection_count) {
-
-       }
-
        h->connection_count++;
        DBG("[Connection count:handle] (%d)", h->connection_count);
 
        if (0 == *connection_count) { /* total connection */
-#if !GLIB_CHECK_VERSION(2,35,0)
+#if !GLIB_CHECK_VERSION(2, 35, 0)
                g_type_init(); /* for alarmmgr */
 #endif
                ret = cal_inotify_init();
@@ -64,15 +60,10 @@ int cal_client_connect(calendar_h handle, unsigned int id, int *connection_count
                }
 
                cal_view_initialize();
-       }
-       else if (0 < *connection_count) {
+       } else if (0 < *connection_count) {
                DBG("[System] calendar service is already connected");
        }
 
-       if (1 == h->connection_count) {
-
-       }
-
        (*connection_count)++;
 
        if (0 == reference_count)
@@ -95,10 +86,6 @@ int cal_client_disconnect(calendar_h handle, unsigned int id, int *connection_co
        cal_mutex_lock(CAL_MUTEX_CONNECTION);
        cal_s *h = (cal_s *)handle;
 
-       if (1 == h->connection_count) {
-
-       }
-
        h->connection_count--;
        DBG("[Disonnection count:handle] (%d)", h->connection_count);
 
@@ -112,11 +99,9 @@ int cal_client_disconnect(calendar_h handle, unsigned int id, int *connection_co
                DBG("[System] disconnected successfully");
                cal_view_finalize();
                cal_inotify_deinit();
-       }
-       else if (1 < *connection_count) {
+       } else if (1 < *connection_count) {
                DBG("[System] connection count(%d)", *connection_count);
-       }
-       else {
+       } else {
                DBG("[System] calendar_connect() is needed");
                cal_mutex_unlock(CAL_MUTEX_CONNECTION);
                return CALENDAR_ERROR_INVALID_PARAMETER;
index 2d76991..679a508 100644 (file)
@@ -132,7 +132,7 @@ API int calendar_filter_add_str(calendar_filter_h filter, unsigned int property_
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_STR, &str_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE !=ret, ret, "property_id(%d), match(%d), match_value(%s)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%s)", property_id, match, match_value);
 
        str_filter->value.s = cal_strdup(match_value);
        return CALENDAR_ERROR_NONE;
@@ -157,7 +157,7 @@ API int calendar_filter_add_int(calendar_filter_h filter, unsigned int property_
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_INT, &int_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE !=ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
 
        int_filter->value.i = match_value;
 
@@ -183,7 +183,7 @@ API int calendar_filter_add_double(calendar_filter_h filter, unsigned int proper
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_DOUBLE, &int_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE !=ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
 
        int_filter->value.d = match_value;
 
@@ -209,7 +209,7 @@ API int calendar_filter_add_lli(calendar_filter_h filter, unsigned int property_
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_LLI, &int_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE !=ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
 
        int_filter->value.lli = match_value;
 
@@ -234,7 +234,7 @@ API int calendar_filter_add_caltime(calendar_filter_h filter, unsigned int prope
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_CALTIME, &int_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE !=ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
 
        int_filter->value.caltime = match_value;
 
@@ -261,17 +261,14 @@ static int _cal_filter_destroy_composite(cal_composite_filter_s* filter)
        GSList *cursor = NULL;
 
        RETV_IF(NULL == filter, CALENDAR_ERROR_INVALID_PARAMETER);
-       for(cursor=filter->filters;cursor;cursor=cursor->next) {
+       for (cursor = filter->filters; cursor; cursor = cursor->next) {
                cal_filter_s *src = (cal_filter_s *)cursor->data;
                if (NULL == src)
                        continue;
-               if (src->filter_type == CAL_FILTER_COMPOSITE) {
+               if (src->filter_type == CAL_FILTER_COMPOSITE)
                        _cal_filter_destroy_composite((cal_composite_filter_s*)src);
-               }
-               else {
+               else
                        _cal_filter_destroy_attribute((cal_attribute_filter_s*)src);
-               }
-
        }
        CAL_FREE(filter->view_uri);
        g_slist_free(filter->filters);
@@ -285,9 +282,9 @@ static int _cal_filter_destroy_attribute(cal_attribute_filter_s* filter)
 {
        RETV_IF(NULL == filter, CALENDAR_ERROR_INVALID_PARAMETER);
 
-       if (filter->filter_type == CAL_FILTER_STR) {
+       if (filter->filter_type == CAL_FILTER_STR)
                CAL_FREE(filter->value.s);
-       }
+
        CAL_FREE(filter);
        return CALENDAR_ERROR_NONE;
 }
@@ -304,7 +301,7 @@ static int _cal_filter_clone_composite(cal_composite_filter_s* filter,
        ret = calendar_filter_create(filter->view_uri, (calendar_filter_h *)&out);
        RETV_IF(CALENDAR_ERROR_NONE != ret, CALENDAR_ERROR_OUT_OF_MEMORY);
 
-       for(cursor=filter->filters; cursor ; cursor=cursor->next) {
+       for (cursor = filter->filters; cursor ; cursor = cursor->next) {
                cal_filter_s *src = (cal_filter_s *)cursor->data;
                cal_filter_s *dest = NULL;
 
@@ -314,15 +311,13 @@ static int _cal_filter_clone_composite(cal_composite_filter_s* filter,
                if (src->filter_type == CAL_FILTER_COMPOSITE) {
                        ret = _cal_filter_clone_composite((cal_composite_filter_s *)src,
                                        (cal_composite_filter_s **)&dest);
-               }
-               else {
+               } else {
                        ret = _cal_filter_clone_attribute((cal_attribute_filter_s *)src,
                                        (cal_attribute_filter_s **)&dest);
                }
                if (CALENDAR_ERROR_NONE == ret) {
                        out->filters = g_slist_append(out->filters, dest);
-               }
-               else {
+               } else {
                        calendar_filter_destroy((calendar_filter_h)out);
                        return ret;
                }
index d795ffa..c501996 100644 (file)
@@ -60,7 +60,7 @@ static inline void _handle_callback(GSList *_noti_list, int wd, uint32_t mask)
                noti = (noti_info_s *)cursor->data;
                if (noti->wd == wd) {
                        if ((mask & IN_CLOSE_WRITE) && noti->cb) {
-                               switch(noti->noti_type) {
+                               switch (noti->noti_type) {
                                case CAL_NOTI_TYPE_CALENDAR:
                                        noti->cb(CALENDAR_VIEW_CALENDAR, noti->cb_data);
                                        break;
@@ -93,7 +93,7 @@ static gboolean _inotify_gio_cb(GIOChannel *src, GIOCondition cond, gpointer dat
                                _handle_callback(_noti_list, ie.wd, ie.mask);
 
                        while (0 != ie.len) {
-                               ret = read(fd, name, (ie.len<sizeof(name))?ie.len:sizeof(name));
+                               ret = read(fd, name, (ie.len < sizeof(name)) ? ie.len : sizeof(name));
                                if (-1 == ret) {
                                        if (EINTR == errno)
                                                continue;
@@ -105,8 +105,7 @@ static gboolean _inotify_gio_cb(GIOChannel *src, GIOCondition cond, gpointer dat
                                else
                                        ie.len -= ret;
                        }
-               }
-               else {
+               } else {
                        while (ret < sizeof(ie)) {
                                int read_size;
                                read_size = read(fd, name, sizeof(ie)-ret);
@@ -156,11 +155,11 @@ int cal_inotify_init(void)
        calendar_inoti_count++;
 
        if (1 < calendar_inoti_count) {
-               DBG("inotify count =%d",calendar_inoti_count);
+               DBG("inotify count =%d", calendar_inoti_count);
                cal_mutex_unlock(CAL_MUTEX_INOTIFY);
                return CALENDAR_ERROR_NONE;
        }
-       DBG("inotify count =%d",calendar_inoti_count);
+       DBG("inotify count =%d", calendar_inoti_count);
        cal_mutex_unlock(CAL_MUTEX_INOTIFY);
 #endif
        _inoti_fd = inotify_init();
@@ -206,10 +205,9 @@ static inline int _cal_inotify_add_watch(int fd, const char *notipath)
        int ret;
 
        ret = inotify_add_watch(fd, notipath, IN_CLOSE_WRITE);
-       if (ret < 0)
-       {
+       if (ret < 0) {
                ERR("Failed to add watch(ret:%d)", ret);
-               return -1; // CALENDAR_ERROR_FAILED_INOTIFY
+               return -1; /* CALENDAR_ERROR_FAILED_INOTIFY */
        }
 
        return CALENDAR_ERROR_NONE;
@@ -227,9 +225,10 @@ static bool _has_noti(int wd, void *cb, void *cb_data)
                        cursor = g_slist_next(cursor);
                        continue;
                }
-               if (info->wd == wd && info->cb == cb && info->cb_data == cb_data) {
+
+               if (info->wd == wd && info->cb == cb && info->cb_data == cb_data)
                        has_noti = true;
-               }
+
                cursor = g_slist_next(cursor);
        }
        return has_noti;
@@ -305,8 +304,7 @@ static int _cal_del_noti(GSList **_noti_list, int wd, void *cb, void *cb_data)
                                free(noti);
                                del_cnt++;
                                continue;
-                       }
-                       else {
+                       } else {
                                remain_cnt++;
                        }
                }
@@ -367,11 +365,11 @@ void cal_inotify_deinit(void)
        calendar_inoti_count--;
 
        if (0 < calendar_inoti_count) {
-               DBG("inotify count =%d",calendar_inoti_count);
+               DBG("inotify count =%d", calendar_inoti_count);
                cal_mutex_unlock(CAL_MUTEX_INOTIFY);
                return ;
        }
-       DBG("inotify count =%d",calendar_inoti_count);
+       DBG("inotify count =%d", calendar_inoti_count);
        cal_mutex_unlock(CAL_MUTEX_INOTIFY);
 #endif
        if (inoti_handler) {
@@ -379,8 +377,7 @@ void cal_inotify_deinit(void)
                inoti_handler = 0;
        }
 
-       if (_noti_list)
-       {
+       if (_noti_list) {
                g_slist_foreach(_noti_list, __clear_nslot_list, NULL);
                g_slist_free(_noti_list);
                _noti_list = NULL;
index 17ed995..5ae8431 100644 (file)
@@ -192,21 +192,18 @@ int cal_list_clone(calendar_list_h list, calendar_list_h *out_list)
        RETV_IF(NULL == out_list, CALENDAR_ERROR_INVALID_PARAMETER);
 
        ret = calendar_list_get_count(list, &count);
-       if (CALENDAR_ERROR_NONE != ret) {
+       if (CALENDAR_ERROR_NONE != ret)
                return ret;
-       }
 
        ret = calendar_list_first(list);
-       if (CALENDAR_ERROR_NONE != ret) {
+       if (CALENDAR_ERROR_NONE != ret)
                return ret;
-       }
 
        ret = calendar_list_create(&l);
-       if (CALENDAR_ERROR_NONE != ret) {
+       if (CALENDAR_ERROR_NONE != ret)
                return ret;
-       }
 
-       for(i = 0; i < count; i++) {
+       for (i = 0; i < count; i++) {
                calendar_record_h record = NULL;
                calendar_record_h clone_record = NULL;
                ret = calendar_list_get_current_record_p(list, &record);
index 65e0eb9..7c1af93 100644 (file)
@@ -31,11 +31,10 @@ static bool _cal_query_property_check(const cal_property_info_s *properties,
 {
        int i;
 
-       for (i=0;i<count;i++) {
+       for (i = 0; i < count; i++) {
                cal_property_info_s *p = (cal_property_info_s*)&(properties[i]);
-               if (property_id == p->property_id) {
+               if (property_id == p->property_id)
                        return true;
-               }
        }
        return false;
 }
@@ -69,7 +68,7 @@ API int calendar_query_set_projection(calendar_query_h query, unsigned int prope
 
        que = (cal_query_s *)query;
 
-       for (i=0;i<count;i++) {
+       for (i = 0; i < count; i++) {
                find = _cal_query_property_check(que->properties, que->property_count, property_ids[i]);
                RETVM_IF(false == find, CALENDAR_ERROR_INVALID_PARAMETER,
                                "Invalid parameter : property_id(%d) is not supported on view_uri(%s)", property_ids[i], que->view_uri);
@@ -117,12 +116,11 @@ API int calendar_query_set_filter(calendar_query_h query, calendar_filter_h filt
                return CALENDAR_ERROR_NO_DATA;
        }
 
-       ret = cal_filter_clone(filter,&new_filter);
-       RETV_IF(ret!=CALENDAR_ERROR_NONE, ret);
+       ret = cal_filter_clone(filter, &new_filter);
+       RETV_IF(ret != CALENDAR_ERROR_NONE, ret);
 
-       if (que->filter) {
+       if (que->filter)
                calendar_filter_destroy((calendar_filter_h)que->filter);
-       }
 
        que->filter = (cal_composite_filter_s*)new_filter;
 
@@ -155,9 +153,8 @@ API int calendar_query_destroy(calendar_query_h query)
        RETV_IF(NULL == query, CALENDAR_ERROR_INVALID_PARAMETER);
        que = (cal_query_s *)query;
 
-       if (que->filter) {
+       if (que->filter)
                calendar_filter_destroy((calendar_filter_h)que->filter);
-       }
 
        CAL_FREE(que->view_uri);
        CAL_FREE(que->projection);
index 28f1415..f7ed052 100644 (file)
 #include "cal_record.h"
 
 #define __CHECK_READ_ONLY_PROPERTY() \
-       if (CAL_PROPERTY_CHECK_FLAGS(property_id, CAL_PROPERTY_FLAGS_READ_ONLY) == true) \
-{ \
-       ERR("Invalid parameter: Don't try to change read-only property."); \
-       return CALENDAR_ERROR_NOT_PERMITTED; \
-}
+       if (CAL_PROPERTY_CHECK_FLAGS(property_id, CAL_PROPERTY_FLAGS_READ_ONLY) == true) { \
+               ERR("Invalid parameter: Don't try to change read-only property."); \
+               return CALENDAR_ERROR_NOT_PERMITTED; \
+       }
 
 extern cal_record_plugin_cb_s cal_record_calendar_plugin_cb;
 extern cal_record_plugin_cb_s cal_record_event_plugin_cb;
@@ -92,7 +91,7 @@ static inline void _cal_record_set_property_flag(calendar_record_h record, unsig
 
        if (NULL == _record->properties_flags) {
                int count = 0;
-               cal_view_get_property_info(_record->view_uri,&count);
+               cal_view_get_property_info(_record->view_uri, &count);
 
                if (0 < count) {
                        _record->properties_flags = calloc(count, sizeof(char));
@@ -101,8 +100,7 @@ static inline void _cal_record_set_property_flag(calendar_record_h record, unsig
                                ERR("calloc() Fail");
                                return ;
                        }
-               }
-               else {
+               } else {
                        ERR("get property_info_Fail");
                        return ;
                }
@@ -159,9 +157,8 @@ int cal_record_set_projection(calendar_record_h record, const unsigned int *proj
 
        _record->properties_max_count = properties_max_count;
 
-       for (i = 0; i < projection_count; i++) {
+       for (i = 0; i < projection_count; i++)
                _cal_record_set_property_flag(record, projection[i], CAL_PROPERTY_FLAG_PROJECTION);
-       }
 
        return CALENDAR_ERROR_NONE;
 }
@@ -174,7 +171,7 @@ API int calendar_record_create(const char* view_uri, calendar_record_h* out_reco
        RETV_IF(NULL == view_uri, CALENDAR_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == out_record, CALENDAR_ERROR_INVALID_PARAMETER);
 
-       type =cal_view_get_type(view_uri);
+       type = cal_view_get_type(view_uri);
        DBG("----------------------[%s]", view_uri);
        RETV_IF(CAL_RECORD_TYPE_INVALID == type, CALENDAR_ERROR_INVALID_PARAMETER);
 
@@ -184,9 +181,8 @@ API int calendar_record_create(const char* view_uri, calendar_record_h* out_reco
 
        ret = plugin_cb->create(out_record);
 
-       if (CALENDAR_ERROR_NONE == ret) {
+       if (CALENDAR_ERROR_NONE == ret)
                CAL_RECORD_INIT_COMMON((cal_record_s*)*out_record, type, plugin_cb, cal_view_get_uri(view_uri));
-       }
 
        return ret;
 }
@@ -484,9 +480,9 @@ int cal_record_set_str(calendar_record_h record, unsigned int property_id, const
        RETVM_IF(false == cal_record_check_property_flag(record, property_id, CAL_PROPERTY_FLAG_PROJECTION), CALENDAR_ERROR_NOT_PERMITTED, "Not permitted");
 
        ret = temp->plugin_cb->set_str(record, property_id, value);
-       if (CALENDAR_ERROR_NONE == ret) {
-               _cal_record_set_property_flag(record,property_id, CAL_PROPERTY_FLAG_DIRTY);
-       }
+       if (CALENDAR_ERROR_NONE == ret)
+               _cal_record_set_property_flag(record, property_id, CAL_PROPERTY_FLAG_DIRTY);
+
        return ret;
 }
 
@@ -502,9 +498,9 @@ int cal_record_set_int(calendar_record_h record, unsigned int property_id, int v
        RETVM_IF(false == cal_record_check_property_flag(record, property_id, CAL_PROPERTY_FLAG_PROJECTION), CALENDAR_ERROR_NOT_PERMITTED, "Not permitted");
 
        ret = temp->plugin_cb->set_int(record, property_id, value);
-       if (CALENDAR_ERROR_NONE == ret) {
-               _cal_record_set_property_flag(record,property_id, CAL_PROPERTY_FLAG_DIRTY);
-       }
+       if (CALENDAR_ERROR_NONE == ret)
+               _cal_record_set_property_flag(record, property_id, CAL_PROPERTY_FLAG_DIRTY);
+
        return ret;
 }
 
@@ -520,9 +516,9 @@ int cal_record_set_double(calendar_record_h record, unsigned int property_id, do
        RETVM_IF(false == cal_record_check_property_flag(record, property_id, CAL_PROPERTY_FLAG_PROJECTION), CALENDAR_ERROR_NOT_PERMITTED, "Not permitted");
 
        ret = temp->plugin_cb->set_double(record, property_id, value);
-       if (CALENDAR_ERROR_NONE == ret) {
-               _cal_record_set_property_flag(record,property_id, CAL_PROPERTY_FLAG_DIRTY);
-       }
+       if (CALENDAR_ERROR_NONE == ret)
+               _cal_record_set_property_flag(record, property_id, CAL_PROPERTY_FLAG_DIRTY);
+
        return ret;
 }
 
@@ -538,9 +534,9 @@ int cal_record_set_lli(calendar_record_h record, unsigned int property_id, long
        RETVM_IF(false == cal_record_check_property_flag(record, property_id, CAL_PROPERTY_FLAG_PROJECTION), CALENDAR_ERROR_NOT_PERMITTED, "Not permitted");
 
        ret = temp->plugin_cb->set_lli(record, property_id, value);
-       if (CALENDAR_ERROR_NONE == ret) {
-               _cal_record_set_property_flag(record,property_id, CAL_PROPERTY_FLAG_DIRTY);
-       }
+       if (CALENDAR_ERROR_NONE == ret)
+               _cal_record_set_property_flag(record, property_id, CAL_PROPERTY_FLAG_DIRTY);
+
        return ret;
 }
 
@@ -556,8 +552,8 @@ int cal_record_set_caltime(calendar_record_h record, unsigned int property_id, c
        RETVM_IF(false == cal_record_check_property_flag(record, property_id, CAL_PROPERTY_FLAG_PROJECTION), CALENDAR_ERROR_NOT_PERMITTED, "Not permitted");
 
        ret = temp->plugin_cb->set_caltime(record, property_id, value);
-       if (CALENDAR_ERROR_NONE == ret) {
-               _cal_record_set_property_flag(record,property_id, CAL_PROPERTY_FLAG_DIRTY);
-       }
+       if (CALENDAR_ERROR_NONE == ret)
+               _cal_record_set_property_flag(record, property_id, CAL_PROPERTY_FLAG_DIRTY);
+
        return ret;
 }
index 01daf4f..da435f6 100644 (file)
@@ -62,13 +62,13 @@ cal_record_plugin_cb_s cal_record_alarm_plugin_cb = {
 
 static void _cal_record_alarm_struct_init(cal_alarm_s *record)
 {
-       memset(record,0, sizeof(cal_alarm_s));
+       memset(record, 0, sizeof(cal_alarm_s));
 }
 
 static int _cal_record_alarm_create(calendar_record_h* out_record)
 {
        cal_alarm_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_alarm_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -140,7 +140,7 @@ static int _cal_record_alarm_get_str(calendar_record_h record, unsigned int prop
                *out_str = cal_strdup(rec->alarm_attach);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -161,7 +161,7 @@ static int _cal_record_alarm_get_str_p(calendar_record_h record, unsigned int pr
                *out_str = (rec->alarm_attach);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -185,7 +185,7 @@ static int _cal_record_alarm_get_int(calendar_record_h record, unsigned int prop
                *out_value = (rec->alarm_action);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -200,7 +200,7 @@ static int _cal_record_alarm_get_caltime(calendar_record_h record, unsigned int
                *out_value = rec->alarm;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return CALENDAR_ERROR_NONE;
@@ -223,7 +223,7 @@ static int _cal_record_alarm_set_str(calendar_record_h record, unsigned int prop
                rec->alarm_attach = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -235,7 +235,7 @@ static int _cal_record_alarm_set_int(calendar_record_h record, unsigned int prop
        cal_alarm_s *rec = (cal_alarm_s*)(record);
        switch (property_id) {
        case CAL_PROPERTY_ALARM_TICK:
-               (rec->remind_tick)=value;
+               rec->remind_tick = value;
                break;
        case CAL_PROPERTY_ALARM_TICK_UNIT:
                switch (value) {
@@ -245,7 +245,7 @@ static int _cal_record_alarm_set_int(calendar_record_h record, unsigned int prop
                case CALENDAR_ALARM_TIME_UNIT_HOUR:
                case CALENDAR_ALARM_TIME_UNIT_DAY:
                case CALENDAR_ALARM_TIME_UNIT_WEEK:
-                       (rec->remind_tick_unit)=value;
+                       rec->remind_tick_unit = value;
                        break;
                default:
                        ERR("invalid parameter (value:%d)", value);
@@ -253,14 +253,14 @@ static int _cal_record_alarm_set_int(calendar_record_h record, unsigned int prop
                }
                break;
        case CAL_PROPERTY_ALARM_PARENT_ID:
-               (rec->parent_id) = value;
+               rec->parent_id = value;
                break;
        case CAL_PROPERTY_ALARM_ACTION:
                switch (value) {
                case CALENDAR_ALARM_ACTION_AUDIO:
                case CALENDAR_ALARM_ACTION_DISPLAY:
                case CALENDAR_ALARM_ACTION_EMAIL:
-                       (rec->alarm_action) = value;
+                       rec->alarm_action = value;
                        break;
                default:
                        ERR("invalid parameter (value:%d)", value);
@@ -268,7 +268,7 @@ static int _cal_record_alarm_set_int(calendar_record_h record, unsigned int prop
                }
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -283,7 +283,7 @@ static int _cal_record_alarm_set_caltime(calendar_record_h record, unsigned int
                rec->alarm = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return CALENDAR_ERROR_NONE;
index 9a27cdc..e644814 100644 (file)
@@ -66,7 +66,7 @@ static void _cal_record_attendee_struct_init(cal_attendee_s *record)
 static int _cal_record_attendee_create(calendar_record_h* out_record)
 {
        cal_attendee_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_attendee_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -163,7 +163,7 @@ static int _cal_record_attendee_get_str(calendar_record_h record, unsigned int p
                *out_str = cal_strdup(rec->attendee_member);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -199,7 +199,7 @@ static int _cal_record_attendee_get_str_p(calendar_record_h record, unsigned int
                *out_str = (rec->attendee_member);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -229,7 +229,7 @@ static int _cal_record_attendee_get_int(calendar_record_h record, unsigned int p
                *out_value = (rec->parent_id);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -273,7 +273,7 @@ static int _cal_record_attendee_set_str(calendar_record_h record, unsigned int p
                rec->attendee_member = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -303,7 +303,7 @@ static int _cal_record_attendee_set_int(calendar_record_h record, unsigned int p
                (rec->parent_id) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index bd05b80..c0fef4e 100644 (file)
@@ -60,7 +60,7 @@ cal_record_plugin_cb_s cal_record_calendar_plugin_cb = {
 
 static void _cal_record_calendar_struct_init(cal_book_s *record)
 {
-       memset(record,0, sizeof(cal_book_s));
+       memset(record, 0, sizeof(cal_book_s));
        record->index = -1;
        record->visibility = true;
        record->account_id = LOCAL_ACCOUNT_ID;
@@ -70,7 +70,7 @@ static void _cal_record_calendar_struct_init(cal_book_s *record)
 static int _cal_record_calendar_create(calendar_record_h* out_record)
 {
        cal_book_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_book_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -175,7 +175,7 @@ static int _cal_record_calendar_get_str(calendar_record_h record, unsigned int p
                *out_str = cal_strdup(cal_rec->sync_data4);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -214,7 +214,7 @@ static int _cal_record_calendar_get_str_p(calendar_record_h record, unsigned int
                *out_str = (cal_rec->sync_data4);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -244,7 +244,7 @@ static int _cal_record_calendar_get_int(calendar_record_h record, unsigned int p
                *out_value = (cal_rec->mode);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -292,7 +292,7 @@ static int _cal_record_calendar_set_str(calendar_record_h record, unsigned int p
                cal_rec->sync_data4 = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -343,7 +343,7 @@ static int _cal_record_calendar_set_int(calendar_record_h record, unsigned int p
                (cal_rec->mode) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index 2a825cd..ec6feb8 100644 (file)
@@ -74,7 +74,7 @@ cal_record_plugin_cb_s cal_record_event_plugin_cb = {
 
 static void _cal_record_event_struct_init(cal_event_s *record)
 {
-       memset(record,0, sizeof(cal_event_s));
+       memset(record, 0, sizeof(cal_event_s));
 
        record->meeting_status = CALENDAR_MEETING_STATUS_NOTMEETING;
        record->calendar_id = DEFAULT_EVENT_CALENDAR_BOOK_ID;
@@ -85,12 +85,12 @@ static void _cal_record_event_struct_init(cal_event_s *record)
        record->busy_status = 2;
        record->summary = NULL;
        record->description = NULL;
-       record->location= NULL;
+       record->location = NULL;
        record->categories = NULL;
        record->exdate = NULL;
        record->organizer_email = NULL;
        record->organizer_name = NULL;
-       record->uid= NULL;
+       record->uid = NULL;
        record->original_event_id = CAL_INVALID_ID;
        record->event_status = CALENDAR_EVENT_STATUS_NONE;
 
@@ -112,7 +112,7 @@ static void _cal_record_event_struct_init(cal_event_s *record)
 static int _cal_record_event_create(calendar_record_h* out_record)
 {
        cal_event_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_event_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -336,7 +336,7 @@ static int _cal_record_event_get_str(calendar_record_h record, unsigned int prop
                *out_str = cal_strdup(rec->end_tzid);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -423,7 +423,7 @@ static int _cal_record_event_get_str_p(calendar_record_h record, unsigned int pr
                *out_str = (rec->end_tzid);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -515,7 +515,7 @@ static int _cal_record_event_get_double(calendar_record_h record, unsigned int p
                *out_value = (rec->longitude);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -553,7 +553,7 @@ static int _cal_record_event_get_caltime(calendar_record_h record, unsigned int
                *out_value = rec->until;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -665,7 +665,7 @@ static int _cal_record_event_set_str(calendar_record_h record, unsigned int prop
                rec->end_tzid = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -833,7 +833,7 @@ static int _cal_record_event_set_int(calendar_record_h record, unsigned int prop
                (rec->is_allday) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -851,7 +851,7 @@ static int _cal_record_event_set_double(calendar_record_h record, unsigned int p
                (rec->longitude) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -866,7 +866,7 @@ static int _cal_record_event_set_lli(calendar_record_h record, unsigned int prop
                (rec->created_time) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return CALENDAR_ERROR_NONE;
@@ -888,7 +888,7 @@ static int _cal_record_event_set_caltime(calendar_record_h record, unsigned int
                rec->until = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -944,7 +944,7 @@ static int _cal_record_event_add_child_record(calendar_record_h record, unsigned
                ret = calendar_list_add((calendar_list_h)rec->extended_list, child_record);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -973,7 +973,7 @@ static int _cal_record_event_remove_child_record(calendar_record_h record, unsig
                ret = calendar_list_remove((calendar_list_h)rec->extended_list, child_record);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return ret;
@@ -1001,7 +1001,7 @@ static int _cal_record_event_get_child_record_count(calendar_record_h record, un
                ret = calendar_list_get_count((calendar_list_h)rec->extended_list, (int *)count);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return ret;
@@ -1029,7 +1029,7 @@ static int _cal_record_event_get_child_record_at_p(calendar_record_h record, uns
                ret = cal_list_get_nth_record_p(rec->extended_list, index, child_record);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return ret;
index 453b0b8..82efe1f 100644 (file)
@@ -60,13 +60,13 @@ cal_record_plugin_cb_s cal_record_extended_plugin_cb = {
 
 static void _cal_record_extended_struct_init(cal_extended_s *record)
 {
-       memset(record,0, sizeof(cal_extended_s));
+       memset(record, 0, sizeof(cal_extended_s));
 }
 
 static int _cal_record_extended_create(calendar_record_h* out_record)
 {
        cal_extended_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_extended_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -131,7 +131,7 @@ static int _cal_record_extended_get_str(calendar_record_h record, unsigned int p
                *out_str = cal_strdup(rec->value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -149,7 +149,7 @@ static int _cal_record_extended_get_str_p(calendar_record_h record, unsigned int
                *out_str = (rec->value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -170,7 +170,7 @@ static int _cal_record_extended_get_int(calendar_record_h record, unsigned int p
                *out_value = (rec->record_type);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -190,7 +190,7 @@ static int _cal_record_extended_set_str(calendar_record_h record, unsigned int p
                rec->value = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -212,7 +212,7 @@ static int _cal_record_extended_set_int(calendar_record_h record, unsigned int p
                (rec->record_type) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index c7c057d..981c1f0 100644 (file)
@@ -65,7 +65,7 @@ cal_record_plugin_cb_s cal_record_instance_allday_plugin_cb = {
 
 static void _cal_record_instance_allday_struct_init(cal_instance_allday_s* record)
 {
-       memset(record,0, sizeof(cal_instance_allday_s));
+       memset(record, 0, sizeof(cal_instance_allday_s));
 
        record->event_status = CALENDAR_EVENT_STATUS_NONE;
        record->calendar_id = DEFAULT_EVENT_CALENDAR_BOOK_ID;
@@ -74,7 +74,7 @@ static void _cal_record_instance_allday_struct_init(cal_instance_allday_s* recor
        record->busy_status = 2;
        record->summary = NULL;
        record->description = NULL;
-       record->location= NULL;
+       record->location = NULL;
 
        record->latitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
        record->longitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
@@ -85,7 +85,7 @@ static void _cal_record_instance_allday_struct_init(cal_instance_allday_s* recor
 static int _cal_record_instance_allday_create(calendar_record_h* out_record)
 {
        cal_instance_allday_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_instance_allday_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -171,7 +171,7 @@ static int _cal_record_instance_allday_get_str(calendar_record_h record, unsigne
                *out_str = cal_strdup(rec->sync_data1);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -195,7 +195,7 @@ static int _cal_record_instance_allday_get_str_p(calendar_record_h record, unsig
                *out_str = (rec->sync_data1);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -237,7 +237,7 @@ static int _cal_record_instance_allday_get_int(calendar_record_h record, unsigne
                *out_value = (rec->is_allday);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -255,7 +255,7 @@ static int _cal_record_instance_allday_get_double(calendar_record_h record, unsi
                *out_value = (rec->longitude);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -287,7 +287,7 @@ static int _cal_record_instance_allday_get_caltime(calendar_record_h record, uns
                *out_value = rec->end;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -315,7 +315,7 @@ static int _cal_record_instance_allday_set_str(calendar_record_h record, unsigne
                rec->sync_data1 = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -354,7 +354,7 @@ static int _cal_record_instance_allday_set_int(calendar_record_h record, unsigne
                (rec->original_event_id) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -372,7 +372,7 @@ static int _cal_record_instance_allday_set_double(calendar_record_h record, unsi
                (rec->longitude) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -390,7 +390,7 @@ static int _cal_record_instance_allday_set_caltime(calendar_record_h record, uns
                rec->end = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index a00f8ca..0502e7b 100644 (file)
@@ -65,7 +65,7 @@ cal_record_plugin_cb_s cal_record_instance_allday_extended_plugin_cb = {
 
 static void _cal_record_instance_allday_extended_struct_init(cal_instance_allday_extended_s* record)
 {
-       memset(record,0, sizeof(cal_instance_allday_extended_s));
+       memset(record, 0, sizeof(cal_instance_allday_extended_s));
 
        record->event_status = CALENDAR_EVENT_STATUS_NONE;
        record->calendar_id = DEFAULT_EVENT_CALENDAR_BOOK_ID;
@@ -74,7 +74,7 @@ static void _cal_record_instance_allday_extended_struct_init(cal_instance_allday
        record->busy_status = 2;
        record->summary = NULL;
        record->description = NULL;
-       record->location= NULL;
+       record->location = NULL;
 
        record->latitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
        record->longitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
@@ -85,7 +85,7 @@ static void _cal_record_instance_allday_extended_struct_init(cal_instance_allday
 static int _cal_record_instance_allday_extended_create(calendar_record_h* out_record)
 {
        cal_instance_allday_extended_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_instance_allday_extended_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -196,7 +196,7 @@ static int _cal_record_instance_allday_extended_get_str(calendar_record_h record
                *out_str = cal_strdup(rec->sync_data4);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -235,7 +235,7 @@ static int _cal_record_instance_allday_extended_get_str_p(calendar_record_h reco
                *out_str = (rec->sync_data4);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -281,7 +281,7 @@ static int _cal_record_instance_allday_extended_get_int(calendar_record_h record
                break;
 
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -300,7 +300,7 @@ static int _cal_record_instance_allday_extended_get_double(calendar_record_h rec
                break;
 
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -332,7 +332,7 @@ static int _cal_record_instance_allday_extended_get_caltime(calendar_record_h re
                *out_value = rec->end;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -380,7 +380,7 @@ static int _cal_record_instance_allday_extended_set_str(calendar_record_h record
                rec->sync_data4 = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -422,7 +422,7 @@ static int _cal_record_instance_allday_extended_set_int(calendar_record_h record
                (rec->has_attendee) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -441,7 +441,7 @@ static int _cal_record_instance_allday_extended_set_double(calendar_record_h rec
                break;
 
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -459,7 +459,7 @@ static int _cal_record_instance_allday_extended_set_caltime(calendar_record_h re
                rec->end = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index 6f820a1..5c54b5f 100644 (file)
@@ -65,7 +65,7 @@ cal_record_plugin_cb_s cal_record_instance_normal_plugin_cb = {
 
 static void _cal_record_instance_normal_struct_init(cal_instance_normal_s* record)
 {
-       memset(record,0, sizeof(cal_instance_normal_s));
+       memset(record, 0, sizeof(cal_instance_normal_s));
 
        record->event_status = CALENDAR_EVENT_STATUS_NONE;
        record->calendar_id = DEFAULT_EVENT_CALENDAR_BOOK_ID;
@@ -74,7 +74,7 @@ static void _cal_record_instance_normal_struct_init(cal_instance_normal_s* recor
        record->busy_status = 2;
        record->summary = NULL;
        record->description = NULL;
-       record->location= NULL;
+       record->location = NULL;
 
        record->latitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
        record->longitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
@@ -85,7 +85,7 @@ static void _cal_record_instance_normal_struct_init(cal_instance_normal_s* recor
 static int _cal_record_instance_normal_create(calendar_record_h* out_record)
 {
        cal_instance_normal_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_instance_normal_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -169,7 +169,7 @@ static int _cal_record_instance_normal_get_str(calendar_record_h record, unsigne
                *out_str = cal_strdup(rec->sync_data1);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -193,7 +193,7 @@ static int _cal_record_instance_normal_get_str_p(calendar_record_h record, unsig
                *out_str = (rec->sync_data1);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -232,7 +232,7 @@ static int _cal_record_instance_normal_get_int(calendar_record_h record, unsigne
                *out_value = (rec->original_event_id);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -251,7 +251,7 @@ static int _cal_record_instance_normal_get_double(calendar_record_h record, unsi
                break;
 
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -283,7 +283,7 @@ static int _cal_record_instance_normal_get_caltime(calendar_record_h record, uns
                *out_value = rec->end;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -311,7 +311,7 @@ static int _cal_record_instance_normal_set_str(calendar_record_h record, unsigne
                rec->sync_data1 = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -350,7 +350,7 @@ static int _cal_record_instance_normal_set_int(calendar_record_h record, unsigne
                (rec->original_event_id) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -369,7 +369,7 @@ static int _cal_record_instance_normal_set_double(calendar_record_h record, unsi
                break;
 
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -387,7 +387,7 @@ static int _cal_record_instance_normal_set_caltime(calendar_record_h record, uns
                rec->end = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index e47c890..6b60ce4 100644 (file)
@@ -65,7 +65,7 @@ cal_record_plugin_cb_s cal_record_instance_normal_extended_plugin_cb = {
 
 static void _cal_record_instance_normal_extended_struct_init(cal_instance_normal_extended_s* record)
 {
-       memset(record,0, sizeof(cal_instance_normal_extended_s));
+       memset(record, 0, sizeof(cal_instance_normal_extended_s));
 
        record->event_status = CALENDAR_EVENT_STATUS_NONE;
        record->calendar_id = DEFAULT_EVENT_CALENDAR_BOOK_ID;
@@ -74,7 +74,7 @@ static void _cal_record_instance_normal_extended_struct_init(cal_instance_normal
        record->busy_status = 2;
        record->summary = NULL;
        record->description = NULL;
-       record->location= NULL;
+       record->location = NULL;
 
        record->latitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
        record->longitude = 1000; /* set default 1000 out of range(-180 ~ 180) */
@@ -85,7 +85,7 @@ static void _cal_record_instance_normal_extended_struct_init(cal_instance_normal
 static int _cal_record_instance_normal_extended_create(calendar_record_h* out_record)
 {
        cal_instance_normal_extended_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_instance_normal_extended_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -194,7 +194,7 @@ static int _cal_record_instance_normal_extended_get_str(calendar_record_h record
                *out_str = cal_strdup(rec->sync_data4);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -233,7 +233,7 @@ static int _cal_record_instance_normal_extended_get_str_p(calendar_record_h reco
                *out_str = (rec->sync_data4);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -275,7 +275,7 @@ static int _cal_record_instance_normal_extended_get_int(calendar_record_h record
                *out_value = (rec->has_attendee);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -294,7 +294,7 @@ static int _cal_record_instance_normal_extended_get_double(calendar_record_h rec
                break;
 
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -326,7 +326,7 @@ static int _cal_record_instance_normal_extended_get_caltime(calendar_record_h re
                *out_value = rec->end;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -374,7 +374,7 @@ static int _cal_record_instance_normal_extended_set_str(calendar_record_h record
                rec->sync_data4 = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -416,7 +416,7 @@ static int _cal_record_instance_normal_extended_set_int(calendar_record_h record
                (rec->has_attendee) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -435,7 +435,7 @@ static int _cal_record_instance_normal_extended_set_double(calendar_record_h rec
                break;
 
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -453,7 +453,7 @@ static int _cal_record_instance_normal_extended_set_caltime(calendar_record_h re
                rec->end = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index b9ed6a8..57852c2 100644 (file)
@@ -67,7 +67,7 @@ cal_record_plugin_cb_s cal_record_search_plugin_cb = {
 static int _cal_record_search_create(calendar_record_h* out_record)
 {
        cal_search_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_search_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -84,11 +84,11 @@ static int _cal_record_search_destroy(calendar_record_h record, bool delete_chil
 
        cal_search_s *temp = (cal_search_s*)(record);
 
-       for(cursor = temp->values;cursor;cursor=cursor->next) {
+       for (cursor = temp->values; cursor; cursor = cursor->next) {
                cal_search_value_s *data = cursor->data;
-               if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
+               if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_STR) == true)
                        CAL_FREE(data->value.s);
-               }
+
                CAL_FREE(data);
        }
 
@@ -111,7 +111,7 @@ static int _cal_record_search_clone(calendar_record_h record, calendar_record_h*
 
        CAL_RECORD_COPY_COMMON(&(out_data->common), &(src_data->common));
 
-       for(cursor = src_data->values;cursor;cursor=cursor->next) {
+       for (cursor = src_data->values; cursor; cursor = cursor->next) {
                cal_search_value_s *src = cursor->data;
                cal_search_value_s *dest = calloc(1, sizeof(cal_search_value_s));
                if (NULL == dest) {
@@ -121,20 +121,15 @@ static int _cal_record_search_clone(calendar_record_h record, calendar_record_h*
                dest->property_id = src->property_id;
                if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
                        dest->value.s = cal_strdup(src->value.s);
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
                        dest->value.i = src->value.i;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
                        dest->value.d = src->value.d;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
                        dest->value.lli = src->value.lli;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(src->property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                        dest->value.caltime = src->value.caltime;
-               }
-               else {
+               } else {
                        CAL_FREE(dest);
                        continue;
                }
@@ -152,15 +147,14 @@ static int _cal_record_search_get_str(calendar_record_h record, unsigned int pro
        cal_search_s *rec = (cal_search_s*)(record);
        GSList *cursor;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                cal_search_value_s *data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
                                *out_str = cal_strdup(data->value.s);
                                break;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -174,15 +168,14 @@ static int _cal_record_search_get_str_p(calendar_record_h record, unsigned int p
        cal_search_s *rec = (cal_search_s*)(record);
        GSList *cursor;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                cal_search_value_s *data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
                                *out_str = (data->value.s);
                                break;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -196,15 +189,14 @@ static int _cal_record_search_get_int(calendar_record_h record, unsigned int pro
        cal_search_s *rec = (cal_search_s*)(record);
        GSList *cursor;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                cal_search_value_s *data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
                                *out_value = (data->value.i);
                                break;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -218,15 +210,14 @@ static int _cal_record_search_get_double(calendar_record_h record, unsigned int
        cal_search_s *rec = (cal_search_s*)(record);
        GSList *cursor;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                cal_search_value_s *data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
                                *out_value = (data->value.d);
                                break;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -240,15 +231,14 @@ static int _cal_record_search_get_lli(calendar_record_h record, unsigned int pro
        cal_search_s *rec = (cal_search_s*)(record);
        GSList *cursor;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                cal_search_value_s *data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
                                *out_value = (data->value.lli);
                                break;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -262,15 +252,14 @@ static int _cal_record_search_get_caltime(calendar_record_h record, unsigned int
        cal_search_s *rec = (cal_search_s*)(record);
        GSList *cursor;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                cal_search_value_s *data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                                *out_value = (data->value.caltime);
                                break;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -285,16 +274,15 @@ static int _cal_record_search_set_str(calendar_record_h record, unsigned int pro
        GSList *cursor;
        cal_search_value_s *data = NULL;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
                                CAL_FREE(data->value.s);
                                (data->value.s) = cal_strdup(value);
                                return CALENDAR_ERROR_NONE;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -315,15 +303,14 @@ static int _cal_record_search_set_int(calendar_record_h record, unsigned int pro
        GSList *cursor;
        cal_search_value_s *data = NULL;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
                                (data->value.i) = value;
                                return CALENDAR_ERROR_NONE;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -344,15 +331,14 @@ static int _cal_record_search_set_double(calendar_record_h record, unsigned int
        GSList *cursor;
        cal_search_value_s *data = NULL;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
                                (data->value.d) = value;
                                return CALENDAR_ERROR_NONE;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -373,15 +359,14 @@ static int _cal_record_search_set_lli(calendar_record_h record, unsigned int pro
        GSList *cursor;
        cal_search_value_s *data = NULL;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
                                (data->value.lli) = value;
                                return CALENDAR_ERROR_NONE;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
@@ -402,15 +387,14 @@ static int _cal_record_search_set_caltime(calendar_record_h record, unsigned int
        GSList *cursor;
        cal_search_value_s *data = NULL;
 
-       for(cursor = rec->values;cursor;cursor=cursor->next) {
+       for (cursor = rec->values; cursor; cursor = cursor->next) {
                data = cursor->data;
                if (data->property_id == property_id) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(data->property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                                (data->value.caltime) = value;
                                return CALENDAR_ERROR_NONE;
-                       }
-                       else {
-                               ERR("invalid parameter (property:%d)",data->property_id);
+                       } else {
+                               ERR("invalid parameter (property:%d)", data->property_id);
                                return CALENDAR_ERROR_INVALID_PARAMETER;
                        }
                }
index bae79fa..381fec6 100644 (file)
@@ -60,14 +60,14 @@ cal_record_plugin_cb_s cal_record_timezone_plugin_cb = {
 
 static void _cal_record_timezone_struct_init(cal_timezone_s *record)
 {
-       memset(record,0, sizeof(cal_timezone_s));
+       memset(record, 0, sizeof(cal_timezone_s));
        record->calendar_id = DEFAULT_EVENT_CALENDAR_BOOK_ID;
 }
 
 static int _cal_record_timezone_create(calendar_record_h* out_record)
 {
        cal_timezone_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_timezone_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -142,7 +142,7 @@ static int _cal_record_timezone_get_str(calendar_record_h record, unsigned int p
                *out_str = cal_strdup(rec->day_light_name);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -160,7 +160,7 @@ static int _cal_record_timezone_get_str_p(calendar_record_h record, unsigned int
                *out_str = (rec->day_light_name);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -211,7 +211,7 @@ static int _cal_record_timezone_get_int(calendar_record_h record, unsigned int p
                *out_value = (rec->calendar_id);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -231,7 +231,7 @@ static int _cal_record_timezone_set_str(calendar_record_h record, unsigned int p
                rec->day_light_name = cal_strdup(value);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -282,7 +282,7 @@ static int _cal_record_timezone_set_int(calendar_record_h record, unsigned int p
                (rec->calendar_id) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index 5abcc97..ba9c439 100644 (file)
@@ -73,7 +73,7 @@ cal_record_plugin_cb_s cal_record_todo_plugin_cb = {
 
 static void _cal_record_todo_struct_init(cal_todo_s *record)
 {
-       memset(record,0, sizeof(cal_todo_s));
+       memset(record, 0, sizeof(cal_todo_s));
 
        record->todo_status = CALENDAR_TODO_STATUS_NONE;
        record->calendar_id = DEFAULT_TODO_CALENDAR_BOOK_ID;
@@ -81,9 +81,9 @@ static void _cal_record_todo_struct_init(cal_todo_s *record)
        record->index = CAL_INVALID_ID;
        record->summary = NULL;
        record->description = NULL;
-       record->location= NULL;
+       record->location = NULL;
        record->categories = NULL;
-       record->uid= NULL;
+       record->uid = NULL;
        record->is_deleted = 0;
        record->latitude = CALENDAR_RECORD_NO_COORDINATE; /* set default 1000 out of range(-180 ~ 180) */
        record->longitude = CALENDAR_RECORD_NO_COORDINATE; /* set default 1000 out of range(-180 ~ 180) */
@@ -103,7 +103,7 @@ static void _cal_record_todo_struct_init(cal_todo_s *record)
 static int _cal_record_todo_create(calendar_record_h* out_record)
 {
        cal_todo_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_todo_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -307,7 +307,7 @@ static int _cal_record_todo_get_str(calendar_record_h record, unsigned int prope
                *out_str = cal_strdup(rec->organizer_email);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -385,7 +385,7 @@ static int _cal_record_todo_get_str_p(calendar_record_h record, unsigned int pro
                *out_str = (rec->organizer_email);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -442,7 +442,7 @@ static int _cal_record_todo_get_int(calendar_record_h record, unsigned int prope
                *out_value = (rec->is_allday);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -460,7 +460,7 @@ static int _cal_record_todo_get_double(calendar_record_h record, unsigned int pr
                *out_value = (rec->longitude);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -481,7 +481,7 @@ static int _cal_record_todo_get_lli(calendar_record_h record, unsigned int prope
                *out_value = (rec->completed_time);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -502,7 +502,7 @@ static int _cal_record_todo_get_caltime(calendar_record_h record, unsigned int p
                *out_value = rec->until;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -714,7 +714,7 @@ static int _cal_record_todo_set_int(calendar_record_h record, unsigned int prope
                (rec->is_allday) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -732,7 +732,7 @@ static int _cal_record_todo_set_double(calendar_record_h record, unsigned int pr
                (rec->longitude) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -750,7 +750,7 @@ static int _cal_record_todo_set_lli(calendar_record_h record, unsigned int prope
                (rec->created_time) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -771,7 +771,7 @@ static int _cal_record_todo_set_caltime(calendar_record_h record, unsigned int p
                (rec->until) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -820,7 +820,7 @@ static int _cal_record_todo_add_child_record(calendar_record_h record, unsigned
                ret = calendar_list_add((calendar_list_h)rec->extended_list, child_record);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return ret;
@@ -846,7 +846,7 @@ static int _cal_record_todo_remove_child_record(calendar_record_h record, unsign
                ret = calendar_list_remove((calendar_list_h)rec->extended_list, child_record);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return ret;
@@ -871,7 +871,7 @@ static int _cal_record_todo_get_child_record_count(calendar_record_h record, uns
                ret = calendar_list_get_count((calendar_list_h)rec->extended_list, (int *)count);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return ret;
@@ -896,7 +896,7 @@ static int _cal_record_todo_get_child_record_at_p(calendar_record_h record, unsi
                ret = cal_list_get_nth_record_p(rec->extended_list, index, child_record);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
        return ret;
index f229db2..84409fc 100644 (file)
@@ -57,7 +57,7 @@ cal_record_plugin_cb_s cal_record_updated_info_plugin_cb = {
 static int _cal_record_updated_info_create(calendar_record_h* out_record)
 {
        cal_updated_info_s *temp = NULL;
-       int ret= CALENDAR_ERROR_NONE;
+       int ret = CALENDAR_ERROR_NONE;
 
        temp = calloc(1, sizeof(cal_updated_info_s));
        RETVM_IF(NULL == temp, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
@@ -118,7 +118,7 @@ static int _cal_record_updated_info_get_int(calendar_record_h record, unsigned i
                *out_value = (rec->version);
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -142,7 +142,7 @@ static int _cal_record_updated_info_set_int(calendar_record_h record, unsigned i
                (rec->version) = value;
                break;
        default:
-               ERR("invalid parameter (property:%d)",property_id);
+               ERR("invalid parameter (property:%d)", property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
index b9e271c..9c0a428 100644 (file)
@@ -224,15 +224,13 @@ API int calendar_vcalendar_parse_to_calendar_foreach(const char *vcalendar_file_
        while (fgets(buf, sizeof(buf), file)) {
                if (len + sizeof(buf) < buf_size) {
                        len += snprintf(stream + len, strlen(buf) +1, "%s", buf);
-               }
-               else {
+               } else {
                        char *new_stream;
                        buf_size *= 2;
                        new_stream = realloc(stream, buf_size);
                        if (new_stream) {
                                stream = new_stream;
-                       }
-                       else {
+                       } else {
                                free(stream);
                                fclose(file);
                                free(foreach_data);
index e5f8759..925544b 100644 (file)
@@ -39,17 +39,15 @@ enum {
        VCAL_VER_2 = 2,
 };
 
-typedef enum
-{
-       EVENT_ATTENDEE_REQ_PARTICIPANT_ROLE=0,
+typedef enum {
+       EVENT_ATTENDEE_REQ_PARTICIPANT_ROLE = 0,
        EVENT_ATTENDEE_OPT_PARTICIPANT_ROLE,
        EVENT_ATTENDEE_NON_PARTICIPANT_ROLE,
        EVENT_ATTENDEE_CHAIR_ROLE,
 } cal_event_attendee_role_type_t;
 
-typedef enum
-{
-       EVENT_ATTENDEE_NEEDS_ACTION_AT_STATUS=0,
+typedef enum {
+       EVENT_ATTENDEE_NEEDS_ACTION_AT_STATUS = 0,
        EVENT_ATTENDEE_ACCEPTED_AT_STATUS,
        EVENT_ATTENDEE_DECLINED_AT_STATUS,
        EVENT_ATTENDEE_TENTATIVE_AT_STATUS,
@@ -93,9 +91,8 @@ cal_make_s *cal_vcalendar_make_new(void)
        cal_make_s *b;
 
        b = calloc(1, sizeof(cal_make_s));
-       if (!b) {
+       if (!b)
                return NULL;
-       }
 
        b->data = calloc(1, sizeof(char));
        if (!b->data) {
@@ -226,8 +223,7 @@ static int  _cal_vcalendar_make_time(cal_make_s *b, char *tzid, calendar_time_s
                        if (NULL == tzid || '\0' == *tzid) {
                                cal_time_get_local_datetime(NULL, t->time.utime, &y, &m, &d, &h, &n, &s);
                                snprintf(buf, sizeof(buf), ":"CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSSZ, y, m, d, h, n, s);
-                       }
-                       else {
+                       } else {
                                cal_time_get_local_datetime(tzid, t->time.utime, &y, &m, &d, &h, &n, &s);
                                snprintf(buf, sizeof(buf), ";TZID=%s:"CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS, tzid, y, m, d, h, n, s);
                        }
@@ -299,8 +295,7 @@ static const char* vl_tick(calendar_alarm_time_unit_type_e unit, int tick)
                *buf = '-';
                i++;
 
-       }
-       else {
+       } else {
                tick = -tick;
        }
 
@@ -344,8 +339,7 @@ int _cal_vcalendar_make_audio(cal_make_s *b, calendar_record_h alarm)
                        _cal_vcalendar_make_printf(b, "TRIGGER;VALUE=DATE-TIME:", datetime);
                        free(datetime);
 
-               }
-               else {
+               } else {
                        char datetime[CAL_STR_SHORT_LEN32] = {0};
                        snprintf(datetime, sizeof(datetime), CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS,
                                        at.time.date.year, at.time.date.month, at.time.date.mday,
@@ -353,8 +347,7 @@ int _cal_vcalendar_make_audio(cal_make_s *b, calendar_record_h alarm)
                        _cal_vcalendar_make_printf(b, "TRIGGER;VALUE=DATE-TIME:", datetime);
                }
 
-       }
-       else {
+       } else {
                int tick = 0;
                ret = calendar_record_get_int(alarm, _calendar_alarm.tick, &tick);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "failed to get tick");
@@ -394,15 +387,13 @@ static void _cal_vcalendar_make_aalarm(cal_make_s *b, calendar_record_h record,
                        snprintf(datetime, sizeof(datetime), "%s;;;", buf);
                        free(buf);
 
-               }
-               else {
+               } else {
                        snprintf(datetime, sizeof(datetime), CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS";;;",
                                        at.time.date.year, at.time.date.month, at.time.date.mday,
                                        at.time.date.hour, at.time.date.minute, at.time.date.second);
                }
 
-       }
-       else {
+       } else {
                /* has tick, unit */
                int tick = 0;
                ret = calendar_record_get_int(alarm, _calendar_alarm.tick, &tick);
@@ -417,8 +408,7 @@ static void _cal_vcalendar_make_aalarm(cal_make_s *b, calendar_record_h record,
                        ret = calendar_record_get_caltime(record, _calendar_event.start_time, &st);
                        RETM_IF(CALENDAR_ERROR_NONE != ret, "calendar_record_get_caltime() Fail(%d)", ret);
 
-               }
-               else if (CAL_STRING_EQUAL == strncmp(uri, _calendar_todo._uri, strlen(_calendar_todo._uri))) {
+               } else if (CAL_STRING_EQUAL == strncmp(uri, _calendar_todo._uri, strlen(_calendar_todo._uri))) {
                        ret = calendar_record_get_caltime(record, _calendar_todo.due_time, &st);
                        RETM_IF(CALENDAR_ERROR_NONE != ret, "calendar_record_get_caltime() Fail(%d)", ret);
                }
@@ -430,8 +420,7 @@ static void _cal_vcalendar_make_aalarm(cal_make_s *b, calendar_record_h record,
                        free(buf);
                        DBG("aalarm: [%s] = (%lld) - (tick(%d) * unit(%d))", datetime, st.time.utime, tick, unit);
 
-               }
-               else {
+               } else {
                        struct tm tm = {0};
                        tm.tm_year = st.time.date.year - 1900;
                        tm.tm_mon = st.time.date.month - 1;
@@ -523,7 +512,7 @@ int _cal_vcalendar_make_rrule_append_mday(char *buf, int buf_len, char *mday)
                        continue;
 
                int num = atoi(t[i]);
-               ret += snprintf(buf +len +ret, buf_len -len -ret, "%d%s", num, 0 < num? " ": "- ");
+               ret += snprintf(buf +len +ret, buf_len -len -ret, "%d%s", num, 0 < num ? " " : "- ");
        }
        g_strfreev(t);
 
@@ -562,8 +551,7 @@ static void _cal_vcalendar_make_rrule_append_setpos(calendar_record_h record, ch
                        blen += snprintf(buf +blen, buf_len -blen, "%d%s ", setpos * (setpos < 0 ? -1 : 1), setpos < 0 ? "-" : "+");
                }
                g_strfreev(t);
-       }
-       else {
+       } else {
                /* in ver2.0, 3TH should be changed to setpos:3, byday:TH */
                char *byday = NULL;
                ret = calendar_record_get_str_p(record, _calendar_event.byday, &byday);
@@ -585,24 +573,21 @@ static void _cal_vcalendar_make_rrule_append_setpos(calendar_record_h record, ch
                        if ('1' <= byday[i] && byday[i] <= '9') {
                                is_working = false;
                                digit++;
-                       }
-                       else if ('+' == byday[i]) {
+                       } else if ('+' == byday[i]) {
                                is_working = false;
                                sign = 1;
-                       }
-                       else if ('-' == byday[i]) {
+                       } else if ('-' == byday[i]) {
                                is_working = false;
                                sign = -1;
-                       }
-                       else {
+                       } else {
                                if (false == is_working) {
                                        is_extracted = true;
                                        is_working = true;
                                        char num[CAL_STR_SHORT_LEN32] = {0};
                                        snprintf(num, digit +1, "%s", byday +i -digit);
-                                       if (NULL == strstr(buf, num)) {
-                                               blen += snprintf(buf +blen, buf_len -blen, "%s%c ", num, (-1 == sign) ? '-': '+');
-                                       }
+                                       if (NULL == strstr(buf, num))
+                                               blen += snprintf(buf +blen, buf_len -blen, "%s%c ", num, (-1 == sign) ? '-' : '+');
+
                                        digit = 0;
                                        sign = 0;
                                }
@@ -715,8 +700,7 @@ int _cal_vcalendar_make_rrule_append_wday(int rrule_type, char *buf, int buf_len
                if (0 < j) {
                        if (CALENDAR_RECURRENCE_WEEKLY == rrule_type) {
                                num_past = num;
-                       }
-                       else {
+                       } else {
                                if (*p == '-') {
                                        snprintf(buf_temp, j + 1, "%s", p + 1);
                                        num = atoi(buf_temp);
@@ -724,8 +708,7 @@ int _cal_vcalendar_make_rrule_append_wday(int rrule_type, char *buf, int buf_len
                                                num_past = num;
                                                len += snprintf(buf +len, buf_len -len, "%s- ", buf_temp);
                                        }
-                               }
-                               else {
+                               } else {
                                        snprintf(buf_temp, j + 1, "%s", p);
                                        num = atoi(buf_temp);
                                        if (0 == i) {
@@ -734,15 +717,13 @@ int _cal_vcalendar_make_rrule_append_wday(int rrule_type, char *buf, int buf_len
                                        }
                                }
                        }
-                       if (num_past == num) {
+                       if (num_past == num)
                                len += snprintf(buf +len, buf_len -len, "%s ", p +j);
-                       }
-                       else {
+                        else
                                ERR("Out of 1.0 spec");
-                       }
+
                        DBG("%d num(%d) val[%s]", i, num, p + j);
-               }
-               else {
+               } else {
                        len += snprintf(buf +len, buf_len -len, "%s ", p);
                }
                DBG("[%s]", buf);
@@ -983,7 +964,7 @@ static void __make_rrule_ver1(cal_make_s *b, calendar_record_h record)
                if (bymonth && *bymonth) {
                        DBG("bymonth[%s]", bymonth);
                        len += snprintf(buf +len, sizeof(buf) -len, "YM%d ", interval);
-                       len +=_cal_vcalendar_make_rrule_append_mday(buf, sizeof(buf), bymonth);
+                       len += _cal_vcalendar_make_rrule_append_mday(buf, sizeof(buf), bymonth);
 
                        if (byday && *byday) {
                                DBG("byday");
@@ -991,24 +972,20 @@ static void __make_rrule_ver1(cal_make_s *b, calendar_record_h record)
                                len += snprintf(buf +len, sizeof(buf) -len, "MP%d ", interval);
                                _cal_vcalendar_make_rrule_append_setpos(record, buf, sizeof(buf));
                                _cal_vcalendar_make_rrule_append_text_wday(CALENDAR_RECURRENCE_MONTHLY, buf, sizeof(buf), byday);
-                       }
-                       else if (bymonthday && *bymonthday) {
+                       } else if (bymonthday && *bymonthday) {
                                DBG("bymonthday");
                                /* ex> YM1 2 MD 1 */
                                len += snprintf(buf +len, sizeof(buf) -len, "MD%d ", interval);
                                _cal_vcalendar_make_rrule_append_mday(buf, sizeof(buf), bymonthday);
-                       }
-                       else {
+                       } else {
                                ERR("Out of scope");
                                __make_rrule_ver1_default(record, freq, interval, buf, sizeof(buf));
                        }
-               }
-               else if (byyearday && *byyearday) {
+               } else if (byyearday && *byyearday) {
                        DBG("byyearday");
                        snprintf(buf, sizeof(buf), "YD%d ", interval);
                        _cal_vcalendar_make_rrule_append_mday(buf, sizeof(buf), byyearday);
-               }
-               else {
+               } else {
                        ERR("Out of scope");
                        __make_rrule_ver1_default(record, freq, interval, buf, sizeof(buf));
                }
@@ -1020,13 +997,11 @@ static void __make_rrule_ver1(cal_make_s *b, calendar_record_h record)
                        snprintf(buf, sizeof(buf), "MP%d ", interval);
                        _cal_vcalendar_make_rrule_append_setpos(record, buf, sizeof(buf));
                        _cal_vcalendar_make_rrule_append_text_wday(CALENDAR_RECURRENCE_MONTHLY, buf, sizeof(buf), byday);
-               }
-               else if (bymonthday && *bymonthday) {
+               } else if (bymonthday && *bymonthday) {
                        DBG("bymonthday");
                        snprintf(buf, sizeof(buf), "MD%d ", interval);
                        _cal_vcalendar_make_rrule_append_mday(buf, sizeof(buf), bymonthday);
-               }
-               else {
+               } else {
                        ERR("Out of scope, so set as bymonthday");
                        __make_rrule_ver1_default(record, freq, interval, buf, sizeof(buf));
                }
@@ -1226,8 +1201,7 @@ static void __make_rrule_ver2(cal_make_s *b, calendar_record_h record)
                                snprintf(tmp, sizeof(tmp), ";UNTIL=%s", tmp_tzid);
                                CAL_FREE(tmp_tzid);
                        }
-               }
-               else {
+               } else {
                        snprintf(tmp, sizeof(tmp), ";UNTIL="CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSSZ,
                                        caltime.time.date.year,
                                        caltime.time.date.month,
@@ -1887,7 +1861,7 @@ static void __make_uid(cal_make_s *b, calendar_record_h record)
        CAL_FN_CALL();
        char *uid = NULL;
 
-       // search if original_event_id > 0.
+       /* search if original_event_id > 0.*/
        int original_event_id = 0;
        calendar_record_get_int(record, _calendar_event.original_event_id, &original_event_id);
        char *recurrence_id = NULL;
@@ -1901,7 +1875,7 @@ static void __make_uid(cal_make_s *b, calendar_record_h record)
                        _cal_vcalendar_make_printf(b, "UID:", uid);
                        free(uid);
                }
-               if (VCAL_VER_1 == b->version) // ver 1.0 does not support: recurrence-id
+               if (VCAL_VER_1 == b->version) /* ver 1.0 does not support: recurrence-id */
                        return;
 
                calendar_record_get_str_p(record, _calendar_event.recurrence_id, &recurrence_id);
@@ -1914,7 +1888,7 @@ static void __make_uid(cal_make_s *b, calendar_record_h record)
                return;
        }
 
-       // if original_event_id > 0, get parent uid.
+       /* if original_event_id > 0, get parent uid. */
        uid = __get_parent_uid(original_event_id);
        if (NULL == uid || '\0' == *uid) {
                uid = __get_new_uid();
@@ -1923,7 +1897,7 @@ static void __make_uid(cal_make_s *b, calendar_record_h record)
        __set_child_uid(record, uid);
        _cal_vcalendar_make_printf(b, "UID:", uid);
 
-       if (VCAL_VER_1 == b->version) // ver 1.0 does not support: recurrence-id
+       if (VCAL_VER_1 == b->version) /* ver 1.0 does not support: recurrence-id */
                return;
 
        if (*recurrence_id >= '0' && *recurrence_id <= '9')
@@ -2066,7 +2040,7 @@ static void _cal_vcalendar_make_schedule(cal_make_s *b, calendar_record_h record
        __make_priority(b, record);
        __make_dtstamp(b, record);
        __make_categories(b, record);
-       __make_exdate(b, record); // only event
+       __make_exdate(b, record); /* only event */
        __make_attendee(b, record);
        __make_alarm(b, record);
        __make_extended(b, record);
@@ -2171,8 +2145,7 @@ static void __devide_vcalendar_with_header(cal_make_s *b, calendar_record_h reco
                /* new start of vcalendar */
                __make_tz(b, tzid, created);
                b->timezone_tzid = strdup(tzid);
-       }
-       else {
+       } else {
                /* not first vcalendar */
                if (0 != strncmp(b->timezone_tzid, tzid, strlen(tzid))) {
                        /* different tzid */
@@ -2182,8 +2155,7 @@ static void __devide_vcalendar_with_header(cal_make_s *b, calendar_record_h reco
                        if (b->timezone_tzid)
                                free(b->timezone_tzid);
                        b->timezone_tzid = strdup(tzid);
-               }
-               else {
+               } else {
                        DBG("same as before, skip");
                }
        }
@@ -2213,14 +2185,12 @@ static int __make_vcalendar(cal_make_s *b, calendar_list_h list)
                        __devide_vcalendar_with_header(b, record);
                        _cal_vcalendar_make_schedule(b, record);
 
-               }
-               else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_todo._uri)) {
+               } else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_todo._uri)) {
                        b->type = CALENDAR_BOOK_TYPE_TODO;
                        __devide_vcalendar_with_header(b, record);
                        _cal_vcalendar_make_schedule(b, record);
 
-               }
-               else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_extended_property._uri)) {
+               } else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_extended_property._uri)) {
                        cal_extended_s *extended = (cal_extended_s *)record;
                        if (CAL_STRING_EQUAL == strncmp(extended->key, "VERSION", strlen("VERSION"))) continue;
 
@@ -2229,16 +2199,13 @@ static int __make_vcalendar(cal_make_s *b, calendar_list_h list)
 
                        DBG("extended key[%s] value[%s]", extended->key, extended->value);
 
-               }
-               else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_timezone._uri)) {
+               } else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_timezone._uri)) {
                        DBG("Not support timezone");
 
-               }
-               else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_book._uri)) {
+               } else if (CAL_STRING_EQUAL == strcmp(uri, _calendar_book._uri)) {
                        DBG("Not support calendar");
 
-               }
-               else {
+               } else {
                        DBG("Unable to understand uri[%s]", uri);
                }
 
index 9a3b10e..c7ca22c 100644 (file)
@@ -327,9 +327,9 @@ static inline char* __crlf(char *p)
 {
        RETV_IF(NULL == p, NULL);
        while (VCAL_LF != *p) {
-               if ('\0' == *p) {
+               if ('\0' == *p)
                        return NULL;
-               }
+
                p++;
        }
        return p +1;
@@ -348,10 +348,9 @@ static bool __check_has_rrule(char *stream)
                                        *(cursor++) == 'U' &&
                                        *(cursor++) == 'L' &&
                                        *(cursor++) == 'E' &&
-                                       *(cursor++) == ':' ) {
+                                       *(cursor++) == ':') {
                                return true;
-                       }
-                       else if (*(cursor-1) == 'E' &&
+                       } else if (*(cursor-1) == 'E' &&
                                        *(cursor++) == 'N' &&
                                        *(cursor++) == 'D' &&
                                        *(cursor++) == ':' &&
@@ -363,8 +362,6 @@ static bool __check_has_rrule(char *stream)
                                        *(cursor++) == 'T') {
                                break;
                        }
-                       else {
-                       }
                }
        }
        return ret;
@@ -393,8 +390,7 @@ static int _sub_caltime(struct user_data *ud, calendar_time_s *s, calendar_time_
                                        s->time.date.second);
                        *diff = lli - a->time.utime;
                        DBG("Convert start localtime with tz[%s] and get(%lld)", tz, lli);
-               }
-               else {
+               } else {
                        lli = cal_time_convert_itol(tz, a->time.date.year, a->time.date.month,
                                        a->time.date.mday, a->time.date.hour, a->time.date.minute,
                                        a->time.date.second);
@@ -419,27 +415,22 @@ static int _sub_caltime(struct user_data *ud, calendar_time_s *s, calendar_time_
 
 static void _get_tick_unit(int t, int *tick, int *unit)
 {
-       if (0 == t) {
+       if (0 == t)
                return;
-       }
 
        if (0 == (t % CALENDAR_ALARM_TIME_UNIT_WEEK)) {
                *tick = t / CALENDAR_ALARM_TIME_UNIT_WEEK;
                *unit = CALENDAR_ALARM_TIME_UNIT_WEEK;
-       }
-       else if (0 == (t % CALENDAR_ALARM_TIME_UNIT_DAY)) {
+       } else if (0 == (t % CALENDAR_ALARM_TIME_UNIT_DAY)) {
                *tick = t / CALENDAR_ALARM_TIME_UNIT_DAY;
                *unit = CALENDAR_ALARM_TIME_UNIT_DAY;
-       }
-       else if (0 == (t % CALENDAR_ALARM_TIME_UNIT_HOUR)) {
+       } else if (0 == (t % CALENDAR_ALARM_TIME_UNIT_HOUR)) {
                *tick = t / CALENDAR_ALARM_TIME_UNIT_HOUR;
                *unit = CALENDAR_ALARM_TIME_UNIT_HOUR;
-       }
-       else if (0 == (t % CALENDAR_ALARM_TIME_UNIT_MINUTE)) {
+       } else if (0 == (t % CALENDAR_ALARM_TIME_UNIT_MINUTE)) {
                *tick = t / CALENDAR_ALARM_TIME_UNIT_MINUTE;
                *unit = CALENDAR_ALARM_TIME_UNIT_MINUTE;
-       }
-       else {
+       } else {
                *tick = t;
                *unit = CALENDAR_ALARM_TIME_UNIT_SPECIFIC;
        }
@@ -453,28 +444,25 @@ static char* __get_value(char *cursor, char **value)
 
        /* offset: length until ';' or ':' */
        int offset = 0;
-       while (':' != *(cursor + offset) && ';' != *(cursor + offset)) {
+       while (':' != *(cursor + offset) && ';' != *(cursor + offset))
                offset++;
-       }
 
        int i = 0;
        while (VCAL_LF != *(cursor + offset + i)) {
-               if ('\0' == *(cursor + offset + i)) {
+               if ('\0' == *(cursor + offset + i))
                        return NULL;
-               }
+
                i++;
        }
 
        char *p = calloc(i + 1, sizeof(char));
        RETVM_IF(NULL == p, NULL, "calloc() Fail");
 
-       if (VCAL_CR == *(cursor + offset + i -1)) {
+       if (VCAL_CR == *(cursor + offset + i -1))
                memcpy(p, cursor + offset, i -1);
-
-       }
-       else {
+       else
                memcpy(p, cursor + offset, i);
-       }
+
        *value = p;
        DBG("offset(%d) len(%d) value[%s]", offset, i, *value);
 
@@ -514,12 +502,10 @@ static inline void __adjust_tzid(char *p)
        int i = 0;
        while (*(p +i)) {
                if ('-' == *(p +i)) {
-                       if ('1' <= *(p +i +1) && *(p +i +1) <= '9') {
+                       if ('1' <= *(p +i +1) && *(p +i +1) <= '9')
                                i++;
-                       }
-                       else {
+                       else
                                *(p +i) = '/';
-                       }
                }
                i++;
        }
@@ -594,8 +580,7 @@ static void __decode_escaped_char(char *p)
                                p++;
                                break;
                        }
-               }
-               else {
+               } else {
                        *q = *p;
                }
                q++;
@@ -660,29 +645,23 @@ static void __decode_quoted_printable(char *p)
        while (p[i]) {
                if (p[i] == '=') {
                        if (p[i+1] == 0x09 || p[i+1] == 0x20) {
-                               i +=3;
-
-                       }
-                       else if (p[i+1] == '\r' || p[i+1] == '\n') {
-                               i +=3;
-
-                       }
-                       else {
+                               i += 3;
+                       } else if (p[i+1] == '\r' || p[i+1] == '\n') {
+                               i += 3;
+                       } else {
                                if (p[i+1] == '0' && tolower(p[i+2]) == 'd' &&
                                                p[i+3] == '=' && p[i+4] == '0' && tolower(p[i+5]) == 'a') {
                                        p[j] = '\n';
                                        j++;
                                        i += 6;
-                               }
-                               else {
+                               } else {
                                        ch = __decode_hexa(p +i +1);
                                        p[j] = ch;
                                        j++;
                                        i += 3;
                                }
                        }
-               }
-               else {
+               } else {
                        p[j] = p[i];
                        j++;
                        i++;
@@ -712,17 +691,15 @@ static char* __decode_iso8859_1_to_utf8(char *p)
 
        /* check enough space */
        for (src = dst = out_p; *src; src++, dst++) {
-               if (*src & 0x80) {
+               if (*src & 0x80)
                        ++dst;
-               }
        }
 
        while (dst > src) {
                if (*src & 0x80) {
                        *dst-- = 0x80 | (*src & 0x3f);
                        *dst-- = 0xc0 | (*((unsigned char *)src--) >> 6);
-               }
-               else {
+               } else {
                        *dst-- = *src--;
                }
        }
@@ -767,8 +744,7 @@ static char* __decode_charset(char *p)
                                charset = VCAL_CHARSET_ISO_8859_1;
                        else
                                WARN("Not support charset[%s]", s[i] + key_len);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(s[i], "ENCODING=", strlen("ENCODING="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(s[i], "ENCODING=", strlen("ENCODING="))) {
                        int key_len = strlen("ENCODING=");
                        if (CAL_STRING_EQUAL == strcmp(s[i] + key_len, "BASE64"))
                                encoding = VCAL_ENCODING_BASE64;
@@ -776,8 +752,7 @@ static char* __decode_charset(char *p)
                                encoding = VCAL_ENCODING_QUOTED_PRINTABLE;
                        else
                                WARN("Not support encoding[%s]", s[i] + key_len);
-               }
-               else {
+               } else {
                        WARN("[%s]", s[i]);
                }
        }
@@ -863,8 +838,7 @@ static char* __decode_datetime(char *p, struct user_data *ud)
                                break;
                        }
                        DBG("set datetime_tzid[%s] as timezone_tzid", ud->datetime_tzid);
-               }
-               else {
+               } else {
                        ERR("INVALID tzid");
                }
                break;
@@ -1029,8 +1003,7 @@ static int _get_caltime(char *p, calendar_time_s *caltime, struct user_data *ud)
 
                if (VCAL_VER_1 == ud->version) {
                        caltime->type = CALENDAR_TIME_LOCALTIME;
-               }
-               else {
+               } else {
                        if (NULL == ud->datetime_tzid || '\0' == *ud->datetime_tzid) {
                                if (NULL == ud->timezone_tzid || '\0' == *ud->timezone_tzid) {
                                        /* Without tzid is localtime */
@@ -1038,8 +1011,7 @@ static int _get_caltime(char *p, calendar_time_s *caltime, struct user_data *ud)
                                        DBG(CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS,
                                                        caltime->time.date.year, caltime->time.date.month, caltime->time.date.mday,
                                                        caltime->time.date.hour, caltime->time.date.minute, caltime->time.date.second);
-                               }
-                               else {
+                               } else {
                                        /* No 'Z' with tzid means utime */
                                        caltime->type = CALENDAR_TIME_UTIME;
                                        caltime->time.utime = cal_time_convert_itol(ud->timezone_tzid,
@@ -1047,8 +1019,7 @@ static int _get_caltime(char *p, calendar_time_s *caltime, struct user_data *ud)
                                                        caltime->time.date.hour, caltime->time.date.minute, caltime->time.date.second);
                                        DBG("timezone_tzid[%s] (%lld)", ud->timezone_tzid, caltime->time.utime);
                                }
-                       }
-                       else {
+                       } else {
                                /* No 'Z' with tzid means utime */
                                caltime->type = CALENDAR_TIME_UTIME;
                                caltime->time.utime = cal_time_convert_itol(ud->datetime_tzid,
@@ -1070,8 +1041,7 @@ static int _get_caltime(char *p, calendar_time_s *caltime, struct user_data *ud)
                        DBG(CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS,
                                        caltime->time.date.year, caltime->time.date.month, caltime->time.date.mday,
                                        caltime->time.date.hour, caltime->time.date.minute, caltime->time.date.second);
-               }
-               else {
+               } else {
                        caltime->type = CALENDAR_TIME_UTIME;
                        caltime->time.utime = cal_time_convert_lli(p);
                        DBG("(%lld)", caltime->time.utime);
@@ -1116,8 +1086,7 @@ static void __parse_tz(const char *tz, int *h, int *m)
        char buf[8] = {0};
        if (sign) {
                snprintf(buf, strlen(t[0]), "%s", t[0] + 1);
-       }
-       else {
+       } else {
                sign = 1;
                snprintf(buf, strlen(t[0]) + 1, "%s", t[0]);
        }
@@ -1144,13 +1113,11 @@ static void __get_tz(char *value, char **tz)
        __parse_tz(value +1, &h, &m); /* +1 to skip ':' */
 
        char buf[CAL_STR_SHORT_LEN32] = {0};
-       if (0 == m) {
+       if (0 == m)
                snprintf(buf, sizeof(buf), "Etc/GMT%c%d", h < 0 ? '+' : '-', h);
-
-       }
-       else {
+       else
                cal_time_get_registered_tzid_with_offset(h * 3600 + m * 60, buf, sizeof(buf));
-       }
+
        DBG("set tzid [%s]", buf);
 
        *tz = strdup(buf);
@@ -1429,18 +1396,15 @@ static void __work_component_property_status(char *value, calendar_record_h reco
        int status = 0;
        switch (ud->type) {
        case CALENDAR_BOOK_TYPE_EVENT:
-               if (CAL_STRING_EQUAL == strncmp(value, ":TENTATIVE", strlen(":TENTATIVE"))) {
+               if (CAL_STRING_EQUAL == strncmp(value, ":TENTATIVE", strlen(":TENTATIVE")))
                        status = CALENDAR_EVENT_STATUS_TENTATIVE;
-               }
-               else if (CAL_STRING_EQUAL == strncmp(value, ":CONFIRMED", strlen(":CONFIRMED"))) {
+               else if (CAL_STRING_EQUAL == strncmp(value, ":CONFIRMED", strlen(":CONFIRMED")))
                        status = CALENDAR_EVENT_STATUS_CONFIRMED;
-               }
-               else if (CAL_STRING_EQUAL == strncmp(value, ":CANCELLED", strlen(":CANCELLED"))) {
+               else if (CAL_STRING_EQUAL == strncmp(value, ":CANCELLED", strlen(":CANCELLED")))
                        status = CALENDAR_EVENT_STATUS_CANCELLED;
-               }
-               else {
+               else
                        status = CALENDAR_EVENT_STATUS_NONE;
-               }
+
                ret = cal_record_set_int(record, _calendar_event.event_status, status);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                break;
@@ -1611,21 +1575,18 @@ static void __work_component_property_rrule_ver_1(char *value, calendar_record_h
                        has_by = true;
                        if (week_index) {
                                int j = 0;
-                               for (j = 0; j < week_index; j++) {
+                               for (j = 0; j < week_index; j++)
                                        len_str += snprintf(bystr + len_str, sizeof(bystr) - len_str, "%d%s,", week[j], t[i]);
-                               }
-                       }
-                       else {
+
+                       } else {
                                len_str += snprintf(bystr + len_str, sizeof(bystr) - len_str, "%s,", t[i]);
                        }
                        DBG("[%s] week_index(%d)", bystr, week_index);
-               }
-               else if ('L' == *t[i] && 'D' == *(t[i] +1)) {  /* last day */
+               } else if ('L' == *t[i] && 'D' == *(t[i] +1)) {  /* last day */
                        has_by = true;
                        len_str += snprintf(bystr + len_str, sizeof(bystr) - len_str, "%s,", "-1");
 
-               }
-               else if ('W' == *t[i] && 'K' == *(t[i] +1) && 'S' == *(t[i] +2) && 'T' == *(t[i] +3)) { /* +4 is '=' */
+               } else if ('W' == *t[i] && 'K' == *(t[i] +1) && 'S' == *(t[i] +2) && 'T' == *(t[i] +3)) { /* +4 is '=' */
                        if ('S' == *(t[i] +5) && 'U' == *(t[i] +6))
                                ret = cal_record_set_int(record, _calendar_event.wkst, CALENDAR_SUNDAY);
                        else if ('M' == *(t[i] +5))
@@ -1644,8 +1605,7 @@ static void __work_component_property_rrule_ver_1(char *value, calendar_record_h
                                ERR("Invalid parameter[%s]", t[i]);
 
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-               }
-               else if (true == __is_digit(t[i])) {
+               } else if (true == __is_digit(t[i])) {
 
                        char buf[8] = {0};
                        bool exit_loop = false;
@@ -1654,9 +1614,9 @@ static void __work_component_property_rrule_ver_1(char *value, calendar_record_h
                        switch (freq_mode) {
                        case VCAL_RECURRENCE_MONTHLY_BYDAY:
                        case VCAL_RECURRENCE_WEEKLY:
-                               if (true == has_by) {
+                               if (true == has_by)
                                        week_index = 0;
-                               }
+
                                while (*(t[i] +j)) {
                                        switch (*(t[i] +j)) {
                                        case '+':
@@ -1699,8 +1659,7 @@ static void __work_component_property_rrule_ver_1(char *value, calendar_record_h
                                len_str += snprintf(bystr + len_str, sizeof(bystr) - len_str, "%d,", (atoi(buf) * sign));
                                break;
                        }
-               }
-               else {
+               } else {
                        if (true == has_by) {
                                __set_bystr(freq_mode, record, bystr);
                                week_index = 0;
@@ -1743,8 +1702,7 @@ static void __work_component_property_rrule_ver_1(char *value, calendar_record_h
                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                                        DBG("frequency[%d] interval(%d)", frequency, interval);
                                }
-                       }
-                       else {
+                       } else {
                                if ('0' <= *t[i] && *t[i] <= '9' && strlen("YYYYMMDDTHHMMSS") <= strlen(t[i])) {
                                        DBG("until");
                                        calendar_time_s caltime = {0};
@@ -1754,36 +1712,31 @@ static void __work_component_property_rrule_ver_1(char *value, calendar_record_h
                                        ret = cal_record_set_caltime(record, _calendar_event.until_time, caltime);
                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_caltime() Fail(%d)", ret);
 
-                               }
-                               else if ('#' == *t[i]) {
+                               } else if ('#' == *t[i]) {
                                        /* count */
                                        if (true == __is_digit(t[i] +1)) {
                                                if (0 == atoi(t[i] +1)) {
                                                        DBG("endless");
                                                        ret = cal_record_set_int(record, _calendar_event.range_type, CALENDAR_RANGE_NONE);
                                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-                                               }
-                                               else {
+                                               } else {
                                                        DBG("count (%d)", atoi(t[i] +1));
                                                        ret = cal_record_set_int(record, _calendar_event.range_type, CALENDAR_RANGE_COUNT);
                                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                                                        ret = cal_record_set_int(record, _calendar_event.count, atoi(t[i] +1));
                                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                                                }
-                                       }
-                                       else {
+                                       } else {
                                                ERR("Unable to parse count[%s]", t[i]);
                                        }
-                               }
-                               else {
+                               } else {
                                        DBG("Invalid");
                                }
                        }
                }
        }
-       if (true == has_by) {
+       if (true == has_by)
                __set_bystr(freq_mode, record, bystr);
-       }
 
        g_strfreev(t);
 }
@@ -1826,54 +1779,44 @@ static void __work_component_property_rrule_ver_2(char *value, calendar_record_h
                        ret = cal_record_set_int(record, _calendar_event.freq, frequency);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
 
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "UNTIL=", strlen("UNTIL="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "UNTIL=", strlen("UNTIL="))) {
                        calendar_time_s caltime = {0};
                        _get_caltime(t[i] + strlen("UNTIL="), &caltime, ud);
                        ret = cal_record_set_caltime(record, _calendar_event.until_time, caltime);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_caltime() Fail(%d)", ret);
                        ret = cal_record_set_int(record, _calendar_event.range_type, CALENDAR_RANGE_UNTIL);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "COUNT=", strlen("COUNT="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "COUNT=", strlen("COUNT="))) {
                        int count = atoi(t[i] + strlen("COUNT="));
                        if (count < 1) count = 1;
                        ret = cal_record_set_int(record,  _calendar_event.count, count);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                        ret = cal_record_set_int(record, _calendar_event.range_type, CALENDAR_RANGE_COUNT);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "INTERVAL=", strlen("INTERVAL="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "INTERVAL=", strlen("INTERVAL="))) {
                        int interval = atoi(t[i] + strlen("INTERVAL="));
                        if (interval < 1) interval = 1;
                        ret = cal_record_set_int(record, _calendar_event.interval, interval);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "BYYEARDAY=", strlen("BYYEARDAY="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "BYYEARDAY=", strlen("BYYEARDAY="))) {
                        ret = cal_record_set_str(record, _calendar_event.byyearday, t[i] + strlen("BYYEARDAY="));
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "BYWEEKNO=", strlen("BYWEEKNO="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "BYWEEKNO=", strlen("BYWEEKNO="))) {
                        ret = cal_record_set_str(record, _calendar_event.byweekno, t[i] + strlen("BYWEEKNO="));
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "BYMONTH=", strlen("BYMONTH="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "BYMONTH=", strlen("BYMONTH="))) {
                        ret = cal_record_set_str(record, _calendar_event.bymonth, t[i] + strlen("BYMONTH="));
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "BYMONTHDAY=", strlen("BYMONTHDAY="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "BYMONTHDAY=", strlen("BYMONTHDAY="))) {
                        ret = cal_record_set_str(record, _calendar_event.bymonthday, t[i] + strlen("BYMONTHDAY="));
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "BYDAY=", strlen("BYDAY="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "BYDAY=", strlen("BYDAY="))) {
                        ret = cal_record_set_str(record, _calendar_event.byday, t[i] + strlen("BYDAY="));
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "BYSETPOS=", strlen("BYSETPOS="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "BYSETPOS=", strlen("BYSETPOS="))) {
                        ret = cal_record_set_str(record, _calendar_event.bysetpos, t[i] + strlen("BYSETPOS="));
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "WKST=", strlen("WKST="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "WKST=", strlen("WKST="))) {
                        if (CAL_STRING_EQUAL == strncmp(t[i] + strlen("WKST="), "SU", strlen("SU")))
                                ret = cal_record_set_int(record, _calendar_event.wkst, CALENDAR_SUNDAY);
                        else if (CAL_STRING_EQUAL == strncmp(t[i] + strlen("WKST="), "MO", strlen("MO")))
@@ -1892,8 +1835,7 @@ static void __work_component_property_rrule_ver_2(char *value, calendar_record_h
                                DBG("Unable to parse[%s]", t[i]);
 
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-               }
-               else {
+               } else {
                        DBG("Unable to parse[%s]", t[i]);
                }
        }
@@ -2076,23 +2018,19 @@ static void __work_component_property_attendee_role(calendar_record_h attendee,
                ret = cal_record_set_int(attendee, _calendar_attendee.cutype, CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT);
                if (strlen(value) > strlen("REQ-PARTICIPANT"))
                        prop = "REQ-PARTICIPANT";
-       }
-       else if (CAL_STRING_EQUAL == strncmp(value, "OPT-PARTICIPANT", strlen("OPT-PARTICIPANT"))) {
+       } else if (CAL_STRING_EQUAL == strncmp(value, "OPT-PARTICIPANT", strlen("OPT-PARTICIPANT"))) {
                ret = cal_record_set_int(attendee, _calendar_attendee.cutype, CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT);
                if (strlen(value) > strlen("OPT-PARTICIPANT"))
                        prop = "OPT-PARTICIPANT";
-       }
-       else if (CAL_STRING_EQUAL == strncmp(value, "NON-PARTICIPANT", strlen("NON-PARTICIPANT"))) {
+       } else if (CAL_STRING_EQUAL == strncmp(value, "NON-PARTICIPANT", strlen("NON-PARTICIPANT"))) {
                ret = cal_record_set_int(attendee, _calendar_attendee.cutype, CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT);
                if (strlen(value) > strlen("NON-PARTICIPANT"))
                        prop = "NON-PARTICIPANT";
-       }
-       else if (CAL_STRING_EQUAL == strncmp(value, "CHAIR", strlen("CHAIR"))) {
+       } else if (CAL_STRING_EQUAL == strncmp(value, "CHAIR", strlen("CHAIR"))) {
                ret = cal_record_set_int(attendee, _calendar_attendee.cutype, CALENDAR_ATTENDEE_ROLE_CHAIR);
                if (strlen(value) > strlen("CHAIR"))
                        prop = "CHAIR";
-       }
-       else {
+       } else {
                ERR("Invalid value[%s]", value);
        }
        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
@@ -2310,15 +2248,13 @@ static void _set_alarm_tick_unit(calendar_record_h alarm, calendar_time_s alarm_
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_caltime() Fail(%d)", ret);
                ret = cal_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_SPECIFIC);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-       }
-       else if (0 == diff) {
+       } else if (0 == diff) {
                DBG("set alarm in start time");
                ret = cal_record_set_int(alarm, _calendar_alarm.tick, 0);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                ret = cal_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_HOUR);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-       }
-       else {
+       } else {
                int tick = 0;
                int unit = 0;
                _get_tick_unit(diff, &tick, &unit);
@@ -2392,14 +2328,12 @@ static void __work_component_property_dalarm(char *value, calendar_record_h reco
                        } else {
                                _set_alarm_tick_unit(alarm, alarm_time, -1); /* -1 goes to specific time */
                        }
-               }
-               else if (VCAL_VER_10_DALARM_DISPLAY_STRING == index) { /* displayString */
+               } else if (VCAL_VER_10_DALARM_DISPLAY_STRING == index) { /* displayString */
                        DBG("displayString [%s]", t[i]);
                        ret = cal_record_set_str(alarm, _calendar_alarm.summary, t[i]);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
 
-               }
-               else {
+               } else {
                        /* TYPE, VALUE */
                }
        }
@@ -2488,20 +2422,17 @@ static void __work_component_property_malarm(char *value, calendar_record_h reco
                        } else {
                                _set_alarm_tick_unit(alarm, alarm_time, -1); /* -1 goes to specific time */
                        }
-               }
-               else if (VCAL_VER_10_MALARM_ADDRESS_STRING == index) { /* addressString */
+               } else if (VCAL_VER_10_MALARM_ADDRESS_STRING == index) { /* addressString */
                        DBG("addressString [%s]", t[i]);
                        ret = cal_record_set_str(alarm, _calendar_alarm.attach, t[i]);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
 
-               }
-               else if (VCAL_VER_10_MALARM_NOTE_STRING == index) { /* noteString */
+               } else if (VCAL_VER_10_MALARM_NOTE_STRING == index) { /* noteString */
                        DBG("noteString [%s]", t[i]);
                        ret = cal_record_set_str(alarm, _calendar_alarm.description, t[i]);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
 
-               }
-               else {
+               } else {
                        /* TYPE, VALUE */
                }
        }
@@ -2591,14 +2522,12 @@ static void __work_component_property_aalarm(char *value, calendar_record_h reco
                        } else {
                                _set_alarm_tick_unit(alarm, alarm_time, -1); /* -1 goes to specific time */
                        }
-               }
-               else if (VCAL_VER_10_AALARM_AUDIO_CONTENT == index) {
+               } else if (VCAL_VER_10_AALARM_AUDIO_CONTENT == index) {
                        /* audioContent */
                        DBG("Content [%s]", t[i]);
                        ret = cal_record_set_str(alarm, _calendar_alarm.attach, t[i]);
                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_str() Fail(%d)", ret);
-               }
-               else {
+               } else {
                        /* TYPE, VALUE */
                }
        }
@@ -2777,11 +2706,9 @@ static void __work_component_property_valarm_trigger(char *value, calendar_recor
                                related = VCAL_RELATED_END;
                        else
                                ERR("Invalid related:[%s]", t[i]);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(t[i], "VALUE", strlen("VALUE"))) {
+               } else if (CAL_STRING_EQUAL == strncmp(t[i], "VALUE", strlen("VALUE"))) {
                        /* do nothing */
-               }
-               else {
+               } else {
                        if ('0' <= *t[i] && *t[i] <= '9' && strlen("YYYYDDMM") <= strlen(t[i])) {
                                calendar_time_s caltime = {0};
                                _get_caltime(t[i], &caltime, ud);
@@ -2789,8 +2716,7 @@ static void __work_component_property_valarm_trigger(char *value, calendar_recor
                                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_caltime() Fail(%d)", ret);
                                ret = cal_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_SPECIFIC);
                                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-                       }
-                       else {
+                       } else {
                                int unit = 0;
                                int tick = 0;
                                __decode_duration(t[i], strlen(t[i]), &tick, &unit);
@@ -2826,8 +2752,7 @@ static void __work_component_property_valarm_trigger(char *value, calendar_recor
                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_caltime() Fail(%d)", ret);
                                        ret = cal_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_SPECIFIC);
                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
-                               }
-                               else {
+                               } else {
                                        ret = cal_record_set_int(alarm, _calendar_alarm.tick, (-1 * tick));
                                        WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                                        ret = cal_record_set_int(alarm, _calendar_alarm.tick_unit, unit);
@@ -3481,25 +3406,20 @@ static char* __work_component_vtimezone(char *cursor, calendar_record_h record,
                        cursor = __get_value(p, &value);
                        __adjust_tzid(value);
                        DBG("tzid[%s]", value +1);
-                       if (true == cal_time_is_available_tzid(value +1)) {
+                       if (true == cal_time_is_available_tzid(value +1))
                                ud->timezone_tzid = strdup(value +1);
-                       }
-                       else {
+                       else
                                DBG("Invalid tzid string[%s]", value +1);
-                       }
+
                        free(value);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(cursor, "BEGIN:STANDARD", strlen("BEGIN:STANDARD"))) {
+               } else if (CAL_STRING_EQUAL == strncmp(cursor, "BEGIN:STANDARD", strlen("BEGIN:STANDARD"))) {
                        cursor = __work_component_vtimezone_standard(cursor, record, ud);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(cursor, "BEGIN:DAYLIGHT", strlen("BEGIN:DAYLIGHT"))) {
+               } else if (CAL_STRING_EQUAL == strncmp(cursor, "BEGIN:DAYLIGHT", strlen("BEGIN:DAYLIGHT"))) {
                        cursor = __work_component_vtimezone_daylight(cursor, record, ud);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(cursor, "END", strlen("END"))) {
+               } else if (CAL_STRING_EQUAL == strncmp(cursor, "END", strlen("END"))) {
                        cursor = __crlf(cursor);
                        break;
-               }
-               else {
+               } else {
                        DBG("Unable to parse");
                        __print_cursor(cursor, __LINE__);
                        cursor = __crlf(cursor);
index c0fd64e..723a571 100644 (file)
@@ -25,8 +25,7 @@
 #include "cal_view.h"
 #include "cal_mutex.h"
 
-API const _calendar_book_property_ids   _calendar_book =
-{
+API const _calendar_book_property_ids   _calendar_book = {
        ._uri = CALENDAR_VIEW_CALENDAR,
        .id = CAL_PROPERTY_CALENDAR_ID,
        .uid = CAL_PROPERTY_CALENDAR_UID,
@@ -45,8 +44,7 @@ API const _calendar_book_property_ids   _calendar_book =
        .mode = CAL_PROPERTY_CALENDAR_MODE
 };
 
-API const _calendar_event_property_ids   _calendar_event =
-{
+API const _calendar_event_property_ids   _calendar_event = {
        ._uri = CALENDAR_VIEW_EVENT,
        .id = CAL_PROPERTY_EVENT_ID,
        .calendar_book_id = CAL_PROPERTY_EVENT_CALENDAR_ID,
@@ -107,8 +105,7 @@ API const _calendar_event_property_ids   _calendar_event =
        .is_allday = CAL_PROPERTY_EVENT_IS_ALLDAY
 };
 
-API const _calendar_todo_property_ids   _calendar_todo =
-{
+API const _calendar_todo_property_ids   _calendar_todo = {
        ._uri = CALENDAR_VIEW_TODO,
        .id = CAL_PROPERTY_TODO_ID,
        .calendar_book_id = CAL_PROPERTY_TODO_CALENDAR_ID,
@@ -160,8 +157,7 @@ API const _calendar_todo_property_ids   _calendar_todo =
        .is_allday = CAL_PROPERTY_TODO_IS_ALLDAY
 };
 
-API const _calendar_timezone_property_ids   _calendar_timezone =
-{
+API const _calendar_timezone_property_ids   _calendar_timezone = {
        ._uri = CALENDAR_VIEW_TIMEZONE,
        .id = CAL_PROPERTY_TIMEZONE_ID,
        .calendar_book_id = CAL_PROPERTY_TIMEZONE_CALENDAR_ID,
@@ -180,8 +176,7 @@ API const _calendar_timezone_property_ids   _calendar_timezone =
        .day_light_bias = CAL_PROPERTY_TIMEZONE_DAY_LIGHT_BIAS
 };
 
-API const _calendar_attendee_property_ids   _calendar_attendee =
-{
+API const _calendar_attendee_property_ids   _calendar_attendee = {
        ._uri = CALENDAR_VIEW_ATTENDEE,
        .parent_id = CAL_PROPERTY_ATTENDEE_PARENT_ID,
        .number = CAL_PROPERTY_ATTENDEE_NUMBER,
@@ -199,8 +194,7 @@ API const _calendar_attendee_property_ids   _calendar_attendee =
        .member = CAL_PROPERTY_ATTENDEE_MEMBER
 };
 
-API const _calendar_alarm_property_ids   _calendar_alarm =
-{
+API const _calendar_alarm_property_ids   _calendar_alarm = {
        ._uri = CALENDAR_VIEW_ALARM,
        .parent_id = CAL_PROPERTY_ALARM_PARENT_ID,
        .tick = CAL_PROPERTY_ALARM_TICK,
@@ -212,8 +206,7 @@ API const _calendar_alarm_property_ids   _calendar_alarm =
        .alarm_time = CAL_PROPERTY_ALARM_ALARM,
 };
 
-API const _calendar_updated_info_property_ids   _calendar_updated_info =
-{
+API const _calendar_updated_info_property_ids   _calendar_updated_info = {
        ._uri = CALENDAR_VIEW_UPDATED_INFO,
        .id = CAL_PROPERTY_UPDATED_INFO_ID,
        .calendar_book_id = CAL_PROPERTY_UPDATED_INFO_CALENDAR_ID,
@@ -221,8 +214,7 @@ API const _calendar_updated_info_property_ids   _calendar_updated_info =
        .version = CAL_PROPERTY_UPDATED_INFO_VERSION
 };
 
-API const _calendar_event_calendar_book_property_ids   _calendar_event_calendar_book =
-{
+API const _calendar_event_calendar_book_property_ids   _calendar_event_calendar_book = {
        ._uri = CALENDAR_VIEW_EVENT_CALENDAR,
        .event_id = CAL_PROPERTY_EVENT_ID,
        .calendar_book_id = CAL_PROPERTY_EVENT_CALENDAR_ID,
@@ -280,8 +272,7 @@ API const _calendar_event_calendar_book_property_ids   _calendar_event_calendar_
        .calendar_book_account_id = CAL_PROPERTY_CALENDAR_ACCOUNT_ID | CAL_PROPERTY_FLAGS_FILTER
 };
 
-API const _calendar_todo_calendar_book_property_ids   _calendar_todo_calendar_book =
-{
+API const _calendar_todo_calendar_book_property_ids   _calendar_todo_calendar_book = {
        ._uri = CALENDAR_VIEW_TODO_CALENDAR,
        .todo_id = CAL_PROPERTY_TODO_ID,
        .calendar_book_id = CAL_PROPERTY_TODO_CALENDAR_ID,
@@ -331,8 +322,7 @@ API const _calendar_todo_calendar_book_property_ids   _calendar_todo_calendar_bo
        .calendar_book_account_id = CAL_PROPERTY_CALENDAR_ACCOUNT_ID | CAL_PROPERTY_FLAGS_FILTER
 };
 
-API const _calendar_event_calendar_book_attendee_property_ids   _calendar_event_calendar_book_attendee =
-{
+API const _calendar_event_calendar_book_attendee_property_ids   _calendar_event_calendar_book_attendee = {
        ._uri = CALENDAR_VIEW_EVENT_CALENDAR_ATTENDEE,
        .event_id = CAL_PROPERTY_EVENT_ID,
        .calendar_book_id = CAL_PROPERTY_EVENT_CALENDAR_ID,
@@ -393,8 +383,7 @@ API const _calendar_event_calendar_book_attendee_property_ids   _calendar_event_
        .attendee_member = CAL_PROPERTY_ATTENDEE_MEMBER | CAL_PROPERTY_FLAGS_FILTER
 };
 
-API const _calendar_instance_utime_calendar_book_property_ids   _calendar_instance_utime_calendar_book =
-{
+API const _calendar_instance_utime_calendar_book_property_ids   _calendar_instance_utime_calendar_book = {
        ._uri = CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR,
        .event_id = CAL_PROPERTY_INSTANCE_NORMAL_EVENT_ID,
        .start_time = CAL_PROPERTY_INSTANCE_NORMAL_START,
@@ -418,8 +407,7 @@ API const _calendar_instance_utime_calendar_book_property_ids   _calendar_instan
        .sync_data1 = CAL_PROPERTY_INSTANCE_NORMAL_SYNC_DATA1
 };
 
-API const _calendar_instance_localtime_calendar_book_property_ids   _calendar_instance_localtime_calendar_book =
-{
+API const _calendar_instance_localtime_calendar_book_property_ids   _calendar_instance_localtime_calendar_book = {
        ._uri = CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR,
        .event_id = CAL_PROPERTY_INSTANCE_ALLDAY_EVENT_ID,
        .start_time = CAL_PROPERTY_INSTANCE_ALLDAY_START,
@@ -444,8 +432,7 @@ API const _calendar_instance_localtime_calendar_book_property_ids   _calendar_in
        .is_allday = CAL_PROPERTY_INSTANCE_ALLDAY_IS_ALLDAY
 };
 
-API const _calendar_instance_utime_calendar_book_extended_property_ids   _calendar_instance_utime_calendar_book_extended =
-{
+API const _calendar_instance_utime_calendar_book_extended_property_ids   _calendar_instance_utime_calendar_book_extended = {
        ._uri = CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR_EXTENDED,
        .event_id = CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_EVENT_ID,
        .start_time = CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_START,
@@ -475,8 +462,7 @@ API const _calendar_instance_utime_calendar_book_extended_property_ids   _calend
        .sync_data4 = CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_SYNC_DATA4
 };
 
-API const _calendar_instance_localtime_calendar_book_extended_property_ids   _calendar_instance_localtime_calendar_book_extended =
-{
+API const _calendar_instance_localtime_calendar_book_extended_property_ids   _calendar_instance_localtime_calendar_book_extended = {
        ._uri = CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR_EXTENDED,
        .event_id = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_EVENT_ID,
        .start_time = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_START,
@@ -498,7 +484,7 @@ API const _calendar_instance_localtime_calendar_book_extended_property_ids   _ca
        .calendar_book_account_id = CAL_PROPERTY_CALENDAR_ACCOUNT_ID | CAL_PROPERTY_FLAGS_FILTER,
        .last_modified_time = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_LAST_MODIFIED_TIME,
        .sync_data1 = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_SYNC_DATA1,
-       .organizer_name= CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_ORGANIZER_NAME,
+       .organizer_name = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_ORGANIZER_NAME,
        .categories = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_CATEGORIES,
        .has_attendee = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_HAS_ATTENDEE,
        .sync_data2 = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_SYNC_DATA2,
@@ -507,8 +493,7 @@ API const _calendar_instance_localtime_calendar_book_extended_property_ids   _ca
        .is_allday = CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_IS_ALLDAY
 };
 
-API const _calendar_extended_property_property_ids   _calendar_extended_property =
-{
+API const _calendar_extended_property_property_ids   _calendar_extended_property = {
        ._uri = CALENDAR_VIEW_EXTENDED,
        .id = CAL_PROPERTY_EXTENDED_ID,
        .record_id = CAL_PROPERTY_EXTENDED_RECORD_ID,
@@ -535,8 +520,7 @@ const cal_property_info_s  __property_calendar_book[] = {
        {CAL_PROPERTY_CALENDAR_MODE,                "mode"},
 };
 
-const cal_property_info_s   __property_event[] =
-{
+const cal_property_info_s   __property_event[] = {
        {CAL_PROPERTY_EVENT_ID,                     "id"},
        {CAL_PROPERTY_EVENT_CALENDAR_ID,            "calendar_id"},
        {CAL_PROPERTY_EVENT_SUMMARY,                "summary"},
@@ -596,8 +580,7 @@ const cal_property_info_s   __property_event[] =
        {CAL_PROPERTY_EVENT_IS_ALLDAY,              "is_allday"},
 };
 
-const cal_property_info_s   __property_todo[] =
-{
+const cal_property_info_s   __property_todo[] = {
        {CAL_PROPERTY_TODO_ID,                      "id"},
        {CAL_PROPERTY_TODO_CALENDAR_ID,             "calendar_id"},
        {CAL_PROPERTY_TODO_SUMMARY,                 "summary"},
@@ -648,8 +631,7 @@ const cal_property_info_s   __property_todo[] =
        {CAL_PROPERTY_TODO_IS_ALLDAY,               "dtend_type"},
 };
 
-const cal_property_info_s   __property_timezone[] =
-{
+const cal_property_info_s   __property_timezone[] = {
        {CAL_PROPERTY_TIMEZONE_ID,                                  "id"},
        {CAL_PROPERTY_TIMEZONE_TZ_OFFSET_FROM_GMT,                  "tz_offset_from_gmt"},
        {CAL_PROPERTY_TIMEZONE_STANDARD_NAME,                       "standard_name"},
@@ -667,8 +649,7 @@ const cal_property_info_s   __property_timezone[] =
        {CAL_PROPERTY_TIMEZONE_CALENDAR_ID,                         "calendar_id"},
 };
 
-const cal_property_info_s   __property_attendee[] =
-{
+const cal_property_info_s   __property_attendee[] = {
        {CAL_PROPERTY_ATTENDEE_NUMBER,              "attendee_number"},
        {CAL_PROPERTY_ATTENDEE_CUTYPE,              "attendee_cutype"},
        {CAL_PROPERTY_ATTENDEE_CT_INDEX,            "attendee_ct_index"},
@@ -685,8 +666,7 @@ const cal_property_info_s   __property_attendee[] =
        {CAL_PROPERTY_ATTENDEE_PARENT_ID,           "event_id"},
 };
 
-const cal_property_info_s   __property_alarm[] =
-{
+const cal_property_info_s   __property_alarm[] = {
        {CAL_PROPERTY_ALARM_TICK,               "remind_tick"},
        {CAL_PROPERTY_ALARM_TICK_UNIT,          "remind_tick_unit"},
        {CAL_PROPERTY_ALARM_DESCRIPTION,        "alarm_description"},
@@ -697,16 +677,14 @@ const cal_property_info_s   __property_alarm[] =
        {CAL_PROPERTY_ALARM_ALARM,              "alarm_type,alarm_utime,alarm_datetime"},
 };
 
-const cal_property_info_s   __property_updated_info[] =
-{
+const cal_property_info_s   __property_updated_info[] = {
        {CAL_PROPERTY_UPDATED_INFO_ID,                  "id"},
        {CAL_PROPERTY_UPDATED_INFO_CALENDAR_ID,         "calendar_id"},
        {CAL_PROPERTY_UPDATED_INFO_TYPE,                "type"},
        {CAL_PROPERTY_UPDATED_INFO_VERSION,             "ver"},
 };
 
-const cal_property_info_s   __property_search_event_calendar[] =
-{
+const cal_property_info_s   __property_search_event_calendar[] = {
        {CAL_PROPERTY_EVENT_ID,                     "id"},
        {CAL_PROPERTY_EVENT_CALENDAR_ID,            "calendar_id"},
        {CAL_PROPERTY_EVENT_SUMMARY,                "summary"},
@@ -763,8 +741,7 @@ const cal_property_info_s   __property_search_event_calendar[] =
        {(CAL_PROPERTY_CALENDAR_ACCOUNT_ID|CAL_PROPERTY_FLAGS_FILTER),       "account_id"},
 };
 
-const cal_property_info_s   __property_search_todo_calendar[] =
-{
+const cal_property_info_s   __property_search_todo_calendar[] = {
        {CAL_PROPERTY_TODO_ID,                      "id"},
        {CAL_PROPERTY_TODO_CALENDAR_ID,             "calendar_id"},
        {CAL_PROPERTY_TODO_SUMMARY,                 "summary"},
@@ -813,8 +790,7 @@ const cal_property_info_s   __property_search_todo_calendar[] =
        {(CAL_PROPERTY_CALENDAR_ACCOUNT_ID|CAL_PROPERTY_FLAGS_FILTER),       "account_id"},
 };
 
-const cal_property_info_s   __property_search_event_calendar_attendee[] =
-{
+const cal_property_info_s   __property_search_event_calendar_attendee[] = {
        {CAL_PROPERTY_EVENT_ID,                     "id"},
        {CAL_PROPERTY_EVENT_CALENDAR_ID,            "calendar_id"},
        {CAL_PROPERTY_EVENT_SUMMARY,                "summary"},
@@ -874,8 +850,7 @@ const cal_property_info_s   __property_search_event_calendar_attendee[] =
        {(CAL_PROPERTY_ATTENDEE_MEMBER|CAL_PROPERTY_FLAGS_FILTER),           "attendee_member"},
 };
 
-const cal_property_info_s   __property_search_instance_utime_calendar[] =
-{
+const cal_property_info_s   __property_search_instance_utime_calendar[] = {
        {CAL_PROPERTY_INSTANCE_NORMAL_EVENT_ID,             "event_id"},
        {CAL_PROPERTY_INSTANCE_NORMAL_START,                "dtstart_type,dtstart_utime,dtstart_datetime"},
        {CAL_PROPERTY_INSTANCE_NORMAL_END,                  "dtend_type,dtend_utime,dtend_datetime"},
@@ -898,8 +873,7 @@ const cal_property_info_s   __property_search_instance_utime_calendar[] =
        {CAL_PROPERTY_INSTANCE_NORMAL_SYNC_DATA1,   "sync_data1"},
 };
 
-const cal_property_info_s   __property_search_instance_localtime_calendar[] =
-{
+const cal_property_info_s   __property_search_instance_localtime_calendar[] = {
        {CAL_PROPERTY_INSTANCE_ALLDAY_EVENT_ID,             "event_id"},
        {CAL_PROPERTY_INSTANCE_ALLDAY_START,                "dtstart_type,dtstart_utime,dtstart_datetime"},
        {CAL_PROPERTY_INSTANCE_ALLDAY_END,                  "dtend_type,dtend_utime,dtend_datetime"},
@@ -923,8 +897,7 @@ const cal_property_info_s   __property_search_instance_localtime_calendar[] =
        {CAL_PROPERTY_INSTANCE_ALLDAY_IS_ALLDAY,   "is_allday"},
 };
 
-const cal_property_info_s   __property_search_instance_utime_calendar_extended[] =
-{
+const cal_property_info_s   __property_search_instance_utime_calendar_extended[] = {
        {CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_EVENT_ID,             "event_id"},
        {CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_START,                "dtstart_type,dtstart_utime,dtstart_datetime"},
        {CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_END,                  "dtend_type,dtend_utime,dtend_datetime"},
@@ -954,8 +927,7 @@ const cal_property_info_s   __property_search_instance_utime_calendar_extended[]
 };
 
 
-const cal_property_info_s   __property_search_instance_localtime_calendar_extended[] =
-{
+const cal_property_info_s   __property_search_instance_localtime_calendar_extended[] = {
        {CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_EVENT_ID,             "event_id"},
        {CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_START,                "dtstart_type,dtstart_utime,dtstart_datetime"},
        {CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_END,                  "dtend_type,dtend_utime,dtend_datetime"},
@@ -985,8 +957,7 @@ const cal_property_info_s   __property_search_instance_localtime_calendar_extend
        {CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_IS_ALLDAY,    "is_allday"},
 };
 
-const cal_property_info_s   __property_extended[] =
-{
+const cal_property_info_s   __property_extended[] = {
        {CAL_PROPERTY_EXTENDED_ID,              "id"},
        {CAL_PROPERTY_EXTENDED_RECORD_ID,       "record_id"},
        {CAL_PROPERTY_EXTENDED_RECORD_TYPE,     "record_type"},
@@ -999,7 +970,7 @@ typedef struct {
        cal_record_type_e type;
        cal_property_info_s *properties;
        int property_count;
-}cal_view_uri_info_s;
+} cal_view_uri_info_s;
 
 #define PTR_COUNT(X)    (void*)(X), sizeof(X)/sizeof(cal_property_info_s)
 
@@ -1077,16 +1048,13 @@ cal_record_type_e cal_view_get_type(const char *view_uri)
        cal_view_uri_info_s* view_uri_info = NULL;
        cal_record_type_e type = CAL_RECORD_TYPE_INVALID;
 
-       if (cal_uri_property_hash){
+       if (cal_uri_property_hash) {
                view_uri_info = g_hash_table_lookup(cal_uri_property_hash, view_uri);
-               if (view_uri_info) {
+               if (view_uri_info)
                        type = view_uri_info->type;
-               }
-               else {
+               else
                        ERR("g_hash_table_lookup() Fail");
-               }
-       }
-       else {
+       } else {
                ERR("Unable to get cal_uri_property_hash[%s]", view_uri);
        }
 
@@ -1118,7 +1086,7 @@ const cal_property_info_s* cal_view_get_property_info(const char *view_uri, int
        cal_property_info_s* tmp = NULL;
        cal_view_uri_info_s* view_uri_info = NULL;
 
-       if (cal_uri_property_hash){
+       if (cal_uri_property_hash) {
                view_uri_info = g_hash_table_lookup(cal_uri_property_hash, view_uri);
                if (view_uri_info) {
                        tmp = view_uri_info->properties;
@@ -1133,11 +1101,10 @@ const char* cal_view_get_uri(const char *view_uri)
 {
        cal_view_uri_info_s* view_uri_info = NULL;
 
-       if (cal_uri_property_hash){
+       if (cal_uri_property_hash) {
                view_uri_info = g_hash_table_lookup(cal_uri_property_hash, view_uri);
-               if (view_uri_info) {
+               if (view_uri_info)
                        return view_uri_info->view_uri;
-               }
        }
 
        return NULL;
diff --git a/common/dbus/cal_dbus.c b/common/dbus/cal_dbus.c
deleted file mode 100644 (file)
index b6f0449..0000000
+++ /dev/null
@@ -1,6584 +0,0 @@
-/*
- * Generated by gdbus-codegen 2.40.2. DO NOT EDIT.
- *
- * The license of this code is the same as for the source it was derived from.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
-#include "cal_dbus.h"
-
-#include <string.h>
-#ifdef G_OS_UNIX
-#  include <gio/gunixfdlist.h>
-#endif
-
-typedef struct
-{
-  GDBusArgInfo parent_struct;
-  gboolean use_gvariant;
-} _ExtendedGDBusArgInfo;
-
-typedef struct
-{
-  GDBusMethodInfo parent_struct;
-  const gchar *signal_name;
-  gboolean pass_fdlist;
-} _ExtendedGDBusMethodInfo;
-
-typedef struct
-{
-  GDBusSignalInfo parent_struct;
-  const gchar *signal_name;
-} _ExtendedGDBusSignalInfo;
-
-typedef struct
-{
-  GDBusPropertyInfo parent_struct;
-  const gchar *hyphen_name;
-  gboolean use_gvariant;
-} _ExtendedGDBusPropertyInfo;
-
-typedef struct
-{
-  GDBusInterfaceInfo parent_struct;
-  const gchar *hyphen_name;
-} _ExtendedGDBusInterfaceInfo;
-
-typedef struct
-{
-  const _ExtendedGDBusPropertyInfo *info;
-  guint prop_id;
-  GValue orig_value; /* the value before the change */
-} ChangedProperty;
-
-static void
-_changed_property_free (ChangedProperty *data)
-{
-  g_value_unset (&data->orig_value);
-  g_free (data);
-}
-
-static gboolean
-_g_strv_equal0 (gchar **a, gchar **b)
-{
-  gboolean ret = FALSE;
-  guint n;
-  if (a == NULL && b == NULL)
-    {
-      ret = TRUE;
-      goto out;
-    }
-  if (a == NULL || b == NULL)
-    goto out;
-  if (g_strv_length (a) != g_strv_length (b))
-    goto out;
-  for (n = 0; a[n] != NULL; n++)
-    if (g_strcmp0 (a[n], b[n]) != 0)
-      goto out;
-  ret = TRUE;
-out:
-  return ret;
-}
-
-static gboolean
-_g_variant_equal0 (GVariant *a, GVariant *b)
-{
-  gboolean ret = FALSE;
-  if (a == NULL && b == NULL)
-    {
-      ret = TRUE;
-      goto out;
-    }
-  if (a == NULL || b == NULL)
-    goto out;
-  ret = g_variant_equal (a, b);
-out:
-  return ret;
-}
-
-G_GNUC_UNUSED static gboolean
-_g_value_equal (const GValue *a, const GValue *b)
-{
-  gboolean ret = FALSE;
-  g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
-  switch (G_VALUE_TYPE (a))
-    {
-      case G_TYPE_BOOLEAN:
-        ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
-        break;
-      case G_TYPE_UCHAR:
-        ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
-        break;
-      case G_TYPE_INT:
-        ret = (g_value_get_int (a) == g_value_get_int (b));
-        break;
-      case G_TYPE_UINT:
-        ret = (g_value_get_uint (a) == g_value_get_uint (b));
-        break;
-      case G_TYPE_INT64:
-        ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
-        break;
-      case G_TYPE_UINT64:
-        ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
-        break;
-      case G_TYPE_DOUBLE:
-        {
-          /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
-          gdouble da = g_value_get_double (a);
-          gdouble db = g_value_get_double (b);
-          ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
-        }
-        break;
-      case G_TYPE_STRING:
-        ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
-        break;
-      case G_TYPE_VARIANT:
-        ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
-        break;
-      default:
-        if (G_VALUE_TYPE (a) == G_TYPE_STRV)
-          ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
-        else
-          g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
-        break;
-    }
-  return ret;
-}
-
-/* ------------------------------------------------------------------------
- * Code for interface org.tizen.calendar_service.dbus
- * ------------------------------------------------------------------------
- */
-
-/**
- * SECTION:calDbus
- * @title: calDbus
- * @short_description: Generated C code for the org.tizen.calendar_service.dbus D-Bus interface
- *
- * This section contains code for working with the <link linkend="gdbus-interface-org-tizen-calendar_service-dbus.top_of_page">org.tizen.calendar_service.dbus</link> D-Bus interface in C.
- */
-
-/* ---- Introspection data for org.tizen.calendar_service.dbus ---- */
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_register_resource_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_register_resource_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_register_resource_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_register_resource =
-{
-  {
-    -1,
-    (gchar *) "register_resource",
-    NULL,
-    (GDBusArgInfo **) &_cal_dbus_method_info_register_resource_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-register-resource",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_unregister_resource_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_unregister_resource_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_unregister_resource_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_unregister_resource =
-{
-  {
-    -1,
-    (gchar *) "unregister_resource",
-    NULL,
-    (GDBusArgInfo **) &_cal_dbus_method_info_unregister_resource_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-unregister-resource",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_record_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_record_IN_ARG_record =
-{
-  {
-    -1,
-    (gchar *) "record",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_insert_record_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_insert_record_IN_ARG_handle,
-  &_cal_dbus_method_info_insert_record_IN_ARG_record,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_record_OUT_ARG_id =
-{
-  {
-    -1,
-    (gchar *) "id",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_record_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_record_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_insert_record_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_insert_record_OUT_ARG_id,
-  &_cal_dbus_method_info_insert_record_OUT_ARG_version,
-  &_cal_dbus_method_info_insert_record_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_insert_record =
-{
-  {
-    -1,
-    (gchar *) "insert_record",
-    (GDBusArgInfo **) &_cal_dbus_method_info_insert_record_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_insert_record_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-insert-record",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_record_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_record_IN_ARG_record =
-{
-  {
-    -1,
-    (gchar *) "record",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_update_record_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_update_record_IN_ARG_handle,
-  &_cal_dbus_method_info_update_record_IN_ARG_record,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_record_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_record_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_update_record_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_update_record_OUT_ARG_version,
-  &_cal_dbus_method_info_update_record_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_update_record =
-{
-  {
-    -1,
-    (gchar *) "update_record",
-    (GDBusArgInfo **) &_cal_dbus_method_info_update_record_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_update_record_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-update-record",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_record_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_record_IN_ARG_view_uri =
-{
-  {
-    -1,
-    (gchar *) "view_uri",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_record_IN_ARG_id =
-{
-  {
-    -1,
-    (gchar *) "id",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_delete_record_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_delete_record_IN_ARG_handle,
-  &_cal_dbus_method_info_delete_record_IN_ARG_view_uri,
-  &_cal_dbus_method_info_delete_record_IN_ARG_id,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_record_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_record_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_delete_record_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_delete_record_OUT_ARG_version,
-  &_cal_dbus_method_info_delete_record_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_delete_record =
-{
-  {
-    -1,
-    (gchar *) "delete_record",
-    (GDBusArgInfo **) &_cal_dbus_method_info_delete_record_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_delete_record_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-delete-record",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_record_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_record_IN_ARG_record =
-{
-  {
-    -1,
-    (gchar *) "record",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_record_IN_ARG_id =
-{
-  {
-    -1,
-    (gchar *) "id",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_replace_record_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_replace_record_IN_ARG_handle,
-  &_cal_dbus_method_info_replace_record_IN_ARG_record,
-  &_cal_dbus_method_info_replace_record_IN_ARG_id,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_record_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_record_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_replace_record_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_replace_record_OUT_ARG_version,
-  &_cal_dbus_method_info_replace_record_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_replace_record =
-{
-  {
-    -1,
-    (gchar *) "replace_record",
-    (GDBusArgInfo **) &_cal_dbus_method_info_replace_record_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_replace_record_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-replace-record",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_records_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_records_IN_ARG_list =
-{
-  {
-    -1,
-    (gchar *) "list",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_insert_records_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_insert_records_IN_ARG_handle,
-  &_cal_dbus_method_info_insert_records_IN_ARG_list,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_records_OUT_ARG_ids =
-{
-  {
-    -1,
-    (gchar *) "ids",
-    (gchar *) "ai",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_records_OUT_ARG_count =
-{
-  {
-    -1,
-    (gchar *) "count",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_records_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_records_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_insert_records_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_insert_records_OUT_ARG_ids,
-  &_cal_dbus_method_info_insert_records_OUT_ARG_count,
-  &_cal_dbus_method_info_insert_records_OUT_ARG_version,
-  &_cal_dbus_method_info_insert_records_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_insert_records =
-{
-  {
-    -1,
-    (gchar *) "insert_records",
-    (GDBusArgInfo **) &_cal_dbus_method_info_insert_records_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_insert_records_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-insert-records",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_records_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_records_IN_ARG_list =
-{
-  {
-    -1,
-    (gchar *) "list",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_update_records_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_update_records_IN_ARG_handle,
-  &_cal_dbus_method_info_update_records_IN_ARG_list,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_records_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_update_records_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_update_records_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_update_records_OUT_ARG_version,
-  &_cal_dbus_method_info_update_records_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_update_records =
-{
-  {
-    -1,
-    (gchar *) "update_records",
-    (GDBusArgInfo **) &_cal_dbus_method_info_update_records_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_update_records_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-update-records",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_records_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_records_IN_ARG_view_uri =
-{
-  {
-    -1,
-    (gchar *) "view_uri",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_records_IN_ARG_ids =
-{
-  {
-    -1,
-    (gchar *) "ids",
-    (gchar *) "ai",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_records_IN_ARG_count =
-{
-  {
-    -1,
-    (gchar *) "count",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_delete_records_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_delete_records_IN_ARG_handle,
-  &_cal_dbus_method_info_delete_records_IN_ARG_view_uri,
-  &_cal_dbus_method_info_delete_records_IN_ARG_ids,
-  &_cal_dbus_method_info_delete_records_IN_ARG_count,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_records_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_delete_records_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_delete_records_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_delete_records_OUT_ARG_version,
-  &_cal_dbus_method_info_delete_records_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_delete_records =
-{
-  {
-    -1,
-    (gchar *) "delete_records",
-    (GDBusArgInfo **) &_cal_dbus_method_info_delete_records_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_delete_records_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-delete-records",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_records_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_records_IN_ARG_list =
-{
-  {
-    -1,
-    (gchar *) "list",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_records_IN_ARG_ids =
-{
-  {
-    -1,
-    (gchar *) "ids",
-    (gchar *) "ai",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_records_IN_ARG_count =
-{
-  {
-    -1,
-    (gchar *) "count",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_replace_records_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_replace_records_IN_ARG_handle,
-  &_cal_dbus_method_info_replace_records_IN_ARG_list,
-  &_cal_dbus_method_info_replace_records_IN_ARG_ids,
-  &_cal_dbus_method_info_replace_records_IN_ARG_count,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_records_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_records_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_replace_records_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_replace_records_OUT_ARG_version,
-  &_cal_dbus_method_info_replace_records_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_replace_records =
-{
-  {
-    -1,
-    (gchar *) "replace_records",
-    (GDBusArgInfo **) &_cal_dbus_method_info_replace_records_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_replace_records_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-replace-records",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_record_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_record_IN_ARG_view_uri =
-{
-  {
-    -1,
-    (gchar *) "view_uri",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_record_IN_ARG_id =
-{
-  {
-    -1,
-    (gchar *) "id",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_record_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_record_IN_ARG_handle,
-  &_cal_dbus_method_info_get_record_IN_ARG_view_uri,
-  &_cal_dbus_method_info_get_record_IN_ARG_id,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_record_OUT_ARG_record =
-{
-  {
-    -1,
-    (gchar *) "record",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_record_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_record_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_record_OUT_ARG_record,
-  &_cal_dbus_method_info_get_record_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_record =
-{
-  {
-    -1,
-    (gchar *) "get_record",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_record_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_record_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-record",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_all_records_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_all_records_IN_ARG_view_uri =
-{
-  {
-    -1,
-    (gchar *) "view_uri",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_all_records_IN_ARG_offset =
-{
-  {
-    -1,
-    (gchar *) "offset",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_all_records_IN_ARG_limit =
-{
-  {
-    -1,
-    (gchar *) "limit",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_all_records_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_all_records_IN_ARG_handle,
-  &_cal_dbus_method_info_get_all_records_IN_ARG_view_uri,
-  &_cal_dbus_method_info_get_all_records_IN_ARG_offset,
-  &_cal_dbus_method_info_get_all_records_IN_ARG_limit,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_all_records_OUT_ARG_list =
-{
-  {
-    -1,
-    (gchar *) "list",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_all_records_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_all_records_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_all_records_OUT_ARG_list,
-  &_cal_dbus_method_info_get_all_records_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_all_records =
-{
-  {
-    -1,
-    (gchar *) "get_all_records",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_all_records_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_all_records_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-all-records",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_records_with_query_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_records_with_query_IN_ARG_query =
-{
-  {
-    -1,
-    (gchar *) "query",
-    (gchar *) "(siviviii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_records_with_query_IN_ARG_offset =
-{
-  {
-    -1,
-    (gchar *) "offset",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_records_with_query_IN_ARG_limit =
-{
-  {
-    -1,
-    (gchar *) "limit",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_records_with_query_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_records_with_query_IN_ARG_handle,
-  &_cal_dbus_method_info_get_records_with_query_IN_ARG_query,
-  &_cal_dbus_method_info_get_records_with_query_IN_ARG_offset,
-  &_cal_dbus_method_info_get_records_with_query_IN_ARG_limit,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_records_with_query_OUT_ARG_list =
-{
-  {
-    -1,
-    (gchar *) "list",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_records_with_query_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_records_with_query_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_records_with_query_OUT_ARG_list,
-  &_cal_dbus_method_info_get_records_with_query_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_records_with_query =
-{
-  {
-    -1,
-    (gchar *) "get_records_with_query",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_records_with_query_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_records_with_query_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-records-with-query",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_IN_ARG_view_uri =
-{
-  {
-    -1,
-    (gchar *) "view_uri",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_count_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_count_IN_ARG_handle,
-  &_cal_dbus_method_info_get_count_IN_ARG_view_uri,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_OUT_ARG_count =
-{
-  {
-    -1,
-    (gchar *) "count",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_count_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_count_OUT_ARG_ret,
-  &_cal_dbus_method_info_get_count_OUT_ARG_count,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_count =
-{
-  {
-    -1,
-    (gchar *) "get_count",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_count_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_count_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-count",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_with_query_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_with_query_IN_ARG_query =
-{
-  {
-    -1,
-    (gchar *) "query",
-    (gchar *) "(siviviii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_count_with_query_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_count_with_query_IN_ARG_handle,
-  &_cal_dbus_method_info_get_count_with_query_IN_ARG_query,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_with_query_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_count_with_query_OUT_ARG_count =
-{
-  {
-    -1,
-    (gchar *) "count",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_count_with_query_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_count_with_query_OUT_ARG_ret,
-  &_cal_dbus_method_info_get_count_with_query_OUT_ARG_count,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_count_with_query =
-{
-  {
-    -1,
-    (gchar *) "get_count_with_query",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_count_with_query_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_count_with_query_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-count-with-query",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_current_version_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_current_version_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_current_version_IN_ARG_handle,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_current_version_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_current_version_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_current_version_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_current_version_OUT_ARG_version,
-  &_cal_dbus_method_info_get_current_version_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_current_version =
-{
-  {
-    -1,
-    (gchar *) "get_current_version",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_current_version_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_current_version_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-current-version",
-  FALSE
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_add_changed_cb =
-{
-  {
-    -1,
-    (gchar *) "add_changed_cb",
-    NULL,
-    NULL,
-    NULL
-  },
-  "handle-add-changed-cb",
-  FALSE
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_remove_changed_cb =
-{
-  {
-    -1,
-    (gchar *) "remove_changed_cb",
-    NULL,
-    NULL,
-    NULL
-  },
-  "handle-remove-changed-cb",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_by_version_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_by_version_IN_ARG_view_uri =
-{
-  {
-    -1,
-    (gchar *) "view_uri",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_by_version_IN_ARG_book_id =
-{
-  {
-    -1,
-    (gchar *) "book_id",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_by_version_IN_ARG_db_version =
-{
-  {
-    -1,
-    (gchar *) "db_version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_changes_by_version_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_changes_by_version_IN_ARG_handle,
-  &_cal_dbus_method_info_get_changes_by_version_IN_ARG_view_uri,
-  &_cal_dbus_method_info_get_changes_by_version_IN_ARG_book_id,
-  &_cal_dbus_method_info_get_changes_by_version_IN_ARG_db_version,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_by_version_OUT_ARG_list =
-{
-  {
-    -1,
-    (gchar *) "list",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_by_version_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_by_version_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_changes_by_version_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_changes_by_version_OUT_ARG_list,
-  &_cal_dbus_method_info_get_changes_by_version_OUT_ARG_version,
-  &_cal_dbus_method_info_get_changes_by_version_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_changes_by_version =
-{
-  {
-    -1,
-    (gchar *) "get_changes_by_version",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_changes_by_version_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_changes_by_version_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-changes-by-version",
-  FALSE
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_last_change_version =
-{
-  {
-    -1,
-    (gchar *) "get_last_change_version",
-    NULL,
-    NULL,
-    NULL
-  },
-  "handle-get-last-change-version",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_view_uri =
-{
-  {
-    -1,
-    (gchar *) "view_uri",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_parent_id =
-{
-  {
-    -1,
-    (gchar *) "parent_id",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_db_version =
-{
-  {
-    -1,
-    (gchar *) "db_version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_handle,
-  &_cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_view_uri,
-  &_cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_parent_id,
-  &_cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_db_version,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_exception_by_version_OUT_ARG_list =
-{
-  {
-    -1,
-    (gchar *) "list",
-    (gchar *) "(iv)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_get_changes_exception_by_version_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_get_changes_exception_by_version_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_get_changes_exception_by_version_OUT_ARG_list,
-  &_cal_dbus_method_info_get_changes_exception_by_version_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_get_changes_exception_by_version =
-{
-  {
-    -1,
-    (gchar *) "get_changes_exception_by_version",
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_changes_exception_by_version_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_get_changes_exception_by_version_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-get-changes-exception-by-version",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_clean_after_sync_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_clean_after_sync_IN_ARG_book_id =
-{
-  {
-    -1,
-    (gchar *) "book_id",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_clean_after_sync_IN_ARG_db_version =
-{
-  {
-    -1,
-    (gchar *) "db_version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_clean_after_sync_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_clean_after_sync_IN_ARG_handle,
-  &_cal_dbus_method_info_clean_after_sync_IN_ARG_book_id,
-  &_cal_dbus_method_info_clean_after_sync_IN_ARG_db_version,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_clean_after_sync_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_clean_after_sync_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_clean_after_sync_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_clean_after_sync =
-{
-  {
-    -1,
-    (gchar *) "clean_after_sync",
-    (GDBusArgInfo **) &_cal_dbus_method_info_clean_after_sync_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_clean_after_sync_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-clean-after-sync",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_vcalendars_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_vcalendars_IN_ARG_stream =
-{
-  {
-    -1,
-    (gchar *) "stream",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_insert_vcalendars_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_insert_vcalendars_IN_ARG_handle,
-  &_cal_dbus_method_info_insert_vcalendars_IN_ARG_stream,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_vcalendars_OUT_ARG_ids =
-{
-  {
-    -1,
-    (gchar *) "ids",
-    (gchar *) "ai",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_vcalendars_OUT_ARG_count =
-{
-  {
-    -1,
-    (gchar *) "count",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_vcalendars_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_insert_vcalendars_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_insert_vcalendars_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_insert_vcalendars_OUT_ARG_ids,
-  &_cal_dbus_method_info_insert_vcalendars_OUT_ARG_count,
-  &_cal_dbus_method_info_insert_vcalendars_OUT_ARG_version,
-  &_cal_dbus_method_info_insert_vcalendars_OUT_ARG_ret,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_insert_vcalendars =
-{
-  {
-    -1,
-    (gchar *) "insert_vcalendars",
-    (GDBusArgInfo **) &_cal_dbus_method_info_insert_vcalendars_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_insert_vcalendars_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-insert-vcalendars",
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_vcalendars_IN_ARG_handle =
-{
-  {
-    -1,
-    (gchar *) "handle",
-    (gchar *) "(ii)",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_vcalendars_IN_ARG_stream =
-{
-  {
-    -1,
-    (gchar *) "stream",
-    (gchar *) "s",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_vcalendars_IN_ARG_ids =
-{
-  {
-    -1,
-    (gchar *) "ids",
-    (gchar *) "ai",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_vcalendars_IN_ARG_count =
-{
-  {
-    -1,
-    (gchar *) "count",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_replace_vcalendars_IN_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_replace_vcalendars_IN_ARG_handle,
-  &_cal_dbus_method_info_replace_vcalendars_IN_ARG_stream,
-  &_cal_dbus_method_info_replace_vcalendars_IN_ARG_ids,
-  &_cal_dbus_method_info_replace_vcalendars_IN_ARG_count,
-  NULL
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_vcalendars_OUT_ARG_ret =
-{
-  {
-    -1,
-    (gchar *) "ret",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo _cal_dbus_method_info_replace_vcalendars_OUT_ARG_version =
-{
-  {
-    -1,
-    (gchar *) "version",
-    (gchar *) "i",
-    NULL
-  },
-  FALSE
-};
-
-static const _ExtendedGDBusArgInfo * const _cal_dbus_method_info_replace_vcalendars_OUT_ARG_pointers[] =
-{
-  &_cal_dbus_method_info_replace_vcalendars_OUT_ARG_ret,
-  &_cal_dbus_method_info_replace_vcalendars_OUT_ARG_version,
-  NULL
-};
-
-static const _ExtendedGDBusMethodInfo _cal_dbus_method_info_replace_vcalendars =
-{
-  {
-    -1,
-    (gchar *) "replace_vcalendars",
-    (GDBusArgInfo **) &_cal_dbus_method_info_replace_vcalendars_IN_ARG_pointers,
-    (GDBusArgInfo **) &_cal_dbus_method_info_replace_vcalendars_OUT_ARG_pointers,
-    NULL
-  },
-  "handle-replace-vcalendars",
-  FALSE
-};
-
-static const _ExtendedGDBusMethodInfo * const _cal_dbus_method_info_pointers[] =
-{
-  &_cal_dbus_method_info_register_resource,
-  &_cal_dbus_method_info_unregister_resource,
-  &_cal_dbus_method_info_insert_record,
-  &_cal_dbus_method_info_update_record,
-  &_cal_dbus_method_info_delete_record,
-  &_cal_dbus_method_info_replace_record,
-  &_cal_dbus_method_info_insert_records,
-  &_cal_dbus_method_info_update_records,
-  &_cal_dbus_method_info_delete_records,
-  &_cal_dbus_method_info_replace_records,
-  &_cal_dbus_method_info_get_record,
-  &_cal_dbus_method_info_get_all_records,
-  &_cal_dbus_method_info_get_records_with_query,
-  &_cal_dbus_method_info_get_count,
-  &_cal_dbus_method_info_get_count_with_query,
-  &_cal_dbus_method_info_get_current_version,
-  &_cal_dbus_method_info_add_changed_cb,
-  &_cal_dbus_method_info_remove_changed_cb,
-  &_cal_dbus_method_info_get_changes_by_version,
-  &_cal_dbus_method_info_get_last_change_version,
-  &_cal_dbus_method_info_get_changes_exception_by_version,
-  &_cal_dbus_method_info_clean_after_sync,
-  &_cal_dbus_method_info_insert_vcalendars,
-  &_cal_dbus_method_info_replace_vcalendars,
-  NULL
-};
-
-static const _ExtendedGDBusInterfaceInfo _cal_dbus_interface_info =
-{
-  {
-    -1,
-    (gchar *) "org.tizen.calendar_service.dbus",
-    (GDBusMethodInfo **) &_cal_dbus_method_info_pointers,
-    NULL,
-    NULL,
-    NULL
-  },
-  "dbus",
-};
-
-
-/**
- * cal_dbus_interface_info:
- *
- * Gets a machine-readable description of the <link linkend="gdbus-interface-org-tizen-calendar_service-dbus.top_of_page">org.tizen.calendar_service.dbus</link> D-Bus interface.
- *
- * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
- */
-GDBusInterfaceInfo *
-cal_dbus_interface_info (void)
-{
-  return (GDBusInterfaceInfo *) &_cal_dbus_interface_info.parent_struct;
-}
-
-/**
- * cal_dbus_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
- * @property_id_begin: The property id to assign to the first overridden property.
- *
- * Overrides all #GObject properties in the #calDbus interface for a concrete class.
- * The properties are overridden in the order they are defined.
- *
- * Returns: The last property id.
- */
-guint
-cal_dbus_override_properties (GObjectClass *klass, guint property_id_begin)
-{
-  return property_id_begin - 1;
-}
-
-
-
-/**
- * calDbus:
- *
- * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-tizen-calendar_service-dbus.top_of_page">org.tizen.calendar_service.dbus</link>.
- */
-
-/**
- * calDbusIface:
- * @parent_iface: The parent interface.
- * @handle_add_changed_cb: Handler for the #calDbus::handle-add-changed-cb signal.
- * @handle_clean_after_sync: Handler for the #calDbus::handle-clean-after-sync signal.
- * @handle_delete_record: Handler for the #calDbus::handle-delete-record signal.
- * @handle_delete_records: Handler for the #calDbus::handle-delete-records signal.
- * @handle_get_all_records: Handler for the #calDbus::handle-get-all-records signal.
- * @handle_get_changes_by_version: Handler for the #calDbus::handle-get-changes-by-version signal.
- * @handle_get_changes_exception_by_version: Handler for the #calDbus::handle-get-changes-exception-by-version signal.
- * @handle_get_count: Handler for the #calDbus::handle-get-count signal.
- * @handle_get_count_with_query: Handler for the #calDbus::handle-get-count-with-query signal.
- * @handle_get_current_version: Handler for the #calDbus::handle-get-current-version signal.
- * @handle_get_last_change_version: Handler for the #calDbus::handle-get-last-change-version signal.
- * @handle_get_record: Handler for the #calDbus::handle-get-record signal.
- * @handle_get_records_with_query: Handler for the #calDbus::handle-get-records-with-query signal.
- * @handle_insert_record: Handler for the #calDbus::handle-insert-record signal.
- * @handle_insert_records: Handler for the #calDbus::handle-insert-records signal.
- * @handle_insert_vcalendars: Handler for the #calDbus::handle-insert-vcalendars signal.
- * @handle_register_resource: Handler for the #calDbus::handle-register-resource signal.
- * @handle_remove_changed_cb: Handler for the #calDbus::handle-remove-changed-cb signal.
- * @handle_replace_record: Handler for the #calDbus::handle-replace-record signal.
- * @handle_replace_records: Handler for the #calDbus::handle-replace-records signal.
- * @handle_replace_vcalendars: Handler for the #calDbus::handle-replace-vcalendars signal.
- * @handle_unregister_resource: Handler for the #calDbus::handle-unregister-resource signal.
- * @handle_update_record: Handler for the #calDbus::handle-update-record signal.
- * @handle_update_records: Handler for the #calDbus::handle-update-records signal.
- *
- * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-tizen-calendar_service-dbus.top_of_page">org.tizen.calendar_service.dbus</link>.
- */
-
-typedef calDbusIface calDbusInterface;
-G_DEFINE_INTERFACE (calDbus, cal_dbus, G_TYPE_OBJECT);
-
-static void
-cal_dbus_default_init (calDbusIface *iface)
-{
-  /* GObject signals for incoming D-Bus method calls: */
-  /**
-   * calDbus::handle-register-resource:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.register_resource">register_resource()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_register_resource() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-register-resource",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_register_resource),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    1,
-    G_TYPE_DBUS_METHOD_INVOCATION);
-
-  /**
-   * calDbus::handle-unregister-resource:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.unregister_resource">unregister_resource()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_unregister_resource() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-unregister-resource",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_unregister_resource),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    1,
-    G_TYPE_DBUS_METHOD_INVOCATION);
-
-  /**
-   * calDbus::handle-insert-record:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_record: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_record">insert_record()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_insert_record() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-insert-record",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_insert_record),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
-
-  /**
-   * calDbus::handle-update-record:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_record: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_record">update_record()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_update_record() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-update-record",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_update_record),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
-
-  /**
-   * calDbus::handle-delete-record:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_view_uri: Argument passed by remote caller.
-   * @arg_id: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_record">delete_record()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_delete_record() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-delete-record",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_delete_record),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    4,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-replace-record:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_record: Argument passed by remote caller.
-   * @arg_id: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_record">replace_record()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_replace_record() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-replace-record",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_replace_record),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    4,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-insert-records:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_list: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_records">insert_records()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_insert_records() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-insert-records",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_insert_records),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
-
-  /**
-   * calDbus::handle-update-records:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_list: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_records">update_records()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_update_records() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-update-records",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_update_records),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
-
-  /**
-   * calDbus::handle-delete-records:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_view_uri: Argument passed by remote caller.
-   * @arg_ids: Argument passed by remote caller.
-   * @arg_count: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_records">delete_records()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_delete_records() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-delete-records",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_delete_records),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    5,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-replace-records:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_list: Argument passed by remote caller.
-   * @arg_ids: Argument passed by remote caller.
-   * @arg_count: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_records">replace_records()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_replace_records() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-replace-records",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_replace_records),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    5,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-get-record:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_view_uri: Argument passed by remote caller.
-   * @arg_id: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_record">get_record()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_record() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-record",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_record),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    4,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-get-all-records:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_view_uri: Argument passed by remote caller.
-   * @arg_offset: Argument passed by remote caller.
-   * @arg_limit: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_all_records">get_all_records()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_all_records() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-all-records",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_all_records),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    5,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-get-records-with-query:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_query: Argument passed by remote caller.
-   * @arg_offset: Argument passed by remote caller.
-   * @arg_limit: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_records_with_query">get_records_with_query()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_records_with_query() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-records-with-query",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_records_with_query),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    5,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_INT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-get-count:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_view_uri: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count">get_count()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_count() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-count",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_count),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING);
-
-  /**
-   * calDbus::handle-get-count-with-query:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_query: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count_with_query">get_count_with_query()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_count_with_query() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-count-with-query",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_count_with_query),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
-
-  /**
-   * calDbus::handle-get-current-version:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_current_version">get_current_version()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_current_version() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-current-version",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_current_version),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    2,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
-
-  /**
-   * calDbus::handle-add-changed-cb:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.add_changed_cb">add_changed_cb()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_add_changed_cb() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-add-changed-cb",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_add_changed_cb),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    1,
-    G_TYPE_DBUS_METHOD_INVOCATION);
-
-  /**
-   * calDbus::handle-remove-changed-cb:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.remove_changed_cb">remove_changed_cb()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_remove_changed_cb() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-remove-changed-cb",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_remove_changed_cb),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    1,
-    G_TYPE_DBUS_METHOD_INVOCATION);
-
-  /**
-   * calDbus::handle-get-changes-by-version:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_view_uri: Argument passed by remote caller.
-   * @arg_book_id: Argument passed by remote caller.
-   * @arg_db_version: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_by_version">get_changes_by_version()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_changes_by_version() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-changes-by-version",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_changes_by_version),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    5,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-get-last-change-version:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_last_change_version">get_last_change_version()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_last_change_version() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-last-change-version",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_last_change_version),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    1,
-    G_TYPE_DBUS_METHOD_INVOCATION);
-
-  /**
-   * calDbus::handle-get-changes-exception-by-version:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_view_uri: Argument passed by remote caller.
-   * @arg_parent_id: Argument passed by remote caller.
-   * @arg_db_version: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_exception_by_version">get_changes_exception_by_version()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_get_changes_exception_by_version() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-get-changes-exception-by-version",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_get_changes_exception_by_version),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    5,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-clean-after-sync:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_book_id: Argument passed by remote caller.
-   * @arg_db_version: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.clean_after_sync">clean_after_sync()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_clean_after_sync() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-clean-after-sync",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_clean_after_sync),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    4,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_INT, G_TYPE_INT);
-
-  /**
-   * calDbus::handle-insert-vcalendars:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_stream: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_vcalendars">insert_vcalendars()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_insert_vcalendars() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-insert-vcalendars",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_insert_vcalendars),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING);
-
-  /**
-   * calDbus::handle-replace-vcalendars:
-   * @object: A #calDbus.
-   * @invocation: A #GDBusMethodInvocation.
-   * @arg_handle: Argument passed by remote caller.
-   * @arg_stream: Argument passed by remote caller.
-   * @arg_ids: Argument passed by remote caller.
-   * @arg_count: Argument passed by remote caller.
-   *
-   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_vcalendars">replace_vcalendars()</link> D-Bus method.
-   *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cal_dbus_complete_replace_vcalendars() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
-   *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
-   */
-  g_signal_new ("handle-replace-vcalendars",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (calDbusIface, handle_replace_vcalendars),
-    g_signal_accumulator_true_handled,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_BOOLEAN,
-    5,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_INT);
-
-}
-
-/**
- * cal_dbus_call_register_resource:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.register_resource">register_resource()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_register_resource_finish() to get the result of the operation.
- *
- * See cal_dbus_call_register_resource_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_register_resource (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "register_resource",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_register_resource_finish:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_register_resource().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_register_resource().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_register_resource_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(i)",
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_register_resource_sync:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.register_resource">register_resource()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_register_resource() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_register_resource_sync (
-    calDbus *proxy,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "register_resource",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(i)",
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_unregister_resource:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.unregister_resource">unregister_resource()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_unregister_resource_finish() to get the result of the operation.
- *
- * See cal_dbus_call_unregister_resource_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_unregister_resource (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "unregister_resource",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_unregister_resource_finish:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_unregister_resource().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_unregister_resource().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_unregister_resource_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(i)",
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_unregister_resource_sync:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.unregister_resource">unregister_resource()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_unregister_resource() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_unregister_resource_sync (
-    calDbus *proxy,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "unregister_resource",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(i)",
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_insert_record:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_record: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_record">insert_record()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_insert_record_finish() to get the result of the operation.
- *
- * See cal_dbus_call_insert_record_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_insert_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "insert_record",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_record),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_insert_record_finish:
- * @proxy: A #calDbusProxy.
- * @out_id: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_insert_record().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_insert_record().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_insert_record_finish (
-    calDbus *proxy,
-    gint *out_id,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(iii)",
-                 out_id,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_insert_record_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_record: Argument to pass with the method invocation.
- * @out_id: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_record">insert_record()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_insert_record() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_insert_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint *out_id,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "insert_record",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_record),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(iii)",
-                 out_id,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_update_record:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_record: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_record">update_record()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_update_record_finish() to get the result of the operation.
- *
- * See cal_dbus_call_update_record_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_update_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "update_record",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_record),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_update_record_finish:
- * @proxy: A #calDbusProxy.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_update_record().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_update_record().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_update_record_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_update_record_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_record: Argument to pass with the method invocation.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_record">update_record()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_update_record() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_update_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "update_record",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_record),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_delete_record:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_id: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_record">delete_record()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_delete_record_finish() to get the result of the operation.
- *
- * See cal_dbus_call_delete_record_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_delete_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "delete_record",
-    g_variant_new ("(@(ii)si)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_id),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_delete_record_finish:
- * @proxy: A #calDbusProxy.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_delete_record().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_delete_record().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_delete_record_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_delete_record_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_id: Argument to pass with the method invocation.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_record">delete_record()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_delete_record() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_delete_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "delete_record",
-    g_variant_new ("(@(ii)si)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_id),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_replace_record:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_record: Argument to pass with the method invocation.
- * @arg_id: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_record">replace_record()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_replace_record_finish() to get the result of the operation.
- *
- * See cal_dbus_call_replace_record_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_replace_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint arg_id,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "replace_record",
-    g_variant_new ("(@(ii)@(iv)i)",
-                   arg_handle,
-                   arg_record,
-                   arg_id),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_replace_record_finish:
- * @proxy: A #calDbusProxy.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_replace_record().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_replace_record().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_replace_record_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_replace_record_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_record: Argument to pass with the method invocation.
- * @arg_id: Argument to pass with the method invocation.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_record">replace_record()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_replace_record() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_replace_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint arg_id,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "replace_record",
-    g_variant_new ("(@(ii)@(iv)i)",
-                   arg_handle,
-                   arg_record,
-                   arg_id),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_insert_records:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_list: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_records">insert_records()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_insert_records_finish() to get the result of the operation.
- *
- * See cal_dbus_call_insert_records_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_insert_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "insert_records",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_list),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_insert_records_finish:
- * @proxy: A #calDbusProxy.
- * @out_ids: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_insert_records().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_insert_records().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_insert_records_finish (
-    calDbus *proxy,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@aiiii)",
-                 out_ids,
-                 out_count,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_insert_records_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_list: Argument to pass with the method invocation.
- * @out_ids: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_records">insert_records()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_insert_records() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_insert_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "insert_records",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_list),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@aiiii)",
-                 out_ids,
-                 out_count,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_update_records:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_list: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_records">update_records()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_update_records_finish() to get the result of the operation.
- *
- * See cal_dbus_call_update_records_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_update_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "update_records",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_list),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_update_records_finish:
- * @proxy: A #calDbusProxy.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_update_records().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_update_records().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_update_records_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_update_records_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_list: Argument to pass with the method invocation.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_records">update_records()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_update_records() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_update_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "update_records",
-    g_variant_new ("(@(ii)@(iv))",
-                   arg_handle,
-                   arg_list),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_delete_records:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_ids: Argument to pass with the method invocation.
- * @arg_count: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_records">delete_records()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_delete_records_finish() to get the result of the operation.
- *
- * See cal_dbus_call_delete_records_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_delete_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    GVariant *arg_ids,
-    gint arg_count,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "delete_records",
-    g_variant_new ("(@(ii)s@aii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_ids,
-                   arg_count),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_delete_records_finish:
- * @proxy: A #calDbusProxy.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_delete_records().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_delete_records().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_delete_records_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_delete_records_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_ids: Argument to pass with the method invocation.
- * @arg_count: Argument to pass with the method invocation.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_records">delete_records()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_delete_records() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_delete_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    GVariant *arg_ids,
-    gint arg_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "delete_records",
-    g_variant_new ("(@(ii)s@aii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_ids,
-                   arg_count),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_replace_records:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_list: Argument to pass with the method invocation.
- * @arg_ids: Argument to pass with the method invocation.
- * @arg_count: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_records">replace_records()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_replace_records_finish() to get the result of the operation.
- *
- * See cal_dbus_call_replace_records_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_replace_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GVariant *arg_ids,
-    gint arg_count,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "replace_records",
-    g_variant_new ("(@(ii)@(iv)@aii)",
-                   arg_handle,
-                   arg_list,
-                   arg_ids,
-                   arg_count),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_replace_records_finish:
- * @proxy: A #calDbusProxy.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_replace_records().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_replace_records().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_replace_records_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_replace_records_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_list: Argument to pass with the method invocation.
- * @arg_ids: Argument to pass with the method invocation.
- * @arg_count: Argument to pass with the method invocation.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_records">replace_records()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_replace_records() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_replace_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GVariant *arg_ids,
-    gint arg_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "replace_records",
-    g_variant_new ("(@(ii)@(iv)@aii)",
-                   arg_handle,
-                   arg_list,
-                   arg_ids,
-                   arg_count),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_record:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_id: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_record">get_record()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_record_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_record_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_record",
-    g_variant_new ("(@(ii)si)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_id),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_record_finish:
- * @proxy: A #calDbusProxy.
- * @out_record: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_record().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_record().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_record_finish (
-    calDbus *proxy,
-    GVariant **out_record,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_record,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_record_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_id: Argument to pass with the method invocation.
- * @out_record: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_record">get_record()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_record() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    GVariant **out_record,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_record",
-    g_variant_new ("(@(ii)si)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_id),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_record,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_all_records:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_offset: Argument to pass with the method invocation.
- * @arg_limit: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_all_records">get_all_records()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_all_records_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_all_records_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_all_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_offset,
-    gint arg_limit,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_all_records",
-    g_variant_new ("(@(ii)sii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_offset,
-                   arg_limit),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_all_records_finish:
- * @proxy: A #calDbusProxy.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_all_records().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_all_records().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_all_records_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_list,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_all_records_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_offset: Argument to pass with the method invocation.
- * @arg_limit: Argument to pass with the method invocation.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_all_records">get_all_records()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_all_records() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_all_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_offset,
-    gint arg_limit,
-    GVariant **out_list,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_all_records",
-    g_variant_new ("(@(ii)sii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_offset,
-                   arg_limit),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_list,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_records_with_query:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_query: Argument to pass with the method invocation.
- * @arg_offset: Argument to pass with the method invocation.
- * @arg_limit: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_records_with_query">get_records_with_query()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_records_with_query_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_records_with_query_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_records_with_query (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    gint arg_offset,
-    gint arg_limit,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_records_with_query",
-    g_variant_new ("(@(ii)@(siviviii)ii)",
-                   arg_handle,
-                   arg_query,
-                   arg_offset,
-                   arg_limit),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_records_with_query_finish:
- * @proxy: A #calDbusProxy.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_records_with_query().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_records_with_query().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_records_with_query_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_list,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_records_with_query_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_query: Argument to pass with the method invocation.
- * @arg_offset: Argument to pass with the method invocation.
- * @arg_limit: Argument to pass with the method invocation.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_records_with_query">get_records_with_query()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_records_with_query() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_records_with_query_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    gint arg_offset,
-    gint arg_limit,
-    GVariant **out_list,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_records_with_query",
-    g_variant_new ("(@(ii)@(siviviii)ii)",
-                   arg_handle,
-                   arg_query,
-                   arg_offset,
-                   arg_limit),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_list,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_count:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count">get_count()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_count_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_count_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_count (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_count",
-    g_variant_new ("(@(ii)s)",
-                   arg_handle,
-                   arg_view_uri),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_count_finish:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_count().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_count().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_count_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    gint *out_count,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_ret,
-                 out_count);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_count_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count">get_count()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_count() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_count_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint *out_ret,
-    gint *out_count,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_count",
-    g_variant_new ("(@(ii)s)",
-                   arg_handle,
-                   arg_view_uri),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_ret,
-                 out_count);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_count_with_query:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_query: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count_with_query">get_count_with_query()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_count_with_query_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_count_with_query_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_count_with_query (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_count_with_query",
-    g_variant_new ("(@(ii)@(siviviii))",
-                   arg_handle,
-                   arg_query),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_count_with_query_finish:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_count_with_query().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_count_with_query().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_count_with_query_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    gint *out_count,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_ret,
-                 out_count);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_count_with_query_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_query: Argument to pass with the method invocation.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count_with_query">get_count_with_query()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_count_with_query() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_count_with_query_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    gint *out_ret,
-    gint *out_count,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_count_with_query",
-    g_variant_new ("(@(ii)@(siviviii))",
-                   arg_handle,
-                   arg_query),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_ret,
-                 out_count);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_current_version:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_current_version">get_current_version()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_current_version_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_current_version_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_current_version (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_current_version",
-    g_variant_new ("(@(ii))",
-                   arg_handle),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_current_version_finish:
- * @proxy: A #calDbusProxy.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_current_version().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_current_version().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_current_version_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_current_version_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_current_version">get_current_version()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_current_version() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_current_version_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_current_version",
-    g_variant_new ("(@(ii))",
-                   arg_handle),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_add_changed_cb:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.add_changed_cb">add_changed_cb()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_add_changed_cb_finish() to get the result of the operation.
- *
- * See cal_dbus_call_add_changed_cb_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_add_changed_cb (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "add_changed_cb",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_add_changed_cb_finish:
- * @proxy: A #calDbusProxy.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_add_changed_cb().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_add_changed_cb().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_add_changed_cb_finish (
-    calDbus *proxy,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "()");
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_add_changed_cb_sync:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.add_changed_cb">add_changed_cb()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_add_changed_cb() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_add_changed_cb_sync (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "add_changed_cb",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "()");
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_remove_changed_cb:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.remove_changed_cb">remove_changed_cb()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_remove_changed_cb_finish() to get the result of the operation.
- *
- * See cal_dbus_call_remove_changed_cb_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_remove_changed_cb (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "remove_changed_cb",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_remove_changed_cb_finish:
- * @proxy: A #calDbusProxy.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_remove_changed_cb().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_remove_changed_cb().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_remove_changed_cb_finish (
-    calDbus *proxy,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "()");
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_remove_changed_cb_sync:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.remove_changed_cb">remove_changed_cb()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_remove_changed_cb() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_remove_changed_cb_sync (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "remove_changed_cb",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "()");
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_changes_by_version:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_book_id: Argument to pass with the method invocation.
- * @arg_db_version: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_by_version">get_changes_by_version()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_changes_by_version_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_changes_by_version_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_changes_by_version (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_book_id,
-    gint arg_db_version,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_changes_by_version",
-    g_variant_new ("(@(ii)sii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_book_id,
-                   arg_db_version),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_changes_by_version_finish:
- * @proxy: A #calDbusProxy.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_changes_by_version().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_changes_by_version().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_changes_by_version_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)ii)",
-                 out_list,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_changes_by_version_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_book_id: Argument to pass with the method invocation.
- * @arg_db_version: Argument to pass with the method invocation.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_by_version">get_changes_by_version()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_changes_by_version() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_changes_by_version_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_book_id,
-    gint arg_db_version,
-    GVariant **out_list,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_changes_by_version",
-    g_variant_new ("(@(ii)sii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_book_id,
-                   arg_db_version),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)ii)",
-                 out_list,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_last_change_version:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_last_change_version">get_last_change_version()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_last_change_version_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_last_change_version_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_last_change_version (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_last_change_version",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_last_change_version_finish:
- * @proxy: A #calDbusProxy.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_last_change_version().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_last_change_version().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_last_change_version_finish (
-    calDbus *proxy,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "()");
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_last_change_version_sync:
- * @proxy: A #calDbusProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_last_change_version">get_last_change_version()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_last_change_version() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_last_change_version_sync (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_last_change_version",
-    g_variant_new ("()"),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "()");
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_changes_exception_by_version:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_parent_id: Argument to pass with the method invocation.
- * @arg_db_version: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_exception_by_version">get_changes_exception_by_version()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_get_changes_exception_by_version_finish() to get the result of the operation.
- *
- * See cal_dbus_call_get_changes_exception_by_version_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_get_changes_exception_by_version (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_parent_id,
-    gint arg_db_version,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "get_changes_exception_by_version",
-    g_variant_new ("(@(ii)sii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_parent_id,
-                   arg_db_version),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_get_changes_exception_by_version_finish:
- * @proxy: A #calDbusProxy.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_get_changes_exception_by_version().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_get_changes_exception_by_version().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_changes_exception_by_version_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_list,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_get_changes_exception_by_version_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_view_uri: Argument to pass with the method invocation.
- * @arg_parent_id: Argument to pass with the method invocation.
- * @arg_db_version: Argument to pass with the method invocation.
- * @out_list: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_exception_by_version">get_changes_exception_by_version()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_get_changes_exception_by_version() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_get_changes_exception_by_version_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_parent_id,
-    gint arg_db_version,
-    GVariant **out_list,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "get_changes_exception_by_version",
-    g_variant_new ("(@(ii)sii)",
-                   arg_handle,
-                   arg_view_uri,
-                   arg_parent_id,
-                   arg_db_version),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@(iv)i)",
-                 out_list,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_clean_after_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_book_id: Argument to pass with the method invocation.
- * @arg_db_version: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.clean_after_sync">clean_after_sync()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_clean_after_sync_finish() to get the result of the operation.
- *
- * See cal_dbus_call_clean_after_sync_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_clean_after_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    gint arg_book_id,
-    gint arg_db_version,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "clean_after_sync",
-    g_variant_new ("(@(ii)ii)",
-                   arg_handle,
-                   arg_book_id,
-                   arg_db_version),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_clean_after_sync_finish:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_clean_after_sync().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_clean_after_sync().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_clean_after_sync_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(i)",
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_clean_after_sync_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_book_id: Argument to pass with the method invocation.
- * @arg_db_version: Argument to pass with the method invocation.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.clean_after_sync">clean_after_sync()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_clean_after_sync() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_clean_after_sync_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    gint arg_book_id,
-    gint arg_db_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "clean_after_sync",
-    g_variant_new ("(@(ii)ii)",
-                   arg_handle,
-                   arg_book_id,
-                   arg_db_version),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(i)",
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_insert_vcalendars:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_stream: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_vcalendars">insert_vcalendars()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_insert_vcalendars_finish() to get the result of the operation.
- *
- * See cal_dbus_call_insert_vcalendars_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_insert_vcalendars (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "insert_vcalendars",
-    g_variant_new ("(@(ii)s)",
-                   arg_handle,
-                   arg_stream),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_insert_vcalendars_finish:
- * @proxy: A #calDbusProxy.
- * @out_ids: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_insert_vcalendars().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_insert_vcalendars().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_insert_vcalendars_finish (
-    calDbus *proxy,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@aiiii)",
-                 out_ids,
-                 out_count,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_insert_vcalendars_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_stream: Argument to pass with the method invocation.
- * @out_ids: (out): Return location for return parameter or %NULL to ignore.
- * @out_count: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_vcalendars">insert_vcalendars()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_insert_vcalendars() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_insert_vcalendars_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "insert_vcalendars",
-    g_variant_new ("(@(ii)s)",
-                   arg_handle,
-                   arg_stream),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(@aiiii)",
-                 out_ids,
-                 out_count,
-                 out_version,
-                 out_ret);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_replace_vcalendars:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_stream: Argument to pass with the method invocation.
- * @arg_ids: Argument to pass with the method invocation.
- * @arg_count: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_vcalendars">replace_vcalendars()</link> D-Bus method on @proxy.
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_call_replace_vcalendars_finish() to get the result of the operation.
- *
- * See cal_dbus_call_replace_vcalendars_sync() for the synchronous, blocking version of this method.
- */
-void
-cal_dbus_call_replace_vcalendars (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GVariant *arg_ids,
-    gint arg_count,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data)
-{
-  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
-    "replace_vcalendars",
-    g_variant_new ("(@(ii)s@aii)",
-                   arg_handle,
-                   arg_stream,
-                   arg_ids,
-                   arg_count),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    callback,
-    user_data);
-}
-
-/**
- * cal_dbus_call_replace_vcalendars_finish:
- * @proxy: A #calDbusProxy.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_call_replace_vcalendars().
- * @error: Return location for error or %NULL.
- *
- * Finishes an operation started with cal_dbus_call_replace_vcalendars().
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_replace_vcalendars_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    gint *out_version,
-    GAsyncResult *res,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_ret,
-                 out_version);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_call_replace_vcalendars_sync:
- * @proxy: A #calDbusProxy.
- * @arg_handle: Argument to pass with the method invocation.
- * @arg_stream: Argument to pass with the method invocation.
- * @arg_ids: Argument to pass with the method invocation.
- * @arg_count: Argument to pass with the method invocation.
- * @out_ret: (out): Return location for return parameter or %NULL to ignore.
- * @out_version: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL.
- *
- * Synchronously invokes the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_vcalendars">replace_vcalendars()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_call_replace_vcalendars() for the asynchronous version of this method.
- *
- * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
- */
-gboolean
-cal_dbus_call_replace_vcalendars_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GVariant *arg_ids,
-    gint arg_count,
-    gint *out_ret,
-    gint *out_version,
-    GCancellable *cancellable,
-    GError **error)
-{
-  GVariant *_ret;
-  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
-    "replace_vcalendars",
-    g_variant_new ("(@(ii)s@aii)",
-                   arg_handle,
-                   arg_stream,
-                   arg_ids,
-                   arg_count),
-    G_DBUS_CALL_FLAGS_NONE,
-    -1,
-    cancellable,
-    error);
-  if (_ret == NULL)
-    goto _out;
-  g_variant_get (_ret,
-                 "(ii)",
-                 out_ret,
-                 out_version);
-  g_variant_unref (_ret);
-_out:
-  return _ret != NULL;
-}
-
-/**
- * cal_dbus_complete_register_resource:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.register_resource">register_resource()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_register_resource (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(i)",
-                   ret));
-}
-
-/**
- * cal_dbus_complete_unregister_resource:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.unregister_resource">unregister_resource()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_unregister_resource (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(i)",
-                   ret));
-}
-
-/**
- * cal_dbus_complete_insert_record:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @id: Parameter to return.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_record">insert_record()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_insert_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint id,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(iii)",
-                   id,
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_update_record:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_record">update_record()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_update_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_delete_record:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_record">delete_record()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_delete_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_replace_record:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_record">replace_record()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_replace_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_insert_records:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ids: Parameter to return.
- * @count: Parameter to return.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_records">insert_records()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_insert_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *ids,
-    gint count,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(@aiiii)",
-                   ids,
-                   count,
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_update_records:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.update_records">update_records()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_update_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_delete_records:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.delete_records">delete_records()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_delete_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_replace_records:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_records">replace_records()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_replace_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_get_record:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @record: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_record">get_record()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *record,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(@(iv)i)",
-                   record,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_get_all_records:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @list: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_all_records">get_all_records()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_all_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(@(iv)i)",
-                   list,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_get_records_with_query:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @list: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_records_with_query">get_records_with_query()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_records_with_query (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(@(iv)i)",
-                   list,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_get_count:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ret: Parameter to return.
- * @count: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count">get_count()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_count (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret,
-    gint count)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   ret,
-                   count));
-}
-
-/**
- * cal_dbus_complete_get_count_with_query:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ret: Parameter to return.
- * @count: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_count_with_query">get_count_with_query()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_count_with_query (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret,
-    gint count)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   ret,
-                   count));
-}
-
-/**
- * cal_dbus_complete_get_current_version:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_current_version">get_current_version()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_current_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_add_changed_cb:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.add_changed_cb">add_changed_cb()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_add_changed_cb (
-    calDbus *object,
-    GDBusMethodInvocation *invocation)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("()"));
-}
-
-/**
- * cal_dbus_complete_remove_changed_cb:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.remove_changed_cb">remove_changed_cb()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_remove_changed_cb (
-    calDbus *object,
-    GDBusMethodInvocation *invocation)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("()"));
-}
-
-/**
- * cal_dbus_complete_get_changes_by_version:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @list: Parameter to return.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_by_version">get_changes_by_version()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_changes_by_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(@(iv)ii)",
-                   list,
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_get_last_change_version:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_last_change_version">get_last_change_version()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_last_change_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("()"));
-}
-
-/**
- * cal_dbus_complete_get_changes_exception_by_version:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @list: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.get_changes_exception_by_version">get_changes_exception_by_version()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_get_changes_exception_by_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(@(iv)i)",
-                   list,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_clean_after_sync:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.clean_after_sync">clean_after_sync()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_clean_after_sync (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(i)",
-                   ret));
-}
-
-/**
- * cal_dbus_complete_insert_vcalendars:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ids: Parameter to return.
- * @count: Parameter to return.
- * @version: Parameter to return.
- * @ret: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.insert_vcalendars">insert_vcalendars()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_insert_vcalendars (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *ids,
-    gint count,
-    gint version,
-    gint ret)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(@aiiii)",
-                   ids,
-                   count,
-                   version,
-                   ret));
-}
-
-/**
- * cal_dbus_complete_replace_vcalendars:
- * @object: A #calDbus.
- * @invocation: (transfer full): A #GDBusMethodInvocation.
- * @ret: Parameter to return.
- * @version: Parameter to return.
- *
- * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-tizen-calendar_service-dbus.replace_vcalendars">replace_vcalendars()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
- *
- * This method will free @invocation, you cannot use it afterwards.
- */
-void
-cal_dbus_complete_replace_vcalendars (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret,
-    gint version)
-{
-  g_dbus_method_invocation_return_value (invocation,
-    g_variant_new ("(ii)",
-                   ret,
-                   version));
-}
-
-/* ------------------------------------------------------------------------ */
-
-/**
- * calDbusProxy:
- *
- * The #calDbusProxy structure contains only private data and should only be accessed using the provided API.
- */
-
-/**
- * calDbusProxyClass:
- * @parent_class: The parent class.
- *
- * Class structure for #calDbusProxy.
- */
-
-struct _calDbusProxyPrivate
-{
-  GData *qdata;
-};
-
-static void cal_dbus_proxy_iface_init (calDbusIface *iface);
-
-#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
-G_DEFINE_TYPE_WITH_CODE (calDbusProxy, cal_dbus_proxy, G_TYPE_DBUS_PROXY,
-                         G_ADD_PRIVATE (calDbusProxy)
-                         G_IMPLEMENT_INTERFACE (CAL_TYPE_DBUS, cal_dbus_proxy_iface_init));
-
-#else
-G_DEFINE_TYPE_WITH_CODE (calDbusProxy, cal_dbus_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (CAL_TYPE_DBUS, cal_dbus_proxy_iface_init));
-
-#endif
-static void
-cal_dbus_proxy_finalize (GObject *object)
-{
-  calDbusProxy *proxy = CAL_DBUS_PROXY (object);
-  g_datalist_clear (&proxy->priv->qdata);
-  G_OBJECT_CLASS (cal_dbus_proxy_parent_class)->finalize (object);
-}
-
-static void
-cal_dbus_proxy_get_property (GObject      *object,
-  guint         prop_id,
-  GValue       *value,
-  GParamSpec   *pspec G_GNUC_UNUSED)
-{
-}
-
-static void
-cal_dbus_proxy_set_property (GObject      *object,
-  guint         prop_id,
-  const GValue *value,
-  GParamSpec   *pspec G_GNUC_UNUSED)
-{
-}
-
-static void
-cal_dbus_proxy_g_signal (GDBusProxy *proxy,
-  const gchar *sender_name G_GNUC_UNUSED,
-  const gchar *signal_name,
-  GVariant *parameters)
-{
-  _ExtendedGDBusSignalInfo *info;
-  GVariantIter iter;
-  GVariant *child;
-  GValue *paramv;
-  guint num_params;
-  guint n;
-  guint signal_id;
-  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_cal_dbus_interface_info.parent_struct, signal_name);
-  if (info == NULL)
-    return;
-  num_params = g_variant_n_children (parameters);
-  paramv = g_new0 (GValue, num_params + 1);
-  g_value_init (&paramv[0], CAL_TYPE_DBUS);
-  g_value_set_object (&paramv[0], proxy);
-  g_variant_iter_init (&iter, parameters);
-  n = 1;
-  while ((child = g_variant_iter_next_value (&iter)) != NULL)
-    {
-      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
-      if (arg_info->use_gvariant)
-        {
-          g_value_init (&paramv[n], G_TYPE_VARIANT);
-          g_value_set_variant (&paramv[n], child);
-          n++;
-        }
-      else
-        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
-      g_variant_unref (child);
-    }
-  signal_id = g_signal_lookup (info->signal_name, CAL_TYPE_DBUS);
-  g_signal_emitv (paramv, signal_id, 0, NULL);
-  for (n = 0; n < num_params + 1; n++)
-    g_value_unset (&paramv[n]);
-  g_free (paramv);
-}
-
-static void
-cal_dbus_proxy_g_properties_changed (GDBusProxy *_proxy,
-  GVariant *changed_properties,
-  const gchar *const *invalidated_properties)
-{
-  calDbusProxy *proxy = CAL_DBUS_PROXY (_proxy);
-  guint n;
-  const gchar *key;
-  GVariantIter *iter;
-  _ExtendedGDBusPropertyInfo *info;
-  g_variant_get (changed_properties, "a{sv}", &iter);
-  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
-    {
-      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cal_dbus_interface_info.parent_struct, key);
-      g_datalist_remove_data (&proxy->priv->qdata, key);
-      if (info != NULL)
-        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
-    }
-  g_variant_iter_free (iter);
-  for (n = 0; invalidated_properties[n] != NULL; n++)
-    {
-      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cal_dbus_interface_info.parent_struct, invalidated_properties[n]);
-      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
-      if (info != NULL)
-        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
-    }
-}
-
-static void
-cal_dbus_proxy_init (calDbusProxy *proxy)
-{
-#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
-  proxy->priv = cal_dbus_proxy_get_instance_private (proxy);
-#else
-  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, CAL_TYPE_DBUS_PROXY, calDbusProxyPrivate);
-#endif
-
-  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), cal_dbus_interface_info ());
-}
-
-static void
-cal_dbus_proxy_class_init (calDbusProxyClass *klass)
-{
-  GObjectClass *gobject_class;
-  GDBusProxyClass *proxy_class;
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->finalize     = cal_dbus_proxy_finalize;
-  gobject_class->get_property = cal_dbus_proxy_get_property;
-  gobject_class->set_property = cal_dbus_proxy_set_property;
-
-  proxy_class = G_DBUS_PROXY_CLASS (klass);
-  proxy_class->g_signal = cal_dbus_proxy_g_signal;
-  proxy_class->g_properties_changed = cal_dbus_proxy_g_properties_changed;
-
-#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
-  g_type_class_add_private (klass, sizeof (calDbusProxyPrivate));
-#endif
-}
-
-static void
-cal_dbus_proxy_iface_init (calDbusIface *iface)
-{
-}
-
-/**
- * cal_dbus_proxy_new:
- * @connection: A #GDBusConnection.
- * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-tizen-calendar_service-dbus.top_of_page">org.tizen.calendar_service.dbus</link>. See g_dbus_proxy_new() for more details.
- *
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_proxy_new_finish() to get the result of the operation.
- *
- * See cal_dbus_proxy_new_sync() for the synchronous, blocking version of this constructor.
- */
-void
-cal_dbus_proxy_new (
-    GDBusConnection     *connection,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GAsyncReadyCallback  callback,
-    gpointer             user_data)
-{
-  g_async_initable_new_async (CAL_TYPE_DBUS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.tizen.calendar_service.dbus", NULL);
-}
-
-/**
- * cal_dbus_proxy_new_finish:
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_proxy_new().
- * @error: Return location for error or %NULL
- *
- * Finishes an operation started with cal_dbus_proxy_new().
- *
- * Returns: (transfer full) (type calDbusProxy): The constructed proxy object or %NULL if @error is set.
- */
-calDbus *
-cal_dbus_proxy_new_finish (
-    GAsyncResult        *res,
-    GError             **error)
-{
-  GObject *ret;
-  GObject *source_object;
-  source_object = g_async_result_get_source_object (res);
-  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
-  g_object_unref (source_object);
-  if (ret != NULL)
-    return CAL_DBUS (ret);
-  else
-    return NULL;
-}
-
-/**
- * cal_dbus_proxy_new_sync:
- * @connection: A #GDBusConnection.
- * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL
- *
- * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-tizen-calendar_service-dbus.top_of_page">org.tizen.calendar_service.dbus</link>. See g_dbus_proxy_new_sync() for more details.
- *
- * The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_proxy_new() for the asynchronous version of this constructor.
- *
- * Returns: (transfer full) (type calDbusProxy): The constructed proxy object or %NULL if @error is set.
- */
-calDbus *
-cal_dbus_proxy_new_sync (
-    GDBusConnection     *connection,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GError             **error)
-{
-  GInitable *ret;
-  ret = g_initable_new (CAL_TYPE_DBUS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.tizen.calendar_service.dbus", NULL);
-  if (ret != NULL)
-    return CAL_DBUS (ret);
-  else
-    return NULL;
-}
-
-
-/**
- * cal_dbus_proxy_new_for_bus:
- * @bus_type: A #GBusType.
- * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: A bus name (well-known or unique).
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
- * @user_data: User data to pass to @callback.
- *
- * Like cal_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
- *
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
- * You can then call cal_dbus_proxy_new_for_bus_finish() to get the result of the operation.
- *
- * See cal_dbus_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
- */
-void
-cal_dbus_proxy_new_for_bus (
-    GBusType             bus_type,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GAsyncReadyCallback  callback,
-    gpointer             user_data)
-{
-  g_async_initable_new_async (CAL_TYPE_DBUS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.tizen.calendar_service.dbus", NULL);
-}
-
-/**
- * cal_dbus_proxy_new_for_bus_finish:
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cal_dbus_proxy_new_for_bus().
- * @error: Return location for error or %NULL
- *
- * Finishes an operation started with cal_dbus_proxy_new_for_bus().
- *
- * Returns: (transfer full) (type calDbusProxy): The constructed proxy object or %NULL if @error is set.
- */
-calDbus *
-cal_dbus_proxy_new_for_bus_finish (
-    GAsyncResult        *res,
-    GError             **error)
-{
-  GObject *ret;
-  GObject *source_object;
-  source_object = g_async_result_get_source_object (res);
-  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
-  g_object_unref (source_object);
-  if (ret != NULL)
-    return CAL_DBUS (ret);
-  else
-    return NULL;
-}
-
-/**
- * cal_dbus_proxy_new_for_bus_sync:
- * @bus_type: A #GBusType.
- * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: A bus name (well-known or unique).
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL
- *
- * Like cal_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
- *
- * The calling thread is blocked until a reply is received.
- *
- * See cal_dbus_proxy_new_for_bus() for the asynchronous version of this constructor.
- *
- * Returns: (transfer full) (type calDbusProxy): The constructed proxy object or %NULL if @error is set.
- */
-calDbus *
-cal_dbus_proxy_new_for_bus_sync (
-    GBusType             bus_type,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GError             **error)
-{
-  GInitable *ret;
-  ret = g_initable_new (CAL_TYPE_DBUS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.tizen.calendar_service.dbus", NULL);
-  if (ret != NULL)
-    return CAL_DBUS (ret);
-  else
-    return NULL;
-}
-
-
-/* ------------------------------------------------------------------------ */
-
-/**
- * calDbusSkeleton:
- *
- * The #calDbusSkeleton structure contains only private data and should only be accessed using the provided API.
- */
-
-/**
- * calDbusSkeletonClass:
- * @parent_class: The parent class.
- *
- * Class structure for #calDbusSkeleton.
- */
-
-struct _calDbusSkeletonPrivate
-{
-  GValue *properties;
-  GList *changed_properties;
-  GSource *changed_properties_idle_source;
-  GMainContext *context;
-  GMutex lock;
-};
-
-static void
-_cal_dbus_skeleton_handle_method_call (
-  GDBusConnection *connection G_GNUC_UNUSED,
-  const gchar *sender G_GNUC_UNUSED,
-  const gchar *object_path G_GNUC_UNUSED,
-  const gchar *interface_name,
-  const gchar *method_name,
-  GVariant *parameters,
-  GDBusMethodInvocation *invocation,
-  gpointer user_data)
-{
-  calDbusSkeleton *skeleton = CAL_DBUS_SKELETON (user_data);
-  _ExtendedGDBusMethodInfo *info;
-  GVariantIter iter;
-  GVariant *child;
-  GValue *paramv;
-  guint num_params;
-  guint num_extra;
-  guint n;
-  guint signal_id;
-  GValue return_value = G_VALUE_INIT;
-  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
-  g_assert (info != NULL);
-  num_params = g_variant_n_children (parameters);
-  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
-  n = 0;
-  g_value_init (&paramv[n], CAL_TYPE_DBUS);
-  g_value_set_object (&paramv[n++], skeleton);
-  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
-  g_value_set_object (&paramv[n++], invocation);
-  if (info->pass_fdlist)
-    {
-#ifdef G_OS_UNIX
-      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
-      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
-#else
-      g_assert_not_reached ();
-#endif
-    }
-  g_variant_iter_init (&iter, parameters);
-  while ((child = g_variant_iter_next_value (&iter)) != NULL)
-    {
-      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
-      if (arg_info->use_gvariant)
-        {
-          g_value_init (&paramv[n], G_TYPE_VARIANT);
-          g_value_set_variant (&paramv[n], child);
-          n++;
-        }
-      else
-        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
-      g_variant_unref (child);
-    }
-  signal_id = g_signal_lookup (info->signal_name, CAL_TYPE_DBUS);
-  g_value_init (&return_value, G_TYPE_BOOLEAN);
-  g_signal_emitv (paramv, signal_id, 0, &return_value);
-  if (!g_value_get_boolean (&return_value))
-    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
-  g_value_unset (&return_value);
-  for (n = 0; n < num_params + num_extra; n++)
-    g_value_unset (&paramv[n]);
-  g_free (paramv);
-}
-
-static GVariant *
-_cal_dbus_skeleton_handle_get_property (
-  GDBusConnection *connection G_GNUC_UNUSED,
-  const gchar *sender G_GNUC_UNUSED,
-  const gchar *object_path G_GNUC_UNUSED,
-  const gchar *interface_name G_GNUC_UNUSED,
-  const gchar *property_name,
-  GError **error,
-  gpointer user_data)
-{
-  calDbusSkeleton *skeleton = CAL_DBUS_SKELETON (user_data);
-  GValue value = G_VALUE_INIT;
-  GParamSpec *pspec;
-  _ExtendedGDBusPropertyInfo *info;
-  GVariant *ret;
-  ret = NULL;
-  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cal_dbus_interface_info.parent_struct, property_name);
-  g_assert (info != NULL);
-  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
-  if (pspec == NULL)
-    {
-      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
-    }
-  else
-    {
-      g_value_init (&value, pspec->value_type);
-      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
-      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
-      g_value_unset (&value);
-    }
-  return ret;
-}
-
-static gboolean
-_cal_dbus_skeleton_handle_set_property (
-  GDBusConnection *connection G_GNUC_UNUSED,
-  const gchar *sender G_GNUC_UNUSED,
-  const gchar *object_path G_GNUC_UNUSED,
-  const gchar *interface_name G_GNUC_UNUSED,
-  const gchar *property_name,
-  GVariant *variant,
-  GError **error,
-  gpointer user_data)
-{
-  calDbusSkeleton *skeleton = CAL_DBUS_SKELETON (user_data);
-  GValue value = G_VALUE_INIT;
-  GParamSpec *pspec;
-  _ExtendedGDBusPropertyInfo *info;
-  gboolean ret;
-  ret = FALSE;
-  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cal_dbus_interface_info.parent_struct, property_name);
-  g_assert (info != NULL);
-  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
-  if (pspec == NULL)
-    {
-      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
-    }
-  else
-    {
-      if (info->use_gvariant)
-        g_value_set_variant (&value, variant);
-      else
-        g_dbus_gvariant_to_gvalue (variant, &value);
-      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
-      g_value_unset (&value);
-      ret = TRUE;
-    }
-  return ret;
-}
-
-static const GDBusInterfaceVTable _cal_dbus_skeleton_vtable =
-{
-  _cal_dbus_skeleton_handle_method_call,
-  _cal_dbus_skeleton_handle_get_property,
-  _cal_dbus_skeleton_handle_set_property,
-  {NULL}
-};
-
-static GDBusInterfaceInfo *
-cal_dbus_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
-{
-  return cal_dbus_interface_info ();
-}
-
-static GDBusInterfaceVTable *
-cal_dbus_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
-{
-  return (GDBusInterfaceVTable *) &_cal_dbus_skeleton_vtable;
-}
-
-static GVariant *
-cal_dbus_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
-{
-  calDbusSkeleton *skeleton = CAL_DBUS_SKELETON (_skeleton);
-
-  GVariantBuilder builder;
-  guint n;
-  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
-  if (_cal_dbus_interface_info.parent_struct.properties == NULL)
-    goto out;
-  for (n = 0; _cal_dbus_interface_info.parent_struct.properties[n] != NULL; n++)
-    {
-      GDBusPropertyInfo *info = _cal_dbus_interface_info.parent_struct.properties[n];
-      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
-        {
-          GVariant *value;
-          value = _cal_dbus_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.tizen.calendar_service.dbus", info->name, NULL, skeleton);
-          if (value != NULL)
-            {
-              g_variant_take_ref (value);
-              g_variant_builder_add (&builder, "{sv}", info->name, value);
-              g_variant_unref (value);
-            }
-        }
-    }
-out:
-  return g_variant_builder_end (&builder);
-}
-
-static void
-cal_dbus_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
-{
-}
-
-static void cal_dbus_skeleton_iface_init (calDbusIface *iface);
-#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
-G_DEFINE_TYPE_WITH_CODE (calDbusSkeleton, cal_dbus_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_ADD_PRIVATE (calDbusSkeleton)
-                         G_IMPLEMENT_INTERFACE (CAL_TYPE_DBUS, cal_dbus_skeleton_iface_init));
-
-#else
-G_DEFINE_TYPE_WITH_CODE (calDbusSkeleton, cal_dbus_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (CAL_TYPE_DBUS, cal_dbus_skeleton_iface_init));
-
-#endif
-static void
-cal_dbus_skeleton_finalize (GObject *object)
-{
-  calDbusSkeleton *skeleton = CAL_DBUS_SKELETON (object);
-  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
-  if (skeleton->priv->changed_properties_idle_source != NULL)
-    g_source_destroy (skeleton->priv->changed_properties_idle_source);
-  g_main_context_unref (skeleton->priv->context);
-  g_mutex_clear (&skeleton->priv->lock);
-  G_OBJECT_CLASS (cal_dbus_skeleton_parent_class)->finalize (object);
-}
-
-static void
-cal_dbus_skeleton_init (calDbusSkeleton *skeleton)
-{
-#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
-  skeleton->priv = cal_dbus_skeleton_get_instance_private (skeleton);
-#else
-  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, CAL_TYPE_DBUS_SKELETON, calDbusSkeletonPrivate);
-#endif
-
-  g_mutex_init (&skeleton->priv->lock);
-  skeleton->priv->context = g_main_context_ref_thread_default ();
-}
-
-static void
-cal_dbus_skeleton_class_init (calDbusSkeletonClass *klass)
-{
-  GObjectClass *gobject_class;
-  GDBusInterfaceSkeletonClass *skeleton_class;
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->finalize = cal_dbus_skeleton_finalize;
-
-  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
-  skeleton_class->get_info = cal_dbus_skeleton_dbus_interface_get_info;
-  skeleton_class->get_properties = cal_dbus_skeleton_dbus_interface_get_properties;
-  skeleton_class->flush = cal_dbus_skeleton_dbus_interface_flush;
-  skeleton_class->get_vtable = cal_dbus_skeleton_dbus_interface_get_vtable;
-
-#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
-  g_type_class_add_private (klass, sizeof (calDbusSkeletonPrivate));
-#endif
-}
-
-static void
-cal_dbus_skeleton_iface_init (calDbusIface *iface)
-{
-}
-
-/**
- * cal_dbus_skeleton_new:
- *
- * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-tizen-calendar_service-dbus.top_of_page">org.tizen.calendar_service.dbus</link>.
- *
- * Returns: (transfer full) (type calDbusSkeleton): The skeleton object.
- */
-calDbus *
-cal_dbus_skeleton_new (void)
-{
-  return CAL_DBUS (g_object_new (CAL_TYPE_DBUS_SKELETON, NULL));
-}
-
diff --git a/common/dbus/cal_dbus.h b/common/dbus/cal_dbus.h
deleted file mode 100644 (file)
index 1146e4d..0000000
+++ /dev/null
@@ -1,1019 +0,0 @@
-/*
- * Generated by gdbus-codegen 2.40.2. DO NOT EDIT.
- *
- * The license of this code is the same as for the source it was derived from.
- */
-
-#ifndef __CAL_DBUS_H__
-#define __CAL_DBUS_H__
-
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-
-
-/* ------------------------------------------------------------------------ */
-/* Declarations for org.tizen.calendar_service.dbus */
-
-#define CAL_TYPE_DBUS (cal_dbus_get_type ())
-#define CAL_DBUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CAL_TYPE_DBUS, calDbus))
-#define CAL_IS_DBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CAL_TYPE_DBUS))
-#define CAL_DBUS_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), CAL_TYPE_DBUS, calDbusIface))
-
-struct _calDbus;
-typedef struct _calDbus calDbus;
-typedef struct _calDbusIface calDbusIface;
-
-struct _calDbusIface
-{
-  GTypeInterface parent_iface;
-
-  gboolean (*handle_add_changed_cb) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-  gboolean (*handle_clean_after_sync) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    gint arg_book_id,
-    gint arg_db_version);
-
-  gboolean (*handle_delete_record) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id);
-
-  gboolean (*handle_delete_records) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    GVariant *arg_ids,
-    gint arg_count);
-
-  gboolean (*handle_get_all_records) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_offset,
-    gint arg_limit);
-
-  gboolean (*handle_get_changes_by_version) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_book_id,
-    gint arg_db_version);
-
-  gboolean (*handle_get_changes_exception_by_version) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_parent_id,
-    gint arg_db_version);
-
-  gboolean (*handle_get_count) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri);
-
-  gboolean (*handle_get_count_with_query) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_query);
-
-  gboolean (*handle_get_current_version) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle);
-
-  gboolean (*handle_get_last_change_version) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-  gboolean (*handle_get_record) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id);
-
-  gboolean (*handle_get_records_with_query) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    gint arg_offset,
-    gint arg_limit);
-
-  gboolean (*handle_insert_record) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_record);
-
-  gboolean (*handle_insert_records) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_list);
-
-  gboolean (*handle_insert_vcalendars) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_stream);
-
-  gboolean (*handle_register_resource) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-  gboolean (*handle_remove_changed_cb) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-  gboolean (*handle_replace_record) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint arg_id);
-
-  gboolean (*handle_replace_records) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GVariant *arg_ids,
-    gint arg_count);
-
-  gboolean (*handle_replace_vcalendars) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GVariant *arg_ids,
-    gint arg_count);
-
-  gboolean (*handle_unregister_resource) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-  gboolean (*handle_update_record) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_record);
-
-  gboolean (*handle_update_records) (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *arg_handle,
-    GVariant *arg_list);
-
-};
-
-GType cal_dbus_get_type (void) G_GNUC_CONST;
-
-GDBusInterfaceInfo *cal_dbus_interface_info (void);
-guint cal_dbus_override_properties (GObjectClass *klass, guint property_id_begin);
-
-
-/* D-Bus method call completion functions: */
-void cal_dbus_complete_register_resource (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret);
-
-void cal_dbus_complete_unregister_resource (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret);
-
-void cal_dbus_complete_insert_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint id,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_update_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_delete_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_replace_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_insert_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *ids,
-    gint count,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_update_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_delete_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_replace_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_get_record (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *record,
-    gint ret);
-
-void cal_dbus_complete_get_all_records (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint ret);
-
-void cal_dbus_complete_get_records_with_query (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint ret);
-
-void cal_dbus_complete_get_count (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret,
-    gint count);
-
-void cal_dbus_complete_get_count_with_query (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret,
-    gint count);
-
-void cal_dbus_complete_get_current_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_add_changed_cb (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-void cal_dbus_complete_remove_changed_cb (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-void cal_dbus_complete_get_changes_by_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_get_last_change_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation);
-
-void cal_dbus_complete_get_changes_exception_by_version (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *list,
-    gint ret);
-
-void cal_dbus_complete_clean_after_sync (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret);
-
-void cal_dbus_complete_insert_vcalendars (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    GVariant *ids,
-    gint count,
-    gint version,
-    gint ret);
-
-void cal_dbus_complete_replace_vcalendars (
-    calDbus *object,
-    GDBusMethodInvocation *invocation,
-    gint ret,
-    gint version);
-
-
-
-/* D-Bus method calls: */
-void cal_dbus_call_register_resource (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_register_resource_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_register_resource_sync (
-    calDbus *proxy,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_unregister_resource (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_unregister_resource_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_unregister_resource_sync (
-    calDbus *proxy,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_insert_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_insert_record_finish (
-    calDbus *proxy,
-    gint *out_id,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_insert_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint *out_id,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_update_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_update_record_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_update_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_delete_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_delete_record_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_delete_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_replace_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint arg_id,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_replace_record_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_replace_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_record,
-    gint arg_id,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_insert_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_insert_records_finish (
-    calDbus *proxy,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_insert_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_update_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_update_records_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_update_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_delete_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    GVariant *arg_ids,
-    gint arg_count,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_delete_records_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_delete_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    GVariant *arg_ids,
-    gint arg_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_replace_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GVariant *arg_ids,
-    gint arg_count,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_replace_records_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_replace_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_list,
-    GVariant *arg_ids,
-    gint arg_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_record (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_record_finish (
-    calDbus *proxy,
-    GVariant **out_record,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_record_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_id,
-    GVariant **out_record,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_all_records (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_offset,
-    gint arg_limit,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_all_records_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_all_records_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_offset,
-    gint arg_limit,
-    GVariant **out_list,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_records_with_query (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    gint arg_offset,
-    gint arg_limit,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_records_with_query_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_records_with_query_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    gint arg_offset,
-    gint arg_limit,
-    GVariant **out_list,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_count (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_count_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    gint *out_count,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_count_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint *out_ret,
-    gint *out_count,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_count_with_query (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_count_with_query_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    gint *out_count,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_count_with_query_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GVariant *arg_query,
-    gint *out_ret,
-    gint *out_count,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_current_version (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_current_version_finish (
-    calDbus *proxy,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_current_version_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_add_changed_cb (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_add_changed_cb_finish (
-    calDbus *proxy,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_add_changed_cb_sync (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_remove_changed_cb (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_remove_changed_cb_finish (
-    calDbus *proxy,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_remove_changed_cb_sync (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_changes_by_version (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_book_id,
-    gint arg_db_version,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_changes_by_version_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_changes_by_version_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_book_id,
-    gint arg_db_version,
-    GVariant **out_list,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_last_change_version (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_last_change_version_finish (
-    calDbus *proxy,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_last_change_version_sync (
-    calDbus *proxy,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_get_changes_exception_by_version (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_parent_id,
-    gint arg_db_version,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_get_changes_exception_by_version_finish (
-    calDbus *proxy,
-    GVariant **out_list,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_get_changes_exception_by_version_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_view_uri,
-    gint arg_parent_id,
-    gint arg_db_version,
-    GVariant **out_list,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_clean_after_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    gint arg_book_id,
-    gint arg_db_version,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_clean_after_sync_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_clean_after_sync_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    gint arg_book_id,
-    gint arg_db_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_insert_vcalendars (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_insert_vcalendars_finish (
-    calDbus *proxy,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_insert_vcalendars_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GVariant **out_ids,
-    gint *out_count,
-    gint *out_version,
-    gint *out_ret,
-    GCancellable *cancellable,
-    GError **error);
-
-void cal_dbus_call_replace_vcalendars (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GVariant *arg_ids,
-    gint arg_count,
-    GCancellable *cancellable,
-    GAsyncReadyCallback callback,
-    gpointer user_data);
-
-gboolean cal_dbus_call_replace_vcalendars_finish (
-    calDbus *proxy,
-    gint *out_ret,
-    gint *out_version,
-    GAsyncResult *res,
-    GError **error);
-
-gboolean cal_dbus_call_replace_vcalendars_sync (
-    calDbus *proxy,
-    GVariant *arg_handle,
-    const gchar *arg_stream,
-    GVariant *arg_ids,
-    gint arg_count,
-    gint *out_ret,
-    gint *out_version,
-    GCancellable *cancellable,
-    GError **error);
-
-
-
-/* ---- */
-
-#define CAL_TYPE_DBUS_PROXY (cal_dbus_proxy_get_type ())
-#define CAL_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CAL_TYPE_DBUS_PROXY, calDbusProxy))
-#define CAL_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAL_TYPE_DBUS_PROXY, calDbusProxyClass))
-#define CAL_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CAL_TYPE_DBUS_PROXY, calDbusProxyClass))
-#define CAL_IS_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CAL_TYPE_DBUS_PROXY))
-#define CAL_IS_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CAL_TYPE_DBUS_PROXY))
-
-typedef struct _calDbusProxy calDbusProxy;
-typedef struct _calDbusProxyClass calDbusProxyClass;
-typedef struct _calDbusProxyPrivate calDbusProxyPrivate;
-
-struct _calDbusProxy
-{
-  /*< private >*/
-  GDBusProxy parent_instance;
-  calDbusProxyPrivate *priv;
-};
-
-struct _calDbusProxyClass
-{
-  GDBusProxyClass parent_class;
-};
-
-GType cal_dbus_proxy_get_type (void) G_GNUC_CONST;
-
-void cal_dbus_proxy_new (
-    GDBusConnection     *connection,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GAsyncReadyCallback  callback,
-    gpointer             user_data);
-calDbus *cal_dbus_proxy_new_finish (
-    GAsyncResult        *res,
-    GError             **error);
-calDbus *cal_dbus_proxy_new_sync (
-    GDBusConnection     *connection,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GError             **error);
-
-void cal_dbus_proxy_new_for_bus (
-    GBusType             bus_type,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GAsyncReadyCallback  callback,
-    gpointer             user_data);
-calDbus *cal_dbus_proxy_new_for_bus_finish (
-    GAsyncResult        *res,
-    GError             **error);
-calDbus *cal_dbus_proxy_new_for_bus_sync (
-    GBusType             bus_type,
-    GDBusProxyFlags      flags,
-    const gchar         *name,
-    const gchar         *object_path,
-    GCancellable        *cancellable,
-    GError             **error);
-
-
-/* ---- */
-
-#define CAL_TYPE_DBUS_SKELETON (cal_dbus_skeleton_get_type ())
-#define CAL_DBUS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CAL_TYPE_DBUS_SKELETON, calDbusSkeleton))
-#define CAL_DBUS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAL_TYPE_DBUS_SKELETON, calDbusSkeletonClass))
-#define CAL_DBUS_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CAL_TYPE_DBUS_SKELETON, calDbusSkeletonClass))
-#define CAL_IS_DBUS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CAL_TYPE_DBUS_SKELETON))
-#define CAL_IS_DBUS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CAL_TYPE_DBUS_SKELETON))
-
-typedef struct _calDbusSkeleton calDbusSkeleton;
-typedef struct _calDbusSkeletonClass calDbusSkeletonClass;
-typedef struct _calDbusSkeletonPrivate calDbusSkeletonPrivate;
-
-struct _calDbusSkeleton
-{
-  /*< private >*/
-  GDBusInterfaceSkeleton parent_instance;
-  calDbusSkeletonPrivate *priv;
-};
-
-struct _calDbusSkeletonClass
-{
-  GDBusInterfaceSkeletonClass parent_class;
-};
-
-GType cal_dbus_skeleton_get_type (void) G_GNUC_CONST;
-
-calDbus *cal_dbus_skeleton_new (void);
-
-
-G_END_DECLS
-
-#endif /* __CAL_DBUS_H__ */
index 1b13729..b3b9c69 100644 (file)
 #define CAL_DBUS_SET_STRING(x) (x) ? x : ""
 #define CAL_DBUS_GET_STRING(x) do { \
        x = (NULL != x && '\0' != *x) ? strdup(x) : NULL; \
-} while(0)
+} while (0)
 
-GVariant *cal_dbus_utils_null_to_gvariant(void)
+GVariantcal_dbus_utils_null_to_gvariant(void)
 {
        GVariant *value = NULL;
        value = g_variant_new("(s)", "");
        return value;
 }
 
-GVariant *cal_dbus_utils_common_to_gvariant(cal_record_s *rec)
+GVariantcal_dbus_utils_common_to_gvariant(cal_record_s *rec)
 {
        GVariant *value = NULL;
        value = g_variant_new("(isuasy)",
@@ -52,7 +52,7 @@ GVariant *cal_dbus_utils_common_to_gvariant(cal_record_s *rec)
        return value;
 }
 
-GVariant *cal_dbus_utils_handle_to_gvariant(calendar_h handle)
+GVariantcal_dbus_utils_handle_to_gvariant(calendar_h handle)
 {
        GVariant *value = NULL;
        cal_s *p = (cal_s *)handle;
@@ -61,7 +61,7 @@ GVariant *cal_dbus_utils_handle_to_gvariant(calendar_h handle)
        return value;
 }
 
-static GVariant *_caltime_to_gvariant(calendar_time_s *ct)
+static GVariant_caltime_to_gvariant(calendar_time_s *ct)
 {
        GVariant *value = NULL;
        switch (ct->type) {
@@ -175,12 +175,10 @@ static GVariant *_composite_to_gvariant(cal_composite_filter_s *filter)
                        if (1 == is_error) {
                                count_composite = 0;
                                arg_composite = cal_dbus_utils_null_to_gvariant();
-                       }
-                       else {
+                       } else {
                                arg_composite = g_variant_builder_end(&builder_attribute);
                        }
-               }
-               else {
+               } else {
                        arg_composite = cal_dbus_utils_null_to_gvariant();
                }
 
@@ -207,8 +205,7 @@ static GVariant *_operate_to_gvariant(cal_composite_filter_s *f, int *out_count)
                        cursor = g_slist_next(cursor);
                }
                arg_operate = g_variant_builder_end(&builder);
-       }
-       else {
+       } else {
                arg_operate = cal_dbus_utils_null_to_gvariant();
        }
        *out_count = count_operate;
@@ -219,21 +216,17 @@ static GVariant *_operate_to_gvariant(cal_composite_filter_s *f, int *out_count)
 static GVariant *_filter_to_gvariant(cal_composite_filter_s *f)
 {
        GVariant *arg_composite_pack = NULL;
-       if (f->filters) {
+       if (f->filters)
                arg_composite_pack = _composite_to_gvariant(f);
-       }
-       else {
+       else
                arg_composite_pack = cal_dbus_utils_null_to_gvariant();
-       }
 
        int count_operate = 0;
        GVariant *arg_operate = NULL;
-       if (f->filter_ops) {
+       if (f->filter_ops)
                arg_operate = _operate_to_gvariant(f, &count_operate);
-       }
-       else {
+       else
                arg_operate = cal_dbus_utils_null_to_gvariant();
-       }
 
        GVariant *value = NULL;
        value = g_variant_new("(viv)",
@@ -246,9 +239,9 @@ static GVariant *_projection_to_gvariant(cal_query_s *p)
        int i;
        GVariantBuilder builder;
        g_variant_builder_init(&builder, G_VARIANT_TYPE("au"));
-       for (i = 0; i < p->projection_count; i++) {
+       for (i = 0; i < p->projection_count; i++)
                g_variant_builder_add(&builder, "u", p->projection[i]);
-       }
+
        return g_variant_builder_end(&builder);
 }
 
@@ -262,19 +255,16 @@ GVariant *cal_dbus_utils_query_to_gvariant(calendar_query_h query)
        if (q->filter) {
                has_filter = 1;
                arg_filter = _filter_to_gvariant(q->filter);
-       }
-       else {
+       } else {
                has_filter = 0;
                arg_filter = cal_dbus_utils_null_to_gvariant();
        }
 
        GVariant *arg_projection = NULL;
-       if (q->projection_count) {
+       if (q->projection_count)
                arg_projection = _projection_to_gvariant(q);
-       }
-       else {
+       else
                arg_projection = cal_dbus_utils_null_to_gvariant();
-       }
 
        GVariant *value = NULL;
        value = g_variant_new("(siviviii)",
@@ -441,8 +431,7 @@ static GVariant *_event_to_gvariant(calendar_record_h record)
                        calendar_record_get_child_record_at_p(record, _calendar_event.calendar_alarm, i, &alarm);
                        g_variant_builder_add(&builder_alarm, "v", _alarm_to_gvariant(alarm));
                }
-       }
-       else {
+       } else {
                DBG("No alarm");
                g_variant_builder_add(&builder_alarm, "v", cal_dbus_utils_null_to_gvariant());
        }
@@ -457,8 +446,7 @@ static GVariant *_event_to_gvariant(calendar_record_h record)
                        calendar_record_get_child_record_at_p(record, _calendar_event.calendar_attendee, i, &attendee);
                        g_variant_builder_add(&builder_attendee, "v", _attendee_to_gvariant(attendee));
                }
-       }
-       else {
+       } else {
                DBG("No attendee");
                g_variant_builder_add(&builder_attendee, "v", cal_dbus_utils_null_to_gvariant());
        }
@@ -473,8 +461,7 @@ static GVariant *_event_to_gvariant(calendar_record_h record)
                        calendar_record_get_child_record_at_p(record, _calendar_event.exception, i, &exception);
                        g_variant_builder_add(&builder_exception, "v", _only_event_to_gvariant(exception));
                }
-       }
-       else {
+       } else {
                DBG("No exception");
                g_variant_builder_add(&builder_exception, "v", cal_dbus_utils_null_to_gvariant());
        }
@@ -489,8 +476,7 @@ static GVariant *_event_to_gvariant(calendar_record_h record)
                        calendar_record_get_child_record_at_p(record, _calendar_event.extended, i, &extended);
                        g_variant_builder_add(&builder_extended, "v", _extended_to_gvariant(extended));
                }
-       }
-       else {
+       } else {
                DBG("No extended");
                g_variant_builder_add(&builder_extended, "v", cal_dbus_utils_null_to_gvariant());
        }
@@ -570,8 +556,7 @@ static GVariant *_todo_to_gvariant(calendar_record_h record)
                        calendar_record_get_child_record_at_p(record, _calendar_todo.calendar_alarm, i, &alarm);
                        g_variant_builder_add(&builder_alarm, "v", _alarm_to_gvariant(alarm));
                }
-       }
-       else {
+       } else {
                DBG("No alarm");
                g_variant_builder_add(&builder_alarm, "v", cal_dbus_utils_null_to_gvariant());
        }
@@ -586,8 +571,7 @@ static GVariant *_todo_to_gvariant(calendar_record_h record)
                        calendar_record_get_child_record_at_p(record, _calendar_todo.calendar_attendee, i, &attendee);
                        g_variant_builder_add(&builder_attendee, "v", _attendee_to_gvariant(attendee));
                }
-       }
-       else {
+       } else {
                DBG("No attendee");
                g_variant_builder_add(&builder_attendee, "v", cal_dbus_utils_null_to_gvariant());
        }
@@ -602,8 +586,7 @@ static GVariant *_todo_to_gvariant(calendar_record_h record)
                        calendar_record_get_child_record_at_p(record, _calendar_todo.extended, i, &extended);
                        g_variant_builder_add(&builder_extended, "v", _extended_to_gvariant(extended));
                }
-       }
-       else {
+       } else {
                DBG("No extended");
                g_variant_builder_add(&builder_extended, "v", cal_dbus_utils_null_to_gvariant());
        }
@@ -760,8 +743,7 @@ static GVariant *_search_to_gvariant(calendar_record_h record)
                        g_variant_builder_add(&builder, "iv", d->property_id, arg_value);
                        cursor = g_slist_next(cursor);
                }
-       }
-       else {
+       } else {
                g_variant_builder_init(&builder, (G_VARIANT_TYPE("i")));
                g_variant_builder_add(&builder, "i", 0);
        }
@@ -778,8 +760,7 @@ GVariant *cal_dbus_utils_record_to_gvariant(calendar_record_h record)
        if (NULL == record) {
                ERR("record is NULL");
                type = -1;
-       }
-       else {
+       } else {
                cal_record_s *rec = (cal_record_s *)record;
                type = rec->type;
        }
@@ -998,7 +979,7 @@ static int _gvariant_to_only_event(GVariant *arg_record, calendar_record_h *out_
        cal_event_s *p = (cal_event_s *)record;
 
        GVariant *arg_until = NULL;
-       GVariant *arg_start= NULL;
+       GVariant *arg_start = NULL;
        GVariant *arg_end = NULL;
 
        g_variant_get(arg_record, "(ii&s&s&s&s&siiiiiii&s&s&siddixixiiivii"
@@ -1196,12 +1177,11 @@ static int _gvariant_to_composite(GVariant * arg_composite_pack, cal_composite_f
                if (1 == is_exit)
                        break;
 
-               if (NULL == composite) {
+               if (NULL == composite)
                        composite = c;
-               }
-               else {
+               else
                        composite->filters = g_slist_append(composite->filters, c);
-               }
+
        }
        *out_composite = composite;
        return CALENDAR_ERROR_NONE;
@@ -1213,9 +1193,8 @@ static int _gvariant_to_operate(GVariant * arg_operate, cal_composite_filter_s *
        g_variant_get(arg_operate, "ai", &iter_operate);
 
        int operate = 0;
-       while (g_variant_iter_loop(iter_operate, "i", &operate)) {
+       while (g_variant_iter_loop(iter_operate, "i", &operate))
                f->filter_ops = g_slist_append(f->filter_ops, GINT_TO_POINTER(operate));
-       }
 
        return CALENDAR_ERROR_NONE;
 }
@@ -1246,9 +1225,9 @@ static int _gvariant_to_projection(int count_projection, GVariant *arg_projectio
                ERR("calloc() Fail");
                return CALENDAR_ERROR_OUT_OF_MEMORY;
        }
-       while (g_variant_iter_loop(iter_projection, "u", &q->projection[i])) {
+       while (g_variant_iter_loop(iter_projection, "u", &q->projection[i]))
                i++;
-       }
+
        q->projection_count = count_projection;
 
        return CALENDAR_ERROR_NONE;
@@ -1303,9 +1282,9 @@ int cal_dbus_utils_gvariant_to_ids(GVariant *arg_ids, int count, int **out_ids)
                return CALENDAR_ERROR_OUT_OF_MEMORY;
        }
        int i = 0;
-       for (i = 0; i < count; i++) {
+       for (i = 0; i < count; i++)
                g_variant_iter_loop(iter_ids, "i", &ids[i]);
-       }
+
        *out_ids = ids;
        return CALENDAR_ERROR_NONE;
 }
@@ -1338,8 +1317,7 @@ static int _gvariant_to_event(GVariant * arg_record, calendar_record_h *out_reco
                        _gvariant_to_alarm(arg_alarm, &alarm);
                        calendar_record_add_child_record(record, _calendar_event.calendar_alarm, alarm);
                }
-       }
-       else {
+       } else {
                DBG("No alarm");
        }
 
@@ -1350,8 +1328,7 @@ static int _gvariant_to_event(GVariant * arg_record, calendar_record_h *out_reco
                        _gvariant_to_attendee(arg_attendee, &attendee);
                        calendar_record_add_child_record(record, _calendar_event.calendar_attendee, attendee);
                }
-       }
-       else {
+       } else {
                DBG("No attendee");
        }
 
@@ -1362,8 +1339,7 @@ static int _gvariant_to_event(GVariant * arg_record, calendar_record_h *out_reco
                        _gvariant_to_only_event(arg_exception, &exception);
                        calendar_record_add_child_record(record, _calendar_event.exception, exception);
                }
-       }
-       else {
+       } else {
                DBG("No exception");
        }
 
@@ -1374,8 +1350,7 @@ static int _gvariant_to_event(GVariant * arg_record, calendar_record_h *out_reco
                        _gvariant_to_extended(arg_extended, &extended);
                        calendar_record_add_child_record(record, _calendar_event.extended, extended);
                }
-       }
-       else {
+       } else {
                DBG("No extended");
        }
 
@@ -1390,7 +1365,7 @@ static int _gvariant_to_only_todo(GVariant *arg_record, calendar_record_h *out_r
        cal_todo_s *p = (cal_todo_s *)record;
 
        GVariant *arg_until = NULL;
-       GVariant *arg_start= NULL;
+       GVariant *arg_start = NULL;
        GVariant *arg_due = NULL;
 
        g_variant_get(arg_record, "(ii&s&s&s&siii&sddxxiixiiivii&s&s&s&s&s&s&s&s&si"
@@ -1462,8 +1437,7 @@ static int _gvariant_to_todo(GVariant * arg_record, calendar_record_h *out_recor
                        _gvariant_to_alarm(arg_alarm, &alarm);
                        calendar_record_add_child_record(record, _calendar_todo.calendar_alarm, alarm);
                }
-       }
-       else {
+       } else {
                DBG("No alarm");
        }
 
@@ -1474,8 +1448,7 @@ static int _gvariant_to_todo(GVariant * arg_record, calendar_record_h *out_recor
                        _gvariant_to_attendee(arg_attendee, &attendee);
                        calendar_record_add_child_record(record, _calendar_todo.calendar_attendee, attendee);
                }
-       }
-       else {
+       } else {
                DBG("No attendee");
        }
 
@@ -1486,8 +1459,7 @@ static int _gvariant_to_todo(GVariant * arg_record, calendar_record_h *out_recor
                        _gvariant_to_extended(arg_extended, &extended);
                        calendar_record_add_child_record(record, _calendar_todo.extended, extended);
                }
-       }
-       else {
+       } else {
                DBG("No extended");
        }
 
index 51db22b..9f98367 100644 (file)
@@ -56,7 +56,7 @@ static cal_permission_info_s* _cal_access_control_find_permission_info(unsigned
 {
        GList *cursor;
 
-       for(cursor=__thread_list;cursor;cursor=cursor->next) {
+       for (cursor = __thread_list; cursor; cursor = cursor->next) {
                cal_permission_info_s *info = NULL;
                info = cursor->data;
                if (info->thread_id == thread_id)
@@ -128,11 +128,11 @@ static void _cal_access_control_set_permission_info(cal_permission_info_s *info)
                mode = sqlite3_column_int(stmt, 1);
                temp = (char *)sqlite3_column_text(stmt, 2);
 
-               if (!smack_enabled) // smack disabled
+               if (!smack_enabled) /* smack disabled */
                        info->write_list[write_index++] = id;
-               else if (NULL == info->ipc) // calendar-service daemon
+               else if (NULL == info->ipc) /* calendar-service daemon */
                        info->write_list[write_index++] = id;
-               else if (info->smack_label && temp && 0 == strcmp(temp, info->smack_label)) // owner
+               else if (info->smack_label && temp && 0 == strcmp(temp, info->smack_label)) /* owner */
                        info->write_list[write_index++] = id;
                else if (CALENDAR_BOOK_MODE_NONE == mode)
                        info->write_list[write_index++] = id;
@@ -191,9 +191,9 @@ char* cal_access_control_get_label(void)
        info = _cal_access_control_find_permission_info(thread_id);
 
        char *smack_label = NULL;
-       if (info && info->smack_label) {
+       if (info && info->smack_label)
                smack_label = strdup(info->smack_label);
-       }
+
        cal_mutex_unlock(CAL_MUTEX_ACCESS_CONTROL);
        return smack_label;
 }
@@ -202,7 +202,7 @@ void cal_access_control_reset(void)
 {
        cal_mutex_lock(CAL_MUTEX_ACCESS_CONTROL);
        GList *cursor;
-       for(cursor=__thread_list;cursor;cursor=cursor->next) {
+       for (cursor = __thread_list; cursor; cursor = cursor->next) {
                cal_permission_info_s *info = NULL;
                info = cursor->data;
                if (info)
index ee41bc7..2db8ce5 100644 (file)
@@ -63,7 +63,7 @@ void cal_server_quit_loop(void)
 static int _cal_server_init(void)
 {
        int ret = 0;
-#if !GLIB_CHECK_VERSION(2,35,0)
+#if !GLIB_CHECK_VERSION(2, 35, 0)
        g_type_init();
 #endif
 
@@ -99,7 +99,7 @@ static int _cal_server_main(void)
 
 static void _cal_server_create_directory(const char* directory, mode_t mode)
 {
-       if (0 == access (directory, F_OK))
+       if (0 == access(directory, F_OK))
                return;
 
        DBG("No directory[%s]", directory);
index d467e2f..0c146c3 100644 (file)
@@ -54,9 +54,8 @@ int cal_server_account_init(void)
        }
 
        ret = account_subscribe_notification(cal_account_h, _noti_cb, NULL);
-       if (ACCOUNT_ERROR_NONE != ret) {
+       if (ACCOUNT_ERROR_NONE != ret)
                WARN("account_subscribe_notification Failed (%d)", ret);
-       }
 
        pthread_mutex_unlock(&cal_mutex_account);
        return CALENDAR_ERROR_NONE;
index 21a8281..e654ce1 100644 (file)
@@ -37,8 +37,7 @@
 
 #define CAL_SEARCH_LOOP_MAX 4
 
-struct _alarm_data_s
-{
+struct _alarm_data_s {
        int event_id;
        long long int alert_utime; /* to compare */
        int unit;
@@ -57,8 +56,7 @@ static int _cal_server_alarm_unset_alerted_alarmmgr_id(int alarm_id)
        int ret = 0;
 
        ret = cal_db_util_begin_trans();
-       if (CALENDAR_ERROR_NONE != ret)
-       {
+       if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_db_util_begin_trans() Fail");
                return CALENDAR_ERROR_DB_FAILED;
        }
@@ -85,8 +83,7 @@ static int _cal_server_alarm_clear_all_cb(alarm_id_t alarm_id, void *data)
        DBG("remove alarm id(%d)", alarm_id);
        _cal_server_alarm_unset_alerted_alarmmgr_id(alarm_id);
        ret = alarmmgr_remove_alarm(alarm_id);
-       if (ret != ALARMMGR_RESULT_SUCCESS)
-       {
+       if (ret != ALARMMGR_RESULT_SUCCESS) {
                ERR("alarmmgr_remove_alarm() Fail(ret:%d)", ret);
                return ret;
        }
@@ -99,8 +96,7 @@ static int _cal_server_alarm_update_alarm_id(int alarm_id, int event_id, int tic
        int ret = 0;
 
        ret = cal_db_util_begin_trans();
-       if (CALENDAR_ERROR_NONE != ret)
-       {
+       if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_db_util_begin_trans() Fail");
                return CALENDAR_ERROR_DB_FAILED;
        }
@@ -244,8 +240,7 @@ int cal_server_alarm_get_alert_time(int alarm_id, time_t *tt_alert)
        if (CALENDAR_ALARM_TIME_UNIT_SPECIFIC == unit) {
                if (CALENDAR_TIME_UTIME == type) {
                        *tt_alert = utime;
-               }
-               else {
+               } else {
                        int y = 0, m = 0, d = 0;
                        int h = 0, n = 0, s = 0;
                        sscanf(datetime, CAL_FORMAT_LOCAL_DATETIME, &y, &m, &d, &h, &n, &s);
@@ -333,7 +328,7 @@ static void _cal_server_alarm_get_upcoming_specific_utime(time_t utime, bool get
                        return;
                }
 
-               ad->event_id = sqlite3_column_int(stmt,0);
+               ad->event_id = sqlite3_column_int(stmt, 0);
                ad->unit = sqlite3_column_int(stmt, 1);
                ad->tick = sqlite3_column_int(stmt, 2);
                ad->type = sqlite3_column_int(stmt, 3);
@@ -652,7 +647,7 @@ static gint _cal_server_alarm_sort_cb(gconstpointer a, gconstpointer b)
 {
        struct _alarm_data_s *p1 = (struct _alarm_data_s *)a;
        struct _alarm_data_s *p2 = (struct _alarm_data_s *)b;
-       DBG("%lld) > (%lld)",p1->alert_utime, p2->alert_utime);
+       DBG("%lld) > (%lld)", p1->alert_utime, p2->alert_utime);
 
        return p1->alert_utime < p2->alert_utime ? -1 : 1;
 }
@@ -804,7 +799,7 @@ static bool __app_matched_cb(app_control_h app_control, const char *package, voi
                l = g_list_next(l);
        }
        app_control_add_extra_data_array(b, "ids", (const char **)ids, len);
-       app_control_send_launch_request (b, NULL, NULL);
+       app_control_send_launch_request(b, NULL, NULL);
        app_control_destroy(b);
 
        for (i = 0; i < len; i++) {
@@ -869,9 +864,8 @@ int cal_server_alarm_register_next_alarm(time_t utime)
 {
        GList *l = NULL;
        _cal_server_alarm_get_latest(utime, false, &l);
-       if (NULL == l) {
+       if (NULL == l)
                return CALENDAR_ERROR_NONE;
-       }
 
        l = g_list_sort(l, _cal_server_alarm_sort_cb);
        g_list_foreach(l, (GFunc)_cal_server_alarm_print_cb, NULL);
index 0dec411..3b9c3b0 100644 (file)
@@ -33,8 +33,7 @@
 #define CAL_SERVER_CALENDAR_DELETE_STEP_TIME 1
 #define CAL_SERVER_CALENDAR_DELETE_THREAD_NAME "cal_server_calendar_delete"
 
-typedef enum
-{
+typedef enum {
        STEP_1, /* create calendar_id_list */
        STEP_2, /* delete schedule_table <-- CAL_SERVER_CALENDAR_DELETE_COUNT */
        STEP_3, /* delete calendar_table*/
@@ -64,7 +63,7 @@ static bool _cal_server_calendar_delete_step(int ret, __calendar_delete_data_s*
                        g_list_free(data->calendar_id_list);
 
                CAL_FREE(data);
-               ERR("_cal_server_calendar_delete_step Fail(%d)",ret);
+               ERR("_cal_server_calendar_delete_step Fail(%d)", ret);
                return false;
        }
        switch (data->step) {
@@ -79,9 +78,8 @@ static bool _cal_server_calendar_delete_step(int ret, __calendar_delete_data_s*
                break;
        case STEP_2:
                if (ret == CALENDAR_ERROR_NO_DATA)
-               {
                        data->step = STEP_3;
-               }
+
                break;
        case STEP_3:
                data->step = STEP_1;
@@ -122,20 +120,15 @@ static int _cal_server_calendar_delete_step1(__calendar_delete_data_s* data)
 
        count = g_list_length(data->calendar_id_list);
        if (count <= 0)
-       {
-               return CALENDAR_ERROR_NO_DATA;
-       }
+                       return CALENDAR_ERROR_NO_DATA;
 
        GList *cursor = g_list_first(data->calendar_id_list);
-       if (cursor)
-       {
+       if (cursor) {
                data->current_calendar_id = GPOINTER_TO_INT(cursor->data);
                data->calendar_id_list = g_list_remove(data->calendar_id_list, GINT_TO_POINTER(data->current_calendar_id));
 
                return CALENDAR_ERROR_NONE;
-       }
-       else
-       {
+       } else {
                return CALENDAR_ERROR_NO_DATA;
        }
 }
@@ -151,8 +144,7 @@ static int _cal_server_calendar_delete_step2(__calendar_delete_data_s* data)
        CAL_FN_CALL();
 
        ret = cal_db_util_begin_trans();
-       if (CALENDAR_ERROR_NONE != ret)
-       {
+       if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_db_util_begin_trans() failed");
                return CALENDAR_ERROR_DB_FAILED;
        }
@@ -184,7 +176,7 @@ static int _cal_server_calendar_delete_step2(__calendar_delete_data_s* data)
        }
 
        GList *cursor = g_list_first(list);
-       while(cursor) {
+       while (cursor) {
                int id = GPOINTER_TO_INT(cursor->data);
                /* delete event table */
                snprintf(query, sizeof(query), "DELETE FROM %s WHERE id=%d", CAL_TABLE_SCHEDULE, id);
@@ -212,8 +204,7 @@ static int _cal_server_calendar_delete_step3(__calendar_delete_data_s* data)
        char query[CAL_DB_SQL_MIN_LEN] = {0};
 
        ret = cal_db_util_begin_trans();
-       if (CALENDAR_ERROR_NONE != ret)
-       {
+       if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_db_util_begin_trans() failed");
                return CALENDAR_ERROR_DB_FAILED;
        }
@@ -274,7 +265,7 @@ static gpointer _cal_server_calendar_main(gpointer user_data)
        int ret = CALENDAR_ERROR_NONE;
        CAL_FN_CALL();
 
-       while(1) {
+       while (1) {
                __calendar_delete_data_s *callback_data = NULL;
                callback_data = calloc(1, sizeof(__calendar_delete_data_s));
                if (NULL == callback_data) {
index 4ede830..f0b500a 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <sys/time.h>
 #include <contacts.h>
-#include <unistd.h>    // usleep
+#include <unistd.h>    /* usleep */
 
 #include "calendar.h"
 #include "cal_typedef.h"
@@ -234,7 +234,7 @@ static int cal_server_contacts_insert_event(int id, calendar_list_h out_insert)
                        contacts_record_destroy(contact, true);
                        return CALENDAR_ERROR_SYSTEM;
                }
-               DBG("account_id[%d]",account_id);
+               DBG("account_id[%d]", account_id);
        }
 
        int index = 0;
@@ -337,12 +337,11 @@ static void _cal_server_contacts_get_event_list(contacts_list_h contacts_list,
 
                if (0 < delete_count) {
                        DBG("delete_count");
-                       if (NULL == array) {
+                       if (NULL == array)
                                array = calloc(delete_count, sizeof(int));
-                       }
-                       else {
+                       else
                                array = realloc(array, (count +delete_count) *sizeof(int));
-                       }
+
                        if (NULL == array) {
                                ERR("calloc() Fail");
                                free(delete_array);
@@ -479,7 +478,7 @@ void cal_server_contacts_delete(int account_id)
                return ;
        }
        ret = calendar_filter_add_int(filter, _calendar_event.calendar_book_id,
-                       CALENDAR_MATCH_EQUAL,DEFAULT_BIRTHDAY_CALENDAR_BOOK_ID);
+                       CALENDAR_MATCH_EQUAL, DEFAULT_BIRTHDAY_CALENDAR_BOOK_ID);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("calendar_filter_add_int() Fail(%d)", ret);
                calendar_filter_destroy(filter);
@@ -494,7 +493,7 @@ void cal_server_contacts_delete(int account_id)
                return ;
        }
        unsigned int projection = _calendar_event.id;
-       ret = calendar_query_set_projection(query, &projection ,1);
+       ret = calendar_query_set_projection(query, &projection , 1);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("calendar_query_set_projection() Fail");
                calendar_filter_destroy(filter);
@@ -576,7 +575,7 @@ static gpointer _cal_server_contacts_sync_main(gpointer user_data)
 
                cal_access_control_set_client_info(NULL, "calendar-service");
 
-               while(1) {
+               while (1) {
                        if (CALENDAR_ERROR_NONE != _cal_server_contacts_sync()) {
                                DBG("end");
                                break;
index 429c2ac..b8af963 100644 (file)
@@ -521,7 +521,7 @@ static int _cal_server_dbus_find_sender(const char *owner_name, cal_sender_s **o
        return CALENDAR_ERROR_NONE;
 }
 
-static int _cal_server_dbus_cleanup_sender(cal_sender_s *sender) // cleanup_handle_list
+static int _cal_server_dbus_cleanup_sender(cal_sender_s *sender) /* cleanup_handle_list */
 {
        CAL_FN_CALL();
        RETV_IF(NULL == sender, CALENDAR_ERROR_INVALID_PARAMETER);
@@ -653,14 +653,18 @@ static void _dbus_on_bus_acquired(GDBusConnection *conn, const gchar *name, gpoi
                        G_CALLBACK(_handle_get_count_with_query), NULL);
        g_signal_connect(dbus_object, "handle-get-current-version",
                        G_CALLBACK(_handle_get_current_version), NULL);
-//     g_signal_connect(dbus_object, "handle-add-changed-cb",
-//     G_CALLBACK(_handle_add_changed_cb), NULL);
-//     g_signal_connect(dbus_object, "handle-remove-changed-cb",
-//     G_CALLBACK(_handle_remove_changed_cb), NULL);
+/*
+       g_signal_connect(dbus_object, "handle-add-changed-cb",
+       G_CALLBACK(_handle_add_changed_cb), NULL);
+       g_signal_connect(dbus_object, "handle-remove-changed-cb",
+       G_CALLBACK(_handle_remove_changed_cb), NULL);
+*/
        g_signal_connect(dbus_object, "handle-get-changes-by-version",
                        G_CALLBACK(_handle_get_changes_by_version), NULL);
-//     g_signal_connect(dbus_object, "handle-get-last-change-version",
-//     G_CALLBACK(_handle_get_last_change_version), NULL);
+/*
+       g_signal_connect(dbus_object, "handle-get-last-change-version",
+       G_CALLBACK(_handle_get_last_change_version), NULL);
+*/
        g_signal_connect(dbus_object, "handle-get-changes-exception-by-version",
                        G_CALLBACK(_handle_get_changes_exception_by_version), NULL);
        g_signal_connect(dbus_object, "handle-clean-after-sync",
index e5354ea..9afbd28 100644 (file)
@@ -34,8 +34,8 @@ static inline int __remake_db_file(char* db_path)
        int ret, fd;
        char *errmsg;
        sqlite3 *db;
-       char db_file[CAL_STR_MIDDLE_LEN]={0};
-       char jn_file[CAL_STR_MIDDLE_LEN]={0};
+       char db_file[CAL_STR_MIDDLE_LEN] = {0};
+       char jn_file[CAL_STR_MIDDLE_LEN] = {0};
 
        snprintf(db_file, sizeof(db_file), "%s/%s", db_path ? db_path : DB_PATH, CALS_DB_NAME);
 
@@ -77,7 +77,7 @@ static inline int __remake_db_file(char* db_path)
 static inline int __check_db_file(char* db_path)
 {
        int fd = -1;
-       char db_file[CAL_STR_MIDDLE_LEN]={0,};
+       char db_file[CAL_STR_MIDDLE_LEN] = {0,};
        snprintf(db_file, sizeof(db_file), "%s/%s", db_path ? db_path : DB_PATH, CALS_DB_NAME);
        DBG("[%s]", db_file);
 
index 9dc9ebe..4583075 100644 (file)
@@ -37,8 +37,8 @@ int cal_connect(void)
 
        cal_mutex_lock(CAL_MUTEX_CONNECTION);
        if (0 == cal_total_connection) {
-#if !GLIB_CHECK_VERSION(2,35,0)
-               g_type_init();  // added for alarmmgr
+#if !GLIB_CHECK_VERSION(2, 35, 0)
+               g_type_init();  /* added for alarmmgr */
 #endif
                cal_view_initialize();
                ret = cal_inotify_init();
@@ -47,8 +47,7 @@ int cal_connect(void)
                        cal_mutex_unlock(CAL_MUTEX_CONNECTION);
                        return ret;
                }
-       }
-       else {
+       } else {
                DBG("[System] calendar service has been already connected");
        }
        cal_total_connection++;
@@ -74,8 +73,7 @@ int cal_disconnect(void)
        cal_mutex_lock(CAL_MUTEX_CONNECTION);
        if (1 == cal_thread_connection) {
                cal_db_util_close();
-       }
-       else if (cal_thread_connection <= 0) {
+       } else if (cal_thread_connection <= 0) {
                DBG("[System] not connected, count(%d)", cal_thread_connection);
                cal_mutex_unlock(CAL_MUTEX_CONNECTION);
                return CALENDAR_ERROR_INVALID_PARAMETER;
@@ -85,11 +83,9 @@ int cal_disconnect(void)
        if (1 == cal_total_connection) {
                cal_inotify_deinit();
                cal_view_finalize();
-       }
-       else if (1 < cal_total_connection) {
+       } else if (1 < cal_total_connection) {
                DBG("[System] connection count(%d)", cal_total_connection);
-       }
-       else {
+       } else {
                DBG("[System] Not connected, count(%d)", cal_total_connection);
                cal_mutex_unlock(CAL_MUTEX_CONNECTION);
                return CALENDAR_ERROR_INVALID_PARAMETER;
@@ -108,9 +104,8 @@ void cal_service_internal_disconnect(void)
                cal_db_util_close();
                cal_thread_connection--;
 
-               if (1 <= cal_total_connection) {
+               if (1 <= cal_total_connection)
                        cal_total_connection--;
-               }
        }
        cal_mutex_unlock(CAL_MUTEX_CONNECTION);
        return CALENDAR_ERROR_NONE;
index 7ea9504..c590482 100644 (file)
@@ -40,8 +40,7 @@ static int _cal_server_update_get_db_version(sqlite3 *db, int *version)
                return CALENDAR_ERROR_DB_FAILED;
        }
        ret = sqlite3_step(stmt);
-       if (SQLITE_ROW != ret)
-       {
+       if (SQLITE_ROW != ret) {
                ERR("sqlite3_step() failed[%s]", sqlite3_errmsg(db));
                sqlite3_finalize(stmt);
                return CALENDAR_ERROR_DB_FAILED;
@@ -77,46 +76,39 @@ int cal_server_update(void)
                 * added attendee_table(cutype, delegatee_uri, member), alarm_table(summary, action, attach).
                 */
                ret = sqlite3_exec(__db, "DROP VIEW event_calendar_attendee_view", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: DROP VIEW event_calendar_attendee_view(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
 
                ret = sqlite3_exec(__db, "ALTER TABLE attendee_table ADD COLUMN attendee_cutype INTEGER", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: ALTER TABLE attendee_table ADD COLUMN attendee_cutype(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
                ret = sqlite3_exec(__db, "ALTER TABLE attendee_table ADD COLUMN attendee_delegatee_uri TEXT", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: ALTER TABLE attendee_table ADD COLUMN attendee_delegatee_uri(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
                ret = sqlite3_exec(__db, "ALTER TABLE attendee_table ADD COLUMN attendee_member TEXT", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: ALTER TABLE attendee_table ADD COLUMN attendee_member(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
 
                ret = sqlite3_exec(__db, "ALTER TABLE alarm_table ADD COLUMN alarm_summary TEXT", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: ALTER TABLE alarm_table ADD COLUMN alarm_summary(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
                ret = sqlite3_exec(__db, "ALTER TABLE alarm_table ADD COLUMN alarm_action INTEGER", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: ALTER TABLE alarm_table ADD COLUMN alarm_action(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
                ret = sqlite3_exec(__db, "ALTER TABLE alarm_table ADD COLUMN alarm_attach TEXT", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: ALTER TABLE alarm_table ADD COLUMN alarm_attach(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
@@ -129,8 +121,7 @@ int cal_server_update(void)
                 * added schedule_table(freq) for view table parameter.
                 */
                ret = sqlite3_exec(__db, "ALTER TABLE schedule_table ADD COLUMN freq INTEGER DEFAULT 0", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: ALTER TABLE schedule_table ADD COLUMN freq(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
@@ -259,14 +250,12 @@ int cal_server_update(void)
                        sqlite3_free(errmsg);
                }
                ret = sqlite3_exec(__db, "DROP VIEW allday_instance_view", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: DROP VIEW allday_instance_view(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
                ret = sqlite3_exec(__db, "DROP VIEW allday_instance_view_extended", NULL, 0, &errmsg);
-               if (SQLITE_OK != ret)
-               {
+               if (SQLITE_OK != ret) {
                        ERR("sqlite3_exec() failed: DROP VIEW allday_instance_view_extended(%d) [%s]", ret, errmsg);
                        sqlite3_free(errmsg);
                }
@@ -276,8 +265,7 @@ int cal_server_update(void)
        /* update DB user_version */
        snprintf(query, sizeof(query), "PRAGMA user_version = %d", __USER_VERSION);
        ret = sqlite3_exec(__db, query, NULL, 0, &errmsg);
-       if (SQLITE_OK != ret)
-       {
+       if (SQLITE_OK != ret) {
                ERR("sqlite3_exec() failed(%d) [%s]", ret, errmsg);
                sqlite3_free(errmsg);
        }
index 027ae46..fdd388a 100644 (file)
@@ -400,7 +400,7 @@ int cal_db_insert_record(calendar_record_h record, int* id)
 
 int cal_db_update_record(calendar_record_h record)
 {
-       cal_record_s *temp=NULL ;
+       cal_record_s *temp = NULL;
        int ret = CALENDAR_ERROR_NONE;
 
        RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER);
@@ -452,7 +452,7 @@ int cal_db_delete_record(const char* view_uri, int id)
 
 int cal_db_replace_record(calendar_record_h record, int record_id)
 {
-       cal_record_s *temp=NULL ;
+       cal_record_s *temp = NULL;
        int ret = CALENDAR_ERROR_NONE;
 
        RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER);
@@ -491,7 +491,7 @@ int cal_db_get_all_records(const char* view_uri, int offset, int limit, calendar
        RETV_IF(NULL == plugin_cb, CALENDAR_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == plugin_cb->get_all_records, CALENDAR_ERROR_NOT_PERMITTED, "Not permitted");
 
-       ret = plugin_cb->get_all_records(offset,limit, &list);
+       ret = plugin_cb->get_all_records(offset, limit, &list);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("get_all_records() Fail");
                return ret;
@@ -664,7 +664,7 @@ int cal_db_insert_records(calendar_list_h list, int** ids, int* count)
        for (i = 0; i < _count; i++) {
                calendar_record_h record = NULL;
                ret = calendar_list_get_current_record_p(list, &record);
-               if (NULL == record|| CALENDAR_ERROR_NONE != ret) {
+               if (NULL == record || CALENDAR_ERROR_NONE != ret) {
                        ERR("No record in the list");
                        cal_db_util_end_trans(false);
                        CAL_FREE(_ids);
@@ -799,7 +799,7 @@ int cal_db_delete_records(const char* view_uri, int record_id_array[], int count
        ret = cal_db_util_begin_trans();
        RETVM_IF(CALENDAR_ERROR_NONE != ret, CALENDAR_ERROR_DB_FAILED, "cal_db_util_begin_trans() Fail(%d)", ret);
 
-       ret = plugin_cb->delete_records(record_id_array,count);
+       ret = plugin_cb->delete_records(record_id_array, count);
 
        if (CALENDAR_ERROR_NONE == ret)
                ret = cal_db_util_end_trans(true);
@@ -891,7 +891,7 @@ int cal_db_insert_vcalendars(const char* vcalendar_stream, int **record_id_array
                return CALENDAR_ERROR_DB_FAILED;
        }
 
-       for(i=0;i<list_count;i++) {
+       for (i = 0; i < list_count; i++) {
                calendar_record_h record = NULL;
 
                ret = calendar_list_get_current_record_p(list, &record);
@@ -964,7 +964,7 @@ int cal_db_replace_vcalendars(const char* vcalendar_stream, int *record_id_array
        int div = (int)(count / BULK_DEFAULT_COUNT) + 1;
        int bulk = count / div + 1;
 
-       for(i = 0; i < list_count; i++) {
+       for (i = 0; i < list_count; i++) {
                calendar_record_h record = NULL;
                char *view_uri = NULL;
 
@@ -987,11 +987,9 @@ int cal_db_replace_vcalendars(const char* vcalendar_stream, int *record_id_array
 
                if (CAL_STRING_EQUAL == strcmp(view_uri, _calendar_event._uri)) {
                        ret = cal_record_set_int(record, _calendar_event.id, record_id_array[i]);
-               }
-               else if (CAL_STRING_EQUAL == strcmp(view_uri, _calendar_todo._uri)) {
+               } else if (CAL_STRING_EQUAL == strcmp(view_uri, _calendar_todo._uri)) {
                        ret = cal_record_set_int(record, _calendar_todo.id, record_id_array[i]);
-               }
-               else {
+               } else {
                        DBG("this uri[%s] is not replacable.", view_uri);
                        calendar_list_next(list);
                        continue;
@@ -1069,27 +1067,21 @@ int cal_db_get_changes_by_version(const char* view_uri, int calendar_book_id, in
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "cal_db_util_query_get_first_int_result() Fail(%d)", ret);
 
        char buf[CAL_STR_SHORT_LEN64] = {0};
-       if (0 < calendar_book_id) {
+       if (0 < calendar_book_id)
                snprintf(buf, sizeof(buf), "AND calendar_id = %d ", calendar_book_id);
-
-       }
-       else {
+       else
                memset(buf, 0x0, sizeof(buf));
-       }
 
        int schedule_type = 0;
        int record_type = 0;
-       if (CAL_STRING_EQUAL == strcmp(view_uri,_calendar_event._uri)) {
+       if (CAL_STRING_EQUAL == strcmp(view_uri, _calendar_event._uri)) {
                schedule_type = CAL_SCH_TYPE_EVENT;
                record_type = CAL_RECORD_TYPE_EVENT;
 
-       }
-       else if (CAL_STRING_EQUAL == strcmp(view_uri,_calendar_todo._uri)) {
+       } else if (CAL_STRING_EQUAL == strcmp(view_uri, _calendar_todo._uri)) {
                schedule_type = CAL_SCH_TYPE_TODO;
                record_type = CAL_RECORD_TYPE_TODO;
-
-       }
-       else {
+       } else {
                ERR("Invalid parameter");
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -1119,11 +1111,11 @@ int cal_db_get_changes_by_version(const char* view_uri, int calendar_book_id, in
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               int id = 0, calendar_id = 0,type = 0;
+               int id = 0, calendar_id = 0, type = 0;
                int ver = 0;
                int created_ver = 0;
 
-               ret = calendar_record_create(_calendar_updated_info._uri,&record);
+               ret = calendar_record_create(_calendar_updated_info._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("calendar_record_create() Fail");
                        calendar_list_destroy(*record_list, true);
@@ -1136,15 +1128,12 @@ int cal_db_get_changes_by_version(const char* view_uri, int calendar_book_id, in
                ver = sqlite3_column_int(stmt, 1);
                created_ver = sqlite3_column_int(stmt, 2);
                is_deleted = sqlite3_column_int(stmt, 3);
-               if (is_deleted == 1) {
+               if (is_deleted == 1)
                        type = CALENDAR_RECORD_MODIFIED_STATUS_DELETED;
-               }
-               else if (created_ver != ver) {
+               else if (created_ver != ver)
                        type = CALENDAR_RECORD_MODIFIED_STATUS_UPDATED;
-               }
-               else {
+               else
                        type = CALENDAR_RECORD_MODIFIED_STATUS_INSERTED;
-               }
 
                calendar_id = sqlite3_column_int(stmt, 4);
 
@@ -1154,12 +1143,12 @@ int cal_db_get_changes_by_version(const char* view_uri, int calendar_book_id, in
                        continue;
                }
 
-               cal_record_set_int(record,_calendar_updated_info.id,id);
-               cal_record_set_int(record,_calendar_updated_info.calendar_book_id,calendar_id);
-               cal_record_set_int(record,_calendar_updated_info.modified_status,type);
-               cal_record_set_int(record,_calendar_updated_info.version,ver);
+               cal_record_set_int(record, _calendar_updated_info.id, id);
+               cal_record_set_int(record, _calendar_updated_info.calendar_book_id, calendar_id);
+               cal_record_set_int(record, _calendar_updated_info.modified_status, type);
+               cal_record_set_int(record, _calendar_updated_info.version, ver);
 
-               ret = calendar_list_add(*record_list,record);
+               ret = calendar_list_add(*record_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*record_list, true);
                        *record_list = NULL;
@@ -1195,12 +1184,11 @@ int cal_db_get_changes_exception_by_version(const char* view_uri, int original_e
 
        int schedule_type = 0;
        int record_type = 0;
-       if (CAL_STRING_EQUAL == strcmp(view_uri,_calendar_event._uri)) {
+       if (CAL_STRING_EQUAL == strcmp(view_uri, _calendar_event._uri)) {
                schedule_type = CAL_SCH_TYPE_EVENT;
                record_type = CAL_RECORD_TYPE_EVENT;
 
-       }
-       else {
+       } else {
                ERR("Invalid parameter");
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -1230,11 +1218,11 @@ int cal_db_get_changes_exception_by_version(const char* view_uri, int original_e
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               int id = 0, calendar_id = 0,type = 0;
+               int id = 0, calendar_id = 0, type = 0;
                int ver = 0;
                int created_ver = 0;
 
-               ret = calendar_record_create(_calendar_updated_info._uri,&record);
+               ret = calendar_record_create(_calendar_updated_info._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("calendar_record_create() Fail");
                        calendar_list_destroy(*record_list, true);
@@ -1257,12 +1245,12 @@ int cal_db_get_changes_exception_by_version(const char* view_uri, int original_e
 
                calendar_id = sqlite3_column_int(stmt, 4);
 
-               cal_record_set_int(record,_calendar_updated_info.id,id);
-               cal_record_set_int(record,_calendar_updated_info.calendar_book_id,calendar_id);
-               cal_record_set_int(record,_calendar_updated_info.modified_status,type);
-               cal_record_set_int(record,_calendar_updated_info.version,ver);
+               cal_record_set_int(record, _calendar_updated_info.id, id);
+               cal_record_set_int(record, _calendar_updated_info.calendar_book_id, calendar_id);
+               cal_record_set_int(record, _calendar_updated_info.modified_status, type);
+               cal_record_set_int(record, _calendar_updated_info.version, ver);
 
-               ret = calendar_list_add(*record_list,record);
+               ret = calendar_list_add(*record_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*record_list, true);
                        *record_list = NULL;
index 569d1f8..195ec06 100644 (file)
@@ -91,9 +91,8 @@ static void __print_ucal(int calendar_system_type, UCalendar *ucal, const char *
                        ucal_get(s_ucal, UCAL_MINUTE, &ec),
                        ucal_get(s_ucal, UCAL_SECOND, &ec));
 
-       if (CALENDAR_SYSTEM_EAST_ASIAN_LUNISOLAR == calendar_system_type) {
+       if (CALENDAR_SYSTEM_EAST_ASIAN_LUNISOLAR == calendar_system_type)
                ucal_close(s_ucal);
-       }
 }
 
 static void __get_allday_date(cal_event_s *event, UCalendar *ucal, int *y, int *m, int *d, int *h, int *n, int *s)
@@ -130,9 +129,8 @@ static void __get_allday_date(cal_event_s *event, UCalendar *ucal, int *y, int *
        if (s)
                *s = ucal_get(s_ucal, UCAL_SECOND, &ec);
 
-       if (CALENDAR_SYSTEM_EAST_ASIAN_LUNISOLAR == event->system_type) {
+       if (CALENDAR_SYSTEM_EAST_ASIAN_LUNISOLAR == event->system_type)
                ucal_close(s_ucal);
-       }
 }
 
 static int _cal_db_instance_parse_byint(char *byint, int *by, int *len)
@@ -211,9 +209,8 @@ static int __get_exdate_list(UCalendar *ucal, cal_event_s *event, GList **l, int
        RETV_IF(NULL == ucal, CALENDAR_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == event, CALENDAR_ERROR_INVALID_PARAMETER);
 
-       if (NULL == event->exdate || '\0' == *(event->exdate)) {
+       if (NULL == event->exdate || '\0' == *(event->exdate))
                return CALENDAR_ERROR_NONE;
-       }
 
        char **t = NULL;
        t = g_strsplit_set(event->exdate, " ,", -1);
@@ -227,9 +224,9 @@ static int __get_exdate_list(UCalendar *ucal, cal_event_s *event, GList **l, int
        int i;
        for (i = 0; i < len; i++) {
                char *p = t[i];
-               if (NULL == p) {
+               if (NULL == p)
                        continue;
-               }
+
                int y = 0, m = 0, d = 0;
                int h = 0, n = 0, s = 0;
                long long int lli = 0;
@@ -289,8 +286,7 @@ static int _cal_db_instance_update_exdate_mod(int original_event_id, char *recur
        t = g_strsplit_set(recurrence_id, " ,", -1);
        RETVM_IF(NULL == t, CALENDAR_ERROR_OUT_OF_MEMORY, "g_strsplit_set() Fail");;
 
-       for (i = 0; t[i]; i++)
-       {
+       for (i = 0; t[i]; i++) {
                p = t[i];
 
                /* remove space */
@@ -356,9 +352,9 @@ static inline int __cal_db_instance_has_after(calendar_time_s *t1, calendar_time
                        t2->time.date.year, t2->time.date.month, t2->time.date.mday);
 
        if (t1->time.date.year == t2->time.date.year) {
-               if (t1->time.date.month == t2->time.date.month) {
+               if (t1->time.date.month == t2->time.date.month)
                        return t1->time.date.mday < t2->time.date.mday ? 0 : 1;
-               }
+
                return t1->time.date.month < t2->time.date.month ? 0 : 1;
        }
        return t1->time.date.year < t2->time.date.year ? 0 : 1;
@@ -385,9 +381,8 @@ static int _cal_db_instance_del_inundant(int event_id, calendar_time_s *st, cal_
        int cnt;
        char query[CAL_DB_SQL_MAX_LEN];
 
-       if (event->range_type != CALENDAR_RANGE_COUNT) {
+       if (event->range_type != CALENDAR_RANGE_COUNT)
                return CALENDAR_ERROR_NONE;
-       }
 
        cnt = event->count;
        DBG("get count(%d) and del after this", cnt);
@@ -402,8 +397,7 @@ static int _cal_db_instance_del_inundant(int event_id, calendar_time_s *st, cal_
                                CAL_TABLE_NORMAL_INSTANCE,
                                event_id, cnt -1);
 
-       }
-       else if (st->type == CALENDAR_TIME_LOCALTIME) {
+       } else if (st->type == CALENDAR_TIME_LOCALTIME) {
                snprintf(query, sizeof(query), "DELETE FROM %s WHERE event_id = %d "
                                "AND dtstart_datetime > (SELECT dtstart_datetime FROM %s "
                                "WHERE event_id = %d ORDER BY dtstart_datetime LIMIT %d, 1) ",
@@ -460,7 +454,7 @@ static int _cal_db_instance_get_duration(UCalendar *ucal, calendar_time_s *st, c
 
        switch (st->type) {
        case CALENDAR_TIME_UTIME:
-               if ( et->time.utime < st->time.utime) {
+               if (et->time.utime < st->time.utime) {
                        ERR("check time: end(%lld < start(%lld)", et->time.utime, st->time.utime);
                        return CALENDAR_ERROR_INVALID_PARAMETER;
                }
@@ -535,9 +529,8 @@ static int __convert_wday_to_int(const char *wday)
        const char *week_text[7] = {"SU", "MO", "TU", "WE", "TH", "FR", "SA"};
        int i;
        for (i = 0; i < 7; i++) {
-               if (strstr(wday, week_text[i])) {
+               if (strstr(wday, week_text[i]))
                        return i + 1;
-               }
        }
        return 0;
 }
@@ -563,8 +556,7 @@ static int __get_until_from_range(cal_event_s *event, calendar_time_s *until)
                        if (range < event->until.time.utime) {
                                DBG("range max < until time(%lld), so set max(%lld)", event->until.time.utime, range);
                                until->time.utime = range;
-                       }
-                       else {
+                       } else {
                                until->time.utime = event->until.time.utime;
                        }
                        break;
@@ -618,14 +610,11 @@ static bool __check_bysetpos_to_skip(int index, int *bysetpos, int bysetpos_len,
 
        for (i = 0; i < bysetpos_len; i++) {
                if (0 < bysetpos[i]) {
-                       if (bysetpos[i] == (index + 1)) {
+                       if (bysetpos[i] == (index + 1))
                                return false;
-                       }
-               }
-               else {
-                       if ((index - dates_len) == bysetpos[i]) {
+               } else {
+                       if ((index - dates_len) == bysetpos[i])
                                return false;
-                       }
                }
        }
        return true;
@@ -703,9 +692,8 @@ static bool __check_daily_bymonth_to_skip(UCalendar *ucal, int *bymonth, int bym
        int month = ucal_get(ucal, UCAL_MONTH, &ec) + 1;
        int i;
        for (i = 0; i < bymonth_len; i++) {
-               if (month == bymonth[i]) {
+               if (month == bymonth[i])
                        return false;
-               }
        }
        if (*log_value != month) {
                DBG("Get month(%d) Not in bymonth", month);
@@ -792,22 +780,24 @@ static int _cal_db_instance_publish_yearly_yday(UCalendar *ucal, cal_event_s *ev
                int i;
                for (i = 0; i < byyearday_len; i++) {
                        ucal_set(ucal, UCAL_DAY_OF_YEAR, byyearday[i]);
-                       if (true == __check_bysetpos_to_skip(i, bysetpos, bysetpos_len, byyearday_len)) {
+                       if (true == __check_bysetpos_to_skip(i, bysetpos, bysetpos_len, byyearday_len))
                                continue;
-                       }
+
                        current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                       if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                       if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                continue;
-                       }
+
                        if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                count++;
                                continue;
                        }
                        is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                       if (true == is_exit) break;
+                       if (true == is_exit)
+                               break;
                        _cal_db_instance_insert_record(ucal, duration, event);
                }
-               if (true == is_exit) break;
+               if (true == is_exit)
+                       break;
                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
                is_exit = __check_to_stop_loop(current_utime, &last_utime, loop);
                loop++;
@@ -844,8 +834,7 @@ static int _cal_db_instance_publish_yearly_weekno(UCalendar *ucal, cal_event_s *
                week_bits |= (0x01 << (dtstart_wday - 1));
                byday_len = 1;
 
-       }
-       else {
+       } else {
                week_bits = __convert_week_to_bits(event->byday, &byday_len);
        }
        DBG("byday_len (%d) week integer(0x%x)", byday_len, week_bits);
@@ -899,25 +888,28 @@ static int _cal_db_instance_publish_yearly_weekno(UCalendar *ucal, cal_event_s *
                                        week_count++;
                                        ucal_set(ucal, UCAL_WEEK_OF_YEAR, byweekno[i] + extra_weekno);
                                        ucal_set(ucal, UCAL_DAY_OF_WEEK, j + 1);
-                                       if (true == __check_bysetpos_to_skip(i + week_count - 1, bysetpos, bysetpos_len, byweekno_len + byday_len - 1)) {
+                                       if (true == __check_bysetpos_to_skip(i + week_count - 1, bysetpos, bysetpos_len, byweekno_len + byday_len - 1))
                                                continue;
-                                       }
+
                                        current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                                       if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                                       if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                                continue;
-                                       }
+
                                        if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                                count++;
                                                continue;
                                        }
                                        is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                                       if (true == is_exit) break;
+                                       if (true == is_exit)
+                                               break;
                                        _cal_db_instance_insert_record(ucal, duration, event);
                                }
                        }
-                       if (true == is_exit) break;
+                       if (true == is_exit)
+                               break;
                }
-               if (true == is_exit) break;
+               if (true == is_exit)
+                       break;
                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
                is_exit = __check_to_stop_loop(current_utime, &last_utime, loop);
                loop++;
@@ -976,8 +968,7 @@ static int _cal_db_instance_publish_yearly_wday(UCalendar *ucal, cal_event_s *ev
                t = g_strsplit_set(buf, " ,", -1);
                byday_len = 1;
 
-       }
-       else {
+       } else {
                t = g_strsplit_set(event->byday, " ,", -1);
                byday_len = g_strv_length(t);
        }
@@ -1026,30 +1017,29 @@ static int _cal_db_instance_publish_yearly_wday(UCalendar *ucal, cal_event_s *ev
                                                ucal_set(ucal, UCAL_MONTH, false == has_bymonth ? 0 : (bymonth[i] - 1));
                                                ucal_add(ucal, UCAL_WEEK_OF_YEAR, nth - 1, &ec);
 
-                                       }
-                                       else {
+                                       } else {
                                                ucal_set(ucal, UCAL_DAY_OF_WEEK, wday_int);
                                                ucal_set(ucal, UCAL_MONTH, false == has_bymonth ? 0 : bymonth[i] - 1);
                                                ucal_set(ucal, UCAL_DAY_OF_WEEK_IN_MONTH, nth);
                                        }
-                                       if (true == __check_bysetpos_to_skip(j, bysetpos, bysetpos_len, bymonth_len + byday_len - 1)) {
+                                       if (true == __check_bysetpos_to_skip(j, bysetpos, bysetpos_len, bymonth_len + byday_len - 1))
                                                continue;
-                                       }
+
                                        current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                                       if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                                       if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                                continue;
-                                       }
+
                                        if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                                count++;
                                                continue;
                                        }
                                        is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                                       if (true == is_exit) break;
+                                       if (true == is_exit)
+                                               break;
                                        _cal_db_instance_insert_record(ucal, duration, event);
                                }
 
-                       }
-                       else {
+                       } else {
                                /* SU, SA: no week num: means all week:1TH,2TH,3TH.., so needs another byevent->system_typex */
                                int week_bits = 0;
                                /* if nowday in weekly */
@@ -1059,8 +1049,7 @@ static int _cal_db_instance_publish_yearly_wday(UCalendar *ucal, cal_event_s *ev
                                        int dtstart_wday = ucal_get(ucal, UCAL_DAY_OF_WEEK, &ec);
                                        week_bits |= (0x01 << (dtstart_wday - 1));
 
-                               }
-                               else {
+                               } else {
                                        week_bits = __convert_week_to_bits(event->byday, NULL);
                                }
                                DBG("week integer(0x%x)", week_bits);
@@ -1083,24 +1072,24 @@ static int _cal_db_instance_publish_yearly_wday(UCalendar *ucal, cal_event_s *ev
                                                        DBG("get wday(%d) != want wday(%d)", w, k + 1);
                                                        continue;
                                                }
-                                               if (true == __check_bysetpos_to_skip(j, bysetpos, bysetpos_len, bymonthday_len)) {
+                                               if (true == __check_bysetpos_to_skip(j, bysetpos, bysetpos_len, bymonthday_len))
                                                        continue;
-                                               }
+
                                                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                                               if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                                               if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                                        continue;
-                                               }
+
                                                if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                                        count++;
                                                        continue;
                                                }
                                                is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                                               if (true == is_exit) break;
+                                               if (true == is_exit)
+                                                       break;
                                                _cal_db_instance_insert_record(ucal, duration, event);
                                        }
 
-                               }
-                               else {
+                               } else {
                                        int year = ucal_get(ucal, UCAL_YEAR, &ec);
 
                                        ucal_set(ucal, UCAL_MONTH, bymonth[i] - 1);
@@ -1127,28 +1116,32 @@ static int _cal_db_instance_publish_yearly_wday(UCalendar *ucal, cal_event_s *ev
                                                        int get_month = ucal_get(ucal, UCAL_MONTH, &ec) + 1;
                                                        if (bymonth[i] != get_month) { j = 6; break; }
 
-                                                       if (true == __check_bysetpos_to_skip(index, bysetpos, bysetpos_len, dates_len)) {
+                                                       if (true == __check_bysetpos_to_skip(index, bysetpos, bysetpos_len, dates_len))
                                                                continue;
-                                                       }
+
                                                        current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                                                       if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                                                       if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                                                continue;
-                                                       }
+
                                                        if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                                                count++;
                                                                continue;
                                                        }
                                                        is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                                                       if (true == is_exit) break;
+                                                       if (true == is_exit)
+                                                               break;
                                                        _cal_db_instance_insert_record(ucal, duration, event);
                                                }
-                                               if (true == is_exit) break;
+                                               if (true == is_exit)
+                                                       break;
                                        }
                                }
                        }
-                       if (true == is_exit) break;
+                       if (true == is_exit)
+                               break;
                }
-               if (true == is_exit) break;
+               if (true == is_exit)
+                       break;
                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
                is_exit = __check_to_stop_loop(current_utime, &last_utime, loop);
                loop++;
@@ -1227,15 +1220,13 @@ static int _cal_db_instance_publish_yearly_mday(UCalendar *ucal, cal_event_s *ev
                                                DBG("bymonthday(%d) but get (%d) from icu", bymonthday[i], get_mday);
                                                continue;
                                        }
-                               }
-                               else if (bymonthday[i] < 0) {
+                               } else if (bymonthday[i] < 0) {
                                        ucal_set(ucal, UCAL_MONTH, bymonth[j] - 1);
                                        ucal_set(ucal, UCAL_DATE, 1);
                                        ucal_add(ucal, UCAL_MONTH, 1, &ec);
                                        ucal_add(ucal, UCAL_DAY_OF_YEAR, bymonthday[i], &ec);
 
-                               }
-                               else { /* 0 is invalid */
+                               } else { /* 0 is invalid */
                                        DBG("Invalid bymonthday(%d)", bymonthday[i]);
                                        continue;
                                }
@@ -1244,19 +1235,21 @@ static int _cal_db_instance_publish_yearly_mday(UCalendar *ucal, cal_event_s *ev
                                        continue;
                                }
                                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                               if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                               if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                        continue;
-                               }
+
                                if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                        count++;
                                        continue;
                                }
                                is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                               if (true == is_exit) break;
+                               if (true == is_exit)
+                                       break;
                                _cal_db_instance_insert_record(ucal, duration, event);
                        }
                }
-               if (true == is_exit) break;
+               if (true == is_exit)
+                       break;
                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
                is_exit = __check_to_stop_loop(current_utime, &last_utime, loop);
                loop++;
@@ -1272,17 +1265,13 @@ static int _cal_db_instance_publish_record_yearly(UCalendar *ucal, cal_event_s *
 
        if (event->byyearday && 0 < strlen(event->byyearday)) {
                _cal_db_instance_publish_yearly_yday(ucal, event, duration);
-       }
-       else if (event->byweekno && 0 < strlen(event->byweekno)) {
+       } else if (event->byweekno && 0 < strlen(event->byweekno)) {
                _cal_db_instance_publish_yearly_weekno(ucal, event, duration);
-       }
-       else {
-               if (event->byday && *event->byday) {
+       } else {
+               if (event->byday && *event->byday)
                        _cal_db_instance_publish_yearly_wday(ucal, event, duration);
-               }
-               else {
+               else
                        _cal_db_instance_publish_yearly_mday(ucal, event, duration);
-               }
        }
        return CALENDAR_ERROR_NONE;
 }
@@ -1321,8 +1310,7 @@ static int _cal_db_instance_publish_monthly_wday(UCalendar *ucal, cal_event_s *e
                t = g_strsplit_set(buf, " ,", -1);
                byday_len = 1;
 
-       }
-       else {
+       } else {
                t = g_strsplit_set(event->byday, " ,", -1);
                byday_len = g_strv_length(t);
        }
@@ -1369,35 +1357,33 @@ static int _cal_db_instance_publish_monthly_wday(UCalendar *ucal, cal_event_s *e
                                                ucal_set(ucal, UCAL_DAY_OF_WEEK, wday_int);
                                                ucal_set(ucal, UCAL_DAY_OF_WEEK_IN_MONTH, -1);
 
-                                       }
-                                       else {
+                                       } else {
                                                ucal_set(ucal, UCAL_DAY_OF_WEEK, wday_int);
                                                ucal_set(ucal, UCAL_DAY_OF_WEEK_IN_MONTH, 1);
                                                ucal_add(ucal, UCAL_WEEK_OF_YEAR, nth - 1, &ec);
                                        }
-                               }
-                               else {
+                               } else {
                                        ucal_set(ucal, UCAL_DAY_OF_WEEK, wday_int);
                                        ucal_set(ucal, UCAL_DAY_OF_WEEK_IN_MONTH, nth);
                                }
-                               if (true == __check_bysetpos_to_skip(i, bysetpos, bysetpos_len, byday_len)) {
+                               if (true == __check_bysetpos_to_skip(i, bysetpos, bysetpos_len, byday_len))
                                        continue;
-                               }
+
                                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                               if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                               if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                        continue;
-                               }
+
                                if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                        count++;
                                        continue;
                                }
                                is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                               if (true == is_exit) break;
+                               if (true == is_exit)
+                                       break;
                                _cal_db_instance_insert_record(ucal, duration, event);
                        }
 
-               }
-               else { /* SU, SA: no week num: means all week:1TH,2TH,3TH.., so needs another byevent->system_type */
+               } else { /* SU, SA: no week num: means all week:1TH,2TH,3TH.., so needs another byevent->system_type */
                        int week_bits = 0;
                        /* if nowday in weekly */
                        if (NULL == event->byday || '\0' == event->byday[0]) {
@@ -1406,8 +1392,7 @@ static int _cal_db_instance_publish_monthly_wday(UCalendar *ucal, cal_event_s *e
                                int dtstart_wday = ucal_get(ucal, UCAL_DAY_OF_WEEK, &ec);
                                week_bits |= (0x01 << (dtstart_wday - 1));
 
-                       }
-                       else {
+                       } else {
                                week_bits = __convert_week_to_bits(event->byday, NULL);
                        }
                        DBG("week integer(0x%x)", week_bits);
@@ -1429,24 +1414,24 @@ static int _cal_db_instance_publish_monthly_wday(UCalendar *ucal, cal_event_s *e
                                                DBG("get wday(%d) != want wday(%d)", w, k + 1);
                                                continue;
                                        }
-                                       if (true == __check_bysetpos_to_skip(j, bysetpos, bysetpos_len, bymonthday_len)) {
+                                       if (true == __check_bysetpos_to_skip(j, bysetpos, bysetpos_len, bymonthday_len))
                                                continue;
-                                       }
+
                                        current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                                       if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                                       if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                                continue;
-                                       }
+
                                        if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                                count++;
                                                continue;
                                        }
                                        is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                                       if (true == is_exit) break;
+                                       if (true == is_exit)
+                                               break;
                                        _cal_db_instance_insert_record(ucal, duration, event);
                                }
 
-                       }
-                       else {
+                       } else {
                                int year = ucal_get(ucal, UCAL_YEAR, &ec);
                                int month = ucal_get(ucal, UCAL_MONTH, &ec) + 1;
 
@@ -1473,26 +1458,29 @@ static int _cal_db_instance_publish_monthly_wday(UCalendar *ucal, cal_event_s *e
                                                int get_month = ucal_get(ucal, UCAL_MONTH, &ec) + 1;
                                                if (month != get_month) { j = 6; break; }
 
-                                               if (true == __check_bysetpos_to_skip(index, bysetpos, bysetpos_len, dates_len)) {
+                                               if (true == __check_bysetpos_to_skip(index, bysetpos, bysetpos_len, dates_len))
                                                        continue;
-                                               }
+
                                                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                                               if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                                               if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                                        continue;
-                                               }
+
                                                if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                                        count++;
                                                        continue;
                                                }
                                                is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                                               if (true == is_exit) break;
+                                               if (true == is_exit)
+                                                       break;
                                                _cal_db_instance_insert_record(ucal, duration, event);
                                        }
-                                       if (true == is_exit) break;
+                                       if (true == is_exit)
+                                               break;
                                }
                        }
                }
-               if (true == is_exit) break;
+               if (true == is_exit)
+                       break;
                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
                is_exit = __check_to_stop_loop(current_utime, &last_utime, loop);
                loop++;
@@ -1558,33 +1546,33 @@ static int _cal_db_instance_publish_monthly_mday(UCalendar *ucal, cal_event_s *e
                                        DBG("bymonthday(%d) but get (%d) from icu", bymonthday[i], get_mday);
                                        continue;
                                }
-                       }
-                       else if (bymonthday[i] < 0) {
+                       } else if (bymonthday[i] < 0) {
                                ucal_set(ucal, UCAL_DATE, 1);
                                ucal_add(ucal, UCAL_MONTH, 1, &ec);
                                ucal_add(ucal, UCAL_DAY_OF_YEAR, bymonthday[i], &ec);
 
-                       }
-                       else { /* 0 is invalid */
+                       } else { /* 0 is invalid */
                                DBG("Invalid bymonthday(%d)", bymonthday[i]);
                                continue;
                        }
-                       if (true == __check_bysetpos_to_skip(i, bysetpos, bysetpos_len, bymonthday_len)) {
+                       if (true == __check_bysetpos_to_skip(i, bysetpos, bysetpos_len, bymonthday_len))
                                continue;
-                       }
+
                        current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                       if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                       if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                continue;
-                       }
+
                        if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                count++;
                                continue;
                        }
                        is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                       if (true == is_exit) break;
+                       if (true == is_exit)
+                               break;
                        _cal_db_instance_insert_record(ucal, duration, event);
                }
-               if (true == is_exit) break;
+               if (true == is_exit)
+                       break;
                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
                is_exit = __check_to_stop_loop(current_utime, &last_utime, loop);
                loop++;
@@ -1626,8 +1614,7 @@ static int _cal_db_instance_publish_weekly_wday(UCalendar *ucal, cal_event_s *ev
                int dtstart_wday = ucal_get(ucal, UCAL_DAY_OF_WEEK, &ec);
                week_bits |= (0x01 << (dtstart_wday - 1));
 
-       }
-       else {
+       } else {
                week_bits = __convert_week_to_bits(event->byday, &byday_len);
        }
        DBG("week integer(0x%x)", week_bits);
@@ -1659,28 +1646,31 @@ static int _cal_db_instance_publish_weekly_wday(UCalendar *ucal, cal_event_s *ev
                int i;
                int index = -1;
                for (i = 0; i < 7; i++) {
-                       if (0 == (week_bits & (0x01 << ((byday_start -1 +i)%7)))) continue;
+                       if (0 == (week_bits & (0x01 << ((byday_start -1 +i)%7))))
+                               continue;
                        index++;
 
                        int wday_int = (byday_start -1 +i) %7 + 1;
                        ucal_set(ucal, UCAL_DAY_OF_WEEK, wday_int);
 
-                       if (true == __check_bysetpos_to_skip(index, bysetpos, bysetpos_len, byday_len)) {
+                       if (true == __check_bysetpos_to_skip(index, bysetpos, bysetpos_len, byday_len))
                                continue;
-                       }
+
                        current_utime = ms2sec(ucal_getMillis(ucal, &ec));
-                       if (true == __check_before_dtstart(current_utime, dtstart_utime)) {
+                       if (true == __check_before_dtstart(current_utime, dtstart_utime))
                                continue;
-                       }
+
                        if (true == __check_exdate_to_skip(current_utime, exdate_len, &l)) {
                                count++;
                                continue;
                        }
                        is_exit = __check_out_of_range(current_utime, event, until_utime, &count);
-                       if (true == is_exit) break;
+                       if (true == is_exit)
+                               break;
                        _cal_db_instance_insert_record(ucal, duration, event);
                }
-               if (true == is_exit) break;
+               if (true == is_exit)
+                       break;
                current_utime = ms2sec(ucal_getMillis(ucal, &ec));
                is_exit = __check_to_stop_loop(current_utime, &last_utime, loop);
                loop++;
index 82806c8..c2a8251 100644 (file)
@@ -34,8 +34,8 @@
 #include "cal_db_plugin_alarm_helper.h"
 #include "cal_utils.h"
 
-//static int _cal_db_alarm_get_record(int id, calendar_record_h* out_record);
-static int _cal_db_alarm_get_all_records(int offset, int limit, calendar_list_hout_list);
+/* static int _cal_db_alarm_get_record(int id, calendar_record_h* out_record); */
+static int _cal_db_alarm_get_all_records(int offset, int limit, calendar_list_h *out_list);
 static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offset, int limit, calendar_list_h* out_list);
 static int _cal_db_alarm_get_count(int *out_count);
 static int _cal_db_alarm_get_count_with_query(calendar_query_h query, int *out_count);
@@ -57,7 +57,7 @@ cal_db_plugin_cb_s cal_db_alarm_plugin_cb = {
        .get_count_with_query = _cal_db_alarm_get_count_with_query
 };
 
-static void _cal_db_alarm_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_alarm_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_alarm_s *alarm = NULL;
        int index;
@@ -84,10 +84,9 @@ static void _cal_db_alarm_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
        alarm->alarm_attach = cal_strdup((const char*)temp);
 
        if (alarm->alarm.type == CALENDAR_TIME_UTIME) {
-               alarm->alarm.time.utime = sqlite3_column_int64(stmt,index++);
+               alarm->alarm.time.utime = sqlite3_column_int64(stmt, index++);
                index++; /* datetime */
-       }
-       else {
+       } else {
                index++; /* utime */
                temp = sqlite3_column_text(stmt, index++);
                if (temp) {
@@ -129,14 +128,14 @@ static int _cal_db_alarm_get_all_records(int offset, int limit, calendar_list_h*
        ret = calendar_list_create(out_list);
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "calendar_list_create() Fail(%d)", ret);
 
-       if (0 < offset) {
+       if (0 < offset)
                snprintf(offsetquery, sizeof(offsetquery), "OFFSET %d", offset);
-       }
-       if (0 < limit) {
+
+       if (0 < limit)
                snprintf(limitquery, sizeof(limitquery), "LIMIT %d", limit);
-       }
+
        snprintf(query, sizeof(query), "SELECT *, rowid FROM %s %s %s",
-                       CAL_TABLE_ALARM,limitquery,offsetquery);
+                       CAL_TABLE_ALARM, limitquery, offsetquery);
 
        ret = cal_db_util_query_prepare(query, &stmt);
        if (CALENDAR_ERROR_NONE != ret) {
@@ -149,16 +148,16 @@ static int _cal_db_alarm_get_all_records(int offset, int limit, calendar_list_h*
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record = NULL;
-               ret = calendar_record_create(_calendar_alarm._uri,&record);
+               ret = calendar_record_create(_calendar_alarm._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
                        sqlite3_finalize(stmt);
                        return ret;
                }
-               _cal_db_alarm_get_stmt(stmt,record);
+               _cal_db_alarm_get_stmt(stmt, record);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -212,8 +211,7 @@ static void _cal_db_alarm_get_property_stmt(sqlite3_stmt *stmt,
                        alarm->alarm.time.utime = sqlite3_column_int64(stmt, *stmt_count);
                        *stmt_count = *stmt_count+1; /* datetime */
 
-               }
-               else {
+               } else {
                        *stmt_count = *stmt_count+1; /* utime */
                        *stmt_count = *stmt_count+1;
                        temp = sqlite3_column_text(stmt, *stmt_count);
@@ -253,11 +251,11 @@ static void _cal_db_alarm_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++)
-               _cal_db_alarm_get_property_stmt(stmt,projection[i],&stmt_count,record);
+       for (i = 0; i < projection_count; i++)
+               _cal_db_alarm_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
 
 static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offset, int limit, calendar_list_h* out_list)
@@ -277,9 +275,8 @@ static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offs
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_ALARM)) {
                table_name = cal_strdup(CAL_TABLE_ALARM);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -303,8 +300,7 @@ static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offs
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT *, rowid FROM ");
                cal_db_append_string(&query_str, table_name);
        }
@@ -349,9 +345,8 @@ static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offs
 
        /* bind text */
        if (bind_text)  {
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -368,7 +363,7 @@ static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offs
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_alarm._uri,&record);
+               ret = calendar_record_create(_calendar_alarm._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -388,12 +383,11 @@ static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offs
                        _cal_db_alarm_get_projection_stmt(stmt,
                                        que->projection, que->projection_count,
                                        record);
-               }
-               else {
-                       _cal_db_alarm_get_stmt(stmt,record);
+               } else {
+                       _cal_db_alarm_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -435,7 +429,7 @@ static int _cal_db_alarm_get_count(int *out_count)
                ERR("cal_db_util_query_get_first_int_result() failed");
                return ret;
        }
-       DBG("%s=%d",query,count);
+       DBG("%s=%d", query, count);
 
        *out_count = count;
        return CALENDAR_ERROR_NONE;
@@ -452,11 +446,10 @@ static int _cal_db_alarm_get_count_with_query(calendar_query_h query, int *out_c
 
        que = (cal_query_s *)query;
 
-       if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_ALARM))     {
+       if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_ALARM)) {
                table_name = cal_strdup(CAL_TABLE_ALARM);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -494,7 +487,7 @@ static int _cal_db_alarm_get_count_with_query(calendar_query_h query, int *out_c
                CAL_FREE(query_str);
                return ret;
        }
-       DBG("%s=%d",query_str,count);
+       DBG("%s=%d", query_str, count);
 
        *out_count = count;
 
index 3b2716d..4f34df9 100644 (file)
@@ -192,18 +192,17 @@ int cal_db_alarm_get_records(int parent, cal_list_s *list)
                alarm->alarm.type = sqlite3_column_int(stmt, index++);
 
                temp = sqlite3_column_text(stmt, index++);
-               alarm->alarm_summary= cal_strdup((const char*)temp);
+               alarm->alarm_summary = cal_strdup((const char*)temp);
 
                alarm->alarm_action = sqlite3_column_int(stmt, index++);
 
                temp = sqlite3_column_text(stmt, index++);
-               alarm->alarm_attach= cal_strdup((const char*)temp);
+               alarm->alarm_attach = cal_strdup((const char*)temp);
 
                if (alarm->alarm.type == CALENDAR_TIME_UTIME) {
-                       alarm->alarm.time.utime = sqlite3_column_int64(stmt,index++);
+                       alarm->alarm.time.utime = sqlite3_column_int64(stmt, index++);
                        index++; /* datetime */
-               }
-               else {
+               } else {
                        index++; /* utime */
                        temp = sqlite3_column_text(stmt, index++);
                        if (temp) {
index 82afa2d..e64df42 100644 (file)
@@ -33,7 +33,7 @@ static int _cal_db_attendee_get_all_records(int offset, int limit, calendar_list
 static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int offset, int limit, calendar_list_h* out_list);
 static int _cal_db_attendee_get_count(int *out_count);
 static int _cal_db_attendee_get_count_with_query(calendar_query_h query, int *out_count);
-// static int _cal_db_attendee_get_record(int id, calendar_record_h* out_record)
+/* static int _cal_db_attendee_get_record(int id, calendar_record_h* out_record) */
 
 cal_db_plugin_cb_s cal_db_attendee_plugin_cb = {
        .is_query_only = false,
@@ -52,7 +52,7 @@ cal_db_plugin_cb_s cal_db_attendee_plugin_cb = {
        .get_count_with_query = _cal_db_attendee_get_count_with_query
 };
 
-static void _cal_db_attendee_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_attendee_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_attendee_s *attendee = NULL;
        int index;
@@ -110,12 +110,12 @@ static int _cal_db_attendee_get_all_records(int offset, int limit, calendar_list
        ret = calendar_list_create(out_list);
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "calendar_list_create() Fail(%d)", ret);
 
-       if (0 < limit)  {
+       if (0 < limit)
                snprintf(limitquery, sizeof(limitquery), "LIMIT %d ", limit);
-       }
-       if (0 < offset) {
+
+       if (0 < offset)
                snprintf(offsetquery, sizeof(offsetquery), "OFFSET %d ", offset);
-       }
+
        snprintf(query, sizeof(query), "SELECT *, rowid FROM %s %s %s ",
                        CAL_TABLE_ATTENDEE, limitquery, offsetquery);
 
@@ -138,7 +138,7 @@ static int _cal_db_attendee_get_all_records(int offset, int limit, calendar_list
                        sqlite3_finalize(stmt);
                        return ret;
                }
-               _cal_db_attendee_get_stmt(stmt,record);
+               _cal_db_attendee_get_stmt(stmt, record);
 
                ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
@@ -224,11 +224,11 @@ static void _cal_db_attendee_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++)
-               _cal_db_attendee_get_property_stmt(stmt,projection[i],&stmt_count,record);
+       for (i = 0; i < projection_count; i++)
+               _cal_db_attendee_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
 
 static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int offset, int limit, calendar_list_h* out_list)
@@ -248,9 +248,8 @@ static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int o
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_ATTENDEE)) {
                table_name = cal_strdup(CAL_TABLE_ATTENDEE);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -274,8 +273,7 @@ static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int o
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT *, rowid FROM ");
                cal_db_append_string(&query_str, table_name);
        }
@@ -320,7 +318,7 @@ static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int o
 
        /* bind text */
        if (bind_text)  {
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++)
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
        }
 
@@ -338,7 +336,7 @@ static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int o
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_attendee._uri,&record);
+               ret = calendar_record_create(_calendar_attendee._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -358,12 +356,11 @@ static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int o
                        _cal_db_attendee_get_projection_stmt(stmt,
                                        que->projection, que->projection_count,
                                        record);
-               }
-               else {
-                       _cal_db_attendee_get_stmt(stmt,record);
+               } else {
+                       _cal_db_attendee_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -404,7 +401,7 @@ static int _cal_db_attendee_get_count(int *out_count)
                ERR("cal_db_util_query_get_first_int_result() failed");
                return ret;
        }
-       DBG("%s=%d",query,count);
+       DBG("%s=%d", query, count);
 
        *out_count = count;
        return CALENDAR_ERROR_NONE;
@@ -424,9 +421,8 @@ static int _cal_db_attendee_get_count_with_query(calendar_query_h query, int *ou
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_ATTENDEE)) {
                table_name = cal_strdup(CAL_TABLE_ATTENDEE);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -465,7 +461,7 @@ static int _cal_db_attendee_get_count_with_query(calendar_query_h query, int *ou
                CAL_FREE(query_str);
                return ret;
        }
-       DBG("%s=%d",query_str,count);
+       DBG("%s=%d", query_str, count);
 
        *out_count = count;
 
index f342c8b..8d7bd7c 100644 (file)
@@ -54,7 +54,7 @@ static int _cal_db_calendar_replace_records(const calendar_list_h list, int ids[
 /*
  * static function
  */
-static void _cal_db_calendar_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_calendar_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static void _cal_db_calendar_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int stmt_count, calendar_record_h record);
 static void _cal_db_calendar_get_projection_stmt(sqlite3_stmt *stmt,
@@ -63,18 +63,18 @@ static void _cal_db_calendar_get_projection_stmt(sqlite3_stmt *stmt,
 static int _cal_db_calendar_update_projection(calendar_record_h record);
 
 cal_db_plugin_cb_s cal_db_calendar_plugin_cb = {
-       .is_query_only=false,
-       .insert_record=_cal_db_calendar_insert_record,
-       .get_record=_cal_db_calendar_get_record,
-       .update_record=_cal_db_calendar_update_record,
-       .delete_record=_cal_db_calendar_delete_record,
-       .get_all_records=_cal_db_calendar_get_all_records,
-       .get_records_with_query=_cal_db_calendar_get_records_with_query,
-       .insert_records=_cal_db_calendar_insert_records,
-       .update_records=_cal_db_calendar_update_records,
-       .delete_records=_cal_db_calendar_delete_records,
-       .get_count=_cal_db_calendar_get_count,
-       .get_count_with_query=_cal_db_calendar_get_count_with_query,
+       .is_query_only = false,
+       .insert_record = _cal_db_calendar_insert_record,
+       .get_record = _cal_db_calendar_get_record,
+       .update_record = _cal_db_calendar_update_record,
+       .delete_record = _cal_db_calendar_delete_record,
+       .get_all_records = _cal_db_calendar_get_all_records,
+       .get_records_with_query = _cal_db_calendar_get_records_with_query,
+       .insert_records = _cal_db_calendar_insert_records,
+       .update_records = _cal_db_calendar_update_records,
+       .delete_records = _cal_db_calendar_delete_records,
+       .get_count = _cal_db_calendar_get_count,
+       .get_count_with_query = _cal_db_calendar_get_count_with_query,
        .replace_record = _cal_db_calendar_replace_record,
        .replace_records = _cal_db_calendar_replace_records
 };
@@ -180,7 +180,7 @@ static int _cal_db_calendar_get_record(int id, calendar_record_h* out_record)
        sqlite3_stmt *stmt = NULL;
        int ret = 0;
 
-       ret = calendar_record_create(_calendar_book._uri ,out_record);
+       ret = calendar_record_create(_calendar_book._uriout_record);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("calendar_record_create() Fail(%d)", ret);
                return CALENDAR_ERROR_OUT_OF_MEMORY;
@@ -226,9 +226,9 @@ static int _cal_db_calendar_update_record(calendar_record_h record)
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
-       if (book->common.properties_flags != NULL) {
+       if (book->common.properties_flags != NULL)
                return _cal_db_calendar_update_projection(record);
-       }
+
 
        char query[CAL_DB_SQL_MAX_LEN] = {0};
        snprintf(query, sizeof(query), "UPDATE %s SET "
@@ -303,7 +303,7 @@ static int _cal_db_calendar_delete_record(int id)
        }
 
        snprintf(query, sizeof(query), "select count(*) from %s", CAL_TABLE_ALLDAY_INSTANCE);
-       ret = cal_db_util_query_get_first_int_result(query,NULL, &count2);
+       ret = cal_db_util_query_get_first_int_result(query, NULL, &count2);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("cal_db_util_query_get_first_int_result() Fail");
                return ret;
@@ -316,8 +316,7 @@ static int _cal_db_calendar_delete_record(int id)
                ret = cal_db_util_query_exec(query);
                RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "cal_db_util_query_exec() Fail(%d)", ret);
                cal_server_calendar_delete_start();
-       }
-       else {
+       } else {
                snprintf(query, sizeof(query), "DELETE FROM %s WHERE id = %d", CAL_TABLE_CALENDAR, id);
                ret = cal_db_util_query_exec(query);
                RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "cal_db_util_query_exec() Fail(%d)", ret);
@@ -350,9 +349,8 @@ static int _cal_db_calendar_replace_record(calendar_record_h record, int id)
        }
 
        book->index = id;
-       if (book->common.properties_flags) {
+       if (book->common.properties_flags)
                return _cal_db_calendar_update_projection(record);
-       }
 
        char query[CAL_DB_SQL_MAX_LEN] = {0};
        snprintf(query, sizeof(query), "UPDATE %s SET "
@@ -439,7 +437,7 @@ static int _cal_db_calendar_get_all_records(int offset, int limit, calendar_list
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_book._uri,&record);
+               ret = calendar_record_create(_calendar_book._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -447,9 +445,9 @@ static int _cal_db_calendar_get_all_records(int offset, int limit, calendar_list
                        CAL_FREE(query_str);
                        return ret;
                }
-               _cal_db_calendar_get_stmt(stmt,record);
+               _cal_db_calendar_get_stmt(stmt, record);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -497,8 +495,7 @@ static int _cal_db_calendar_get_records_with_query(calendar_query_h query, int o
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, CAL_TABLE_CALENDAR);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, CAL_TABLE_CALENDAR);
        }
@@ -548,7 +545,7 @@ static int _cal_db_calendar_get_records_with_query(calendar_query_h query, int o
        /* bind text */
        if (bind_text) {
                g_slist_length(bind_text);
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++)
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
        }
 
@@ -566,7 +563,7 @@ static int _cal_db_calendar_get_records_with_query(calendar_query_h query, int o
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_book._uri,&record);
+               ret = calendar_record_create(_calendar_book._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -587,12 +584,11 @@ static int _cal_db_calendar_get_records_with_query(calendar_query_h query, int o
                        _cal_db_calendar_get_projection_stmt(stmt,
                                        que->projection, que->projection_count,
                                        record);
-               }
-               else {
-                       _cal_db_calendar_get_stmt(stmt,record);
+               } else {
+                       _cal_db_calendar_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -623,7 +619,7 @@ static int _cal_db_calendar_insert_records(const calendar_list_h list, int** ids
        calendar_record_h record;
        int ret = 0;
        int count = 0;
-       int i=0;
+       int i = 0;
        int *id = NULL;
 
        ret = calendar_list_get_count(list, &count);
@@ -655,12 +651,10 @@ static int _cal_db_calendar_insert_records(const calendar_list_h list, int** ids
                i++;
        } while (CALENDAR_ERROR_NO_DATA != calendar_list_next(list));
 
-       if (ids) {
+       if (ids)
                *ids = id;
-       }
-       else {
+       else
                CAL_FREE(id);
-       }
 
        return CALENDAR_ERROR_NONE;
 }
@@ -693,7 +687,7 @@ static int _cal_db_calendar_delete_records(int ids[], int count)
 {
        int ret = 0;
        int i = 0;
-       for(i = 0; i < count; i++) {
+       for (i = 0; i < count; i++) {
                ret = _cal_db_calendar_delete_record(ids[i]);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("_cal_db_calendar_delete_record() Fail(%d)", ret);
@@ -728,9 +722,8 @@ static int _cal_db_calendar_replace_records(const calendar_list_h list, int ids[
                                return ret;
                        }
                }
-               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list)) {
+               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list))
                        break;
-               }
        }
 
        return CALENDAR_ERROR_NONE;
@@ -773,9 +766,8 @@ static int _cal_db_calendar_get_count_with_query(calendar_query_h query, int *ou
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_CALENDAR)) {
                table_name = cal_strdup(CAL_TABLE_CALENDAR);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -827,7 +819,7 @@ static int _cal_db_calendar_get_count_with_query(calendar_query_h query, int *ou
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_calendar_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_calendar_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_book_s* calendar =  (cal_book_s*)(record);
        int count = 0;
@@ -949,10 +941,10 @@ static void _cal_db_calendar_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
 
-       for(i=0;i<projection_count;i++)
-               _cal_db_calendar_get_property_stmt(stmt,projection[i],i,record);
+       for (i = 0; i < projection_count; i++)
+               _cal_db_calendar_get_property_stmt(stmt, projection[i], i, record);
 }
 
 static int _cal_db_calendar_update_projection(calendar_record_h record)
@@ -965,12 +957,12 @@ static int _cal_db_calendar_update_projection(calendar_record_h record)
        GSList *bind_text = NULL;
        GSList *cursor = NULL;
 
-       ret = cal_db_query_create_projection_update_set(record,&set,&bind_text);
+       ret = cal_db_query_create_projection_update_set(record, &set, &bind_text);
        RETV_IF(CALENDAR_ERROR_NONE != ret, ret);
 
        snprintf(query, sizeof(query), "UPDATE %s SET %s "
                        "WHERE id = %d",
-                       CAL_TABLE_CALENDAR,set,
+                       CAL_TABLE_CALENDAR, set,
                        calendar->index);
 
        ret = cal_db_util_query_prepare(query, &stmt);
@@ -988,7 +980,7 @@ static int _cal_db_calendar_update_projection(calendar_record_h record)
        /* bind */
        if (bind_text) {
                int i = 0;
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++)
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
        }
 
index 4487d03..5034e2d 100644 (file)
@@ -55,7 +55,7 @@ int cal_db_delete_account(int account_id)
 
        sqlite3_finalize(stmt);
        if (calendar_list)
-               DBG("calendar cnt=%d",g_list_length(calendar_list));
+               DBG("calendar cnt=%d", g_list_length(calendar_list));
 
        ret = cal_db_util_begin_trans();
        if (CALENDAR_ERROR_NONE != ret) {
index 16f1a48..dda47a0 100644 (file)
@@ -58,7 +58,7 @@ static int __update_record(calendar_record_h record, int is_dirty_in_time);
 /*
  * static function
  */
-static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar_record_h record, int *exception, int *extended);
+static void _cal_db_event_get_stmt(sqlite3_stmt *stmt, bool is_view_table, calendar_record_h record, int *exception, int *extended);
 static void _cal_db_event_get_property_stmt(sqlite3_stmt *stmt, unsigned int property, int *stmt_count, calendar_record_h record);
 static void _cal_db_event_get_projection_stmt(sqlite3_stmt *stmt, const unsigned int *projection, const int projection_count, calendar_record_h record);
 static int _cal_db_event_exception_get_records(int original_id, cal_list_s *list);
@@ -137,7 +137,7 @@ static int _cal_db_event_get_record(int id, calendar_record_h* out_record)
        calendar_record_h record_calendar;
        calendar_book_sync_event_type_e sync_event_type = CALENDAR_BOOK_SYNC_EVENT_FOR_ME;
 
-       ret = calendar_record_create(_calendar_event._uri ,out_record);
+       ret = calendar_record_create(_calendar_event._uriout_record);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("calendar_record_create(%d)", ret);
                return CALENDAR_ERROR_OUT_OF_MEMORY;
@@ -225,9 +225,9 @@ static int __is_dirty_in_time(calendar_record_h record)
        int i;
        int is_dirty_in_time = DIRTY_IN_OTHER;
        for (i = 0; i < count; i++) {
-               if (false == cal_record_check_property_flag(record, info[i].property_id , CAL_PROPERTY_FLAG_DIRTY)) {
+               if (false == cal_record_check_property_flag(record, info[i].property_id, CAL_PROPERTY_FLAG_DIRTY))
                        continue;
-               }
+
                switch (info[i].property_id) {
                case CAL_PROPERTY_EVENT_START:
                case CAL_PROPERTY_EVENT_END:
@@ -303,9 +303,8 @@ time_t __get_time_diff(char *old_tzid, calendar_time_s *old, char *new_tzid, cal
 
 static int __get_time_shifted_field(char *old_field, int old_type, int new_type, time_t time_diff, char **new_field)
 {
-       if (NULL == old_field || '\0' == *old_field) {
+       if (NULL == old_field || '\0' == *old_field)
                return CALENDAR_ERROR_NONE;
-       }
 
        gchar **t = NULL;
        t = g_strsplit_set(old_field, " ,", -1);
@@ -314,8 +313,8 @@ static int __get_time_shifted_field(char *old_field, int old_type, int new_type,
        int len_t = g_strv_length(t);
 
        int len_field = strlen(old_field);
-       char *new= NULL;
-       new= calloc(len_field + (len_t * 8) + 1, sizeof(char)); /* add (len_t * 8) for YYYYMMDD -> YYYYMMDDTHHMMSSZ */
+       char *new = NULL;
+       new = calloc(len_field + (len_t * 8) + 1, sizeof(char)); /* add (len_t * 8) for YYYYMMDD -> YYYYMMDDTHHMMSSZ */
        if (NULL == new) {
                ERR("calloc() Fail");
                g_strfreev(t);
@@ -495,9 +494,9 @@ static int __update_record(calendar_record_h record, int is_dirty_in_time)
        }
 
        if (event->common.properties_flags) {
-               if (DIRTY_INIT == is_dirty_in_time) {
+               if (DIRTY_INIT == is_dirty_in_time)
                        is_dirty_in_time = __is_dirty_in_time(record);
-               }
+
                return _cal_db_event_update_dirty(record, is_dirty_in_time);
        }
 
@@ -605,12 +604,12 @@ static int __update_record(calendar_record_h record, int is_dirty_in_time)
                event->end.type,
                event->end.type == CALENDAR_TIME_UTIME ? event->end.time.utime : 0,
                0 < event->freq ? 1 : 0,
-               (event->attendee_list && 0 < event->attendee_list->count)? 1: 0,
+               (event->attendee_list && 0 < event->attendee_list->count) ? 1 : 0,
                has_alarm,
                event->system_type,
                event->updated,
-               (event->exception_list && 0 < event->exception_list->count)? 1 : 0,
-               (event->extended_list && 0 < event->extended_list->count)? 1 : 0,
+               (event->exception_list && 0 < event->exception_list->count) ? 1 : 0,
+               (event->extended_list && 0 < event->extended_list->count) ? 1 : 0,
                event->freq,
                is_allday,
                event->index);
@@ -641,9 +640,9 @@ static int __update_record(calendar_record_h record, int is_dirty_in_time)
        index++;
 
        if (event->exdate) {
-               if (DIRTY_IN_TIME == is_dirty_in_time) {
+               if (DIRTY_IN_TIME == is_dirty_in_time)
                        __update_exdate(event, time_diff);
-               }
+
                cal_db_util_stmt_bind_text(stmt, index, event->exdate);
        }
        index++;
@@ -731,8 +730,7 @@ static int __update_record(calendar_record_h record, int is_dirty_in_time)
                cal_db_instance_discard_record(event->index);
                cal_db_instance_publish_record(record);
 
-       }
-       else {
+       } else {
                cal_db_instance_update_exdate_del(event->index, event->exdate);
        }
 
@@ -825,8 +823,7 @@ static int _cal_db_event_add_exdate(int original_event_id, char* recurrence_id)
                if (NULL == temp || strlen((char *)temp) < 1) {
                        exdate = cal_strdup(recurrence_id);
                        DBG("append first exdate[%s]", exdate);
-               }
-               else {
+               } else {
                        if (strstr((char *)temp, recurrence_id)) {
                                DBG("warn: recurrence id already is registered to exdate");
                                sqlite3_finalize(stmt);
@@ -842,8 +839,7 @@ static int _cal_db_event_add_exdate(int original_event_id, char* recurrence_id)
                        snprintf(exdate, len, "%s,%s", temp, recurrence_id);
                        DBG("append [%s] to already has exdate [%s]", temp, recurrence_id);
                }
-       }
-       else {
+       } else {
                DBG("Failed to get exdate: event_id(%d)", original_event_id);
        }
        sqlite3_finalize(stmt);
@@ -928,8 +924,7 @@ static int _cal_db_event_delete_record(int id)
                        return ret;
                }
 
-       }
-       else {
+       } else {
                cal_db_util_get_next_ver();
 
                DBG("delete event");
@@ -960,12 +955,11 @@ static int _cal_db_event_get_all_records(int offset, int limit, calendar_list_h*
        ret = calendar_list_create(out_list);
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "calendar_list_create() Fail(%d)", ret);
 
-       if (0 < offset) {
+       if (0 < offset)
                snprintf(offsetquery, sizeof(offsetquery), "OFFSET %d", offset);
-       }
-       if (0 < limit) {
+
+       if (0 < limit)
                snprintf(limitquery, sizeof(limitquery), "LIMIT %d", limit);
-       }
 
        char *query_str = NULL;
        cal_db_append_string(&query_str, "SELECT * FROM");
@@ -986,8 +980,8 @@ static int _cal_db_event_get_all_records(int offset, int limit, calendar_list_h*
        SECURE("[TEST]---------query[%s]", query_str);
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               int exception=0, extended=0;
-               ret = calendar_record_create(_calendar_event._uri,&record);
+               int exception = 0, extended = 0;
+               ret = calendar_record_create(_calendar_event._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -1002,23 +996,22 @@ static int _cal_db_event_get_all_records(int offset, int limit, calendar_list_h*
                int record_id = 0;
                cal_event_s* pevent = (cal_event_s*) record;
                calendar_record_get_int(record, _calendar_event.id, &record_id);
-               if (CALENDAR_ERROR_NONE == calendar_record_get_int(record, _calendar_event.has_attendee,&has_attendee)) {
-                       if (has_attendee == 1) {
+               if (CALENDAR_ERROR_NONE == calendar_record_get_int(record, _calendar_event.has_attendee, &has_attendee)) {
+                       if (has_attendee == 1)
                                cal_db_attendee_get_records(record_id, pevent->attendee_list);
-                       }
                }
-               if (CALENDAR_ERROR_NONE == calendar_record_get_int(record, _calendar_event.has_alarm,&has_alarm)) {
-                       if (has_alarm == 1) {
+               if (CALENDAR_ERROR_NONE == calendar_record_get_int(record, _calendar_event.has_alarm, &has_alarm)) {
+                       if (has_alarm == 1)
                                cal_db_alarm_get_records(record_id, pevent->alarm_list);
-                       }
                }
 
                if (exception == 1)
                        _cal_db_event_exception_get_records(record_id, pevent->exception_list);
+
                if (extended == 1)
                        cal_db_extended_get_records(record_id, CALENDAR_RECORD_TYPE_EVENT, pevent->extended_list);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -1055,15 +1048,12 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR_ATTENDEE)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR_ATTENDEE)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR_ATTENDEE);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -1088,8 +1078,7 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, table_name);
        }
@@ -1122,7 +1111,7 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
                        cal_db_append_string(&query_str, buf);
                }
        }
-       DBG("%s",query_str);
+       DBG("%s", query_str);
 
        /* query */
        ret = cal_db_util_query_prepare(query_str, &stmt);
@@ -1139,9 +1128,8 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
 
        /* bind text */
        if (bind_text) {
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(&list);
@@ -1161,7 +1149,7 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
                int exception = 1, extended = 1;
                int attendee = 1, alarm = 1;
 
-               ret = calendar_record_create(_calendar_event._uri,&record);
+               ret = calendar_record_create(_calendar_event._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(list, true);
                        if (bind_text) {
@@ -1175,10 +1163,9 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
                if (0 < que->projection_count) {
                        cal_record_set_projection(record, que->projection, que->projection_count, que->property_count);
                        _cal_db_event_get_projection_stmt(stmt, que->projection, que->projection_count, record);
-               }
-               else {
+               } else {
                        cal_event_s *event = NULL;
-                       _cal_db_event_get_stmt(stmt,true,record, &exception, &extended);
+                       _cal_db_event_get_stmt(stmt, true, record, &exception, &extended);
                        event = (cal_event_s*)(record);
                        if (event) {
                                attendee = event->has_attendee;
@@ -1195,16 +1182,16 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
                        cal_event_s* pevent = (cal_event_s*) record;
                        cal_db_attendee_get_records(pevent->index, pevent->attendee_list);
                }
-               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_EVENT_EXCEPTION) == true && exception ==1) {
+               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_EVENT_EXCEPTION) == true && exception == 1) {
                        cal_event_s* pevent = (cal_event_s*) record;
                        _cal_db_event_exception_get_records(pevent->index, pevent->exception_list);
                }
-               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_EVENT_EXTENDED) == true && extended ==1) {
+               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_EVENT_EXTENDED) == true && extended == 1) {
                        cal_event_s* pevent = (cal_event_s*) record;
                        cal_db_extended_get_records(pevent->index, CALENDAR_RECORD_TYPE_EVENT, pevent->extended_list);
                }
 
-               ret = calendar_list_add(list,record);
+               ret = calendar_list_add(list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("calendar_list_add() Fail(%d)", ret);
                        calendar_list_destroy(list, true);
@@ -1239,7 +1226,7 @@ static int _cal_db_event_insert_records(const calendar_list_h list, int** ids)
        calendar_record_h record;
        int ret = 0;
        int count = 0;
-       int i=0;
+       int i = 0;
        int *id = NULL;
 
        ret = calendar_list_get_count(list, &count);
@@ -1270,12 +1257,11 @@ static int _cal_db_event_insert_records(const calendar_list_h list, int** ids)
                i++;
        } while (CALENDAR_ERROR_NO_DATA != calendar_list_next(list));
 
-       if (ids) {
+       if (ids)
                *ids = id;
-       }
-       else {
+       else
                CAL_FREE(id);
-       }
+
 
        return CALENDAR_ERROR_NONE;
 }
@@ -1308,7 +1294,7 @@ static int _cal_db_event_delete_records(int ids[], int count)
        int ret = CALENDAR_ERROR_NONE;
        int i = 0;
 
-       for(i = 0; i < count; i++) {
+       for (i = 0; i < count; i++) {
                ret = _cal_db_event_delete_record(ids[i]);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("_cal_db_event_delete_record() Fail(%d)", ret);
@@ -1354,15 +1340,12 @@ static int _cal_db_event_get_count_with_query(calendar_query_h query, int *out_c
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR_ATTENDEE)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR_ATTENDEE)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR_ATTENDEE);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -1434,9 +1417,9 @@ static int _cal_db_event_replace_record(calendar_record_h record, int id)
                ERR("cal_access_control_have_write_permission() Fail");
                return CALENDAR_ERROR_PERMISSION_DENIED;
        }
-       if (event->common.properties_flags != NULL) {
+       if (event->common.properties_flags != NULL)
                return _cal_db_event_update_dirty(record, -1);
-       }
+
        has_alarm = cal_db_alarm_has_alarm(event->alarm_list);
        cal_db_timezone_search_with_tzid(event->calendar_id, event->start_tzid, &timezone_id);
        input_ver = cal_db_util_get_next_ver();
@@ -1696,15 +1679,14 @@ static int _cal_db_event_replace_records(const calendar_list_h list, int ids[],
                                return CALENDAR_ERROR_DB_FAILED;
                        }
                }
-               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list)) {
+               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list))
                        break;
-               }
        }
 
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar_record_h record,
+static void _cal_db_event_get_stmt(sqlite3_stmt *stmt, bool is_view_table, calendar_record_h record,
                int *exception, int *extended)
 {
        cal_event_s *event = NULL;
@@ -1749,8 +1731,8 @@ static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calenda
        event->meeting_status = sqlite3_column_int(stmt, count++);
        event->calendar_id = sqlite3_column_int(stmt, count++);
        event->original_event_id = sqlite3_column_int(stmt, count++);
-       event->latitude = sqlite3_column_double(stmt,count++);
-       event->longitude = sqlite3_column_double(stmt,count++);
+       event->latitude = sqlite3_column_double(stmt, count++);
+       event->longitude = sqlite3_column_double(stmt, count++);
        event->email_id = sqlite3_column_int(stmt, count++);
        event->created_time = sqlite3_column_int64(stmt, count++);
 
@@ -1759,14 +1741,13 @@ static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calenda
        count++; /* changed_ver */
        count++; /* created_ver */
 
-       event->is_deleted = sqlite3_column_int(stmt,count++);
-       event->start.type = sqlite3_column_int(stmt,count++);
+       event->is_deleted = sqlite3_column_int(stmt, count++);
+       event->start.type = sqlite3_column_int(stmt, count++);
 
        if (event->start.type == CALENDAR_TIME_UTIME) {
-               event->start.time.utime = sqlite3_column_int64(stmt,count++);
+               event->start.time.utime = sqlite3_column_int64(stmt, count++);
                count++; /* dtstart_datetime */
-       }
-       else {
+       } else {
                count++; /* dtstart_utime */
                temp = sqlite3_column_text(stmt, count++);
                if (temp) {
@@ -1782,10 +1763,9 @@ static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calenda
 
        event->end.type = sqlite3_column_int(stmt, count++);
        if (event->end.type == CALENDAR_TIME_UTIME) {
-               event->end.time.utime = sqlite3_column_int64(stmt,count++);
+               event->end.time.utime = sqlite3_column_int64(stmt, count++);
                count++; /* dtend_datetime */
-       }
-       else {
+       } else {
                count++; /* dtend_utime */
                temp = sqlite3_column_text(stmt, count++);
                if (temp) {
@@ -1798,17 +1778,17 @@ static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calenda
        temp = sqlite3_column_text(stmt, count++);
        event->end_tzid = cal_strdup((const char*)temp);
 
-       event->last_mod = sqlite3_column_int64(stmt,count++);
-       sqlite3_column_int(stmt,count++);
+       event->last_mod = sqlite3_column_int64(stmt, count++);
+       sqlite3_column_int(stmt, count++);
 
        temp = sqlite3_column_text(stmt, count++);
        event->recurrence_id = cal_strdup((const char*)temp);
        temp = sqlite3_column_text(stmt, count++);
        event->rdate = cal_strdup((const char*)temp);
-       event->has_attendee = sqlite3_column_int(stmt,count++);
-       event->has_alarm = sqlite3_column_int(stmt,count++);
-       event->system_type = sqlite3_column_int(stmt,count++);
-       event->updated = sqlite3_column_int(stmt,count++);
+       event->has_attendee = sqlite3_column_int(stmt, count++);
+       event->has_alarm = sqlite3_column_int(stmt, count++);
+       event->system_type = sqlite3_column_int(stmt, count++);
+       event->updated = sqlite3_column_int(stmt, count++);
        temp = sqlite3_column_text(stmt, count++);
        event->sync_data1 = cal_strdup((const char*)temp);
        temp = sqlite3_column_text(stmt, count++);
@@ -1820,19 +1800,18 @@ static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calenda
 
        /* has_exception */
        if (exception)
-               *exception = sqlite3_column_int(stmt,count++);
+               *exception = sqlite3_column_int(stmt, count++);
 
        /* has_extended */
        if (extended)
-               *extended = sqlite3_column_int(stmt,count++);
+               *extended = sqlite3_column_int(stmt, count++);
 
        event->freq = sqlite3_column_int(stmt, count++);
        event->is_allday = sqlite3_column_int(stmt, count++);
 
        if (is_view_table == true) {
-               if (event->freq <= 0) {
+               if (event->freq <= 0)
                        return ;
-               }
 
                event->range_type = sqlite3_column_int(stmt, count++);
                event->until.type = sqlite3_column_int(stmt, count++);
@@ -1868,19 +1847,19 @@ static void _cal_db_event_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calenda
                event->byhour = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               event->byday= cal_strdup((const char*)temp);
+               event->byday = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               event->bymonthday= cal_strdup((const char*)temp);
+               event->bymonthday = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               event->byyearday= cal_strdup((const char*)temp);
+               event->byyearday = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               event->byweekno= cal_strdup((const char*)temp);
+               event->byweekno = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               event->bymonth= cal_strdup((const char*)temp);
+               event->bymonth = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
                event->bysetpos = cal_strdup((const char*)temp);
@@ -1964,10 +1943,10 @@ static void _cal_db_event_get_property_stmt(sqlite3_stmt *stmt,
                event->original_event_id = sqlite3_column_int(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_EVENT_LATITUDE:
-               event->latitude = sqlite3_column_double(stmt,*stmt_count);
+               event->latitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_EVENT_LONGITUDE:
-               event->longitude = sqlite3_column_double(stmt,*stmt_count);
+               event->longitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_EVENT_EMAIL_ID:
                event->email_id = sqlite3_column_int(stmt, *stmt_count);
@@ -2065,13 +2044,12 @@ static void _cal_db_event_get_property_stmt(sqlite3_stmt *stmt,
                event->sync_data4 = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_EVENT_START:
-               event->start.type = sqlite3_column_int(stmt,*stmt_count);
+               event->start.type = sqlite3_column_int(stmt, *stmt_count);
                if (event->start.type == CALENDAR_TIME_UTIME) {
                        *stmt_count = *stmt_count+1;
-                       event->start.time.utime = sqlite3_column_int64(stmt,*stmt_count);
+                       event->start.time.utime = sqlite3_column_int64(stmt, *stmt_count);
                        *stmt_count = *stmt_count+1; /* dtstart_datetime */
-               }
-               else {
+               } else {
                        *stmt_count = *stmt_count+1;
                        *stmt_count = *stmt_count+1;
                        temp = sqlite3_column_text(stmt, *stmt_count);
@@ -2091,10 +2069,9 @@ static void _cal_db_event_get_property_stmt(sqlite3_stmt *stmt,
                event->end.type = sqlite3_column_int(stmt, *stmt_count);
                if (event->end.type == CALENDAR_TIME_UTIME) {
                        *stmt_count = *stmt_count+1;
-                       event->end.time.utime = sqlite3_column_int64(stmt,*stmt_count);
+                       event->end.time.utime = sqlite3_column_int64(stmt, *stmt_count);
                        *stmt_count = *stmt_count+1; /* dtstart_datetime */
-               }
-               else {
+               } else {
                        *stmt_count = *stmt_count+1; /* dtend_utime */
                        *stmt_count = *stmt_count+1;
                        temp = sqlite3_column_text(stmt, *stmt_count);
@@ -2125,12 +2102,11 @@ static void _cal_db_event_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_event_get_property_stmt(stmt,projection[i],&stmt_count,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_event_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
 
 static bool _cal_db_event_check_calendar_book_type(calendar_record_h record)
@@ -2152,8 +2128,7 @@ static bool _cal_db_event_check_calendar_book_type(calendar_record_h record)
 
        if (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                store_type = sqlite3_column_int(stmt, 0);
-       }
-       else {
+       } else {
                sqlite3_finalize(stmt);
                stmt = NULL;
                DBG("Failed to get calendar: calendar_id(%d)", event->calendar_id);
@@ -2198,10 +2173,10 @@ static int _cal_db_event_update_dirty(calendar_record_h record, int is_dirty_in_
        int ret = CALENDAR_ERROR_NONE;
        calendar_record_h original_record = NULL;
 
-       ret = calendar_record_get_int(record,_calendar_event.id, &event_id);
+       ret = calendar_record_get_int(record, _calendar_event.id, &event_id);
        RETV_IF(CALENDAR_ERROR_NONE != ret, ret);
 
-       DBG("id=%d",event_id);
+       DBG("id=%d", event_id);
 
        ret = _cal_db_event_get_record(event_id, &original_record);
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "_cal_db_event_get_record() Fail(%d)", ret);
@@ -2209,16 +2184,15 @@ static int _cal_db_event_update_dirty(calendar_record_h record, int is_dirty_in_
        cal_record_s *_record = NULL;
        const cal_property_info_s* property_info = NULL;
        int property_info_count = 0;
-       int i=0;
+       int i = 0;
 
        _record = (cal_record_s *)record;
 
        property_info = cal_view_get_property_info(_record->view_uri, &property_info_count);
 
-       for(i=0;i<property_info_count;i++) {
-               if (false == cal_record_check_property_flag(record, property_info[i].property_id , CAL_PROPERTY_FLAG_DIRTY)) {
+       for (i = 0; i < property_info_count; i++) {
+               if (false == cal_record_check_property_flag(record, property_info[i].property_id , CAL_PROPERTY_FLAG_DIRTY))
                        continue;
-               }
 
                if (property_info[i].property_id == CAL_PROPERTY_EVENT_EXDATE) {
                        int calendar_id = 0;
@@ -2226,7 +2200,7 @@ static int _cal_db_event_update_dirty(calendar_record_h record, int is_dirty_in_
                        calendar_book_sync_event_type_e sync_event_type = CALENDAR_BOOK_SYNC_EVENT_FOR_ME;
 
                        char *record_exdate = NULL;
-                       ret = calendar_record_get_str_p(record,property_info[i]. property_id, &record_exdate);
+                       ret = calendar_record_get_str_p(record, property_info[i]. property_id, &record_exdate);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
                        ret = calendar_record_get_int(original_record, CAL_PROPERTY_EVENT_CALENDAR_ID, &calendar_id);
@@ -2241,19 +2215,18 @@ static int _cal_db_event_update_dirty(calendar_record_h record, int is_dirty_in_
                        calendar_record_destroy(record_calendar, true);
 
                        char *original_exdate = NULL;
-                       ret = calendar_record_get_str_p(original_record,property_info[i].property_id,&original_exdate);
+                       ret = calendar_record_get_str_p(original_record, property_info[i].property_id, &original_exdate);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
                        if (sync_event_type == CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_REMAIN) {
                                ret = _cal_db_event_exdate_insert_normal(event_id, original_exdate, record_exdate, NULL, NULL);
-                               WARN_IF(CALENDAR_ERROR_NONE != ret, "%s->%s",original_exdate,record_exdate);
+                               WARN_IF(CALENDAR_ERROR_NONE != ret, "%s->%s", original_exdate, record_exdate);
 
-                       }
-                       else {
+                       } else {
                                int *exception_ids = NULL;
                                int exception_len = 0;
                                ret = _cal_db_event_exdate_insert_normal(event_id, original_exdate, record_exdate, &exception_ids, &exception_len);
-                               WARN_IF(CALENDAR_ERROR_NONE != ret, "%s->%s",original_exdate,record_exdate);
+                               WARN_IF(CALENDAR_ERROR_NONE != ret, "%s->%s", original_exdate, record_exdate);
                                ret = _cal_db_event_delete_exception(exception_ids, exception_len);
                                WARN_IF(CALENDAR_ERROR_NONE != ret, "_cal_db_event_delete_record() Fail");
                                free(exception_ids);
@@ -2261,46 +2234,41 @@ static int _cal_db_event_update_dirty(calendar_record_h record, int is_dirty_in_
                        ret = cal_record_set_str(original_record, property_info[i].property_id, record_exdate);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
-                       int tmp=0;
-                       ret = calendar_record_get_int(record,property_info[i].property_id,&tmp);
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
+                       int tmp = 0;
+                       ret = calendar_record_get_int(record, property_info[i].property_id, &tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
                        ret = cal_record_set_int(original_record, property_info[i].property_id, tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
-                       char *tmp=NULL;
-                       ret = calendar_record_get_str_p(record,property_info[i].property_id,&tmp);
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
+                       char *tmp = NULL;
+                       ret = calendar_record_get_str_p(record, property_info[i].property_id, &tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
                        ret = cal_record_set_str(original_record, property_info[i].property_id, tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
-                       double tmp=0;
-                       ret = calendar_record_get_double(record,property_info[i].property_id,&tmp);
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
+                       double tmp = 0;
+                       ret = calendar_record_get_double(record, property_info[i].property_id, &tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
                        ret = cal_record_set_double(original_record, property_info[i].property_id, tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
-                       long long int tmp=0;
-                       ret = calendar_record_get_lli(record,property_info[i].property_id,&tmp);
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
+                       long long int tmp = 0;
+                       ret = calendar_record_get_lli(record, property_info[i].property_id, &tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
                        ret = cal_record_set_lli(original_record, property_info[i].property_id, tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
-               }
-               else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
+               } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                        calendar_time_s tmp = {0,};
-                       ret = calendar_record_get_caltime(record,property_info[i].property_id,&tmp);
+                       ret = calendar_record_get_caltime(record, property_info[i].property_id, &tmp);
                        if (CALENDAR_ERROR_NONE != ret)
                                continue;
                        ret = cal_record_set_caltime(original_record, property_info[i].property_id, tmp);
@@ -2470,7 +2438,7 @@ static int _cal_db_event_exception_update(cal_list_s *exception_list_s, int orig
                calendar_list_first(exception_list);
                while (CALENDAR_ERROR_NONE == calendar_list_get_current_record_p(exception_list, &exception)) {
                        int exception_id = 0;
-                       ret = calendar_record_get_int(exception,_calendar_event.id, &exception_id);
+                       ret = calendar_record_get_int(exception, _calendar_event.id, &exception_id);
                        DBG("exception(%d)", exception_id);
                        if (0 < exception_id && exception_id != original_id) { /* update */
                                bool bchanged = false;
@@ -2498,20 +2466,18 @@ static int _cal_db_event_exception_update(cal_list_s *exception_list_s, int orig
                                        cal_db_instance_discard_record(exception_id);
                                        cal_db_instance_publish_record(exception);
 
-                               }
-                               else {
+                               } else {
                                        cal_db_instance_discard_record(exception_id);
                                        cal_db_instance_publish_record(exception);
-                                       DBG("exception don't changed. exception_id=[%d]",exception_id);
+                                       DBG("exception don't changed. exception_id=[%d]", exception_id);
                                }
 
                                if (id_list)
                                        id_list = g_list_remove(id_list, GINT_TO_POINTER(exception_id));
 
-                       }
-                       else {
+                       } else {
                                /* insert */
-                               ret = cal_record_set_int(exception,_calendar_event.calendar_book_id, calendar_id);
+                               ret = cal_record_set_int(exception, _calendar_event.calendar_book_id, calendar_id);
                                if (CALENDAR_ERROR_NONE != ret) {
                                        ERR("cal_record_set_int() Fail(%d)", ret);
                                        if (id_list)
@@ -2608,13 +2574,13 @@ static int _cal_db_event_exdate_insert_normal(int event_id, const char* original
        RETVM_IF(NULL == ids, CALENDAR_ERROR_OUT_OF_MEMORY, "calloc() Fail");
 
        int exception_count = 0;
-       for(i = 0; i < len1; i++) {
+       for (i = 0; i < len1; i++) {
                if (NULL == patterns1[i]) {
                        ERR("exdate is NULL, so check next");
                        continue;
                }
                bool bFind = false;
-               for(j = 0; j < len2; j++) {
+               for (j = 0; j < len2; j++) {
                        if (NULL == patterns2[j]) {
                                ERR("original exdate is NULL");
                                continue;
@@ -2634,8 +2600,7 @@ static int _cal_db_event_exdate_insert_normal(int event_id, const char* original
                                                &y, &mon, &d, &h, &min, &s);
                                start_utime = cal_time_convert_itol(NULL, y, mon, d, h, min, s);
 
-                       }
-                       else {
+                       } else {
                                snprintf(datetime, sizeof(datetime),
                                                "%s", patterns1[i]);
 
@@ -2695,12 +2660,11 @@ static int _cal_db_event_exdate_insert_normal(int event_id, const char* original
                        exception_count++;
                }
        }
-       if (exception_ids) {
+       if (exception_ids)
                *exception_ids = ids;
-       }
-       else {
+       else
                free(ids);
-       }
+
        if (exception_len)
                *exception_len = exception_count;
 
index 958b875..a5e76d4 100644 (file)
@@ -100,20 +100,16 @@ int cal_db_event_check_value_validation(cal_event_s *event)
                if (event->start.time.date.month < 1 || 12 < event->start.time.date.month) {
                        ERR("Error check start month(input:%d)", event->start.time.date.month);
                        return CALENDAR_ERROR_INVALID_PARAMETER;
-               }
-               else if (event->start.time.date.mday < 1 || 31 < event->start.time.date.mday) {
+               } else if (event->start.time.date.mday < 1 || 31 < event->start.time.date.mday) {
                        ERR("Error check start mday(input:%d)", event->start.time.date.mday);
                        return CALENDAR_ERROR_INVALID_PARAMETER;
-               }
-               else if (event->end.time.date.month < 1 || 12 < event->end.time.date.month) {
+               } else if (event->end.time.date.month < 1 || 12 < event->end.time.date.month) {
                        ERR("Error check end month(input:%d)", event->end.time.date.month);
                        return CALENDAR_ERROR_INVALID_PARAMETER;
-               }
-               else if (event->end.time.date.mday < 1 || 31 < event->end.time.date.mday) {
+               } else if (event->end.time.date.mday < 1 || 31 < event->end.time.date.mday) {
                        ERR("Error check end mday(input:%d)", event->end.time.date.mday);
                        return CALENDAR_ERROR_INVALID_PARAMETER;
-               }
-               else {
+               } else {
                        /* handle hour, minute, second */
                        if (event->start.time.date.hour < 0 || 24 < event->start.time.date.hour)
                                event->start.time.date.hour = 0;
@@ -206,9 +202,9 @@ char* cal_db_event_get_recurrence_id_from_exception(int child_id)
        }
 
        char *recurrence_id = NULL;
-       if (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
+       if (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt))
                recurrence_id = cal_strdup((const char*)sqlite3_column_text(stmt, 0));
-       }
+
        sqlite3_finalize(stmt);
        return recurrence_id;
 }
@@ -237,8 +233,7 @@ static void __get_tzid_and_range(char *p, char **out_tzid, int *out_range)
                                continue;
                        tzid = strdup(s[i] + strlen("TZID="));
                        DBG("tzid [%s]", tzid);
-               }
-               else if (CAL_STRING_EQUAL == strncmp(s[i], "RANGE=", strlen("RANGE="))) {
+               } else if (CAL_STRING_EQUAL == strncmp(s[i], "RANGE=", strlen("RANGE="))) {
                        char *param = s[i] + strlen("RANGE=");
                        if (CAL_STRING_EQUAL == strncmp(param, "THISANDFUTURE", strlen("THISANDFUTURE")))
                                range = CAL_RECURRENCE_ID_RANGE_THISANDFUTURE;
@@ -246,8 +241,7 @@ static void __get_tzid_and_range(char *p, char **out_tzid, int *out_range)
                                range = CAL_RECURRENCE_ID_RANGE_THISANDPRIOR;
                        else
                                ERR("Invalid param[%s]", s[i]);
-               }
-               else {
+               } else {
                        ERR("Invalid param[%s]", s[i]);
                }
        }
@@ -411,8 +405,7 @@ static void __get_last_instance_caltime(int parent_id, int type, calendar_time_s
                                sscanf(temp, CAL_FORMAT_LOCAL_DATETIME,
                                                &(dtstart->time.date.year), &(dtstart->time.date.month), &(dtstart->time.date.mday),
                                                &(dtstart->time.date.hour), &(dtstart->time.date.minute), &(dtstart->time.date.second));
-                       }
-                       else {
+                       } else {
                                ERR("datetime is NULL");
                        }
                }
@@ -529,8 +522,7 @@ void cal_db_event_apply_recurrence_id(int parent_id, cal_event_s *event, char *r
                        dtstart_utime = cal_time_convert_itol(tzid, y, m, d, h, n, s);
                        rectime.type = CALENDAR_TIME_UTIME;
                        rectime.time.utime = dtstart_utime;
-               }
-               else {
+               } else {
                        snprintf(dtstart_datetime, sizeof(dtstart_datetime), CAL_FORMAT_LOCAL_DATETIME, y, m, d, h, n, s);
                        rectime.type = CALENDAR_TIME_LOCALTIME;
                        rectime.time.date.year = y;
@@ -623,9 +615,9 @@ static int __get_parent_id_with_uid(char *uid, int child_id)
                SECURE("query[%s]", query);
                return ret;
        }
-       if (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
+       if (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt))
                parent_id = sqlite3_column_int64(stmt, 0);
-       }
+
        sqlite3_finalize(stmt);
        DBG("found parent_id(%d)", parent_id);
        return parent_id;
@@ -861,18 +853,18 @@ int cal_db_event_insert_record(calendar_record_h record, int original_event_id,
 
        calendar_record_get_int(record, _calendar_event.id, &tmp);
        cal_record_set_int(record, _calendar_event.id, event_id);
-       if (id) {
+       if (id)
                *id = event_id;
-       }
 
        cal_db_rrule_get_rrule_from_record(record, &rrule);
        if (rrule) {
                cal_db_rrule_insert_record(event_id, rrule);
                CAL_FREE(rrule);
        }
-       if (0 < original_event_id) {
+
+       if (0 < original_event_id)
                cal_record_set_int(record, _calendar_event.original_event_id, original_event_id);
-       }
+
        cal_db_instance_publish_record(record);
 
        while (event->uid && *event->uid) {
@@ -905,8 +897,7 @@ int cal_db_event_insert_record(calendar_record_h record, int original_event_id,
                                l = g_list_next(l);
                        }
                        g_list_free(list);
-               }
-               else {
+               } else {
                        DBG("this is child");
                        /* get parent with uid and update original_event_id */
                        int parent_id = 0;
@@ -927,8 +918,7 @@ int cal_db_event_insert_record(calendar_record_h record, int original_event_id,
                DBG("insert alarm");
                ret = cal_db_alarm_insert_records(event->alarm_list, event_id);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_db_alarm_insert_records() Fail(%d)", ret);
-       }
-       else {
+       } else {
                DBG("No alarm");
        }
 
@@ -936,8 +926,7 @@ int cal_db_event_insert_record(calendar_record_h record, int original_event_id,
                DBG("insert attendee");
                ret = cal_db_attendee_insert_records(event->attendee_list, event_id);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_db_attendee_insert_records() Fail(%d)", ret);
-       }
-       else {
+       } else {
                DBG("No attendee");
        }
 
@@ -945,8 +934,7 @@ int cal_db_event_insert_record(calendar_record_h record, int original_event_id,
                DBG("insert exception");
                ret = cal_db_event_insert_records(event->exception_list, event_id);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_db_event_insert_records() Fail(%d)", ret);
-       }
-       else {
+       } else {
                DBG("No exception");
        }
 
@@ -954,8 +942,7 @@ int cal_db_event_insert_record(calendar_record_h record, int original_event_id,
                DBG("insert extended");
                ret = cal_db_extended_insert_records(event->extended_list, event_id, CALENDAR_RECORD_TYPE_EVENT);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_db_extended_insert_records() Fail(%d)", ret);
-       }
-       else {
+       } else {
                DBG("No extended");
        }
 
index a3cb490..1294bab 100644 (file)
@@ -47,28 +47,28 @@ static int _cal_db_extended_replace_records(const calendar_list_h list, int ids[
 /*
  * static function
  */
-static void _cal_db_extended_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_extended_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static void _cal_db_extended_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int stmt_count, calendar_record_h record);
 static void _cal_db_extended_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record);
-static void _cal_db_extended_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_extended_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static int _cal_db_extended_update_projection(calendar_record_h record);
 
 cal_db_plugin_cb_s cal_db_extended_plugin_cb = {
-       .is_query_only=false,
-       .insert_record=_cal_db_extended_insert_record,
-       .get_record=_cal_db_extended_get_record,
-       .update_record=_cal_db_extended_update_record,
-       .delete_record=_cal_db_extended_delete_record,
-       .get_all_records=_cal_db_extended_get_all_records,
-       .get_records_with_query=_cal_db_extended_get_records_with_query,
-       .insert_records=_cal_db_extended_insert_records,
-       .update_records=_cal_db_extended_update_records,
-       .delete_records=_cal_db_extended_delete_records,
-       .get_count=_cal_db_extended_get_count,
-       .get_count_with_query=_cal_db_extended_get_count_with_query,
+       .is_query_only = false,
+       .insert_record = _cal_db_extended_insert_record,
+       .get_record = _cal_db_extended_get_record,
+       .update_record = _cal_db_extended_update_record,
+       .delete_record = _cal_db_extended_delete_record,
+       .get_all_records = _cal_db_extended_get_all_records,
+       .get_records_with_query = _cal_db_extended_get_records_with_query,
+       .insert_records = _cal_db_extended_insert_records,
+       .update_records = _cal_db_extended_update_records,
+       .delete_records = _cal_db_extended_delete_records,
+       .get_count = _cal_db_extended_get_count,
+       .get_count_with_query = _cal_db_extended_get_count_with_query,
        .replace_record = _cal_db_extended_replace_record,
        .replace_records = _cal_db_extended_replace_records
 };
@@ -87,7 +87,7 @@ static int _cal_db_extended_get_record(int id, calendar_record_h* out_record)
        char query[CAL_DB_SQL_MAX_LEN];
        sqlite3_stmt *stmt = NULL;
 
-       ret = calendar_record_create(_calendar_extended_property._uri ,out_record);
+       ret = calendar_record_create(_calendar_extended_property._uriout_record);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("calendar_record_create() Fail(%d)", ret);
                return CALENDAR_ERROR_OUT_OF_MEMORY;
@@ -113,7 +113,7 @@ static int _cal_db_extended_get_record(int id, calendar_record_h* out_record)
                return ret;
        }
 
-       _cal_db_extended_get_stmt(stmt,*out_record);
+       _cal_db_extended_get_stmt(stmt, *out_record);
 
        sqlite3_finalize(stmt);
        stmt = NULL;
@@ -130,9 +130,8 @@ static int _cal_db_extended_update_record(calendar_record_h record)
 
        RETV_IF(NULL == extended_info, CALENDAR_ERROR_INVALID_PARAMETER);
 
-       if (extended_info->common.properties_flags) {
+       if (extended_info->common.properties_flags)
                return _cal_db_extended_update_projection(record);
-       }
 
        snprintf(query, sizeof(query), "UPDATE %s SET "
                        "record_id=%d,"
@@ -194,9 +193,8 @@ static int _cal_db_extended_replace_record(calendar_record_h record, int id)
        RETV_IF(NULL == extended_info, CALENDAR_ERROR_INVALID_PARAMETER);
        extended_info->id = id;
 
-       if (extended_info->common.properties_flags) {
+       if (extended_info->common.properties_flags)
                return _cal_db_extended_update_projection(record);
-       }
 
        snprintf(query, sizeof(query), "UPDATE %s SET "
                        "record_id=%d,"
@@ -245,13 +243,13 @@ static int _cal_db_extended_get_all_records(int offset, int limit, calendar_list
        ret = calendar_list_create(out_list);
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "calendar_list_create() Fail(%d)", ret);
 
-       if (0 < offset) {
+       if (0 < offset)
                snprintf(offsetquery, sizeof(offsetquery), "OFFSET %d", offset);
-       }
-       if (0 < limit) {
+
+       if (0 < limit)
                snprintf(limitquery, sizeof(limitquery), "LIMIT %d", limit);
-       }
-       snprintf(query, sizeof(query), "SELECT * FROM %s %s %s", CAL_TABLE_EXTENDED,limitquery,offsetquery);
+
+       snprintf(query, sizeof(query), "SELECT * FROM %s %s %s", CAL_TABLE_EXTENDED, limitquery, offsetquery);
 
        ret = cal_db_util_query_prepare(query, &stmt);
        if (CALENDAR_ERROR_NONE != ret) {
@@ -264,16 +262,16 @@ static int _cal_db_extended_get_all_records(int offset, int limit, calendar_list
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_extended_property._uri,&record);
+               ret = calendar_record_create(_calendar_extended_property._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
                        sqlite3_finalize(stmt);
                        return ret;
                }
-               _cal_db_extended_get_stmt(stmt,record);
+               _cal_db_extended_get_stmt(stmt, record);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -320,8 +318,7 @@ static int _cal_db_extended_get_records_with_query(calendar_query_h query, int o
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, CAL_TABLE_EXTENDED);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, CAL_TABLE_EXTENDED);
        }
@@ -365,9 +362,8 @@ static int _cal_db_extended_get_records_with_query(calendar_query_h query, int o
 
        /* bind text */
        if (bind_text) {
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -384,7 +380,7 @@ static int _cal_db_extended_get_records_with_query(calendar_query_h query, int o
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_extended_property._uri,&record);
+               ret = calendar_record_create(_calendar_extended_property._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -404,12 +400,11 @@ static int _cal_db_extended_get_records_with_query(calendar_query_h query, int o
                        _cal_db_extended_get_projection_stmt(stmt,
                                        que->projection, que->projection_count,
                                        record);
-               }
-               else {
-                       _cal_db_extended_get_stmt(stmt,record);
+               } else {
+                       _cal_db_extended_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -439,7 +434,7 @@ static int _cal_db_extended_insert_records(const calendar_list_h list, int** ids
        calendar_record_h record;
        int ret = 0;
        int count = 0;
-       int i=0;
+       int i = 0;
        int *id = NULL;
 
        ret = calendar_list_get_count(list, &count);
@@ -470,12 +465,10 @@ static int _cal_db_extended_insert_records(const calendar_list_h list, int** ids
                i++;
        } while (CALENDAR_ERROR_NO_DATA != calendar_list_next(list));
 
-       if (ids) {
+       if (ids)
                *ids = id;
-       }
-       else {
+       else
                CAL_FREE(id);
-       }
 
        return CALENDAR_ERROR_NONE;
 }
@@ -507,7 +500,7 @@ static int _cal_db_extended_delete_records(int ids[], int count)
 {
        int ret = 0;
        int i = 0;
-       for(i = 0; i < count; i++) {
+       for (i = 0; i < count; i++) {
                ret = _cal_db_extended_delete_record(ids[i]);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("_cal_db_extended_delete_record() Fail(%d)", ret);
@@ -542,9 +535,8 @@ static int _cal_db_extended_replace_records(const calendar_list_h list, int ids[
                                return CALENDAR_ERROR_DB_FAILED;
                        }
                }
-               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list)) {
+               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list))
                        break;
-               }
        }
 
        return CALENDAR_ERROR_NONE;
@@ -565,7 +557,7 @@ static int _cal_db_extended_get_count(int *out_count)
                ERR("cal_db_util_query_get_first_int_result() Fail");
                return ret;
        }
-       DBG("%s=%d",query,count);
+       DBG("%s=%d", query, count);
 
        *out_count = count;
        return CALENDAR_ERROR_NONE;
@@ -585,9 +577,8 @@ static int _cal_db_extended_get_count_with_query(calendar_query_h query, int *ou
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EXTENDED)) {
                table_name = cal_strdup(CAL_TABLE_EXTENDED);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -624,7 +615,7 @@ static int _cal_db_extended_get_count_with_query(calendar_query_h query, int *ou
                CAL_FREE(query_str);
                return ret;
        }
-       DBG("%s=%d",query_str,count);
+       DBG("%s=%d", query_str, count);
 
        *out_count = count;
 
@@ -636,7 +627,7 @@ static int _cal_db_extended_get_count_with_query(calendar_query_h query, int *ou
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_extended_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_extended_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_extended_s* extended =  (cal_extended_s*)(record);
        int count = 0;
@@ -689,11 +680,10 @@ static void _cal_db_extended_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_extended_get_property_stmt(stmt,projection[i],i,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_extended_get_property_stmt(stmt, projection[i], i, record);
 }
 
 static int _cal_db_extended_update_projection(calendar_record_h record)
@@ -706,7 +696,7 @@ static int _cal_db_extended_update_projection(calendar_record_h record)
        GSList *bind_text = NULL;
        GSList *cursor = NULL;
 
-       ret = cal_db_query_create_projection_update_set(record,&set,&bind_text);
+       ret = cal_db_query_create_projection_update_set(record, &set, &bind_text);
        RETV_IF(CALENDAR_ERROR_NONE != ret, ret);
 
        snprintf(query, sizeof(query), "UPDATE %s SET %s WHERE id = %d",
@@ -726,10 +716,8 @@ static int _cal_db_extended_update_projection(calendar_record_h record)
 
        if (bind_text) {
                int i = 0;
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++)
-               {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = cal_db_util_stmt_step(stmt);
index 4b64cab..cbaec36 100644 (file)
@@ -142,9 +142,8 @@ int cal_db_extended_insert_record(calendar_record_h record, int record_id, calen
        index = cal_db_util_last_insert_id();
 
        /* cal_record_set_int(record, _calendar_extended.id,index); */
-       if (id) {
+       if (id)
                *id = index;
-       }
 
        if (record_type == CALENDAR_RECORD_TYPE_EVENT || record_type == CALENDAR_RECORD_TYPE_TODO) {
                snprintf(query, sizeof(query), "UPDATE %s SET has_extended = 1 WHERE id = %d ",
index 6513a01..76c4320 100644 (file)
@@ -38,7 +38,7 @@ static int _cal_db_instance_allday_get_count_with_query(calendar_query_h query,
 /*
  * static function
  */
-static void _cal_db_instance_allday_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_instance_allday_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static void _cal_db_instance_allday_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int *stmt_count, calendar_record_h record);
 static void _cal_db_instance_allday_get_projection_stmt(sqlite3_stmt *stmt,
@@ -47,19 +47,19 @@ static void _cal_db_instance_allday_get_projection_stmt(sqlite3_stmt *stmt,
 
 cal_db_plugin_cb_s cal_db_instance_allday_plugin_cb = {
        .is_query_only = false,
-       .insert_record=NULL,
-       .get_record=NULL,
-       .update_record=NULL,
-       .delete_record=_cal_db_instance_allday_delete_record,
-       .get_all_records=_cal_db_instance_allday_get_all_records,
-       .get_records_with_query=_cal_db_instance_allday_get_records_with_query,
-       .insert_records=NULL,
-       .update_records=NULL,
-       .delete_records=NULL,
-       .get_count=_cal_db_instance_allday_get_count,
-       .get_count_with_query=_cal_db_instance_allday_get_count_with_query,
-       .replace_record=NULL,
-       .replace_records=NULL
+       .insert_record = NULL,
+       .get_record = NULL,
+       .update_record = NULL,
+       .delete_record = _cal_db_instance_allday_delete_record,
+       .get_all_records = _cal_db_instance_allday_get_all_records,
+       .get_records_with_query = _cal_db_instance_allday_get_records_with_query,
+       .insert_records = NULL,
+       .update_records = NULL,
+       .delete_records = NULL,
+       .get_count = _cal_db_instance_allday_get_count,
+       .get_count_with_query = _cal_db_instance_allday_get_count_with_query,
+       .replace_record = NULL,
+       .replace_records = NULL
 };
 
 static int _cal_db_instance_allday_delete_record(int id)
@@ -118,7 +118,7 @@ static int _cal_db_instance_allday_get_all_records(int offset, int limit, calend
        SECURE("[TEST]---------query[%s]", query_str);
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_instance_localtime_calendar_book._uri,&record);
+               ret = calendar_record_create(_calendar_instance_localtime_calendar_book._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -160,12 +160,10 @@ static int _cal_db_instance_allday_get_records_with_query(calendar_query_h query
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_ALLDAY_INSTANCE);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR_EXTENDED)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR_EXTENDED)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_ALLDAY_INSTANCE_EXTENDED);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -190,8 +188,7 @@ static int _cal_db_instance_allday_get_records_with_query(calendar_query_h query
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, table_name);
        }
@@ -241,9 +238,8 @@ static int _cal_db_instance_allday_get_records_with_query(calendar_query_h query
        /* bind text */
        if (bind_text) {
                g_slist_length(bind_text);
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -260,7 +256,7 @@ static int _cal_db_instance_allday_get_records_with_query(calendar_query_h query
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(que->view_uri,&record);
+               ret = calendar_record_create(que->view_uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -276,12 +272,11 @@ static int _cal_db_instance_allday_get_records_with_query(calendar_query_h query
                if (0 < que->projection_count) {
                        cal_record_set_projection(record, que->projection, que->projection_count, que->property_count);
                        _cal_db_instance_allday_get_projection_stmt(stmt, que->projection, que->projection_count, record);
-               }
-               else {
-                       _cal_db_instance_allday_get_stmt(stmt,record);
+               } else {
+                       _cal_db_instance_allday_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -344,12 +339,10 @@ static int _cal_db_instance_allday_get_count_with_query(calendar_query_h query,
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_ALLDAY_INSTANCE);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR_EXTENDED)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR_EXTENDED)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_ALLDAY_INSTANCE_EXTENDED);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -400,7 +393,7 @@ static int _cal_db_instance_allday_get_count_with_query(calendar_query_h query,
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_instance_allday_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_instance_allday_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_instance_allday_s* instance =  (cal_instance_allday_s*)(record);
        const unsigned char *temp;
@@ -449,13 +442,12 @@ static void _cal_db_instance_allday_get_stmt(sqlite3_stmt *stmt,calendar_record_
        instance->sensitivity = sqlite3_column_int(stmt, count++);
 
        instance->has_rrule = sqlite3_column_int(stmt, count++);
-       if (0 < instance->has_rrule) {
+       if (0 < instance->has_rrule)
                instance->has_rrule = 1;
-       }
 
-       instance->latitude = sqlite3_column_double(stmt,count++);
-       instance->longitude = sqlite3_column_double(stmt,count++);
-       instance->has_alarm = sqlite3_column_int(stmt,count++);
+       instance->latitude = sqlite3_column_double(stmt, count++);
+       instance->longitude = sqlite3_column_double(stmt, count++);
+       instance->has_alarm = sqlite3_column_int(stmt, count++);
        instance->original_event_id = sqlite3_column_int(stmt, count++);
        instance->calendar_id = sqlite3_column_int(stmt, count++);
        instance->last_mod = sqlite3_column_int64(stmt, count++);
@@ -529,15 +521,15 @@ static void _cal_db_instance_allday_get_property_stmt(sqlite3_stmt *stmt,
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_HAS_RRULE:
                instance->has_rrule = sqlite3_column_int(stmt, *stmt_count);
-               if (0 < instance->has_rrule) {
+               if (0 < instance->has_rrule)
                        instance->has_rrule = 1;
-               }
+
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_LATITUDE:
-               instance->latitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->latitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_LONGITUDE:
-               instance->longitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->longitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EVENT_ID:
                instance->event_id = sqlite3_column_int(stmt, *stmt_count);
@@ -573,10 +565,9 @@ static void _cal_db_instance_allday_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_instance_allday_get_property_stmt(stmt,projection[i],&stmt_count,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_instance_allday_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
index 1e4f94e..5fb5094 100644 (file)
@@ -38,7 +38,7 @@ static int _cal_db_instance_allday_extended_get_count_with_query(calendar_query_
 /*
  * static function
  */
-static void _cal_db_instance_allday_extended_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_instance_allday_extended_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static void _cal_db_instance_allday_extended_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int *stmt_count, calendar_record_h record);
 static void _cal_db_instance_allday_extended_get_projection_stmt(sqlite3_stmt *stmt,
@@ -47,19 +47,19 @@ static void _cal_db_instance_allday_extended_get_projection_stmt(sqlite3_stmt *s
 
 cal_db_plugin_cb_s cal_db_instance_allday_extended_plugin_cb = {
        .is_query_only = false,
-       .insert_record= NULL,
-       .get_record= NULL,
-       .update_record=NULL,
-       .delete_record=NULL,
-       .get_all_records=_cal_db_instance_allday_extended_get_all_records,
-       .get_records_with_query=_cal_db_instance_allday_extended_get_records_with_query,
-       .insert_records=NULL,
-       .update_records=NULL,
-       .delete_records=NULL,
-       .get_count=_cal_db_instance_allday_extended_get_count,
-       .get_count_with_query=_cal_db_instance_allday_extended_get_count_with_query,
-       .replace_record=NULL,
-       .replace_records=NULL
+       .insert_record = NULL,
+       .get_record = NULL,
+       .update_record = NULL,
+       .delete_record = NULL,
+       .get_all_records = _cal_db_instance_allday_extended_get_all_records,
+       .get_records_with_query = _cal_db_instance_allday_extended_get_records_with_query,
+       .insert_records = NULL,
+       .update_records = NULL,
+       .delete_records = NULL,
+       .get_count = _cal_db_instance_allday_extended_get_count,
+       .get_count_with_query = _cal_db_instance_allday_extended_get_count_with_query,
+       .replace_record = NULL,
+       .replace_records = NULL
 };
 
 static int _cal_db_instance_allday_extended_get_all_records(int offset, int limit, calendar_list_h* out_list)
@@ -97,7 +97,7 @@ static int _cal_db_instance_allday_extended_get_all_records(int offset, int limi
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_instance_localtime_calendar_book_extended._uri,&record);
+               ret = calendar_record_create(_calendar_instance_localtime_calendar_book_extended._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -105,9 +105,9 @@ static int _cal_db_instance_allday_extended_get_all_records(int offset, int limi
                        CAL_FREE(query_str);
                        return ret;
                }
-               _cal_db_instance_allday_extended_get_stmt(stmt,record);
+               _cal_db_instance_allday_extended_get_stmt(stmt, record);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -159,8 +159,7 @@ static int _cal_db_instance_allday_extended_get_records_with_query(calendar_quer
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, table_name);
        }
@@ -210,9 +209,8 @@ static int _cal_db_instance_allday_extended_get_records_with_query(calendar_quer
        /* bind text */
        if (bind_text) {
                g_slist_length(bind_text);
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -229,7 +227,7 @@ static int _cal_db_instance_allday_extended_get_records_with_query(calendar_quer
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(que->view_uri,&record);
+               ret = calendar_record_create(que->view_uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -245,12 +243,11 @@ static int _cal_db_instance_allday_extended_get_records_with_query(calendar_quer
                if (0 < que->projection_count) {
                        cal_record_set_projection(record, que->projection, que->projection_count, que->property_count);
                        _cal_db_instance_allday_extended_get_projection_stmt(stmt, que->projection, que->projection_count, record);
-               }
-               else {
-                       _cal_db_instance_allday_extended_get_stmt(stmt,record);
+               } else {
+                       _cal_db_instance_allday_extended_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -360,7 +357,7 @@ static int _cal_db_instance_allday_extended_get_count_with_query(calendar_query_
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_instance_allday_extended_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_instance_allday_extended_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_instance_allday_extended_s* instance =  (cal_instance_allday_extended_s*)(record);
        const unsigned char *temp;
@@ -405,13 +402,12 @@ static void _cal_db_instance_allday_extended_get_stmt(sqlite3_stmt *stmt,calenda
        instance->sensitivity = sqlite3_column_int(stmt, count++);
 
        instance->has_rrule = sqlite3_column_int(stmt, count++);
-       if (0 < instance->has_rrule) {
+       if (0 < instance->has_rrule)
                instance->has_rrule = 1;
-       }
 
-       instance->latitude = sqlite3_column_double(stmt,count++);
-       instance->longitude = sqlite3_column_double(stmt,count++);
-       instance->has_alarm = sqlite3_column_int(stmt,count++);
+       instance->latitude = sqlite3_column_double(stmt, count++);
+       instance->longitude = sqlite3_column_double(stmt, count++);
+       instance->has_alarm = sqlite3_column_int(stmt, count++);
        instance->original_event_id = sqlite3_column_int(stmt, count++);
        instance->calendar_id = sqlite3_column_int(stmt, count++);
 
@@ -424,9 +420,9 @@ static void _cal_db_instance_allday_extended_get_stmt(sqlite3_stmt *stmt,calenda
        instance->organizer_name = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, count++);
-       instance->categories= cal_strdup((const char*)temp);
+       instance->categories = cal_strdup((const char*)temp);
 
-       instance->has_attendee= sqlite3_column_int(stmt, count++);
+       instance->has_attendee = sqlite3_column_int(stmt, count++);
 
        temp = sqlite3_column_text(stmt, count++);
        instance->sync_data2 = cal_strdup((const char*)temp);
@@ -502,15 +498,15 @@ static void _cal_db_instance_allday_extended_get_property_stmt(sqlite3_stmt *stm
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_HAS_RRULE:
                instance->has_rrule = sqlite3_column_int(stmt, *stmt_count);
-               if (0 < instance->has_rrule) {
+               if (0 < instance->has_rrule)
                        instance->has_rrule = 1;
-               }
+
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_LATITUDE:
-               instance->latitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->latitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_LONGITUDE:
-               instance->longitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->longitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_EVENT_ID:
                instance->event_id = sqlite3_column_int(stmt, *stmt_count);
@@ -530,18 +526,18 @@ static void _cal_db_instance_allday_extended_get_property_stmt(sqlite3_stmt *stm
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_ORGANIZER_NAME:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->organizer_name= cal_strdup((const char*)temp);
+               instance->organizer_name = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_CATEGORIES:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->categories= cal_strdup((const char*)temp);
+               instance->categories = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_HAS_ATTENDEE:
-               instance->has_attendee= sqlite3_column_int(stmt, *stmt_count);
+               instance->has_attendee = sqlite3_column_int(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_SYNC_DATA2:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->sync_data2= cal_strdup((const char*)temp);
+               instance->sync_data2 = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_SYNC_DATA3:
                temp = sqlite3_column_text(stmt, *stmt_count);
@@ -549,7 +545,7 @@ static void _cal_db_instance_allday_extended_get_property_stmt(sqlite3_stmt *stm
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_SYNC_DATA4:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->sync_data4= cal_strdup((const char*)temp);
+               instance->sync_data4 = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_INSTANCE_ALLDAY_EXTENDED_IS_ALLDAY:
                instance->is_allday = sqlite3_column_int(stmt, *stmt_count);
@@ -569,10 +565,9 @@ static void _cal_db_instance_allday_extended_get_projection_stmt(sqlite3_stmt *s
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_instance_allday_extended_get_property_stmt(stmt,projection[i],&stmt_count,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_instance_allday_extended_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
index b720026..e5f4b3d 100644 (file)
@@ -39,7 +39,7 @@ static int _cal_db_instance_normal_get_count_with_query(calendar_query_h query,
 /*
  * static function
  */
-static void _cal_db_instance_normal_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_instance_normal_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static void _cal_db_instance_normal_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int *stmt_count, calendar_record_h record);
 static void _cal_db_instance_normal_get_projection_stmt(sqlite3_stmt *stmt,
@@ -48,19 +48,19 @@ static void _cal_db_instance_normal_get_projection_stmt(sqlite3_stmt *stmt,
 
 cal_db_plugin_cb_s cal_db_instance_normal_plugin_cb = {
        .is_query_only = false,
-       .insert_record=NULL,
-       .get_record=NULL,
-       .update_record=NULL,
-       .delete_record=_cal_db_instance_normal_delete_record,
-       .get_all_records=_cal_db_instance_normal_get_all_records,
-       .get_records_with_query=_cal_db_instance_normal_get_records_with_query,
-       .insert_records=NULL,
-       .update_records=NULL,
-       .delete_records=NULL,
-       .get_count=_cal_db_instance_normal_get_count,
-       .get_count_with_query=_cal_db_instance_normal_get_count_with_query,
-       .replace_record=NULL,
-       .replace_records=NULL
+       .insert_record = NULL,
+       .get_record = NULL,
+       .update_record = NULL,
+       .delete_record = _cal_db_instance_normal_delete_record,
+       .get_all_records = _cal_db_instance_normal_get_all_records,
+       .get_records_with_query = _cal_db_instance_normal_get_records_with_query,
+       .insert_records = NULL,
+       .update_records = NULL,
+       .delete_records = NULL,
+       .get_count = _cal_db_instance_normal_get_count,
+       .get_count_with_query = _cal_db_instance_normal_get_count_with_query,
+       .replace_record = NULL,
+       .replace_records = NULL
 };
 
 static int _cal_db_instance_normal_delete_record(int id)
@@ -123,7 +123,7 @@ static int _cal_db_instance_normal_get_all_records(int offset, int limit, calend
        SECURE("[TEST]---------query[%s]", query_str);
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_instance_utime_calendar_book._uri,&record);
+               ret = calendar_record_create(_calendar_instance_utime_calendar_book._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -164,12 +164,10 @@ static int _cal_db_instance_normal_get_records_with_query(calendar_query_h query
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_NORMAL_INSTANCE);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR_EXTENDED)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR_EXTENDED)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_NORMAL_INSTANCE_EXTENDED);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -194,8 +192,7 @@ static int _cal_db_instance_normal_get_records_with_query(calendar_query_h query
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, table_name);
        }
@@ -245,9 +242,8 @@ static int _cal_db_instance_normal_get_records_with_query(calendar_query_h query
        /* bind text */
        if (bind_text) {
                g_slist_length(bind_text);
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -264,7 +260,7 @@ static int _cal_db_instance_normal_get_records_with_query(calendar_query_h query
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(que->view_uri,&record);
+               ret = calendar_record_create(que->view_uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -283,12 +279,11 @@ static int _cal_db_instance_normal_get_records_with_query(calendar_query_h query
                        _cal_db_instance_normal_get_projection_stmt(stmt,
                                        que->projection, que->projection_count,
                                        record);
-               }
-               else {
-                       _cal_db_instance_normal_get_stmt(stmt,record);
+               } else {
+                       _cal_db_instance_normal_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -350,12 +345,10 @@ static int _cal_db_instance_normal_get_count_with_query(calendar_query_h query,
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_NORMAL_INSTANCE);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR_EXTENDED)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR_EXTENDED)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_NORMAL_INSTANCE_EXTENDED);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -439,13 +432,12 @@ static void _cal_db_instance_normal_get_stmt(sqlite3_stmt *stmt, calendar_record
        instance->sensitivity = sqlite3_column_int(stmt, count++);
 
        instance->has_rrule = sqlite3_column_int(stmt, count++);
-       if (0 < instance->has_rrule) {
+       if (0 < instance->has_rrule)
                instance->has_rrule = 1;
-       }
 
-       instance->latitude = sqlite3_column_double(stmt,count++);
-       instance->longitude = sqlite3_column_double(stmt,count++);
-       instance->has_alarm = sqlite3_column_int(stmt,count++);
+       instance->latitude = sqlite3_column_double(stmt, count++);
+       instance->longitude = sqlite3_column_double(stmt, count++);
+       instance->has_alarm = sqlite3_column_int(stmt, count++);
        instance->original_event_id = sqlite3_column_int(stmt, count++);
        instance->calendar_id = sqlite3_column_int(stmt, count++);
        instance->last_mod = sqlite3_column_int64(stmt, count++);
@@ -471,7 +463,7 @@ static void _cal_db_instance_normal_get_property_stmt(sqlite3_stmt *stmt,
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_END:
                instance->end.type = CALENDAR_TIME_UTIME;
-               sqlite3_column_int(stmt,*stmt_count);
+               sqlite3_column_int(stmt, *stmt_count);
                *stmt_count = *stmt_count+1;
                instance->end.time.utime = sqlite3_column_int64(stmt, *stmt_count);
                *stmt_count = *stmt_count+1; /* datatime */
@@ -505,15 +497,15 @@ static void _cal_db_instance_normal_get_property_stmt(sqlite3_stmt *stmt,
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_HAS_RRULE:
                instance->has_rrule = sqlite3_column_int(stmt, *stmt_count);
-               if (0 < instance->has_rrule) {
+               if (0 < instance->has_rrule)
                        instance->has_rrule = 1;
-               }
+
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_LATITUDE:
-               instance->latitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->latitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_LONGITUDE:
-               instance->longitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->longitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EVENT_ID:
                instance->event_id = sqlite3_column_int(stmt, *stmt_count);
@@ -545,10 +537,9 @@ static void _cal_db_instance_normal_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_instance_normal_get_property_stmt(stmt,projection[i],&stmt_count,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_instance_normal_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
index 11eea3a..d49fe76 100644 (file)
@@ -37,7 +37,7 @@ static int _cal_db_instance_normal_extended_get_count_with_query(calendar_query_
 /*
  * static function
  */
-static void _cal_db_instance_normal_extended_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_instance_normal_extended_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static void _cal_db_instance_normal_extended_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int *stmt_count, calendar_record_h record);
 static void _cal_db_instance_normal_extended_get_projection_stmt(sqlite3_stmt *stmt,
@@ -46,19 +46,19 @@ static void _cal_db_instance_normal_extended_get_projection_stmt(sqlite3_stmt *s
 
 cal_db_plugin_cb_s cal_db_instance_normal_extended_plugin_cb = {
        .is_query_only = false,
-       .insert_record=NULL,
-       .get_record=NULL,
-       .update_record=NULL,
-       .delete_record=NULL,
-       .get_all_records=_cal_db_instance_normal_extended_get_all_records,
-       .get_records_with_query=_cal_db_instance_normal_extended_get_records_with_query,
-       .insert_records=NULL,
-       .update_records=NULL,
-       .delete_records=NULL,
-       .get_count=_cal_db_instance_normal_extended_get_count,
-       .get_count_with_query=_cal_db_instance_normal_extended_get_count_with_query,
-       .replace_record=NULL,
-       .replace_records=NULL
+       .insert_record = NULL,
+       .get_record = NULL,
+       .update_record = NULL,
+       .delete_record = NULL,
+       .get_all_records = _cal_db_instance_normal_extended_get_all_records,
+       .get_records_with_query = _cal_db_instance_normal_extended_get_records_with_query,
+       .insert_records = NULL,
+       .update_records = NULL,
+       .delete_records = NULL,
+       .get_count = _cal_db_instance_normal_extended_get_count,
+       .get_count_with_query = _cal_db_instance_normal_extended_get_count_with_query,
+       .replace_record = NULL,
+       .replace_records = NULL
 };
 
 static int _cal_db_instance_normal_extended_get_all_records(int offset, int limit, calendar_list_h* out_list)
@@ -96,7 +96,7 @@ static int _cal_db_instance_normal_extended_get_all_records(int offset, int limi
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_instance_utime_calendar_book_extended._uri,&record);
+               ret = calendar_record_create(_calendar_instance_utime_calendar_book_extended._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -104,9 +104,9 @@ static int _cal_db_instance_normal_extended_get_all_records(int offset, int limi
                        CAL_FREE(query_str);
                        return ret;
                }
-               _cal_db_instance_normal_extended_get_stmt(stmt,record);
+               _cal_db_instance_normal_extended_get_stmt(stmt, record);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -158,8 +158,7 @@ static int _cal_db_instance_normal_extended_get_records_with_query(calendar_quer
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, table_name);
        }
@@ -209,9 +208,8 @@ static int _cal_db_instance_normal_extended_get_records_with_query(calendar_quer
        /* bind text */
        if (bind_text) {
                g_slist_length(bind_text);
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -228,7 +226,7 @@ static int _cal_db_instance_normal_extended_get_records_with_query(calendar_quer
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(que->view_uri,&record);
+               ret = calendar_record_create(que->view_uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -247,12 +245,11 @@ static int _cal_db_instance_normal_extended_get_records_with_query(calendar_quer
 
                        _cal_db_instance_normal_extended_get_projection_stmt(stmt,
                                        que->projection, que->projection_count, record);
-               }
-               else {
-                       _cal_db_instance_normal_extended_get_stmt(stmt,record);
+               } else {
+                       _cal_db_instance_normal_extended_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -361,7 +358,7 @@ static int _cal_db_instance_normal_extended_get_count_with_query(calendar_query_
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_instance_normal_extended_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_instance_normal_extended_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_instance_normal_extended_s* instance =  (cal_instance_normal_extended_s*)(record);
        const unsigned char *temp;
@@ -393,13 +390,12 @@ static void _cal_db_instance_normal_extended_get_stmt(sqlite3_stmt *stmt,calenda
        instance->sensitivity = sqlite3_column_int(stmt, count++);
 
        instance->has_rrule = sqlite3_column_int(stmt, count++);
-       if (0 < instance->has_rrule) {
+       if (0 < instance->has_rrule)
                instance->has_rrule = 1;
-       }
 
-       instance->latitude = sqlite3_column_double(stmt,count++);
-       instance->longitude = sqlite3_column_double(stmt,count++);
-       instance->has_alarm = sqlite3_column_int(stmt,count++);
+       instance->latitude = sqlite3_column_double(stmt, count++);
+       instance->longitude = sqlite3_column_double(stmt, count++);
+       instance->has_alarm = sqlite3_column_int(stmt, count++);
        instance->original_event_id = sqlite3_column_int(stmt, count++);
        instance->calendar_id = sqlite3_column_int(stmt, count++);
        instance->last_mod = sqlite3_column_int64(stmt, count++);
@@ -411,9 +407,9 @@ static void _cal_db_instance_normal_extended_get_stmt(sqlite3_stmt *stmt,calenda
        instance->organizer_name = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, count++);
-       instance->categories= cal_strdup((const char*)temp);
+       instance->categories = cal_strdup((const char*)temp);
 
-       instance->has_attendee= sqlite3_column_int(stmt, count++);
+       instance->has_attendee = sqlite3_column_int(stmt, count++);
 
        temp = sqlite3_column_text(stmt, count++);
        instance->sync_data2 = cal_strdup((const char*)temp);
@@ -477,15 +473,15 @@ static void _cal_db_instance_normal_extended_get_property_stmt(sqlite3_stmt *stm
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_HAS_RRULE:
                instance->has_rrule = sqlite3_column_int(stmt, *stmt_count);
-               if (0 < instance->has_rrule) {
+               if (0 < instance->has_rrule)
                        instance->has_rrule = 1;
-               }
+
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_LATITUDE:
-               instance->latitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->latitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_LONGITUDE:
-               instance->longitude = sqlite3_column_double(stmt,*stmt_count);
+               instance->longitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_EVENT_ID:
                instance->event_id = sqlite3_column_int(stmt, *stmt_count);
@@ -505,18 +501,18 @@ static void _cal_db_instance_normal_extended_get_property_stmt(sqlite3_stmt *stm
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_ORGANIZER_NAME:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->organizer_name= cal_strdup((const char*)temp);
+               instance->organizer_name = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_CATEGORIES:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->categories= cal_strdup((const char*)temp);
+               instance->categories = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_HAS_ATTENDEE:
-               instance->has_attendee= sqlite3_column_int(stmt, *stmt_count);
+               instance->has_attendee = sqlite3_column_int(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_SYNC_DATA2:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->sync_data2= cal_strdup((const char*)temp);
+               instance->sync_data2 = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_SYNC_DATA3:
                temp = sqlite3_column_text(stmt, *stmt_count);
@@ -524,7 +520,7 @@ static void _cal_db_instance_normal_extended_get_property_stmt(sqlite3_stmt *stm
                break;
        case CAL_PROPERTY_INSTANCE_NORMAL_EXTENDED_SYNC_DATA4:
                temp = sqlite3_column_text(stmt, *stmt_count);
-               instance->sync_data4= cal_strdup((const char*)temp);
+               instance->sync_data4 = cal_strdup((const char*)temp);
                break;
        default:
                sqlite3_column_int(stmt, *stmt_count);
@@ -540,10 +536,9 @@ static void _cal_db_instance_normal_extended_get_projection_stmt(sqlite3_stmt *s
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_instance_normal_extended_get_property_stmt(stmt,projection[i],&stmt_count,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_instance_normal_extended_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
index 847c776..eb0656c 100644 (file)
@@ -38,26 +38,26 @@ static int _cal_db_search_get_count_with_query(calendar_query_h query, int *out_
 /*
  * static function
  */
-static void _cal_db_search_get_stmt(sqlite3_stmt *stmt,calendar_query_h query, calendar_record_h record);
+static void _cal_db_search_get_stmt(sqlite3_stmt *stmt, calendar_query_h query, calendar_record_h record);
 static void _cal_db_search_get_property_stmt(sqlite3_stmt *stmt, unsigned int property, int *stmt_count, calendar_record_h record);
 static void _cal_db_search_get_projection_stmt(sqlite3_stmt *stmt, const unsigned int *projection, const int projection_count, calendar_record_h record);
 static int _cal_db_search_make_projection(calendar_query_h query, char **projection);
 
 cal_db_plugin_cb_s cal_db_search_plugin_cb = {
-       .is_query_only=true,
-       .insert_record=NULL,
-       .get_record=NULL,
-       .update_record=NULL,
-       .delete_record=NULL,
-       .get_all_records=NULL,
-       .get_records_with_query=_cal_db_search_get_records_with_query,
-       .insert_records=NULL,
-       .update_records=NULL,
-       .delete_records=NULL,
-       .get_count=NULL,
-       .get_count_with_query=_cal_db_search_get_count_with_query,
-       .replace_record=NULL,
-       .replace_records=NULL
+       .is_query_only = true,
+       .insert_record = NULL,
+       .get_record = NULL,
+       .update_record = NULL,
+       .delete_record = NULL,
+       .get_all_records = NULL,
+       .get_records_with_query = _cal_db_search_get_records_with_query,
+       .insert_records = NULL,
+       .update_records = NULL,
+       .delete_records = NULL,
+       .get_count = NULL,
+       .get_count_with_query = _cal_db_search_get_count_with_query,
+       .replace_record = NULL,
+       .replace_records = NULL
 };
 
 static int _cal_db_search_get_records_with_query(calendar_query_h query, int offset, int limit, calendar_list_h* out_list)
@@ -84,14 +84,12 @@ static int _cal_db_search_get_records_with_query(calendar_query_h query, int off
        }
 
        /* make: projection */
-       if (0 < que->projection_count) {
+       if (0 < que->projection_count)
                ret = cal_db_query_create_projection(query, &projection);
-       }
-       else {
+       else
                _cal_db_search_make_projection(query, &projection);
-       }
 
-       // query - projection
+       /* query - projection */
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR)) {
                table_name = strdup(CAL_VIEW_TABLE_EVENT_CALENDAR);
        } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO_CALENDAR)) {
@@ -107,7 +105,7 @@ static int _cal_db_search_get_records_with_query(calendar_query_h query, int off
        } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR_EXTENDED)) {
                table_name = strdup(CAL_VIEW_TABLE_ALLDAY_INSTANCE_EXTENDED);
        } else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+               ERR("uri(%s) not support get records with query", que->view_uri);
                CAL_FREE(projection);
                CAL_FREE(condition);
                return CALENDAR_ERROR_INVALID_PARAMETER;
@@ -119,8 +117,7 @@ static int _cal_db_search_get_records_with_query(calendar_query_h query, int off
                cal_db_append_string(&query_str, projection);
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT");
                cal_db_append_string(&query_str, projection);
                cal_db_append_string(&query_str, "FROM");
@@ -173,9 +170,8 @@ static int _cal_db_search_get_records_with_query(calendar_query_h query, int off
        /* bind text */
        if (bind_text) {
                g_slist_length(bind_text);
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -192,7 +188,7 @@ static int _cal_db_search_get_records_with_query(calendar_query_h query, int off
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(que->view_uri,&record);
+               ret = calendar_record_create(que->view_uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -206,14 +202,13 @@ static int _cal_db_search_get_records_with_query(calendar_query_h query, int off
                        return ret;
                }
                if (0 < que->projection_count) {
-                       _cal_db_search_get_projection_stmt(stmt,que->projection,que->projection_count,
+                       _cal_db_search_get_projection_stmt(stmt, que->projection, que->projection_count,
                                        record);
-               }
-               else {
-                       _cal_db_search_get_stmt(stmt, query,record);
+               } else {
+                       _cal_db_search_get_stmt(stmt, query, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -254,25 +249,20 @@ static int _cal_db_search_get_count_with_query(calendar_query_h query, int *out_
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR);
                projection = cal_strdup("id");
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO_CALENDAR)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_TODO_CALENDAR);
                projection = cal_strdup("id");
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR_ATTENDEE)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_CALENDAR_ATTENDEE)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR_ATTENDEE);
                projection = cal_strdup("id");
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_UTIME_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_NORMAL_INSTANCE);
                projection = cal_strdup("event_id");
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_INSTANCE_LOCALTIME_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_ALLDAY_INSTANCE);
                projection = cal_strdup("event_id");
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -295,8 +285,7 @@ static int _cal_db_search_get_count_with_query(calendar_query_h query, int *out_
                cal_db_append_string(&query_str, projection);
                cal_db_append_string(&query_str, ") FROM");
                cal_db_append_string(&query_str, table_name);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT count(*) FROM");
                cal_db_append_string(&query_str, table_name);
        }
@@ -335,24 +324,23 @@ static int _cal_db_search_get_count_with_query(calendar_query_h query, int *out_
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_search_get_stmt(sqlite3_stmt *stmt,calendar_query_h query,
+static void _cal_db_search_get_stmt(sqlite3_stmt *stmt, calendar_query_h query,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
        cal_query_s *query_s = NULL;
        cal_property_info_s *properties = NULL;
 
        query_s = (cal_query_s *)query;
 
-       for (i=0;i<query_s->property_count;i++) {
+       for (i = 0; i < query_s->property_count; i++) {
                properties = &(query_s->properties[i]);
 
-               if (CAL_PROPERTY_CHECK_FLAGS(properties->property_id, CAL_PROPERTY_FLAGS_FILTER) == true) {
+               if (CAL_PROPERTY_CHECK_FLAGS(properties->property_id, CAL_PROPERTY_FLAGS_FILTER) == true)
                        break;
-               }
 
-               _cal_db_search_get_property_stmt(stmt, properties->property_id, &stmt_count,record);
+               _cal_db_search_get_property_stmt(stmt, properties->property_id, &stmt_count, record);
        }
        return ;
 }
@@ -368,27 +356,23 @@ static void _cal_db_search_get_property_stmt(sqlite3_stmt *stmt,
 
        if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_INT) == true) {
                int_tmp = sqlite3_column_int(stmt, *stmt_count);
-               cal_record_set_int(record,property,int_tmp);
-       }
-       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_STR) == true) {
+               cal_record_set_int(record, property, int_tmp);
+       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_STR) == true) {
                temp = sqlite3_column_text(stmt, *stmt_count);
-               cal_record_set_str(record,property, (const char*)temp);
-       }
-       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
-               d_tmp = sqlite3_column_double(stmt,*stmt_count);
-               cal_record_set_double(record,property,d_tmp);
-       }
-       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
+               cal_record_set_str(record, property, (const char*)temp);
+       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
+               d_tmp = sqlite3_column_double(stmt, *stmt_count);
+               cal_record_set_double(record, property, d_tmp);
+       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
                lli_tmp = sqlite3_column_int64(stmt, *stmt_count);
-               cal_record_set_lli(record,property,lli_tmp);
-       }
-       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
+               cal_record_set_lli(record, property, lli_tmp);
+       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                calendar_time_s caltime_tmp;
-               caltime_tmp.type = sqlite3_column_int(stmt,*stmt_count);
+               caltime_tmp.type = sqlite3_column_int(stmt, *stmt_count);
                switch (caltime_tmp.type) {
                case CALENDAR_TIME_UTIME:
                        *stmt_count = *stmt_count+1;
-                       caltime_tmp.time.utime = sqlite3_column_int64(stmt,*stmt_count);
+                       caltime_tmp.time.utime = sqlite3_column_int64(stmt, *stmt_count);
                        *stmt_count = *stmt_count+1; /* datatime */
                        break;
 
@@ -404,10 +388,9 @@ static void _cal_db_search_get_property_stmt(sqlite3_stmt *stmt,
                        }
                        break;
                }
-               ret = cal_record_set_caltime(record,property,caltime_tmp);
+               ret = cal_record_set_caltime(record, property, caltime_tmp);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "Failed to cal_record_set_caltime()");
-       }
-       else {
+       } else {
                sqlite3_column_int(stmt, *stmt_count);
        }
 
@@ -417,12 +400,11 @@ static void _cal_db_search_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_search_get_property_stmt(stmt,projection[i],&stmt_count,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_search_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
 
 static int _cal_db_search_make_projection(calendar_query_h query, char **projection)
@@ -447,13 +429,12 @@ static int _cal_db_search_make_projection(calendar_query_h query, char **project
                return CALENDAR_ERROR_SYSTEM;
        }
 
-       for (i=1;i<query_s->property_count;i++) {
+       for (i = 1; i < query_s->property_count; i++) {
                properties = &(query_s->properties[i]);
                field_name = properties->fields;
 
-               if (CAL_PROPERTY_CHECK_FLAGS(properties->property_id, CAL_PROPERTY_FLAGS_FILTER) == true) {
+               if (CAL_PROPERTY_CHECK_FLAGS(properties->property_id, CAL_PROPERTY_FLAGS_FILTER) == true)
                        break;
-               }
 
                if (field_name) {
                        len += snprintf(out_projection+len, sizeof(out_projection)-len, ", %s", field_name);
index 091497e..bfb142e 100644 (file)
@@ -46,28 +46,28 @@ static int _cal_db_timezone_replace_records(const calendar_list_h list, int ids[
 /*
  * static function
  */
-static void _cal_db_timezone_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_timezone_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static void _cal_db_timezone_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int stmt_count, calendar_record_h record);
 static void _cal_db_timezone_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record);
-static void _cal_db_timezone_get_stmt(sqlite3_stmt *stmt,calendar_record_h record);
+static void _cal_db_timezone_get_stmt(sqlite3_stmt *stmt, calendar_record_h record);
 static int _cal_db_timezone_update_projection(calendar_record_h record);
 
 cal_db_plugin_cb_s cal_db_timezone_plugin_cb = {
-       .is_query_only=false,
-       .insert_record=_cal_db_timezone_insert_record,
-       .get_record=_cal_db_timezone_get_record,
-       .update_record=_cal_db_timezone_update_record,
-       .delete_record=_cal_db_timezone_delete_record,
-       .get_all_records=_cal_db_timezone_get_all_records,
-       .get_records_with_query=_cal_db_timezone_get_records_with_query,
-       .insert_records=_cal_db_timezone_insert_records,
-       .update_records=_cal_db_timezone_update_records,
-       .delete_records=_cal_db_timezone_delete_records,
-       .get_count=_cal_db_timezone_get_count,
-       .get_count_with_query=_cal_db_timezone_get_count_with_query,
+       .is_query_only = false,
+       .insert_record = _cal_db_timezone_insert_record,
+       .get_record = _cal_db_timezone_get_record,
+       .update_record = _cal_db_timezone_update_record,
+       .delete_record = _cal_db_timezone_delete_record,
+       .get_all_records = _cal_db_timezone_get_all_records,
+       .get_records_with_query = _cal_db_timezone_get_records_with_query,
+       .insert_records = _cal_db_timezone_insert_records,
+       .update_records = _cal_db_timezone_update_records,
+       .delete_records = _cal_db_timezone_delete_records,
+       .get_count = _cal_db_timezone_get_count,
+       .get_count_with_query = _cal_db_timezone_get_count_with_query,
        .replace_record = _cal_db_timezone_replace_record,
        .replace_records = _cal_db_timezone_replace_records
 };
@@ -164,9 +164,8 @@ static int _cal_db_timezone_insert_record(calendar_record_h record, int* id)
        }
        index = cal_db_util_last_insert_id();
 
-       if (id) {
+       if (id)
                *id = index;
-       }
 
        return CALENDAR_ERROR_NONE;
 }
@@ -177,7 +176,7 @@ static int _cal_db_timezone_get_record(int id, calendar_record_h* out_record)
        sqlite3_stmt *stmt = NULL;
        int ret = 0;
 
-       ret = calendar_record_create(_calendar_timezone._uri ,out_record);
+       ret = calendar_record_create(_calendar_timezone._uriout_record);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("calendar_record_create() Fail(%d)", ret);
                return CALENDAR_ERROR_OUT_OF_MEMORY;
@@ -207,7 +206,7 @@ static int _cal_db_timezone_get_record(int id, calendar_record_h* out_record)
                return ret;
        }
 
-       _cal_db_timezone_get_stmt(stmt,*out_record);
+       _cal_db_timezone_get_stmt(stmt, *out_record);
 
        sqlite3_finalize(stmt);
        stmt = NULL;
@@ -224,9 +223,8 @@ static int _cal_db_timezone_update_record(calendar_record_h record)
 
        RETV_IF(NULL == timezone_info, CALENDAR_ERROR_INVALID_PARAMETER);
 
-       if (timezone_info->common.properties_flags) {
+       if (timezone_info->common.properties_flags)
                return _cal_db_timezone_update_projection(record);
-       }
 
        snprintf(query, sizeof(query), "UPDATE %s SET "
                        "tz_offset_from_gmt=%d,"
@@ -308,9 +306,8 @@ static int _cal_db_timezone_replace_record(calendar_record_h record, int id)
        RETV_IF(NULL == timezone_info, CALENDAR_ERROR_INVALID_PARAMETER);
        timezone_info->index = id;
 
-       if (timezone_info->common.properties_flags) {
+       if (timezone_info->common.properties_flags)
                return _cal_db_timezone_update_projection(record);
-       }
 
        snprintf(query, sizeof(query), "UPDATE %s SET "
                        "tz_offset_from_gmt=%d,"
@@ -379,12 +376,12 @@ static int _cal_db_timezone_get_all_records(int offset, int limit, calendar_list
        ret = calendar_list_create(out_list);
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "calendar_list_create() Fail(%d)", ret);
 
-       if (0 < offset) {
+       if (0 < offset)
                snprintf(offsetquery, sizeof(offsetquery), "OFFSET %d", offset);
-       }
-       if (0 < limit) {
+
+       if (0 < limit)
                snprintf(limitquery, sizeof(limitquery), "LIMIT %d", limit);
-       }
+
        snprintf(query, sizeof(query), "SELECT * FROM %s where "
                        "calendar_id IN (select id from %s where deleted = 0) "
                        "%s %s",
@@ -404,16 +401,16 @@ static int _cal_db_timezone_get_all_records(int offset, int limit, calendar_list
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_timezone._uri,&record);
+               ret = calendar_record_create(_calendar_timezone._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
                        sqlite3_finalize(stmt);
                        return ret;
                }
-               _cal_db_timezone_get_stmt(stmt,record);
+               _cal_db_timezone_get_stmt(stmt, record);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -460,8 +457,7 @@ static int _cal_db_timezone_get_records_with_query(calendar_query_h query, int o
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, CAL_TABLE_TIMEZONE);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, CAL_TABLE_TIMEZONE);
        }
@@ -474,8 +470,7 @@ static int _cal_db_timezone_get_records_with_query(calendar_query_h query, int o
                cal_db_append_string(&query_str, "AND calendar_id IN (select id from");
                cal_db_append_string(&query_str, CAL_TABLE_CALENDAR);
                cal_db_append_string(&query_str, "where deleted = 0)");
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "WHERE calendar_id IN (select id from");
                cal_db_append_string(&query_str, CAL_TABLE_CALENDAR);
                cal_db_append_string(&query_str, "where deleted = 0)");
@@ -513,9 +508,8 @@ static int _cal_db_timezone_get_records_with_query(calendar_query_h query, int o
 
        /* bind text */
        if (bind_text) {
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -532,7 +526,7 @@ static int _cal_db_timezone_get_records_with_query(calendar_query_h query, int o
 
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
-               ret = calendar_record_create(_calendar_timezone._uri,&record);
+               ret = calendar_record_create(_calendar_timezone._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -552,12 +546,11 @@ static int _cal_db_timezone_get_records_with_query(calendar_query_h query, int o
                        _cal_db_timezone_get_projection_stmt(stmt,
                                        que->projection, que->projection_count,
                                        record);
-               }
-               else {
-                       _cal_db_timezone_get_stmt(stmt,record);
+               } else {
+                       _cal_db_timezone_get_stmt(stmt, record);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -587,7 +580,7 @@ static int _cal_db_timezone_insert_records(const calendar_list_h list, int** ids
        calendar_record_h record;
        int ret = 0;
        int count = 0;
-       int i=0;
+       int i = 0;
        int *id = NULL;
 
        ret = calendar_list_get_count(list, &count);
@@ -617,12 +610,11 @@ static int _cal_db_timezone_insert_records(const calendar_list_h list, int** ids
                i++;
        } while (CALENDAR_ERROR_NO_DATA != calendar_list_next(list));
 
-       if (ids) {
+       if (ids)
                *ids = id;
-       }
-       else {
+       else
                CAL_FREE(id);
-       }
+
 
        return CALENDAR_ERROR_NONE;
 }
@@ -654,7 +646,7 @@ static int _cal_db_timezone_delete_records(int ids[], int count)
 {
        int ret = 0;
        int i = 0;
-       for(i = 0; i < count; i++) {
+       for (i = 0; i < count; i++) {
                ret = _cal_db_timezone_delete_record(ids[i]);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("_cal_db_timezone_delete_record() Fail(%d)", ret);
@@ -686,9 +678,8 @@ static int _cal_db_timezone_replace_records(const calendar_list_h list, int ids[
                                return CALENDAR_ERROR_DB_FAILED;
                        }
                }
-               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list)) {
+               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list))
                        break;
-               }
        }
 
        return CALENDAR_ERROR_NONE;
@@ -712,7 +703,7 @@ static int _cal_db_timezone_get_count(int *out_count)
                ERR("cal_db_util_query_get_first_int_result() Fail");
                return ret;
        }
-       DBG("%s=%d",query,count);
+       DBG("%s=%d", query, count);
 
        *out_count = count;
        return CALENDAR_ERROR_NONE;
@@ -732,9 +723,8 @@ static int _cal_db_timezone_get_count_with_query(calendar_query_h query, int *ou
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TIMEZONE)) {
                table_name = cal_strdup(CAL_TABLE_TIMEZONE);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -761,8 +751,7 @@ static int _cal_db_timezone_get_count_with_query(calendar_query_h query, int *ou
                cal_db_append_string(&query_str, CAL_TABLE_CALENDAR);
                cal_db_append_string(&query_str, "where deleted = 0)");
                CAL_FREE(condition);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "WHERE calendar_id IN (select id from");
                cal_db_append_string(&query_str, CAL_TABLE_CALENDAR);
                cal_db_append_string(&query_str, "where deleted = 0)");
@@ -779,7 +768,7 @@ static int _cal_db_timezone_get_count_with_query(calendar_query_h query, int *ou
                CAL_FREE(query_str);
                return ret;
        }
-       DBG("%s=%d",query_str,count);
+       DBG("%s=%d", query_str, count);
 
        *out_count = count;
 
@@ -791,7 +780,7 @@ static int _cal_db_timezone_get_count_with_query(calendar_query_h query, int *ou
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_timezone_get_stmt(sqlite3_stmt *stmt,calendar_record_h record)
+static void _cal_db_timezone_get_stmt(sqlite3_stmt *stmt, calendar_record_h record)
 {
        cal_timezone_s* timezone =  (cal_timezone_s*)(record);
        int count = 0;
@@ -887,11 +876,10 @@ static void _cal_db_timezone_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_timezone_get_property_stmt(stmt,projection[i],i,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_timezone_get_property_stmt(stmt, projection[i], i, record);
 }
 
 static int _cal_db_timezone_update_projection(calendar_record_h record)
@@ -904,7 +892,7 @@ static int _cal_db_timezone_update_projection(calendar_record_h record)
        GSList *bind_text = NULL;
        GSList *cursor = NULL;
 
-       ret = cal_db_query_create_projection_update_set(record,&set,&bind_text);
+       ret = cal_db_query_create_projection_update_set(record, &set, &bind_text);
        RETV_IF(CALENDAR_ERROR_NONE != ret, ret);
 
        snprintf(query, sizeof(query), "UPDATE %s SET %s WHERE id = %d",
@@ -924,9 +912,8 @@ static int _cal_db_timezone_update_projection(calendar_record_h record)
 
        if (bind_text) {
                int i = 0;
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = cal_db_util_stmt_step(stmt);
index daadcb7..6b8f723 100644 (file)
@@ -53,7 +53,7 @@ static int _cal_db_todo_replace_records(const calendar_list_h list, int ids[], i
 /*
  * static function
  */
-static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar_record_h record, int *extended);
+static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt, bool is_view_table, calendar_record_h record, int *extended);
 static void _cal_db_todo_get_property_stmt(sqlite3_stmt *stmt,
                unsigned int property, int *stmt_count, calendar_record_h record);
 static void _cal_db_todo_get_projection_stmt(sqlite3_stmt *stmt,
@@ -74,8 +74,8 @@ cal_db_plugin_cb_s cal_db_todo_plugin_cb = {
        .insert_records = _cal_db_todo_insert_records,
        .update_records = _cal_db_todo_update_records,
        .delete_records = _cal_db_todo_delete_records,
-       .get_count=_cal_db_todo_get_count,
-       .get_count_with_query=_cal_db_todo_get_count_with_query,
+       .get_count = _cal_db_todo_get_count,
+       .get_count_with_query = _cal_db_todo_get_count_with_query,
        .replace_record = _cal_db_todo_replace_record,
        .replace_records = _cal_db_todo_replace_records
 };
@@ -273,9 +273,8 @@ static int _cal_db_todo_insert_record(calendar_record_h record, int* id)
 
        calendar_record_get_int(record, _calendar_todo.id, &tmp);
        cal_record_set_int(record, _calendar_todo.id, index);
-       if (id) {
+       if (id)
                *id = index;
-       }
 
        cal_db_rrule_get_rrule_from_record(record, &rrule);
        cal_db_rrule_insert_record(index, rrule);
@@ -294,8 +293,7 @@ static int _cal_db_todo_insert_record(calendar_record_h record, int* id)
                DBG("insert extended");
                ret = cal_db_extended_insert_records(todo->extended_list, index, CALENDAR_RECORD_TYPE_TODO);
                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_db_extended_insert_records() Fail(%x)", ret);
-       }
-       else {
+       } else {
                DBG("No extended");
        }
 
@@ -318,7 +316,7 @@ static int _cal_db_todo_get_record(int id, calendar_record_h* out_record)
        calendar_book_sync_event_type_e sync_event_type = CALENDAR_BOOK_SYNC_EVENT_FOR_ME;
        int ret = 0;
 
-       ret = calendar_record_create(_calendar_todo._uri ,out_record);
+       ret = calendar_record_create(_calendar_todo._uriout_record);
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("calendar_record_create() Fail(%d)", ret);
                return CALENDAR_ERROR_OUT_OF_MEMORY;
@@ -352,7 +350,7 @@ static int _cal_db_todo_get_record(int id, calendar_record_h* out_record)
                return ret;
        }
 
-       _cal_db_todo_get_stmt(stmt,false,*out_record, &extended);
+       _cal_db_todo_get_stmt(stmt, false, *out_record, &extended);
        sqlite3_finalize(stmt);
        stmt = NULL;
 
@@ -407,9 +405,8 @@ static int _cal_db_todo_update_record(calendar_record_h record)
                return CALENDAR_ERROR_PERMISSION_DENIED;
        }
 
-       if (todo->common.properties_flags != NULL) {
+       if (todo->common.properties_flags != NULL)
                return _cal_db_todo_update_dirty(record);
-       }
 
        has_alarm = cal_db_alarm_has_alarm(todo->alarm_list);
        int is_allday = 0;
@@ -644,8 +641,7 @@ static int _cal_db_todo_delete_record(int id)
                        return ret;
                }
                DBG("attendee, alarm and rrule will be deleted by trigger after sync clean");
-       }
-       else {
+       } else {
                cal_db_util_get_next_ver();
 
                DBG("delete event");
@@ -682,9 +678,9 @@ static int _cal_db_todo_replace_record(calendar_record_h record, int id)
                return CALENDAR_ERROR_PERMISSION_DENIED;
        }
 
-       if (todo->common.properties_flags) {
+       if (todo->common.properties_flags)
                return _cal_db_todo_update_dirty(record);
-       }
+
        int is_allday = 0;
        if (CALENDAR_TIME_LOCALTIME == todo->start.type
                        && (0 == todo->start.time.date.hour)
@@ -886,12 +882,11 @@ static int _cal_db_todo_get_all_records(int offset, int limit, calendar_list_h*
        ret = calendar_list_create(out_list);
        RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "calendar_list_create() Fail(%d)", ret);
 
-       if (0 < offset) {
+       if (0 < offset)
                snprintf(offsetquery, sizeof(offsetquery), "OFFSET %d", offset);
-       }
-       if (0 < limit) {
+
+       if (0 < limit)
                snprintf(limitquery, sizeof(limitquery), "LIMIT %d", limit);
-       }
 
        char *query_str = NULL;
        cal_db_append_string(&query_str, "SELECT * FROM");
@@ -912,7 +907,7 @@ static int _cal_db_todo_get_all_records(int offset, int limit, calendar_list_h*
        while (CAL_SQLITE_ROW == cal_db_util_stmt_step(stmt)) {
                calendar_record_h record;
                int extended = 0;
-               ret = calendar_record_create(_calendar_todo._uri,&record);
+               ret = calendar_record_create(_calendar_todo._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -920,28 +915,26 @@ static int _cal_db_todo_get_all_records(int offset, int limit, calendar_list_h*
                        CAL_FREE(query_str);
                        return ret;
                }
-               _cal_db_todo_get_stmt(stmt,true,record, &extended);
+               _cal_db_todo_get_stmt(stmt, true, record, &extended);
 
                /* child */
                int has_attendee = 0, has_alarm = 0;
                int record_id = 0;
                cal_todo_s* ptodo = (cal_todo_s*) record;
                calendar_record_get_int(record, _calendar_todo.id, &record_id);
-               if (CALENDAR_ERROR_NONE ==  calendar_record_get_int(record, _calendar_todo.has_attendee,&has_attendee)) {
-                       if (has_attendee == 1) {
+               if (CALENDAR_ERROR_NONE ==  calendar_record_get_int(record, _calendar_todo.has_attendee, &has_attendee)) {
+                       if (has_attendee == 1)
                                cal_db_attendee_get_records(record_id, ptodo->attendee_list);
-                       }
                }
-               if (CALENDAR_ERROR_NONE ==  calendar_record_get_int(record, _calendar_todo.has_alarm,&has_alarm)) {
-                       if (has_alarm == 1) {
+               if (CALENDAR_ERROR_NONE ==  calendar_record_get_int(record, _calendar_todo.has_alarm, &has_alarm)) {
+                       if (has_alarm == 1)
                                cal_db_alarm_get_records(record_id, ptodo->alarm_list);
-                       }
                }
 
                if (extended == 1)
                        cal_db_extended_get_records(record_id, CALENDAR_RECORD_TYPE_TODO, ptodo->extended_list);
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -972,12 +965,10 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_TODO);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO_CALENDAR)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_TODO_CALENDAR);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -1003,8 +994,7 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
                cal_db_append_string(&query_str, "FROM");
                cal_db_append_string(&query_str, table_name);
                CAL_FREE(projection);
-       }
-       else {
+       } else {
                cal_db_append_string(&query_str, "SELECT * FROM");
                cal_db_append_string(&query_str, table_name);
        }
@@ -1054,9 +1044,8 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
        /* bind text */
        if (bind_text) {
                g_slist_length(bind_text);
-               for (cursor=bind_text, i=1; cursor;cursor=cursor->next, i++) {
+               for (cursor = bind_text, i = 1; cursor; cursor = cursor->next, i++)
                        cal_db_util_stmt_bind_text(stmt, i, cursor->data);
-               }
        }
 
        ret = calendar_list_create(out_list);
@@ -1075,7 +1064,7 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
                calendar_record_h record;
                int extended = 1;
                int attendee = 1, alarm = 1;
-               ret = calendar_record_create(_calendar_todo._uri,&record);
+               ret = calendar_record_create(_calendar_todo._uri, &record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -1095,10 +1084,9 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
                        _cal_db_todo_get_projection_stmt(stmt,
                                        que->projection, que->projection_count,
                                        record);
-               }
-               else {
+               } else {
                        cal_todo_s *todo = NULL;
-                       _cal_db_todo_get_stmt(stmt,true,record, &extended);
+                       _cal_db_todo_get_stmt(stmt, true, record, &extended);
                        todo = (cal_todo_s*)(record);
                        if (todo) {
                                attendee = todo->has_attendee;
@@ -1107,11 +1095,11 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
                }
 
                /* child */
-               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_TODO_CALENDAR_ALARM) == true && alarm ==1) {
+               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_TODO_CALENDAR_ALARM) == true && alarm == 1) {
                        cal_todo_s* todo = (cal_todo_s*) record;
                        cal_db_alarm_get_records(todo->index, todo->alarm_list);
                }
-               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_TODO_CALENDAR_ATTENDEE) == true && attendee==1) {
+               if (cal_db_query_find_projection_property(query, CAL_PROPERTY_TODO_CALENDAR_ATTENDEE) == true && attendee == 1) {
                        cal_todo_s* todo = (cal_todo_s*) record;
                        cal_db_attendee_get_records(todo->index, todo->attendee_list);
                }
@@ -1120,7 +1108,7 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
                        cal_db_extended_get_records(todo->index, CALENDAR_RECORD_TYPE_TODO, todo->extended_list);
                }
 
-               ret = calendar_list_add(*out_list,record);
+               ret = calendar_list_add(*out_list, record);
                if (CALENDAR_ERROR_NONE != ret) {
                        calendar_list_destroy(*out_list, true);
                        *out_list = NULL;
@@ -1152,7 +1140,7 @@ static int _cal_db_todo_insert_records(const calendar_list_h list, int** ids)
        calendar_record_h record;
        int ret = 0;
        int count = 0;
-       int i=0;
+       int i = 0;
        int *id = NULL;
 
        ret = calendar_list_get_count(list, &count);
@@ -1182,12 +1170,10 @@ static int _cal_db_todo_insert_records(const calendar_list_h list, int** ids)
                i++;
        } while (CALENDAR_ERROR_NO_DATA != calendar_list_next(list));
 
-       if (ids) {
+       if (ids)
                *ids = id;
-       }
-       else {
+       else
                CAL_FREE(id);
-       }
 
        return CALENDAR_ERROR_NONE;
 }
@@ -1218,7 +1204,7 @@ static int _cal_db_todo_delete_records(int ids[], int count)
 {
        int ret = 0;
        int i = 0;
-       for(i = 0; i < count; i++) {
+       for (i = 0; i < count; i++) {
                ret = _cal_db_todo_delete_record(ids[i]);
                if (CALENDAR_ERROR_NONE != ret) {
                        ERR("_cal_db_todo_delete_record() Fail(%d)", ret);
@@ -1276,9 +1262,8 @@ static int _cal_db_todo_replace_records(const calendar_list_h list, int ids[], i
                                return CALENDAR_ERROR_DB_FAILED;
                        }
                }
-               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list)) {
+               if (CALENDAR_ERROR_NO_DATA != calendar_list_next(list))
                        break;
-               }
        }
 
        return CALENDAR_ERROR_NONE;
@@ -1298,12 +1283,10 @@ static int _cal_db_todo_get_count_with_query(calendar_query_h query, int *out_co
 
        if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_TODO);
-       }
-       else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO_CALENDAR)) {
+       } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_TODO_CALENDAR)) {
                table_name = cal_strdup(CAL_VIEW_TABLE_TODO_CALENDAR);
-       }
-       else {
-               ERR("uri(%s) not support get records with query",que->view_uri);
+       } else {
+               ERR("uri(%s) not support get records with query", que->view_uri);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
 
@@ -1354,7 +1337,7 @@ static int _cal_db_todo_get_count_with_query(calendar_query_h query, int *out_co
        return CALENDAR_ERROR_NONE;
 }
 
-static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar_record_h record, int *extended)
+static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt, bool is_view_table, calendar_record_h record, int *extended)
 {
        cal_todo_s *todo = NULL;
        const unsigned char *temp;
@@ -1400,27 +1383,26 @@ static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar
 
        sqlite3_column_int(stmt, count++);
 
-       todo->latitude = sqlite3_column_double(stmt,count++);
-       todo->longitude = sqlite3_column_double(stmt,count++);
+       todo->latitude = sqlite3_column_double(stmt, count++);
+       todo->longitude = sqlite3_column_double(stmt, count++);
        sqlite3_column_int(stmt, count++);
 
        todo->created_time = sqlite3_column_int64(stmt, count++);
 
        todo->completed_time = sqlite3_column_int64(stmt, count++);
 
-       todo->progress = sqlite3_column_int(stmt,count++);
+       todo->progress = sqlite3_column_int(stmt, count++);
 
-       sqlite3_column_int(stmt,count++);
-       sqlite3_column_int(stmt,count++);
-       todo->is_deleted = sqlite3_column_int(stmt,count++);
+       sqlite3_column_int(stmt, count++);
+       sqlite3_column_int(stmt, count++);
+       todo->is_deleted = sqlite3_column_int(stmt, count++);
 
-       todo->start.type = sqlite3_column_int(stmt,count++);
+       todo->start.type = sqlite3_column_int(stmt, count++);
 
        if (todo->start.type == CALENDAR_TIME_UTIME) {
-               todo->start.time.utime = sqlite3_column_int64(stmt,count++);
+               todo->start.time.utime = sqlite3_column_int64(stmt, count++);
                count++; /* dtstart_datetime */
-       }
-       else {
+       } else {
                count++; /* dtstart_utime */
                temp = sqlite3_column_text(stmt, count++);
                if (temp) {
@@ -1435,10 +1417,9 @@ static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar
        todo->start_tzid = cal_strdup((const char*)temp);
        todo->due.type = sqlite3_column_int(stmt, count++);
        if (todo->due.type == CALENDAR_TIME_UTIME) {
-               todo->due.time.utime = sqlite3_column_int64(stmt,count++);
+               todo->due.time.utime = sqlite3_column_int64(stmt, count++);
                count++; /* datatime */
-       }
-       else {
+       } else {
                count++;
                temp = sqlite3_column_text(stmt, count++);
                if (temp) {
@@ -1451,15 +1432,15 @@ static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar
        temp = sqlite3_column_text(stmt, count++);
        todo->due_tzid = cal_strdup((const char*)temp);
 
-       todo->last_mod = sqlite3_column_int64(stmt,count++);
-       sqlite3_column_int(stmt,count++);
+       todo->last_mod = sqlite3_column_int64(stmt, count++);
+       sqlite3_column_int(stmt, count++);
 
        sqlite3_column_text(stmt, count++);
        sqlite3_column_text(stmt, count++);
-       todo->has_attendee = sqlite3_column_int(stmt,count++);
-       todo->has_alarm = sqlite3_column_int(stmt,count++);
-       todo->system_type = sqlite3_column_int(stmt,count++);
-       todo->updated = sqlite3_column_int(stmt,count++);
+       todo->has_attendee = sqlite3_column_int(stmt, count++);
+       todo->has_alarm = sqlite3_column_int(stmt, count++);
+       todo->system_type = sqlite3_column_int(stmt, count++);
+       todo->updated = sqlite3_column_int(stmt, count++);
        temp = sqlite3_column_text(stmt, count++);
        todo->sync_data1 = cal_strdup((const char*)temp);
        temp = sqlite3_column_text(stmt, count++);
@@ -1469,18 +1450,17 @@ static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar
        temp = sqlite3_column_text(stmt, count++);
        todo->sync_data4 = cal_strdup((const char*)temp);
 
-       sqlite3_column_int(stmt,count++);
+       sqlite3_column_int(stmt, count++);
 
        if (extended)
-               *extended = sqlite3_column_int(stmt,count++);
+               *extended = sqlite3_column_int(stmt, count++);
 
        todo->freq = sqlite3_column_int(stmt, count++);
        todo->is_allday = sqlite3_column_int(stmt, count++);
 
        if (is_view_table == true) {
-               if (todo->freq <= 0) {
-                       return ;
-               }
+               if (todo->freq <= 0)
+                       return;
 
                todo->range_type = sqlite3_column_int(stmt, count++);
                todo->until.type = sqlite3_column_int(stmt, count++);
@@ -1512,19 +1492,19 @@ static void _cal_db_todo_get_stmt(sqlite3_stmt *stmt,bool is_view_table,calendar
                todo->byhour = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               todo->byday= cal_strdup((const char*)temp);
+               todo->byday = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               todo->bymonthday= cal_strdup((const char*)temp);
+               todo->bymonthday = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               todo->byyearday= cal_strdup((const char*)temp);
+               todo->byyearday = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               todo->byweekno= cal_strdup((const char*)temp);
+               todo->byweekno = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
-               todo->bymonth= cal_strdup((const char*)temp);
+               todo->bymonth = cal_strdup((const char*)temp);
 
                temp = sqlite3_column_text(stmt, count++);
                todo->bysetpos = cal_strdup((const char*)temp);
@@ -1580,10 +1560,10 @@ static void _cal_db_todo_get_property_stmt(sqlite3_stmt *stmt,
                todo->uid = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_TODO_LATITUDE:
-               todo->latitude = sqlite3_column_double(stmt,*stmt_count);
+               todo->latitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_TODO_LONGITUDE:
-               todo->longitude = sqlite3_column_double(stmt,*stmt_count);
+               todo->longitude = sqlite3_column_double(stmt, *stmt_count);
                break;
        case CAL_PROPERTY_TODO_PROGRESS:
                todo->progress = sqlite3_column_int(stmt, *stmt_count);
@@ -1673,13 +1653,12 @@ static void _cal_db_todo_get_property_stmt(sqlite3_stmt *stmt,
                todo->sync_data4 = cal_strdup((const char*)temp);
                break;
        case CAL_PROPERTY_TODO_START:
-               todo->start.type = sqlite3_column_int(stmt,*stmt_count);
+               todo->start.type = sqlite3_column_int(stmt, *stmt_count);
                if (todo->start.type == CALENDAR_TIME_UTIME) {
                        *stmt_count = *stmt_count+1;
-                       todo->start.time.utime = sqlite3_column_int64(stmt,*stmt_count);
+                       todo->start.time.utime = sqlite3_column_int64(stmt, *stmt_count);
                        *stmt_count = *stmt_count+1; /* datetime */
-               }
-               else {
+               } else {
                        *stmt_count = *stmt_count+1; /* utime */
                        *stmt_count = *stmt_count+1;
                        temp = sqlite3_column_text(stmt, *stmt_count);
@@ -1699,10 +1678,9 @@ static void _cal_db_todo_get_property_stmt(sqlite3_stmt *stmt,
                todo->due.type = sqlite3_column_int(stmt, *stmt_count);
                if (todo->due.type == CALENDAR_TIME_UTIME) {
                        *stmt_count = *stmt_count+1;
-                       todo->due.time.utime = sqlite3_column_int64(stmt,*stmt_count);
+                       todo->due.time.utime = sqlite3_column_int64(stmt, *stmt_count);
                        *stmt_count = *stmt_count+1; /* datatime */
-               }
-               else {
+               } else {
                        *stmt_count = *stmt_count+1; /* utime */
                        *stmt_count = *stmt_count+1;
                        temp = sqlite3_column_text(stmt, *stmt_count);
@@ -1741,12 +1719,11 @@ static void _cal_db_todo_get_projection_stmt(sqlite3_stmt *stmt,
                const unsigned int *projection, const int projection_count,
                calendar_record_h record)
 {
-       int i=0;
+       int i = 0;
        int stmt_count = 0;
 
-       for(i=0;i<projection_count;i++) {
-               _cal_db_todo_get_property_stmt(stmt,projection[i],&stmt_count,record);
-       }
+       for (i = 0; i < projection_count; i++)
+               _cal_db_todo_get_property_stmt(stmt, projection[i], &stmt_count, record);
 }
 
 static bool _cal_db_todo_check_calendar_book_type(calendar_record_h record)
@@ -1796,10 +1773,10 @@ static int _cal_db_todo_update_dirty(calendar_record_h record)
        int ret = CALENDAR_ERROR_NONE;
        calendar_record_h original_record;
 
-       ret = calendar_record_get_int(record,_calendar_todo.id, &todo_id);
+       ret = calendar_record_get_int(record, _calendar_todo.id, &todo_id);
        RETV_IF(CALENDAR_ERROR_NONE != ret, ret);
 
-       DBG("id=%d",todo_id);
+       DBG("id=%d", todo_id);
 
        RETV_IF(false == _cal_db_todo_check_calendar_book_type(record), CALENDAR_ERROR_INVALID_PARAMETER);
 
@@ -1812,53 +1789,49 @@ static int _cal_db_todo_update_dirty(calendar_record_h record)
        cal_record_s *_record = NULL;
        const cal_property_info_s* property_info = NULL;
        int property_info_count = 0;
-       int i=0;
+       int i = 0;
 
        _record = (cal_record_s *)record;
 
        property_info = cal_view_get_property_info(_record->view_uri, &property_info_count);
 
-       for(i=0;i<property_info_count;i++) {
+       for (i = 0; i < property_info_count; i++) {
                if (true == cal_record_check_property_flag(record, property_info[i].property_id , CAL_PROPERTY_FLAG_DIRTY)) {
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
-                               int tmp=0;
-                               ret = calendar_record_get_int(record,property_info[i].property_id,&tmp);
+                               int tmp = 0;
+                               ret = calendar_record_get_int(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
                                ret = cal_record_set_int(original_record, property_info[i].property_id, tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
-                               char *tmp=NULL;
-                               ret = calendar_record_get_str_p(record,property_info[i].property_id,&tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
+                               char *tmp = NULL;
+                               ret = calendar_record_get_str_p(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
                                ret = cal_record_set_str(original_record, property_info[i].property_id, tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
-                               double tmp=0;
-                               ret = calendar_record_get_double(record,property_info[i].property_id,&tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
+                               double tmp = 0;
+                               ret = calendar_record_get_double(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
                                ret = cal_record_set_double(original_record, property_info[i].property_id, tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
-                               long long int tmp=0;
-                               ret = calendar_record_get_lli(record,property_info[i].property_id,&tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
+                               long long int tmp = 0;
+                               ret = calendar_record_get_lli(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
                                ret = cal_record_set_lli(original_record, property_info[i].property_id, tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                                calendar_time_s tmp = {0,};
-                               ret = calendar_record_get_caltime(record,property_info[i].property_id,&tmp);
+                               ret = calendar_record_get_caltime(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
                                ret = cal_record_set_caltime(original_record, property_info[i].property_id, tmp);
index b7817a4..e8f0bf4 100644 (file)
 #define CAL_DB_CALTIME_FIELD_MAX 3
 #define CAL_DB_ESCAPE_CHAR     '\\'
 
-static const char* _cal_db_utime_field_name[] =
-{
+static const char* _cal_db_utime_field_name[] = {
        "dtstart_utime",
        "dtend_utime",
        "until_utime"
 };
-static const char* _cal_db_datetime_field_name[] =
-{
+static const char* _cal_db_datetime_field_name[] = {
        "dtstart_datetime",
        "dtend_datetime",
        "until_datetime"
 };
-static const char* _cal_db_timetype_field_name[] =
-{
+static const char* _cal_db_timetype_field_name[] = {
        "dtstart_type",
        "dtend_type",
        "until_type"
@@ -108,7 +105,7 @@ int cal_db_query_create_projection(calendar_query_h query, char **projection)
        if (field_name)
                cal_db_append_string(&out_projection, (char*)field_name);
 
-       for (i=1;i<query_s->projection_count;i++) {
+       for (i = 1; i < query_s->projection_count; i++) {
                field_name = _cal_db_query_get_property_field_name(properties, query_s->property_count, query_s->projection[i]);
                if (field_name) {
                        cal_db_append_string(&out_projection, ",");
@@ -147,9 +144,7 @@ int cal_db_query_create_order(calendar_query_h query, char *condition, char **or
                        if (condition) {
                                p_utime = _cal_db_query_get_utime_field_name(condition);
                                p_datetime = _cal_db_query_get_datetime_field_name(condition);
-                       }
-                       else
-                       {
+                       } else {
                                DBG("No condition");
                        }
                }
@@ -159,29 +154,25 @@ int cal_db_query_create_order(calendar_query_h query, char *condition, char **or
                        switch (type) {
                        case CAL_RECORD_TYPE_INSTANCE_NORMAL_EXTENDED:
                        case CAL_RECORD_TYPE_INSTANCE_NORMAL:
-                               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_utime, query_s->asc==false ? "DESC":"ASC");
+                               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_utime, query_s->asc == false ? "DESC" : "ASC");
                                break;
                        case CAL_RECORD_TYPE_INSTANCE_ALLDAY_EXTENDED:
                        case CAL_RECORD_TYPE_INSTANCE_ALLDAY:
-                               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_datetime, query_s->asc==false ? "DESC":"ASC");
+                               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_datetime, query_s->asc == false ? "DESC" : "ASC");
                                break;
                        default:
-                               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s, %s %s ", p_utime, query_s->asc==false ? "DESC":"ASC", p_datetime, query_s->asc==false ? "DESC":"ASC");
+                               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s, %s %s ", p_utime, query_s->asc == false ? "DESC" : "ASC", p_datetime, query_s->asc == false ? "DESC" : "ASC");
                                break;
                        }
-               }
-               else if (p_utime && !p_datetime) {
-                       snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_utime, query_s->asc==false ? "DESC":"ASC");
-               }
-               else if (!p_utime && p_datetime) {
-                       snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_datetime, query_s->asc==false ? "DESC":"ASC");
-               }
-               else {
+               } else if (p_utime && !p_datetime) {
+                       snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_utime, query_s->asc == false ? "DESC" : "ASC");
+               } else if (!p_utime && p_datetime) {
+                       snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", p_datetime, query_s->asc == false ? "DESC" : "ASC");
+               } else {
                        DBG("No utime, datetime");
                }
-       }
-       else {
-               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", field_name, query_s->asc==false ? "DESC":"ASC");
+       } else {
+               snprintf(out_order, sizeof(out_order), "ORDER BY %s %s ", field_name, query_s->asc == false ? "DESC" : "ASC");
        }
        *order = strdup(out_order);
 
@@ -229,56 +220,51 @@ int cal_db_query_create_projection_update_set(calendar_record_h record, char **s
        /* get propety_info_s from uri */
        property_info = cal_view_get_property_info(_record->view_uri, &property_info_count);
 
-       for(i=0;i<property_info_count;i++) {
+       for (i = 0; i < property_info_count; i++) {
                if (true == cal_record_check_property_flag(record, property_info[i].property_id , CAL_PROPERTY_FLAG_DIRTY)) {
                        field_name = property_info[i].fields;
 
-                       if (NULL == field_name) {
+                       if (NULL == field_name)
                                continue;
-                       }
 
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
-                               int tmp=0;
-                               ret = calendar_record_get_int(record,property_info[i].property_id,&tmp);
+                               int tmp = 0;
+                               ret = calendar_record_get_int(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d",field_name,tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
-                               char *tmp=NULL;
-                               ret = calendar_record_get_str(record,property_info[i].property_id,&tmp);
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d", field_name, tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
+                               char *tmp = NULL;
+                               ret = calendar_record_get_str(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=?",field_name);
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=?", field_name);
                                *bind_text = g_slist_append(*bind_text, tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
-                               double tmp=0;
-                               ret = calendar_record_get_double(record,property_info[i].property_id,&tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
+                               double tmp = 0;
+                               ret = calendar_record_get_double(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lf",field_name,tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
-                               long long int tmp=0;
-                               ret = calendar_record_get_lli(record,property_info[i].property_id,&tmp);
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lf", field_name, tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
+                               long long int tmp = 0;
+                               ret = calendar_record_get_lli(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lld",field_name,tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lld", field_name, tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                                /*
                                 * field_name
                                 * dtstart_type, dtstart_utime, dtstart_datetime
@@ -295,17 +281,16 @@ int cal_db_query_create_projection_update_set(calendar_record_h record, char **s
                                timetype_field = _cal_db_query_get_timetype_field_name(field_name);
                                utime_field = _cal_db_query_get_utime_field_name(field_name);
                                datetime_field = _cal_db_query_get_datetime_field_name(field_name);
-                               ret = calendar_record_get_caltime(record,property_info[i].property_id,&tmp);
+                               ret = calendar_record_get_caltime(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
                                if (tmp.type == CALENDAR_TIME_UTIME) {
-                                       if (strlen(out_set) != 0) {
+                                       if (strlen(out_set) != 0)
                                                len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                                       }
+
                                        len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d, %s=%lld",
                                                        timetype_field, CALENDAR_TIME_UTIME, utime_field, tmp.time.utime);
-                               }
-                               else {
+                               } else {
                                        char *bind_tmp = NULL;
                                        char bind_datetime[CAL_STR_SHORT_LEN32] = {0};
                                        snprintf(bind_datetime, sizeof(bind_datetime), CAL_FORMAT_LOCAL_DATETIME,
@@ -316,13 +301,13 @@ int cal_db_query_create_projection_update_set(calendar_record_h record, char **s
                                                        tmp.time.date.minute,
                                                        tmp.time.date.second);
 
-                                       if (strlen(out_set) != 0) {
+                                       if (strlen(out_set) != 0)
                                                len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                                       }
+
                                        len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d, %s=?",
                                                        timetype_field, CALENDAR_TIME_LOCALTIME, datetime_field);
 
-                                       bind_tmp= strdup(bind_datetime);
+                                       bind_tmp = strdup(bind_datetime);
                                        *bind_text = g_slist_append(*bind_text, bind_tmp);
                                }
                        }
@@ -330,7 +315,7 @@ int cal_db_query_create_projection_update_set(calendar_record_h record, char **s
        }
 
        *set = strdup(out_set);
-       DBG("set=%s",*set);
+       DBG("set=%s", *set);
 
        return CALENDAR_ERROR_NONE;
 }
@@ -352,17 +337,16 @@ int cal_db_query_create_projection_update_set_with_property(
 
        _record = (cal_record_s *)record;
 
-       if (_record->properties_max_count == 0 || NULL == _record->properties_flags) {
+       if (_record->properties_max_count == 0 || NULL == _record->properties_flags)
                return CALENDAR_ERROR_NONE;
-       }
 
        /* get propety_info_s from uri */
        property_info = cal_view_get_property_info(_record->view_uri, &property_info_count);
 
-       for(i=0;i<property_info_count;i++) {
-               int j=0;
+       for (i = 0; i < property_info_count; i++) {
+               int j = 0;
                bool flag = false;
-               for(j=0;j<properties_count;j++) {
+               for (j = 0; j < properties_count; j++) {
                        if (property_info[i].property_id == properties[j]) {
                                flag = true;
                                break;
@@ -372,52 +356,47 @@ int cal_db_query_create_projection_update_set_with_property(
                                (true == cal_record_check_property_flag(record, property_info[i].property_id , CAL_PROPERTY_FLAG_DIRTY))) {
                        field_name = property_info[i].fields;
 
-                       if (NULL == field_name) {
+                       if (NULL == field_name)
                                continue;
-                       }
 
                        if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_INT) == true) {
-                               int tmp=0;
-                               ret = calendar_record_get_int(record,property_info[i].property_id,&tmp);
+                               int tmp = 0;
+                               ret = calendar_record_get_int(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d",field_name,tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
-                               char *tmp=NULL;
-                               ret = calendar_record_get_str(record,property_info[i].property_id,&tmp);
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d", field_name, tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_STR) == true) {
+                               char *tmp = NULL;
+                               ret = calendar_record_get_str(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=?",field_name);
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=?", field_name);
                                *bind_text = g_slist_append(*bind_text, tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
-                               double tmp=0;
-                               ret = calendar_record_get_double(record,property_info[i].property_id,&tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_DOUBLE) == true) {
+                               double tmp = 0;
+                               ret = calendar_record_get_double(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lf",field_name,tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
-                               long long int tmp=0;
-                               ret = calendar_record_get_lli(record,property_info[i].property_id,&tmp);
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lf", field_name, tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_LLI) == true) {
+                               long long int tmp = 0;
+                               ret = calendar_record_get_lli(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
-                               if (strlen(out_set) != 0) {
+                               if (strlen(out_set) != 0)
                                        len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                               }
-                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lld",field_name,tmp);
-                       }
-                       else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
+
+                               len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%lld", field_name, tmp);
+                       } else if (CAL_PROPERTY_CHECK_DATA_TYPE(property_info[i].property_id, CAL_PROPERTY_DATA_TYPE_CALTIME) == true) {
                                /*
                                 * field_name
                                 * dtstart_type, dtstart_utime, dtstart_datetime
@@ -434,17 +413,16 @@ int cal_db_query_create_projection_update_set_with_property(
                                timetype_field = _cal_db_query_get_timetype_field_name(field_name);
                                utime_field = _cal_db_query_get_utime_field_name(field_name);
                                datetime_field = _cal_db_query_get_datetime_field_name(field_name);
-                               ret = calendar_record_get_caltime(record,property_info[i].property_id,&tmp);
+                               ret = calendar_record_get_caltime(record, property_info[i].property_id, &tmp);
                                if (CALENDAR_ERROR_NONE != ret)
                                        continue;
                                if (tmp.type == CALENDAR_TIME_UTIME) {
-                                       if (strlen(out_set) != 0) {
+                                       if (strlen(out_set) != 0)
                                                len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                                       }
+
                                        len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d, %s=%lld",
-                                                       timetype_field, CALENDAR_TIME_UTIME,utime_field,tmp.time.utime);
-                               }
-                               else {
+                                                       timetype_field, CALENDAR_TIME_UTIME, utime_field, tmp.time.utime);
+                               } else {
                                        char *bind_tmp = NULL;
                                        char bind_datetime[CAL_STR_SHORT_LEN32] = {0};
                                        snprintf(bind_datetime, sizeof(bind_datetime), CAL_FORMAT_LOCAL_DATETIME,
@@ -455,13 +433,13 @@ int cal_db_query_create_projection_update_set_with_property(
                                                        tmp.time.date.minute,
                                                        tmp.time.date.second);
 
-                                       if (strlen(out_set) != 0) {
+                                       if (strlen(out_set) != 0)
                                                len += snprintf(out_set+len, sizeof(out_set)-len, ", ");
-                                       }
+
                                        len += snprintf(out_set+len, sizeof(out_set)-len, "%s=%d, %s=?",
                                                        timetype_field, CALENDAR_TIME_LOCALTIME, datetime_field);
 
-                                       bind_tmp= strdup(bind_datetime);
+                                       bind_tmp = strdup(bind_datetime);
                                        *bind_text = g_slist_append(*bind_text, bind_tmp);
                                }
                        }
@@ -484,17 +462,14 @@ static int _cal_db_query_create_composite_condition(cal_composite_filter_s *com_
        cal_filter_s *filter;
        int ret = CALENDAR_ERROR_NONE;
 
-       if (NULL == com_filter || NULL == com_filter->filters) {
+       if (NULL == com_filter || NULL == com_filter->filters)
                return CALENDAR_ERROR_INVALID_PARAMETER;
-       }
 
        filter = (cal_filter_s *)com_filter->filters->data;
-       if (filter->filter_type == CAL_FILTER_COMPOSITE) {
+       if (filter->filter_type == CAL_FILTER_COMPOSITE)
                ret = _cal_db_query_create_composite_condition((cal_composite_filter_s*)filter, &cond, &binds);
-       }
-       else {
+       else
                ret = _cal_db_query_create_attribute_condition(com_filter, (cal_attribute_filter_s*)filter, &cond, &binds);
-       }
 
        if (CALENDAR_ERROR_NONE != ret) {
                ERR("_cal_db_query_create_attribute_condition() Fail(%d)", ret);
@@ -509,8 +484,8 @@ static int _cal_db_query_create_composite_condition(cal_composite_filter_s *com_
 
        CAL_FREE(cond);
 
-       for(cursor_ops=com_filter->filter_ops; cursor_ops && cursor_filter;
-                       cursor_filter=cursor_filter->next, cursor_ops=cursor_ops->next) {
+       for (cursor_ops = com_filter->filter_ops; cursor_ops && cursor_filter;
+                       cursor_filter = cursor_filter->next, cursor_ops = cursor_ops->next) {
                filter = (cal_filter_s *)cursor_filter->data;
                if (filter->filter_type == CAL_FILTER_COMPOSITE)
                        ret = _cal_db_query_create_composite_condition((cal_composite_filter_s*)filter, &cond, &binds2);
@@ -532,8 +507,7 @@ static int _cal_db_query_create_composite_condition(cal_composite_filter_s *com_
                        cal_db_append_string(&out_cond, "AND (");
                        cal_db_append_string(&out_cond, cond);
                        cal_db_append_string(&out_cond, ")");
-               }
-               else {
+               } else {
                        cal_db_append_string(&out_cond, "OR (");
                        cal_db_append_string(&out_cond, cond);
                        cal_db_append_string(&out_cond, ")");
@@ -576,7 +550,7 @@ static int _cal_db_query_create_attribute_condition(cal_composite_filter_s *com_
        case CAL_FILTER_CALTIME:
                ret = _cal_db_query_create_caltime_condition(com_filter, filter, &cond);
                break;
-       default :
+       default:
                ERR("The filter type is not supported (%d)", filter->filter_type);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -620,7 +594,7 @@ static int _cal_db_query_create_int_condition(cal_composite_filter_s *com_filter
        case CALENDAR_MATCH_NOT_EQUAL:
                snprintf(out_cond, sizeof(out_cond), "%s <> %d", field_name, filter->value.i);
                break;
-       default :
+       default:
                ERR("Invalid parameter : int match rule(%d) is not supported", filter->match);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -662,7 +636,7 @@ static int _cal_db_query_create_double_condition(cal_composite_filter_s *com_fil
        case CALENDAR_MATCH_NOT_EQUAL:
                snprintf(out_cond, sizeof(out_cond), "%s <> %lf", field_name, filter->value.d);
                break;
-       default :
+       default:
                ERR("Invalid parameter : int match rule(%d) is not supported", filter->match);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -704,7 +678,7 @@ static int _cal_db_query_create_lli_condition(cal_composite_filter_s *com_filter
        case CALENDAR_MATCH_NOT_EQUAL:
                snprintf(out_cond, sizeof(out_cond), "%s <> %lld", field_name, filter->value.lli);
                break;
-       default :
+       default:
                ERR("Invalid parameter : int match rule(%d) is not supported", filter->match);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -727,9 +701,9 @@ static int _cal_db_query_create_caltime_condition(cal_composite_filter_s *com_fi
 
        if (filter->value.caltime.type == CALENDAR_TIME_UTIME) {
                tmp = _cal_db_query_get_utime_field_name(field_name);
-               if (NULL == tmp) {
+               if (NULL == tmp)
                        tmp = field_name;
-               }
+
                switch (filter->match) {
                case CALENDAR_MATCH_EQUAL:
                        snprintf(out_cond, sizeof(out_cond), "%s = %lld", tmp, filter->value.caltime.time.utime);
@@ -752,20 +726,19 @@ static int _cal_db_query_create_caltime_condition(cal_composite_filter_s *com_fi
                case CALENDAR_MATCH_NOT_EQUAL:
                        snprintf(out_cond, sizeof(out_cond), "%s <> %lld", tmp, filter->value.caltime.time.utime);
                        break;
-               default :
+               default:
                        ERR("Invalid parameter : int match rule(%d) is not supported", filter->match);
                        return CALENDAR_ERROR_INVALID_PARAMETER;
                }
-       }
-       else if (filter->value.caltime.type == CALENDAR_TIME_LOCALTIME) {
+       } else if (filter->value.caltime.type == CALENDAR_TIME_LOCALTIME) {
                char sdate[CAL_STR_SHORT_LEN32] = {0};
                snprintf(sdate, sizeof(sdate), CAL_FORMAT_LOCAL_DATETIME,
                                filter->value.caltime.time.date.year, filter->value.caltime.time.date.month, filter->value.caltime.time.date.mday,
                                filter->value.caltime.time.date.hour, filter->value.caltime.time.date.minute, filter->value.caltime.time.date.second);
                tmp = _cal_db_query_get_datetime_field_name(field_name);
-               if (NULL == tmp) {
+               if (NULL == tmp)
                        tmp = field_name;
-               }
+
                switch (filter->match) {
                case CALENDAR_MATCH_EQUAL:
                        snprintf(out_cond, sizeof(out_cond), "%s = '%s'", tmp, sdate);
@@ -786,12 +759,11 @@ static int _cal_db_query_create_caltime_condition(cal_composite_filter_s *com_fi
                        snprintf(out_cond, sizeof(out_cond), "%s <> '%s'", tmp, sdate);
                        break;
                case CALENDAR_MATCH_NONE:
-               default :
+               default:
                        ERR("Invalid parameter : int match rule(%d) is not supported", filter->match);
                        return CALENDAR_ERROR_INVALID_PARAMETER;
                }
-       }
-       else {
+       } else {
                ERR("Invalid parameter : property id(%d)", filter->property_id);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -818,10 +790,10 @@ static char * _cal_db_get_str_with_escape(char *str, int len, bool with_escape)
        if (false == with_escape)
                return strdup(str);
 
-       for(i=0;i<len;i++) {
-               if (str[i] == '\'' || str[i] == '_' || str[i] == '%' || str[i] == '\\') {
+       for (i = 0; i < len; i++) {
+               if (str[i] == '\'' || str[i] == '_' || str[i] == '%' || str[i] == '\\')
                        temp_str[j++] = CAL_DB_ESCAPE_CHAR;
-               }
+
                temp_str[j++] = str[i];
        }
        temp_str[j] = '\0';
@@ -861,7 +833,7 @@ static int _cal_db_query_create_str_condition(cal_composite_filter_s *com_filter
        case CALENDAR_MATCH_EXISTS:
                snprintf(out_cond, sizeof(out_cond), "%s IS NOT NULL", field_name);
                break;
-       default :
+       default:
                ERR("Invalid paramter : int match rule (%d) is not supported", filter->match);
                return CALENDAR_ERROR_INVALID_PARAMETER;
        }
@@ -878,7 +850,7 @@ static const char * _cal_db_query_get_property_field_name(const cal_property_inf
                int count, unsigned int property_id)
 {
        int i;
-       for (i=0;i<count;i++) {
+       for (i = 0; i < count; i++) {
                cal_property_info_s *p = (cal_property_info_s*)&(properties[i]);
                if (property_id == p->property_id) {
                        if (p->fields)
@@ -893,13 +865,12 @@ static const char * _cal_db_query_get_property_field_name(const cal_property_inf
 static const char * _cal_db_query_get_utime_field_name(const char* src)
 {
        char *tmp1 = NULL;
-       int i=0;
+       int i = 0;
 
-       for(i=0;i<CAL_DB_CALTIME_FIELD_MAX;i++) {
-               tmp1 = strstr(src,_cal_db_utime_field_name[i]);
-               if (tmp1) {
+       for (i = 0; i < CAL_DB_CALTIME_FIELD_MAX; i++) {
+               tmp1 = strstr(src, _cal_db_utime_field_name[i]);
+               if (tmp1)
                        return _cal_db_utime_field_name[i];
-               }
        }
 
        return NULL;
@@ -908,13 +879,12 @@ static const char * _cal_db_query_get_utime_field_name(const char* src)
 static const char * _cal_db_query_get_datetime_field_name(const char* src)
 {
        char *tmp1 = NULL;
-       int i=0;
+       int i = 0;
 
-       for(i=0;i<CAL_DB_CALTIME_FIELD_MAX;i++) {
-               tmp1 = strstr(src,_cal_db_datetime_field_name[i]);
-               if (tmp1) {
+       for (i = 0; i < CAL_DB_CALTIME_FIELD_MAX; i++) {
+               tmp1 = strstr(src, _cal_db_datetime_field_name[i]);
+               if (tmp1)
                        return _cal_db_datetime_field_name[i];
-               }
        }
 
        return NULL;
@@ -923,13 +893,12 @@ static const char * _cal_db_query_get_datetime_field_name(const char* src)
 static const char * _cal_db_query_get_timetype_field_name(const char* src)
 {
        char *tmp1 = NULL;
-       int i=0;
+       int i = 0;
 
-       for(i=0;i<CAL_DB_CALTIME_FIELD_MAX;i++) {
-               tmp1 = strstr(src,_cal_db_timetype_field_name[i]);
-               if (tmp1) {
+       for (i = 0; i < CAL_DB_CALTIME_FIELD_MAX; i++) {
+               tmp1 = strstr(src, _cal_db_timetype_field_name[i]);
+               if (tmp1)
                        return _cal_db_timetype_field_name[i];
-               }
        }
 
        return NULL;
index 99d5d5b..1dfb49f 100644 (file)
@@ -348,19 +348,19 @@ int cal_db_rrule_get_rrule(int id, cal_rrule_s **rrule)
        _rrule->byhour = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, index++);
-       _rrule->byday= cal_strdup((const char*)temp);
+       _rrule->byday = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, index++);
-       _rrule->bymonthday= cal_strdup((const char*)temp);
+       _rrule->bymonthday = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, index++);
-       _rrule->byyearday= cal_strdup((const char*)temp);
+       _rrule->byyearday = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, index++);
-       _rrule->byweekno= cal_strdup((const char*)temp);
+       _rrule->byweekno = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, index++);
-       _rrule->bymonth= cal_strdup((const char*)temp);
+       _rrule->bymonth = cal_strdup((const char*)temp);
 
        temp = sqlite3_column_text(stmt, index++);
        _rrule->bysetpos = cal_strdup((const char*)temp);
@@ -520,11 +520,9 @@ int cal_db_rrule_insert_record(int id, cal_rrule_s *rrule)
        RETVM_IF(NULL == rrule, CALENDAR_ERROR_INVALID_PARAMETER,
                        "Invalid argument: rrule is NULL");
 
-       if (rrule->freq == CALENDAR_RECURRENCE_NONE) {
-       }
-       else {
+       if (CALENDAR_RECURRENCE_NONE != rrule->freq)
                _cal_db_rrule_insert_record(id, rrule);
-       }
+
        return CALENDAR_ERROR_NONE;
 }
 
@@ -536,15 +534,12 @@ int cal_db_rrule_update_record(int id, cal_rrule_s *rrule)
                DBG("freq is NONE");
                _cal_db_rrule_delete_record(id);
                return CALENDAR_ERROR_NONE;
-       }
-       else {
+       } else {
                _cal_db_rrule_has_record(id, &has_record);
-               if (has_record) {
+               if (has_record)
                        _cal_db_rrule_update_record(id, rrule);
-               }
-               else {
+               else
                        _cal_db_rrule_insert_record(id, rrule);
-               }
        }
        return CALENDAR_ERROR_NONE;
 }
index f03d28e..6885816 100644 (file)
@@ -42,9 +42,9 @@ static TLS int transaction_cnt = 0;
 static TLS int transaction_ver = 0;
 static TLS bool version_up = false;
 
-static TLS bool event_change=false;
-static TLS bool todo_change=false;
-static TLS bool calendar_change=false;
+static TLS bool event_change = false;
+static TLS bool todo_change = false;
+static TLS bool calendar_change = false;
 
 static void _cal_db_util_notify_event_change(void)
 {
@@ -52,8 +52,7 @@ static void _cal_db_util_notify_event_change(void)
        if (0 <= fd) {
                close(fd);
                event_change = false;
-       }
-       else {
+       } else {
                ERR("open() Fail");
        }
 }
@@ -64,8 +63,7 @@ static inline void _cal_db_util_notify_todo_change(void)
        if (0 <= fd) {
                close(fd);
                todo_change = false;
-       }
-       else {
+       } else {
                ERR("open() Fail");
        }
 }
@@ -76,8 +74,7 @@ static inline void _cal_db_util_notify_calendar_change(void)
        if (0 <= fd) {
                close(fd);
                calendar_change = false;
-       }
-       else {
+       } else {
                ERR("open() Fail");
        }
 }
@@ -109,7 +106,7 @@ int cal_db_util_notify(cal_noti_type_e type)
                return CALENDAR_ERROR_NONE;
        }
 
-       switch(type) {
+       switch (type) {
        case CAL_NOTI_TYPE_EVENT:
                _cal_db_util_notify_event_change();
                break;
@@ -132,10 +129,10 @@ int cal_db_util_open(void)
        if (cal_db)
                return CALENDAR_ERROR_NONE;
 
-       if (-1 == access (DB_PATH, F_OK))
+       if (-1 == access(DB_PATH, F_OK))
                mkdir(DB_PATH, 755);
 
-       if (-1 == access (CAL_DB_FILE, F_OK))
+       if (-1 == access(CAL_DB_FILE, F_OK))
                mkdir(DB_PATH, 755);
 
        int ret = 0;
@@ -155,9 +152,9 @@ int cal_db_util_close(void)
 
        int ret = 0;
        ret = db_util_close(cal_db);
-       if (SQLITE_OK != ret) {
+       if (SQLITE_OK != ret)
                WARN("db_util_close() Fail(%d)", ret);
-       }
+
        cal_db = NULL;
        DBG("The database disconnected really.");
 
@@ -186,11 +183,10 @@ int cal_db_util_query_prepare(char *query, sqlite3_stmt **stmt)
                if (SQLITE_BUSY == ret || SQLITE_LOCKED == ret) {
                        gettimeofday(&now, NULL);
                        timersub(&now, &from, &diff);
-                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ?true :false;
+                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ? true : false;
                        if (retry)
-                               usleep(CAL_QUERY_RETRY_INTERVAL); // 50ms
-               }
-               else {
+                               usleep(CAL_QUERY_RETRY_INTERVAL); /* 50ms */
+               } else {
                        retry = false;
                }
        } while (retry);
@@ -229,11 +225,10 @@ int cal_db_util_stmt_step(sqlite3_stmt *stmt)
                if (SQLITE_BUSY == ret || SQLITE_LOCKED == ret) {
                        gettimeofday(&now, NULL);
                        timersub(&now, &from, &diff);
-                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ?true :false;
+                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ? true : false;
                        if (retry)
                                usleep(CAL_QUERY_RETRY_INTERVAL); /* 50ms */
-               }
-               else {
+               } else {
                        retry = false;
                }
        } while (retry);
@@ -305,11 +300,10 @@ int cal_db_util_query_get_first_int_result(const char *query, GSList *bind_text,
                        SECURE("[%s]", query);
                        gettimeofday(&now, NULL);
                        timersub(&now, &from, &diff);
-                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ?true :false;
+                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ? true : false;
                        if (retry)
                                usleep(CAL_QUERY_RETRY_INTERVAL); /* 50ms */
-               }
-               else {
+               } else {
                        retry = false;
                }
        } while (retry);
@@ -337,11 +331,10 @@ int cal_db_util_query_get_first_int_result(const char *query, GSList *bind_text,
                        ERR("sqlite3_step fail(%d, %s)", ret, sqlite3_errmsg(cal_db));
                        gettimeofday(&now, NULL);
                        timersub(&now, &from, &diff);
-                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ? true : false;
+                       retry = (diff.tv_sec < CAL_QUERY_RETRY_TIME) ? true :  false;
                        if (retry)
                                usleep(CAL_QUERY_RETRY_INTERVAL); /* 50ms */
-               }
-               else {
+               } else {
                        retry = false;
                }
        } while (retry);
@@ -380,8 +373,8 @@ int cal_db_util_begin_trans(void)
 
                progress = 100000;
                ret = cal_db_util_query_exec("BEGIN IMMEDIATE TRANSACTION");
-               // !! check error code
-               while(CALENDAR_ERROR_NONE != ret && progress < CAL_COMMIT_TRY_MAX) {
+               /*  !! check error code */
+               while (CALENDAR_ERROR_NONE != ret && progress < CAL_COMMIT_TRY_MAX) {
                        usleep(progress);
                        ret = cal_db_util_query_exec("BEGIN IMMEDIATE TRANSACTION");
                        progress *= 2;
@@ -391,8 +384,7 @@ int cal_db_util_begin_trans(void)
                transaction_cnt = 0;
                const char *query = "SELECT ver FROM "CAL_TABLE_VERSION;
                ret = cal_db_util_query_get_first_int_result(query, NULL, &transaction_ver);
-               if (CALENDAR_ERROR_NONE != ret)
-               {
+               if (CALENDAR_ERROR_NONE != ret) {
                        ERR("cal_db_util_query_get_first_int_result() Fail");
                        return ret;
                }
@@ -434,13 +426,13 @@ int cal_db_util_end_trans(bool is_success)
        INFO("start commit");
        progress = 100000;
        ret = cal_db_util_query_exec("COMMIT TRANSACTION");
-       // !! check error code
+       /* !! check error code */
        while (CALENDAR_ERROR_NONE != ret && progress < CAL_COMMIT_TRY_MAX) {
                usleep(progress);
                ret = cal_db_util_query_exec("COMMIT TRANSACTION");
                progress *= 2;
        }
-       INFO("%s", (CALENDAR_ERROR_NONE == ret)?"commit": "rollback");
+       INFO("%s", (CALENDAR_ERROR_NONE == ret) ? "commit" : "rollback");
 
        if (CALENDAR_ERROR_NONE != ret) {
                int tmp_ret;
@@ -454,7 +446,7 @@ int cal_db_util_end_trans(bool is_success)
        if (todo_change) _cal_db_util_notify_todo_change();
        if (calendar_change) _cal_db_util_notify_calendar_change();
 
-       DBG("transaction_ver = %d",transaction_ver);
+       DBG("transaction_ver = %d", transaction_ver);
        return CALENDAR_ERROR_NONE;
 }
 
@@ -469,9 +461,9 @@ int cal_db_util_get_next_ver(void)
        int count = 0;
        const char *query = "SELECT ver FROM "CAL_TABLE_VERSION;
        ret = cal_db_util_query_get_first_int_result(query, NULL, &count);
-       if (CALENDAR_ERROR_NONE != ret) {
+       if (CALENDAR_ERROR_NONE != ret)
                WARN("cal_db_util_query_get_first_int_result() Fail(%d)", ret);
-       }
+
        return (1 + count);
 }