From 00a22343420cb72309a3f9df67c84b45e2445a7f Mon Sep 17 00:00:00 2001 From: Jeesun Kim Date: Wed, 2 Aug 2017 17:10:24 +0900 Subject: [PATCH] Add calendar feature Change-Id: If18db32ad9ceb794ffc586e0d7c49e0d92d7a42e --- client/CMakeLists.txt | 3 ++- client/cal_client_db.c | 24 +++++++++++++++++++++ client/cal_client_reminder.c | 6 ++++++ client/cal_client_service.c | 14 +++++++++++++ common/cal_filter.c | 18 ++++++++++++++++ common/cal_internal.h | 20 ++++++++++++++++++ common/cal_list.c | 20 ++++++++++++++++++ common/cal_query.c | 12 +++++++++++ common/cal_record.c | 44 ++++++++++++++++++++++++++++++++++++++ common/cal_vcalendar.c | 6 ++++++ doc/calendar_doc.h | 9 ++++++++ include/calendar_db.h | 50 ++++++++++++++++++++++++++++++++++++++++++-- include/calendar_errors.h | 1 + include/calendar_filter.h | 18 ++++++++++++++++ include/calendar_list.h | 20 ++++++++++++++++++ include/calendar_query.h | 12 +++++++++++ include/calendar_record.h | 40 +++++++++++++++++++++++++++++++++++ include/calendar_reminder.h | 4 ++++ include/calendar_service.h | 12 +++++++++-- include/calendar_vcalendar.h | 6 ++++++ 20 files changed, 334 insertions(+), 5 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 131aeb7..e97b11e 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -21,7 +21,8 @@ pkg_check_modules(client_pkgs REQUIRED dlog capi-base-common gio-2.0 - gio-unix-2.0) + gio-unix-2.0 + capi-system-info) INCLUDE_DIRECTORIES(${client_pkgs_INCLUDE_DIRS}) LINK_DIRECTORIES(${client_pkgs_LIBRARY_DIRS}) diff --git a/client/cal_client_db.c b/client/cal_client_db.c index 860c628..3c61ba4 100644 --- a/client/cal_client_db.c +++ b/client/cal_client_db.c @@ -38,6 +38,7 @@ EXPORT_API int calendar_db_insert_record(calendar_record_h record, int* id) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -53,6 +54,7 @@ EXPORT_API int calendar_db_insert_record(calendar_record_h record, int* id) EXPORT_API int calendar_db_update_record(calendar_record_h record) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -67,6 +69,7 @@ EXPORT_API int calendar_db_update_record(calendar_record_h record) EXPORT_API int calendar_db_delete_record(const char* view_uri, int id) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -82,6 +85,7 @@ EXPORT_API int calendar_db_delete_record(const char* view_uri, int id) EXPORT_API int calendar_db_replace_record(calendar_record_h record, int record_id) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -96,6 +100,7 @@ EXPORT_API int calendar_db_replace_record(calendar_record_h record, int record_i EXPORT_API int calendar_db_get_record(const char* view_uri, int id, calendar_record_h* out_record) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -111,6 +116,7 @@ EXPORT_API int calendar_db_get_record(const char* view_uri, int id, calendar_rec EXPORT_API int calendar_db_get_all_records(const char* view_uri, int offset, int limit, calendar_list_h* out_list) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -126,6 +132,7 @@ EXPORT_API int calendar_db_get_all_records(const char* view_uri, int offset, int EXPORT_API int calendar_db_get_records_with_query(calendar_query_h query, int offset, int limit, calendar_list_h* out_list) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -141,6 +148,7 @@ EXPORT_API int calendar_db_get_records_with_query(calendar_query_h query, int of EXPORT_API int calendar_db_clean_after_sync(int book_id, int calendar_db_version) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -154,6 +162,7 @@ EXPORT_API int calendar_db_clean_after_sync(int book_id, int calendar_db_version EXPORT_API int calendar_db_get_count(const char *view_uri, int *out_count) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -168,6 +177,7 @@ EXPORT_API int calendar_db_get_count(const char *view_uri, int *out_count) EXPORT_API int calendar_db_get_count_with_query(calendar_query_h query, int *out_count) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -183,6 +193,7 @@ EXPORT_API int calendar_db_get_count_with_query(calendar_query_h query, int *out EXPORT_API int calendar_db_insert_records(calendar_list_h record_list, int** record_id_array, int* count) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -206,6 +217,7 @@ EXPORT_API int calendar_db_insert_records(calendar_list_h record_list, int** rec EXPORT_API int calendar_db_update_records(calendar_list_h record_list) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -227,6 +239,7 @@ EXPORT_API int calendar_db_update_records(calendar_list_h record_list) EXPORT_API int calendar_db_delete_records(const char* view_uri, int record_id_array[], int count) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -241,6 +254,7 @@ EXPORT_API int calendar_db_delete_records(const char* view_uri, int record_id_ar EXPORT_API int calendar_db_replace_records(calendar_list_h record_list, int *record_id_array, int count) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -265,6 +279,7 @@ EXPORT_API int calendar_db_get_changes_by_version(const char* view_uri, int book int calendar_db_version, calendar_list_h* record_list, int* current_version) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -282,6 +297,7 @@ EXPORT_API int calendar_db_get_changes_by_version(const char* view_uri, int book EXPORT_API int calendar_db_get_current_version(int* current_version) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -296,6 +312,7 @@ EXPORT_API int calendar_db_get_current_version(int* current_version) EXPORT_API int calendar_db_add_changed_cb(const char* view_uri, calendar_db_changed_cb callback, void* user_data) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -310,6 +327,7 @@ EXPORT_API int calendar_db_add_changed_cb(const char* view_uri, calendar_db_chan EXPORT_API int calendar_db_remove_changed_cb(const char* view_uri, calendar_db_changed_cb callback, void* user_data) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -324,6 +342,7 @@ EXPORT_API int calendar_db_remove_changed_cb(const char* view_uri, calendar_db_c EXPORT_API int calendar_db_insert_vcalendars(const char* vcalendar_stream, int **record_id_array, int *count) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -340,6 +359,7 @@ EXPORT_API int calendar_db_insert_vcalendars(const char* vcalendar_stream, int * EXPORT_API int calendar_db_replace_vcalendars(const char* vcalendar_stream, int *record_id_array, int count) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -355,6 +375,7 @@ EXPORT_API int calendar_db_replace_vcalendars(const char* vcalendar_stream, int EXPORT_API int calendar_db_get_last_change_version(int* last_version) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -370,6 +391,7 @@ EXPORT_API int calendar_db_get_changes_exception_by_version(const char* view_uri int original_event_id, int calendar_db_version, calendar_list_h* record_list) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); int ret = 0; calendar_h handle = NULL; @@ -393,6 +415,7 @@ EXPORT_API int calendar_db_get_changes_exception_by_version(const char* view_uri EXPORT_API int calendar_db_link_record(int base_id, int record_id) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); RETV_IF(base_id <= 0, CALENDAR_ERROR_INVALID_PARAMETER); RETV_IF(record_id <= 0, CALENDAR_ERROR_INVALID_PARAMETER); @@ -408,6 +431,7 @@ EXPORT_API int calendar_db_link_record(int base_id, int record_id) EXPORT_API int calendar_db_unlink_record(int record_id) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); RETV_IF(record_id <= 0, CALENDAR_ERROR_INVALID_PARAMETER); diff --git a/client/cal_client_reminder.c b/client/cal_client_reminder.c index 88bac7f..4d533cb 100644 --- a/client/cal_client_reminder.c +++ b/client/cal_client_reminder.c @@ -41,6 +41,9 @@ static GSList *__subscribe_list = NULL; EXPORT_API int calendar_reminder_add_cb(calendar_reminder_cb callback, void *user_data) { + CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == callback, CALENDAR_ERROR_INVALID_PARAMETER); pthread_mutex_lock(&cal_mutex_reminder); @@ -86,6 +89,9 @@ EXPORT_API int calendar_reminder_add_cb(calendar_reminder_cb callback, void *use EXPORT_API int calendar_reminder_remove_cb(calendar_reminder_cb callback, void *user_data) { + CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == callback, CALENDAR_ERROR_INVALID_PARAMETER); pthread_mutex_lock(&cal_mutex_reminder); diff --git a/client/cal_client_service.c b/client/cal_client_service.c index 9b4c821..82e65ab 100644 --- a/client/cal_client_service.c +++ b/client/cal_client_service.c @@ -29,6 +29,8 @@ static TLS int connection_count_on_thread = 0; EXPORT_API int calendar_connect(void) { CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret; calendar_h handle = NULL; unsigned int id = cal_client_get_pid(); @@ -49,6 +51,9 @@ EXPORT_API int calendar_connect(void) EXPORT_API int calendar_disconnect(void) { + CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret; calendar_h handle = NULL; unsigned int id = cal_client_get_pid(); @@ -69,6 +74,9 @@ EXPORT_API int calendar_disconnect(void) EXPORT_API int calendar_connect_on_thread(void) { + CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret; calendar_h handle = NULL; unsigned int id = cal_client_get_tid(); @@ -89,6 +97,9 @@ EXPORT_API int calendar_connect_on_thread(void) EXPORT_API int calendar_disconnect_on_thread(void) { + CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret; calendar_h handle = NULL; unsigned int id = cal_client_get_tid(); @@ -109,6 +120,9 @@ EXPORT_API int calendar_disconnect_on_thread(void) EXPORT_API int calendar_connect_with_flags(unsigned int flags) { + CAL_FN_CALL(); + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret; calendar_h handle = NULL; unsigned int id = cal_client_get_pid(); diff --git a/common/cal_filter.c b/common/cal_filter.c index 2abfbd8..2ec324d 100644 --- a/common/cal_filter.c +++ b/common/cal_filter.c @@ -38,6 +38,8 @@ static int _cal_filter_clone_attribute(cal_attribute_filter_s* filter, EXPORT_API int calendar_filter_create(const char* view_uri, calendar_filter_h* out_filter) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; RETV_IF(NULL == view_uri, CALENDAR_ERROR_INVALID_PARAMETER); @@ -58,6 +60,8 @@ EXPORT_API int calendar_filter_create(const char* view_uri, calendar_filter_h* o EXPORT_API int calendar_filter_add_operator(calendar_filter_h filter, calendar_filter_operator_e op) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; RETV_IF(NULL == filter, CALENDAR_ERROR_INVALID_PARAMETER); @@ -73,6 +77,8 @@ EXPORT_API int calendar_filter_add_operator(calendar_filter_h filter, calendar_f EXPORT_API int calendar_filter_add_filter(calendar_filter_h filter, calendar_filter_h add_filter) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; cal_composite_filter_s *com_filter2; calendar_filter_h f = NULL; @@ -119,6 +125,8 @@ static int _cal_filter_create_attribute(cal_composite_filter_s *com_filter, EXPORT_API int calendar_filter_add_str(calendar_filter_h filter, unsigned int property_id, calendar_match_str_flag_e match, const char* match_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; cal_attribute_filter_s *str_filter; int ret; @@ -145,6 +153,8 @@ EXPORT_API int calendar_filter_add_str(calendar_filter_h filter, unsigned int pr EXPORT_API int calendar_filter_add_int(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, int match_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; cal_attribute_filter_s *int_filter; int ret; @@ -171,6 +181,8 @@ EXPORT_API int calendar_filter_add_int(calendar_filter_h filter, unsigned int pr EXPORT_API int calendar_filter_add_double(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, double match_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; cal_attribute_filter_s *int_filter; int ret; @@ -197,6 +209,8 @@ EXPORT_API int calendar_filter_add_double(calendar_filter_h filter, unsigned int EXPORT_API int calendar_filter_add_lli(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, long long int match_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; cal_attribute_filter_s *int_filter; int ret; @@ -222,6 +236,8 @@ EXPORT_API int calendar_filter_add_lli(calendar_filter_h filter, unsigned int pr EXPORT_API int calendar_filter_add_caltime(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, calendar_time_s match_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_composite_filter_s *com_filter; cal_attribute_filter_s *int_filter; int ret; @@ -247,6 +263,8 @@ EXPORT_API int calendar_filter_add_caltime(calendar_filter_h filter, unsigned in EXPORT_API int calendar_filter_destroy(calendar_filter_h filter) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == filter, CALENDAR_ERROR_INVALID_PARAMETER); #ifdef CAL_IPC_CLIENT diff --git a/common/cal_internal.h b/common/cal_internal.h index b5b4de5..085358b 100644 --- a/common/cal_internal.h +++ b/common/cal_internal.h @@ -21,6 +21,7 @@ #include #include +#include #define SAFE_STRDUP(src) (src) ? strdup((char *)src) : NULL @@ -145,5 +146,24 @@ #define TLS #endif +#define CALENDAR_FEATURE "http://tizen.org/feature/calendar" +#if defined(CAL_IPC_CLIENT) +#define CHECK_CALENDAR_SUPPORTED(feature_name) \ + do { \ + bool is_supported = false; \ + if (!system_info_get_platform_bool(feature_name, &is_supported)) { \ + if (is_supported == false) { \ + LOGE("[%s] feature is disabled", feature_name); \ + return CALENDAR_ERROR_NOT_SUPPORTED; \ + } \ + } else { \ + LOGE("Error - Feature getting from System Info"); \ + return CALENDAR_ERROR_SYSTEM; \ + } \ + } while (0) +#else +#define CHECK_CALENDAR_SUPPORTED(feature_name) +#endif + #endif /* __CAL_INTERNAL_H__ */ diff --git a/common/cal_list.c b/common/cal_list.c index b35f0d9..570c517 100644 --- a/common/cal_list.c +++ b/common/cal_list.c @@ -25,6 +25,8 @@ EXPORT_API int calendar_list_create(calendar_list_h* out_list) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == out_list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -41,6 +43,8 @@ EXPORT_API int calendar_list_create(calendar_list_h* out_list) EXPORT_API int calendar_list_get_count(calendar_list_h list, int *count) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -53,6 +57,8 @@ EXPORT_API int calendar_list_get_count(calendar_list_h list, int *count) EXPORT_API int calendar_list_add(calendar_list_h list, calendar_record_h record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -67,6 +73,8 @@ EXPORT_API int calendar_list_add(calendar_list_h list, calendar_record_h record) EXPORT_API int calendar_list_remove(calendar_list_h list, calendar_record_h record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -89,6 +97,8 @@ EXPORT_API int calendar_list_remove(calendar_list_h list, calendar_record_h reco EXPORT_API int calendar_list_get_current_record_p(calendar_list_h list, calendar_record_h* record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -106,6 +116,8 @@ EXPORT_API int calendar_list_get_current_record_p(calendar_list_h list, calendar EXPORT_API int calendar_list_prev(calendar_list_h list) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -120,6 +132,8 @@ EXPORT_API int calendar_list_prev(calendar_list_h list) EXPORT_API int calendar_list_next(calendar_list_h list) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -134,6 +148,8 @@ EXPORT_API int calendar_list_next(calendar_list_h list) EXPORT_API int calendar_list_first(calendar_list_h list) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -146,6 +162,8 @@ EXPORT_API int calendar_list_first(calendar_list_h list) EXPORT_API int calendar_list_last(calendar_list_h list) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_list_s *l = NULL; RETV_IF(NULL == list, CALENDAR_ERROR_INVALID_PARAMETER); @@ -158,6 +176,8 @@ EXPORT_API int calendar_list_last(calendar_list_h list) EXPORT_API int calendar_list_destroy(calendar_list_h list, bool delete_record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + GList *cursor; cal_list_s *l = NULL; diff --git a/common/cal_query.c b/common/cal_query.c index 47d4f61..7429dd5 100644 --- a/common/cal_query.c +++ b/common/cal_query.c @@ -40,6 +40,8 @@ static bool _cal_query_property_check(const cal_property_info_s *properties, EXPORT_API int calendar_query_create(const char* view_uri, calendar_query_h* out_query) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_query_s *query; RETV_IF(NULL == view_uri, CALENDAR_ERROR_INVALID_PARAMETER); @@ -60,6 +62,8 @@ EXPORT_API int calendar_query_create(const char* view_uri, calendar_query_h* out EXPORT_API int calendar_query_set_projection(calendar_query_h query, unsigned int property_ids[], int count) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_query_s *que = NULL; int i; bool find; @@ -92,6 +96,8 @@ EXPORT_API int calendar_query_set_projection(calendar_query_h query, unsigned in EXPORT_API int calendar_query_set_distinct(calendar_query_h query, bool set) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_query_s *que = NULL; RETV_IF(NULL == query, CALENDAR_ERROR_INVALID_PARAMETER); @@ -104,6 +110,8 @@ EXPORT_API int calendar_query_set_distinct(calendar_query_h query, bool set) EXPORT_API int calendar_query_set_filter(calendar_query_h query, calendar_filter_h filter) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_query_s *que; calendar_filter_h new_filter; int ret = CALENDAR_ERROR_NONE; @@ -133,6 +141,8 @@ EXPORT_API int calendar_query_set_filter(calendar_query_h query, calendar_filter EXPORT_API int calendar_query_set_sort(calendar_query_h query, unsigned int property_id, bool asc) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_query_s *que; bool find = false; @@ -152,6 +162,8 @@ EXPORT_API int calendar_query_set_sort(calendar_query_h query, unsigned int prop EXPORT_API int calendar_query_destroy(calendar_query_h query) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + cal_query_s *que; RETV_IF(NULL == query, CALENDAR_ERROR_INVALID_PARAMETER); diff --git a/common/cal_record.c b/common/cal_record.c index 700823a..05ab54c 100644 --- a/common/cal_record.c +++ b/common/cal_record.c @@ -169,6 +169,8 @@ int cal_record_set_projection(calendar_record_h record, const unsigned int *proj EXPORT_API int calendar_record_create(const char* view_uri, calendar_record_h* out_record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_type_e type = CAL_RECORD_TYPE_INVALID; @@ -194,6 +196,8 @@ EXPORT_API int calendar_record_create(const char* view_uri, calendar_record_h* o EXPORT_API int calendar_record_destroy(calendar_record_h record, bool delete_child) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER); @@ -215,6 +219,8 @@ EXPORT_API int calendar_record_destroy(calendar_record_h record, bool delete_chi EXPORT_API int calendar_record_clone(calendar_record_h record, calendar_record_h* out_record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -234,6 +240,8 @@ EXPORT_API int calendar_record_clone(calendar_record_h record, calendar_record_h EXPORT_API int calendar_record_get_uri_p(calendar_record_h record, char** out_str) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -248,6 +256,8 @@ EXPORT_API int calendar_record_get_uri_p(calendar_record_h record, char** out_st EXPORT_API int calendar_record_get_str(calendar_record_h record, unsigned int property_id, char** out_str) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -265,6 +275,8 @@ EXPORT_API int calendar_record_get_str(calendar_record_h record, unsigned int pr EXPORT_API int calendar_record_get_str_p(calendar_record_h record, unsigned int property_id, char** out_str) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -279,8 +291,11 @@ EXPORT_API int calendar_record_get_str_p(calendar_record_h record, unsigned int return ret; } + EXPORT_API int calendar_record_get_int(calendar_record_h record, unsigned int property_id, int* out_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -298,6 +313,8 @@ EXPORT_API int calendar_record_get_int(calendar_record_h record, unsigned int pr EXPORT_API int calendar_record_get_double(calendar_record_h record, unsigned int property_id, double* out_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -312,8 +329,11 @@ EXPORT_API int calendar_record_get_double(calendar_record_h record, unsigned int return ret; } + EXPORT_API int calendar_record_get_lli(calendar_record_h record, unsigned int property_id, long long int* out_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -331,6 +351,8 @@ EXPORT_API int calendar_record_get_lli(calendar_record_h record, unsigned int pr EXPORT_API int calendar_record_get_caltime(calendar_record_h record, unsigned int property_id, calendar_time_s *out_value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -348,6 +370,8 @@ EXPORT_API int calendar_record_get_caltime(calendar_record_h record, unsigned in EXPORT_API int calendar_record_set_str(calendar_record_h record, unsigned int property_id, const char* value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER); __CHECK_READ_ONLY_PROPERTY(); @@ -358,6 +382,8 @@ EXPORT_API int calendar_record_set_str(calendar_record_h record, unsigned int pr EXPORT_API int calendar_record_set_int(calendar_record_h record, unsigned int property_id, int value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER); __CHECK_READ_ONLY_PROPERTY(); @@ -368,6 +394,8 @@ EXPORT_API int calendar_record_set_int(calendar_record_h record, unsigned int pr EXPORT_API int calendar_record_set_double(calendar_record_h record, unsigned int property_id, double value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER); __CHECK_READ_ONLY_PROPERTY(); @@ -378,6 +406,8 @@ EXPORT_API int calendar_record_set_double(calendar_record_h record, unsigned int EXPORT_API int calendar_record_set_lli(calendar_record_h record, unsigned int property_id, long long int value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER); __CHECK_READ_ONLY_PROPERTY(); @@ -388,6 +418,8 @@ EXPORT_API int calendar_record_set_lli(calendar_record_h record, unsigned int pr EXPORT_API int calendar_record_set_caltime(calendar_record_h record, unsigned int property_id, calendar_time_s value) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER); __CHECK_READ_ONLY_PROPERTY(); @@ -398,6 +430,8 @@ EXPORT_API int calendar_record_set_caltime(calendar_record_h record, unsigned in EXPORT_API int calendar_record_add_child_record(calendar_record_h record, unsigned int property_id, calendar_record_h child_record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -412,8 +446,11 @@ EXPORT_API int calendar_record_add_child_record(calendar_record_h record, unsign return ret; } + EXPORT_API int calendar_record_remove_child_record(calendar_record_h record, unsigned int property_id, calendar_record_h child_record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -431,6 +468,8 @@ EXPORT_API int calendar_record_remove_child_record(calendar_record_h record, uns EXPORT_API int calendar_record_get_child_record_count(calendar_record_h record, unsigned int property_id, unsigned int* count) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -445,8 +484,11 @@ EXPORT_API int calendar_record_get_child_record_count(calendar_record_h record, return ret; } + EXPORT_API int calendar_record_get_child_record_at_p(calendar_record_h record, unsigned int property_id, int index, calendar_record_h* child_record) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); @@ -464,6 +506,8 @@ EXPORT_API int calendar_record_get_child_record_at_p(calendar_record_h record, u EXPORT_API int calendar_record_clone_child_record_list(calendar_record_h record, unsigned int property_id, calendar_list_h* out_list) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret = CALENDAR_ERROR_NONE; cal_record_s *temp = (cal_record_s*)(record); diff --git a/common/cal_vcalendar.c b/common/cal_vcalendar.c index 65fa94d..0dba736 100644 --- a/common/cal_vcalendar.c +++ b/common/cal_vcalendar.c @@ -39,6 +39,8 @@ */ EXPORT_API int calendar_vcalendar_make_from_records(calendar_list_h list, char **vcalendar_stream) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int ret; cal_make_s *b; char *ical = NULL; @@ -139,6 +141,8 @@ static const char* __calendar_vcalendar_get_vcalendar_object(const char *origina */ EXPORT_API int calendar_vcalendar_parse_to_calendar(const char* vcalendar_stream, calendar_list_h *out_list) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + int count = 0; const char *cursor = NULL; char *vcalendar_object = NULL; @@ -187,6 +191,8 @@ EXPORT_API int calendar_vcalendar_parse_to_calendar(const char* vcalendar_stream EXPORT_API int calendar_vcalendar_parse_to_calendar_foreach(const char *vcalendar_file_path, calendar_vcalendar_parse_cb callback, void *user_data) { + CHECK_CALENDAR_SUPPORTED(CALENDAR_FEATURE); + FILE *file; int buf_size, len; char *stream; diff --git a/doc/calendar_doc.h b/doc/calendar_doc.h index 021862d..0947e69 100644 --- a/doc/calendar_doc.h +++ b/doc/calendar_doc.h @@ -49,6 +49,15 @@ * * * + * + * @section CAPI_SOCIAL_CALENDAR_SVC_MODULE_FEATURE Related Features + * This API is related with the following features:\n + * - http://tizen.org/feature/calendar\n + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n + * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n + * More details on featuring your application can be found from Feature Element. + * * Calendar service module works in a way similar to client-service architecture. * In this architecture Tizen application is a client side and has to connect to service before using calendar service APIs. * Connection/disconnection MUST be done with use of calendar_connect() / calendar_disconnect(). diff --git a/include/calendar_db.h b/include/calendar_db.h index d5d847e..a370059 100644 --- a/include/calendar_db.h +++ b/include/calendar_db.h @@ -62,6 +62,8 @@ typedef void (*calendar_db_changed_cb)(const char* view_uri, void* user_data); * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_record() @@ -94,6 +96,8 @@ int calendar_db_insert_record(calendar_record_h record, int* record_id); * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_record_destroy() @@ -118,6 +122,8 @@ int calendar_db_get_record(const char* view_uri, int record_id, calendar_record_ * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_record() @@ -145,6 +151,8 @@ int calendar_db_update_record(calendar_record_h record); * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_record() @@ -172,6 +180,8 @@ int calendar_db_delete_record(const char* view_uri, int record_id); * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() @@ -199,6 +209,8 @@ int calendar_db_get_all_records(const char* view_uri, int offset, int limit, cal * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() @@ -223,6 +235,8 @@ int calendar_db_get_records_with_query(calendar_query_h query, int offset, int l * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre This function requires an open connection to the calendar service using calendar_connect2(). * @see calendar_connect() */ @@ -246,6 +260,8 @@ int calendar_db_get_count(const char* view_uri, int *count); * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre This function requires an open connection to the calendar service using calendar_connect2(). * @see calendar_connect2() */ @@ -271,6 +287,8 @@ int calendar_db_get_count_with_query(calendar_query_h query, int *count); * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_records() @@ -296,6 +314,8 @@ int calendar_db_insert_records(calendar_list_h record_list, int** record_id_arra * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_records() @@ -323,6 +343,8 @@ int calendar_db_update_records(calendar_list_h record_list); * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_insert_records() @@ -345,6 +367,8 @@ int calendar_db_delete_records(const char* view_uri, int record_id_array[], int * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre This function requires an open connection to the calendar service using calendar_connect(). * @see calendar_connect() * @see calendar_db_get_changes_by_version() @@ -370,9 +394,10 @@ int calendar_db_get_current_version(int* calendar_db_version); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre This function requires an open connection to the calendar service using calendar_connect(). * @post calendar_db_changed_cb() will be invoked when the designated view changes. * @see calendar_connect() @@ -394,8 +419,9 @@ int calendar_db_add_changed_cb(const char* view_uri, calendar_db_changed_cb call * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre This function requires an open connection to the calendar service using calendar_connect(). * @see calendar_connect() * @see calendar_db_changed_cb() @@ -425,6 +451,8 @@ int calendar_db_remove_changed_cb(const char* view_uri, calendar_db_changed_cb c * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() @@ -451,6 +479,8 @@ int calendar_db_get_changes_by_version(const char* view_uri, int calendar_book_i * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_replace_vcalendars() @@ -477,6 +507,8 @@ int calendar_db_insert_vcalendars(const char* vcalendar_stream, int **record_id_ * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre This function requires an open connection to the calendar service by calendar_connect(). * @see calendar_connect() * @see calendar_db_replace_vcalendars() @@ -501,6 +533,8 @@ int calendar_db_replace_vcalendars(const char* vcalendar_stream, int *record_id_ * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_record() @@ -528,6 +562,8 @@ int calendar_db_replace_record(calendar_record_h record, int record_id); * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_db_update_records() @@ -548,6 +584,8 @@ int calendar_db_replace_records(calendar_list_h record_list, int *record_id_arra * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre This function requires an open connection to the calendar service using calendar_connect(). * @see calendar_connect() * @see calendar_db_get_current_version() @@ -575,6 +613,8 @@ int calendar_db_get_last_change_version(int* last_change_version); * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() * @see calendar_list_destroy() @@ -599,6 +639,8 @@ int calendar_db_get_changes_exception_by_version(const char* view_uri, int origi * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full * @retval #CALENDAR_ERROR_IPC Unknown IPC error * @retval #CALENDAR_ERROR_NO_DATA Data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() */ @@ -620,6 +662,8 @@ int calendar_db_clean_after_sync(int calendar_book_id, int calendar_db_version); * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() */ @@ -640,6 +684,8 @@ int calendar_db_link_record(int base_id, int record_id); * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied * @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to open a connection to the calendar service. * @see calendar_connect() */ diff --git a/include/calendar_errors.h b/include/calendar_errors.h index 717fba8..04b4ebd 100644 --- a/include/calendar_errors.h +++ b/include/calendar_errors.h @@ -54,6 +54,7 @@ typedef enum { CALENDAR_ERROR_DB_RECORD_NOT_FOUND = TIZEN_ERROR_CALENDAR | 0x05, /**< Database not found */ CALENDAR_ERROR_IPC = TIZEN_ERROR_CALENDAR | 0xBF, /**< Unknown IPC error */ CALENDAR_ERROR_SYSTEM = TIZEN_ERROR_CALENDAR | 0xEF, /**< Error from another modules */ + CALENDAR_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported (Since 4.0) */ } calendar_error_e; diff --git a/include/calendar_filter.h b/include/calendar_filter.h index 7f0a21a..25cfa42 100644 --- a/include/calendar_filter.h +++ b/include/calendar_filter.h @@ -46,6 +46,8 @@ extern "C" { * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to initialize. * @see calendar_filter_destroy() */ @@ -60,6 +62,8 @@ int calendar_filter_create(const char* view_uri, calendar_filter_h* filter); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_create() */ int calendar_filter_destroy(calendar_filter_h filter); @@ -76,6 +80,8 @@ int calendar_filter_destroy(calendar_filter_h filter); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_add_operator() */ int calendar_filter_add_str(calendar_filter_h filter, unsigned int property_id, calendar_match_str_flag_e match, const char* match_value); @@ -92,6 +98,8 @@ int calendar_filter_add_str(calendar_filter_h filter, unsigned int property_id, * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_add_operator() */ int calendar_filter_add_int(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, int match_value); @@ -108,6 +116,8 @@ int calendar_filter_add_int(calendar_filter_h filter, unsigned int property_id, * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_add_operator() */ int calendar_filter_add_double(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, double match_value); @@ -124,6 +134,8 @@ int calendar_filter_add_double(calendar_filter_h filter, unsigned int property_i * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_add_operator() */ int calendar_filter_add_lli(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, long long int match_value); @@ -140,6 +152,8 @@ int calendar_filter_add_lli(calendar_filter_h filter, unsigned int property_id, * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_add_operator() */ int calendar_filter_add_caltime(calendar_filter_h filter, unsigned int property_id, calendar_match_int_flag_e match, calendar_time_s match_value); @@ -154,6 +168,8 @@ int calendar_filter_add_caltime(calendar_filter_h filter, unsigned int property_ * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_add_operator() */ int calendar_filter_add_filter(calendar_filter_h parent_filter, calendar_filter_h child_filter); @@ -168,6 +184,8 @@ int calendar_filter_add_filter(calendar_filter_h parent_filter, calendar_filter_ * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_filter_add_str() * @see calendar_filter_add_int() * @see calendar_filter_add_double() diff --git a/include/calendar_list.h b/include/calendar_list.h index fa41944..5aef347 100644 --- a/include/calendar_list.h +++ b/include/calendar_list.h @@ -41,6 +41,8 @@ extern "C" { * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_destroy() */ int calendar_list_create(calendar_list_h* out_list); @@ -56,6 +58,8 @@ int calendar_list_create(calendar_list_h* out_list); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_create() */ int calendar_list_destroy(calendar_list_h list, bool delete_record); @@ -70,6 +74,8 @@ int calendar_list_destroy(calendar_list_h list, bool delete_record); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_add() */ int calendar_list_get_count(calendar_list_h list, int *count); @@ -84,6 +90,8 @@ int calendar_list_get_count(calendar_list_h list, int *count); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_remove() */ int calendar_list_add(calendar_list_h list, calendar_record_h record); @@ -101,6 +109,8 @@ int calendar_list_add(calendar_list_h list, calendar_record_h record); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_add() */ int calendar_list_remove(calendar_list_h list, calendar_record_h record); @@ -119,6 +129,8 @@ int calendar_list_remove(calendar_list_h list, calendar_record_h record); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported */ int calendar_list_get_current_record_p(calendar_list_h list, calendar_record_h* record); @@ -132,6 +144,8 @@ int calendar_list_get_current_record_p(calendar_list_h list, calendar_record_h* * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_next() */ int calendar_list_prev(calendar_list_h list); @@ -146,6 +160,8 @@ int calendar_list_prev(calendar_list_h list); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_prev() */ int calendar_list_next(calendar_list_h list); @@ -159,6 +175,8 @@ int calendar_list_next(calendar_list_h list); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_last() */ int calendar_list_first(calendar_list_h list); @@ -172,6 +190,8 @@ int calendar_list_first(calendar_list_h list); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_first() */ int calendar_list_last(calendar_list_h list); diff --git a/include/calendar_query.h b/include/calendar_query.h index a204808..17851b4 100644 --- a/include/calendar_query.h +++ b/include/calendar_query.h @@ -46,6 +46,8 @@ extern "C" { * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to initialize. * @see calendar_query_destroy() */ @@ -60,6 +62,8 @@ int calendar_query_create(const char* view_uri, calendar_query_h* query); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_query_create() */ int calendar_query_destroy(calendar_query_h query); @@ -76,6 +80,8 @@ int calendar_query_destroy(calendar_query_h query); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported */ int calendar_query_set_projection(calendar_query_h query, unsigned int property_id_array[], int count); @@ -90,6 +96,8 @@ int calendar_query_set_projection(calendar_query_h query, unsigned int property_ * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported */ int calendar_query_set_distinct(calendar_query_h query, bool set); @@ -104,6 +112,8 @@ int calendar_query_set_distinct(calendar_query_h query, bool set); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_query_add_operator() */ int calendar_query_set_filter(calendar_query_h query, calendar_filter_h filter); @@ -120,6 +130,8 @@ int calendar_query_set_filter(calendar_query_h query, calendar_filter_h filter); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported */ int calendar_query_set_sort(calendar_query_h query, unsigned int property_id, bool is_ascending); diff --git a/include/calendar_record.h b/include/calendar_record.h index 27cf8f9..29bf7c6 100644 --- a/include/calendar_record.h +++ b/include/calendar_record.h @@ -47,6 +47,8 @@ extern "C" { * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to initialize. * @see calendar_record_destroy() */ @@ -64,6 +66,8 @@ int calendar_record_create(const char* view_uri, calendar_record_h* out_record); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_create() */ int calendar_record_destroy(calendar_record_h record, bool delete_child); @@ -80,6 +84,8 @@ int calendar_record_destroy(calendar_record_h record, bool delete_child); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_destroy() */ int calendar_record_clone(calendar_record_h record, calendar_record_h* out_record); @@ -94,6 +100,8 @@ int calendar_record_clone(calendar_record_h record, calendar_record_h* out_recor * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported */ int calendar_record_get_uri_p(calendar_record_h record, char** uri); @@ -110,6 +118,8 @@ int calendar_record_get_uri_p(calendar_record_h record, char** uri); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_get_str_p() * @see calendar_record_set_str() */ @@ -128,6 +138,8 @@ int calendar_record_get_str(calendar_record_h record, unsigned int property_id, * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_get_str() * @see calendar_record_set_str() */ @@ -145,6 +157,8 @@ int calendar_record_get_str_p(calendar_record_h record, unsigned int property_id * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_set_int() */ int calendar_record_get_int(calendar_record_h record, unsigned int property_id, int* out_value); @@ -161,6 +175,8 @@ int calendar_record_get_int(calendar_record_h record, unsigned int property_id, * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_set_double() */ int calendar_record_get_double(calendar_record_h record, unsigned int property_id, double* out_value); @@ -177,6 +193,8 @@ int calendar_record_get_double(calendar_record_h record, unsigned int property_i * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_set_lli() */ int calendar_record_get_lli(calendar_record_h record, unsigned int property_id, long long int* out_value); @@ -193,6 +211,8 @@ int calendar_record_get_lli(calendar_record_h record, unsigned int property_id, * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_set_caltime() */ int calendar_record_get_caltime(calendar_record_h record, unsigned int property_id, calendar_time_s* out_value); @@ -209,6 +229,8 @@ int calendar_record_get_caltime(calendar_record_h record, unsigned int property_ * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_get_str() * @see calendar_record_get_str_p() */ @@ -226,6 +248,8 @@ int calendar_record_set_str(calendar_record_h record, unsigned int property_id, * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_get_int() */ int calendar_record_set_int(calendar_record_h record, unsigned int property_id, int value); @@ -242,6 +266,8 @@ int calendar_record_set_int(calendar_record_h record, unsigned int property_id, * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_get_double() */ int calendar_record_set_double(calendar_record_h record, unsigned int property_id, double value); @@ -258,6 +284,8 @@ int calendar_record_set_double(calendar_record_h record, unsigned int property_i * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_get_lli() */ int calendar_record_set_lli(calendar_record_h record, unsigned int property_id, long long int value); @@ -274,6 +302,8 @@ int calendar_record_set_lli(calendar_record_h record, unsigned int property_id, * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_get_caltime() */ int calendar_record_set_caltime(calendar_record_h record, unsigned int property_id, calendar_time_s value); @@ -290,6 +320,8 @@ int calendar_record_set_caltime(calendar_record_h record, unsigned int property_ * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_remove_child_record() */ int calendar_record_add_child_record(calendar_record_h record, unsigned int property_id, calendar_record_h child_record); @@ -306,6 +338,8 @@ int calendar_record_add_child_record(calendar_record_h record, unsigned int prop * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_add_child_record() */ int calendar_record_remove_child_record(calendar_record_h record, unsigned int property_id, calendar_record_h child_record); @@ -322,6 +356,8 @@ int calendar_record_remove_child_record(calendar_record_h record, unsigned int p * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_add_child_record() * @see calendar_record_remove_child_record() */ @@ -342,6 +378,8 @@ int calendar_record_get_child_record_count(calendar_record_h record, unsigned in * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_record_add_child_record() * @see calendar_record_remove_child_record() * @see calendar_record_get_child_record_count() @@ -361,6 +399,8 @@ int calendar_record_get_child_record_at_p(calendar_record_h record, unsigned int * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_list_destroy() */ int calendar_record_clone_child_record_list(calendar_record_h record, unsigned int property_id, calendar_list_h* out_list); diff --git a/include/calendar_reminder.h b/include/calendar_reminder.h index 6689f62..60c0192 100644 --- a/include/calendar_reminder.h +++ b/include/calendar_reminder.h @@ -58,6 +58,8 @@ typedef void (*calendar_reminder_cb)(const char *param, void* user_data); * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_reminder_remove_cb() */ int calendar_reminder_add_cb(calendar_reminder_cb callback, void *user_data); @@ -72,6 +74,8 @@ int calendar_reminder_add_cb(calendar_reminder_cb callback, void *user_data); * otherwise a negative error value * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_reminder_add_cb() */ int calendar_reminder_remove_cb(calendar_reminder_cb callback, void *user_data); diff --git a/include/calendar_service.h b/include/calendar_service.h index 85a654a..e887712 100644 --- a/include/calendar_service.h +++ b/include/calendar_service.h @@ -52,7 +52,8 @@ extern "C" { * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_disconnect() */ int calendar_connect(void); @@ -68,6 +69,8 @@ int calendar_connect(void); * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_IPC Unknown IPC error + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_connect() */ int calendar_disconnect(void); @@ -84,6 +87,8 @@ int calendar_disconnect(void); * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_disconnect_on_thread() */ int calendar_connect_on_thread(void); @@ -99,6 +104,8 @@ int calendar_connect_on_thread(void); * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_connect_on_thread() */ int calendar_disconnect_on_thread(void); @@ -120,7 +127,8 @@ int calendar_disconnect_on_thread(void); * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted * @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. * @retval #CALENDAR_ERROR_IPC Unknown IPC error - * @retval #CALENDAR_ERROR_SYSTEM Error from another modules + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @see calendar_disconnect(), CALENDAR_CONNECT_FLAG_RETRY */ int calendar_connect_with_flags(unsigned int flags); diff --git a/include/calendar_vcalendar.h b/include/calendar_vcalendar.h index df3809a..993ed69 100644 --- a/include/calendar_vcalendar.h +++ b/include/calendar_vcalendar.h @@ -46,6 +46,8 @@ extern "C" { * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported */ int calendar_vcalendar_make_from_records(calendar_list_h calendar_list, char **vcalendar_stream); @@ -61,6 +63,8 @@ int calendar_vcalendar_make_from_records(calendar_list_h calendar_list, char **v * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to initialize. */ int calendar_vcalendar_parse_to_calendar(const char* vcalendar_stream, calendar_list_h *calendar_list); @@ -93,6 +97,8 @@ typedef bool (*calendar_vcalendar_parse_cb)(calendar_record_h record, void *user * @retval #CALENDAR_ERROR_NONE Successful * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_SYSTEM Internal system module error + * @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported * @pre calendar_connect() should be called to initialize. * @post This function invokes calendar_vcalendar_parse_cb(). * @see calendar_vcalendar_parse_cb() -- 2.7.4