modify terminology:calendar->book,allday->localtime,normal->utime,svc->service
[platform/core/pim/calendar-service.git] / server / db / cal_db_plugin_event_helper.c
index 57e64d2..2c30330 100644 (file)
@@ -84,7 +84,7 @@ int cal_db_event_check_value_validation(cal_event_s *event)
 
        if (event->start.type != event->end.type) {
                /* LCOV_EXCL_START */
-               ERR("normal end(%lld) < start(%lld)",
+               ERR("utime end(%lld) < start(%lld)",
                                event->end.time.utime, event->start.time.utime);
                return CALENDAR_ERROR_INVALID_PARAMETER;
                /* LCOV_EXCL_STOP */
@@ -94,7 +94,7 @@ int cal_db_event_check_value_validation(cal_event_s *event)
        case CALENDAR_TIME_UTIME:
                if (event->end.time.utime < event->start.time.utime) {
                        /* LCOV_EXCL_START */
-                       ERR("normal end(%lld) < start(%lld) so set same", event->end.time.utime, event->start.time.utime);
+                       ERR("utime end(%lld) < start(%lld) so set same", event->end.time.utime, event->start.time.utime);
                        event->end.time.utime =  event->start.time.utime;
                        return CALENDAR_ERROR_INVALID_PARAMETER;
                        /* LCOV_EXCL_STOP */
@@ -333,7 +333,7 @@ static void __get_next_instance_caltime(int parent_id, calendar_time_s *caltime,
        case CALENDAR_TIME_UTIME:
                snprintf(query, sizeof(query), "SELECT dtstart_utime, dtend_utime FROM %s WHERE event_id=%d AND dtstart_utime>%lld "
                                "ORDER BY dtstart_utime ASC LIMIT 1",
-                               CAL_TABLE_NORMAL_INSTANCE, parent_id, caltime->time.utime);
+                               CAL_TABLE_UTIME_INSTANCE, parent_id, caltime->time.utime);
 
                ret = cal_db_util_query_prepare(query, &stmt);
                if (CALENDAR_ERROR_NONE != ret) {
@@ -356,7 +356,7 @@ static void __get_next_instance_caltime(int parent_id, calendar_time_s *caltime,
                snprintf(query, sizeof(query), "SELECT dtstart_datetime, dtend_datetime FROM %s "
                                "WHERE event_id=%d AND dtstart_datetime>'%04d-%02d-%02dT%02d:%02d:%02d' "
                                "ORDER BY dtstart_datetime ASC LIMIT 1",
-                               CAL_TABLE_ALLDAY_INSTANCE, parent_id,
+                               CAL_TABLE_LOCALTIME_INSTANCE, parent_id,
                                caltime->time.date.year, caltime->time.date.month, caltime->time.date.mday,
                                caltime->time.date.hour, caltime->time.date.minute, caltime->time.date.second);
 
@@ -400,7 +400,7 @@ static void __get_last_instance_caltime(int parent_id, int type, calendar_time_s
        case CALENDAR_TIME_UTIME:
                snprintf(query, sizeof(query), "SELECT dtstart_utime FROM %s WHERE event_id=%d "
                                "ORDER BY dtstart_utime DESC LIMIT 1",
-                               CAL_TABLE_NORMAL_INSTANCE, parent_id);
+                               CAL_TABLE_UTIME_INSTANCE, parent_id);
                ret = cal_db_util_query_prepare(query, &stmt);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
@@ -418,7 +418,7 @@ static void __get_last_instance_caltime(int parent_id, int type, calendar_time_s
        case CALENDAR_TIME_LOCALTIME:
                snprintf(query, sizeof(query), "SELECT dtstart_datetime FROM %s WHERE event_id=%d "
                                "ORDER BY dtstart_datetime DESC LIMIT 1",
-                               CAL_TABLE_ALLDAY_INSTANCE, parent_id);
+                               CAL_TABLE_LOCALTIME_INSTANCE, parent_id);
                ret = cal_db_util_query_prepare(query, &stmt);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
@@ -451,11 +451,11 @@ static void __del_recurence_id_instance(calendar_time_s *rectime, int parent_id)
        switch (rectime->type) {
        case CALENDAR_TIME_UTIME:
                snprintf(query, sizeof(query), "DELETE FROM %s WHERE dtstart_utime=%lld AND event_id=%d",
-                               CAL_TABLE_NORMAL_INSTANCE, rectime->time.utime, parent_id);
+                               CAL_TABLE_UTIME_INSTANCE, rectime->time.utime, parent_id);
                break;
        case CALENDAR_TIME_LOCALTIME:
                snprintf(query, sizeof(query), "DELETE FROM %s WHERE dtstart_datetime='%04d-%02d-%02dT%02d:%02d:%02d' AND event_id=%d",
-                               CAL_TABLE_ALLDAY_INSTANCE, rectime->time.date.year, rectime->time.date.month, rectime->time.date.mday,
+                               CAL_TABLE_LOCALTIME_INSTANCE, rectime->time.date.year, rectime->time.date.month, rectime->time.date.mday,
                                rectime->time.date.hour, rectime->time.date.minute, rectime->time.date.second, parent_id);
                break;
        }