static int _cal_db_event_exception_get_ids(int original_id, GList **out_list);
static int _cal_db_event_exception_update(cal_list_s *exception_list_s, int original_id, int calendar_id, int is_dirty_in_time, time_t time_diff, int old_type, int new_type);
static int _cal_db_event_get_deleted_data(int id, int* calendar_book_id, int* created_ver, int* original_event_id, char** recurrence_id);
-static int _cal_db_event_exdate_insert_normal(int event_id, const char* original_exdate, const char* exdate, int **exception_id, int *exception_len);
+static int _cal_db_event_exdate_insert_utime(int event_id, const char* original_exdate, const char* exdate, int **exception_id, int *exception_len);
static bool _cal_db_event_check_calendar_book_type(calendar_record_h record);
static void __check_list(calendar_list_h l)
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)) {
- table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR);
- } 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 if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_BOOK)) {
+ table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_BOOK);
+ } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_BOOK_ATTENDEE)) {
+ table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_BOOK_ATTENDEE);
} else {
/* LCOV_EXCL_START */
ERR("uri(%s) not support get records with query", que->view_uri);
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)) {
- table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_CALENDAR);
- } 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 if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_BOOK)) {
+ table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_BOOK);
+ } else if (CAL_STRING_EQUAL == strcmp(que->view_uri, CALENDAR_VIEW_EVENT_BOOK_ATTENDEE)) {
+ table_name = cal_strdup(CAL_VIEW_TABLE_EVENT_BOOK_ATTENDEE);
} else {
/* LCOV_EXCL_START */
ERR("uri(%s) not support get records with query", que->view_uri);
case CAL_PROPERTY_EVENT_ID:
event->index = sqlite3_column_int(stmt, *stmt_count);
break;
- case CAL_PROPERTY_EVENT_CALENDAR_ID:
+ case CAL_PROPERTY_EVENT_BOOK_ID:
event->calendar_id = sqlite3_column_int(stmt, *stmt_count);
break;
case CAL_PROPERTY_EVENT_SUMMARY:
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);
+ ret = calendar_record_get_int(original_record, CAL_PROPERTY_EVENT_BOOK_ID, &calendar_id);
if (CALENDAR_ERROR_NONE != ret)
continue;
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,
+ ret = _cal_db_event_exdate_insert_utime(event_id, original_exdate,
record_exdate, NULL, NULL);
WARN_IF(CALENDAR_ERROR_NONE != ret, "%s->%s", original_exdate, record_exdate);
} else {
int *exception_ids = NULL;
int exception_len = 0;
- ret = _cal_db_event_exdate_insert_normal(event_id, original_exdate,
+ ret = _cal_db_event_exdate_insert_utime(event_id, original_exdate,
record_exdate, &exception_ids, &exception_len);
WARN_IF(CALENDAR_ERROR_NONE != ret, "%s->%s", original_exdate, record_exdate);
ret = _cal_db_event_delete_exception(exception_ids, exception_len);
return CALENDAR_ERROR_NONE;
}
-static int _cal_db_event_exdate_insert_normal(int event_id, const char* original_exdate,
+static int _cal_db_event_exdate_insert_utime(int event_id, const char* original_exdate,
const char* exdate, int **exception_ids, int *exception_len)
{
int ret = CALENDAR_ERROR_NONE;