RETV_IF(NULL == view_uri, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == out_filter, CALENDAR_ERROR_INVALID_PARAMETER);
+
com_filter = calloc(1, sizeof(cal_composite_filter_s));
RETV_IF(NULL == com_filter, CALENDAR_ERROR_OUT_OF_MEMORY);
#ifdef CAL_IPC_CLIENT
cal_view_initialize();
#endif
-
com_filter->filter_type = CAL_FILTER_COMPOSITE;
com_filter->view_uri = cal_strdup(view_uri);
com_filter->properties = (cal_property_info_s *)cal_view_get_property_info(view_uri, &com_filter->property_count);
RETV_IF(NULL == view_uri, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == out_query, CALENDAR_ERROR_INVALID_PARAMETER);
-#ifdef CAL_IPC_CLIENT
- cal_view_initialize();
-#endif
-
query = calloc(1, sizeof(cal_query_s));
RETV_IF(NULL == query, CALENDAR_ERROR_OUT_OF_MEMORY);
+#ifdef CAL_IPC_CLIENT
+ cal_view_initialize();
+#endif
query->view_uri = cal_strdup(view_uri);
query->properties = (cal_property_info_s *)cal_view_get_property_info(view_uri, &query->property_count);
*out_query = (calendar_query_h)query;
#ifdef CAL_IPC_CLIENT
cal_view_initialize();
#endif
-
type = cal_view_get_type(view_uri);
RETV_IF(CAL_RECORD_TYPE_INVALID == type, CALENDAR_ERROR_INVALID_PARAMETER);
RETVM_IF(NULL == plugin_cb->create, CALENDAR_ERROR_NOT_PERMITTED, "Not permitted in [%s]", view_uri);
ret = plugin_cb->create(out_record);
-
if (CALENDAR_ERROR_NONE == ret)
CAL_RECORD_INIT_COMMON((cal_record_s*)*out_record, type, plugin_cb, cal_view_get_uri(view_uri));
RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER);
-#ifdef CAL_IPC_CLIENT
- cal_view_finalize();
-#endif
-
cal_record_s *temp = (cal_record_s*)(record);
RETV_IF(NULL == temp->plugin_cb, CALENDAR_ERROR_INVALID_PARAMETER);
CAL_FREE(temp->properties_flags);
+#ifdef CAL_IPC_CLIENT
+ cal_view_finalize();
+#endif
ret = temp->plugin_cb->destroy(record, delete_child);
return ret;
RETV_IF(NULL == out_record, CALENDAR_ERROR_INVALID_PARAMETER);
RETVM_IF(NULL == temp->plugin_cb->clone, CALENDAR_ERROR_NOT_PERMITTED, "Not permitted in [%s]", temp->view_uri);
+#ifdef CAL_IPC_CLIENT
+ cal_view_initialize();
+#endif
ret = temp->plugin_cb->clone(record, out_record);
return ret;