From 367e91b244ceab0b37a6d0be04be5d3a1a190290 Mon Sep 17 00:00:00 2001 From: Jooseok Park Date: Wed, 21 Dec 2016 14:39:21 +0900 Subject: [PATCH] add log in API entry point - it is helpful for debugging tc issues Change-Id: I163ae9870f9a93832af0f71f2e50a3616c5c4b47 --- packaging/iotcon.spec | 2 +- src/ic-attributes.c | 24 ++++++++++++++++++++++++ src/ic-device.c | 5 +++++ src/ic-ioty-ocprocess.c | 4 ++++ src/ic-list.c | 26 ++++++++++++++++++++++++++ src/ic-lite-resource.c | 4 ++++ src/ic-observation.c | 4 ++++ src/ic-options.c | 6 ++++++ src/ic-presence.c | 8 ++++++++ src/ic-provisioning-struct.c | 10 ++++++++++ src/ic-query.c | 10 ++++++++++ src/ic-remote-resource-caching.c | 3 +++ src/ic-remote-resource-crud.c | 6 ++++++ src/ic-remote-resource-monitoring.c | 2 ++ src/ic-remote-resource.c | 15 +++++++++++++++ src/ic-representation.c | 15 +++++++++++++++ src/ic-request.c | 8 ++++++++ src/ic-resource-interfaces.c | 6 ++++++ src/ic-resource-types.c | 6 ++++++ src/ic-resource.c | 11 +++++++++++ src/ic-response.c | 7 +++++++ src/ic.c | 5 +++++ 22 files changed, 186 insertions(+), 1 deletion(-) diff --git a/packaging/iotcon.spec b/packaging/iotcon.spec index f083411..42be1a5 100644 --- a/packaging/iotcon.spec +++ b/packaging/iotcon.spec @@ -1,6 +1,6 @@ Name: iotcon Summary: Tizen IoT Connectivity -Version: 0.3.8 +Version: 0.3.9 Release: 0 Group: Network & Connectivity/Service License: Apache-2.0 diff --git a/src/ic-attributes.c b/src/ic-attributes.c index b17e562..47d500e 100644 --- a/src/ic-attributes.c +++ b/src/ic-attributes.c @@ -37,6 +37,7 @@ iotcon_attributes_h icl_attributes_ref(iotcon_attributes_h attributes) API int iotcon_attributes_create(iotcon_attributes_h *ret_attributes) { + FN_CALL; iotcon_attributes_h attributes; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -60,6 +61,7 @@ API int iotcon_attributes_create(iotcon_attributes_h *ret_attributes) API int iotcon_attributes_destroy(iotcon_attributes_h attributes) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == attributes, IOTCON_ERROR_INVALID_PARAMETER); @@ -77,6 +79,7 @@ API int iotcon_attributes_destroy(iotcon_attributes_h attributes) API int iotcon_attributes_remove(iotcon_attributes_h attributes, const char *key) { + FN_CALL; gboolean ret = FALSE; iotcon_value_h value = NULL; @@ -103,6 +106,7 @@ API int iotcon_attributes_remove(iotcon_attributes_h attributes, const char *key API int iotcon_attributes_get_int(iotcon_attributes_h attributes, const char *key, int *val) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -130,6 +134,7 @@ API int iotcon_attributes_get_int(iotcon_attributes_h attributes, const char *ke API int iotcon_attributes_add_int(iotcon_attributes_h attributes, const char *key, int val) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -150,6 +155,7 @@ API int iotcon_attributes_add_int(iotcon_attributes_h attributes, const char *ke API int iotcon_attributes_get_bool(iotcon_attributes_h attributes, const char *key, bool *val) { + FN_CALL; icl_basic_s *real = NULL; iotcon_value_h value = NULL; @@ -178,6 +184,7 @@ API int iotcon_attributes_get_bool(iotcon_attributes_h attributes, const char *k API int iotcon_attributes_add_bool(iotcon_attributes_h attributes, const char *key, bool val) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -198,6 +205,7 @@ API int iotcon_attributes_add_bool(iotcon_attributes_h attributes, const char *k API int iotcon_attributes_get_double(iotcon_attributes_h attributes, const char *key, double *val) { + FN_CALL; icl_basic_s *real = NULL; iotcon_value_h value = NULL; @@ -226,6 +234,7 @@ API int iotcon_attributes_get_double(iotcon_attributes_h attributes, API int iotcon_attributes_add_double(iotcon_attributes_h attributes, const char *key, double val) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -246,6 +255,7 @@ API int iotcon_attributes_add_double(iotcon_attributes_h attributes, API int iotcon_attributes_get_str(iotcon_attributes_h attributes, const char *key, char **val) { + FN_CALL; icl_basic_s *real = NULL; iotcon_value_h value = NULL; @@ -274,6 +284,7 @@ API int iotcon_attributes_get_str(iotcon_attributes_h attributes, const char *ke API int iotcon_attributes_add_str(iotcon_attributes_h attributes, const char *key, char *val) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -295,6 +306,7 @@ API int iotcon_attributes_add_str(iotcon_attributes_h attributes, const char *ke API int iotcon_attributes_get_byte_str(iotcon_attributes_h attributes, const char *key, unsigned char **val, int *len) { + FN_CALL; iotcon_value_h value = NULL; icl_val_byte_str_s *real = NULL; @@ -325,6 +337,7 @@ API int iotcon_attributes_get_byte_str(iotcon_attributes_h attributes, const cha API int iotcon_attributes_add_byte_str(iotcon_attributes_h attributes, const char *key, unsigned char *val, int len) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -347,6 +360,7 @@ API int iotcon_attributes_add_byte_str(iotcon_attributes_h attributes, API int iotcon_attributes_is_null(iotcon_attributes_h attributes, const char *key, bool *is_null) { + FN_CALL; icl_basic_s *real = NULL; iotcon_value_h value = NULL; @@ -369,6 +383,7 @@ API int iotcon_attributes_is_null(iotcon_attributes_h attributes, const char *ke API int iotcon_attributes_add_null(iotcon_attributes_h attributes, const char *key) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -389,6 +404,7 @@ API int iotcon_attributes_add_null(iotcon_attributes_h attributes, const char *k API int iotcon_attributes_get_list(iotcon_attributes_h attributes, const char *key, iotcon_list_h *list) { + FN_CALL; iotcon_value_h value = NULL; icl_val_list_s *real = NULL; @@ -417,6 +433,7 @@ API int iotcon_attributes_get_list(iotcon_attributes_h attributes, const char *k API int iotcon_attributes_add_list(iotcon_attributes_h attributes, const char *key, iotcon_list_h list) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -439,6 +456,7 @@ API int iotcon_attributes_add_list(iotcon_attributes_h attributes, const char *k API int iotcon_attributes_get_attributes(iotcon_attributes_h src, const char *key, iotcon_attributes_h *dest) { + FN_CALL; icl_val_attributes_s *real = NULL; iotcon_value_h value = NULL; @@ -467,6 +485,7 @@ API int iotcon_attributes_get_attributes(iotcon_attributes_h src, const char *ke API int iotcon_attributes_add_attributes(iotcon_attributes_h attributes, const char *key, iotcon_attributes_h val) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -488,6 +507,7 @@ API int iotcon_attributes_add_attributes(iotcon_attributes_h attributes, API int iotcon_attributes_get_type(iotcon_attributes_h attributes, const char *key, iotcon_type_e *type) { + FN_CALL; iotcon_value_h value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -508,6 +528,7 @@ API int iotcon_attributes_get_type(iotcon_attributes_h attributes, const char *k int icl_attributes_set_value(iotcon_attributes_h attributes, const char *key, iotcon_value_h value) { + FN_CALL; RETV_IF(NULL == attributes, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == value, IOTCON_ERROR_INVALID_PARAMETER); @@ -521,6 +542,7 @@ int icl_attributes_set_value(iotcon_attributes_h attributes, const char *key, API int iotcon_attributes_get_keys_count(iotcon_attributes_h attributes, unsigned int *count) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == attributes, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == count, IOTCON_ERROR_INVALID_PARAMETER); @@ -535,6 +557,7 @@ API int iotcon_attributes_get_keys_count(iotcon_attributes_h attributes, API int iotcon_attributes_clone(iotcon_attributes_h attributes, iotcon_attributes_h *attributes_clone) { + FN_CALL; int ret; iotcon_attributes_h temp = NULL; @@ -579,6 +602,7 @@ void icl_attributes_clone_foreach(char *key, iotcon_value_h src_val, API int iotcon_attributes_foreach(iotcon_attributes_h attributes, iotcon_attributes_cb cb, void *user_data) { + FN_CALL; GHashTableIter iter; gpointer key; diff --git a/src/ic-device.c b/src/ic-device.c index ba68037..d82912d 100644 --- a/src/ic-device.c +++ b/src/ic-device.c @@ -27,6 +27,7 @@ API int iotcon_device_info_get_property(iotcon_device_info_h device_info, iotcon_device_info_e property, char **value) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == device_info, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == value, IOTCON_ERROR_INVALID_PARAMETER); @@ -58,6 +59,7 @@ API int iotcon_find_device_info(const char *host_address, iotcon_device_info_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -79,6 +81,7 @@ API int iotcon_find_device_info(const char *host_address, API int iotcon_set_device_name(const char *device_name) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -96,6 +99,7 @@ API int iotcon_set_device_name(const char *device_name) API int iotcon_platform_info_get_property(iotcon_platform_info_h platform_info, iotcon_platform_info_e property, char **value) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == platform_info, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == value, IOTCON_ERROR_INVALID_PARAMETER); @@ -148,6 +152,7 @@ API int iotcon_find_platform_info(const char *host_address, iotcon_platform_info_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); diff --git a/src/ic-ioty-ocprocess.c b/src/ic-ioty-ocprocess.c index 15659b1..2e1fe46 100644 --- a/src/ic-ioty-ocprocess.c +++ b/src/ic-ioty-ocprocess.c @@ -57,6 +57,7 @@ void icl_ioty_ocprocess_start() API int iotcon_polling_get_interval(int *interval) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == interval, IOTCON_ERROR_INVALID_PARAMETER); @@ -68,6 +69,7 @@ API int iotcon_polling_get_interval(int *interval) API int iotcon_polling_set_interval(int interval) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(interval <= ICL_IOTY_TIME_INTERVAL_MIN, IOTCON_ERROR_INVALID_PARAMETER); @@ -81,6 +83,7 @@ API int iotcon_polling_set_interval(int interval) API int iotcon_polling_invoke(void) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); ic_utils_cond_signal(IC_UTILS_COND_POLLING); @@ -138,6 +141,7 @@ static gboolean _icl_ioty_ocprocess_find_idle_cb(gpointer p) resource = resource_list->data; resource->is_found = true; cb = (iotcon_found_resource_cb)cb_data->cb; + INFO("Call the callback"); if (IOTCON_FUNC_STOP == cb(resource, IOTCON_ERROR_NONE, cb_data->user_data)) { /* Stop */ INFO("Stop the callback"); diff --git a/src/ic-list.c b/src/ic-list.c index 40714c3..189f0b9 100644 --- a/src/ic-list.c +++ b/src/ic-list.c @@ -38,6 +38,7 @@ iotcon_list_h icl_list_ref(iotcon_list_h list) API int iotcon_list_create(iotcon_type_e type, iotcon_list_h *ret_list) { + FN_CALL; iotcon_list_h list; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -65,6 +66,7 @@ API int iotcon_list_create(iotcon_type_e type, iotcon_list_h *ret_list) API int iotcon_list_add_int(iotcon_list_h list, int val, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -84,6 +86,7 @@ API int iotcon_list_add_int(iotcon_list_h list, int val, int pos) API int iotcon_list_add_bool(iotcon_list_h list, bool val, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -103,6 +106,7 @@ API int iotcon_list_add_bool(iotcon_list_h list, bool val, int pos) API int iotcon_list_add_double(iotcon_list_h list, double val, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -122,6 +126,7 @@ API int iotcon_list_add_double(iotcon_list_h list, double val, int pos) API int iotcon_list_add_str(iotcon_list_h list, char *val, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -143,6 +148,7 @@ API int iotcon_list_add_str(iotcon_list_h list, char *val, int pos) API int iotcon_list_add_byte_str(iotcon_list_h list, unsigned char *val, int len, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -163,6 +169,7 @@ API int iotcon_list_add_byte_str(iotcon_list_h list, unsigned char *val, int len API int iotcon_list_add_list(iotcon_list_h list, iotcon_list_h val, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -183,6 +190,7 @@ API int iotcon_list_add_list(iotcon_list_h list, iotcon_list_h val, int pos) API int iotcon_list_add_attributes(iotcon_list_h list, iotcon_attributes_h val, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -203,6 +211,7 @@ API int iotcon_list_add_attributes(iotcon_list_h list, iotcon_attributes_h val, API int iotcon_list_get_nth_int(iotcon_list_h list, int pos, int *val) { + FN_CALL; int ival, ret; iotcon_value_h value; @@ -231,6 +240,7 @@ API int iotcon_list_get_nth_int(iotcon_list_h list, int pos, int *val) API int iotcon_list_get_nth_bool(iotcon_list_h list, int pos, bool *val) { + FN_CALL; int ret; bool bval; iotcon_value_h value; @@ -260,6 +270,7 @@ API int iotcon_list_get_nth_bool(iotcon_list_h list, int pos, bool *val) API int iotcon_list_get_nth_double(iotcon_list_h list, int pos, double *val) { + FN_CALL; int ret; double dbval; iotcon_value_h value; @@ -289,6 +300,7 @@ API int iotcon_list_get_nth_double(iotcon_list_h list, int pos, double *val) API int iotcon_list_get_nth_str(iotcon_list_h list, int pos, char **val) { + FN_CALL; int ret; char *strval; iotcon_value_h value; @@ -319,6 +331,7 @@ API int iotcon_list_get_nth_str(iotcon_list_h list, int pos, char **val) API int iotcon_list_get_nth_byte_str(iotcon_list_h list, int pos, unsigned char **val, int *len) { + FN_CALL; unsigned char *byte_val; int ret, byte_len; iotcon_value_h value; @@ -350,6 +363,7 @@ API int iotcon_list_get_nth_byte_str(iotcon_list_h list, int pos, API int iotcon_list_get_nth_list(iotcon_list_h src, int pos, iotcon_list_h *dest) { + FN_CALL; int ret; iotcon_value_h value; iotcon_list_h list_val; @@ -380,6 +394,7 @@ API int iotcon_list_get_nth_list(iotcon_list_h src, int pos, iotcon_list_h *dest API int iotcon_list_get_nth_attributes(iotcon_list_h list, int pos, iotcon_attributes_h *attributes) { + FN_CALL; int ret; iotcon_value_h value; iotcon_attributes_h attributes_val; @@ -409,6 +424,7 @@ API int iotcon_list_get_nth_attributes(iotcon_list_h list, int pos, API int iotcon_list_remove_nth(iotcon_list_h list, int pos) { + FN_CALL; iotcon_value_h value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -431,6 +447,7 @@ API int iotcon_list_remove_nth(iotcon_list_h list, int pos) API int iotcon_list_get_type(iotcon_list_h list, iotcon_type_e *type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == type, IOTCON_ERROR_INVALID_PARAMETER); @@ -443,6 +460,7 @@ API int iotcon_list_get_type(iotcon_list_h list, iotcon_type_e *type) API int iotcon_list_get_length(iotcon_list_h list, unsigned int *length) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == length, IOTCON_ERROR_INVALID_PARAMETER); @@ -468,6 +486,7 @@ int icl_list_insert(iotcon_list_h list, iotcon_value_h value, int pos) API int iotcon_list_foreach_int(iotcon_list_h list, iotcon_list_int_cb cb, void *user_data) { + FN_CALL; GList *cur; int index = 0; icl_basic_s *real = NULL; @@ -494,6 +513,7 @@ API int iotcon_list_foreach_int(iotcon_list_h list, iotcon_list_int_cb cb, API int iotcon_list_foreach_bool(iotcon_list_h list, iotcon_list_bool_cb cb, void *user_data) { + FN_CALL; GList *cur; int index = 0; icl_basic_s *real = NULL; @@ -520,6 +540,7 @@ API int iotcon_list_foreach_bool(iotcon_list_h list, iotcon_list_bool_cb cb, API int iotcon_list_foreach_double(iotcon_list_h list, iotcon_list_double_cb cb, void *user_data) { + FN_CALL; GList *cur; int index = 0; icl_basic_s *real = NULL; @@ -546,6 +567,7 @@ API int iotcon_list_foreach_double(iotcon_list_h list, iotcon_list_double_cb cb, API int iotcon_list_foreach_str(iotcon_list_h list, iotcon_list_str_cb cb, void *user_data) { + FN_CALL; GList *cur; int index = 0; icl_basic_s *real = NULL; @@ -572,6 +594,7 @@ API int iotcon_list_foreach_str(iotcon_list_h list, iotcon_list_str_cb cb, API int iotcon_list_foreach_byte_str(iotcon_list_h list, iotcon_list_byte_str_cb cb, void *user_data) { + FN_CALL; GList *cur; int index = 0; icl_val_byte_str_s *real = NULL; @@ -598,6 +621,7 @@ API int iotcon_list_foreach_byte_str(iotcon_list_h list, iotcon_list_byte_str_cb API int iotcon_list_foreach_list(iotcon_list_h list, iotcon_list_list_cb cb, void *user_data) { + FN_CALL; int index = 0; GList *cur = NULL; icl_val_list_s *real = NULL; @@ -624,6 +648,7 @@ API int iotcon_list_foreach_list(iotcon_list_h list, iotcon_list_list_cb cb, API int iotcon_list_foreach_attributes(iotcon_list_h list, iotcon_list_attributes_cb cb, void *user_data) { + FN_CALL; int index = 0; GList *cur = NULL; icl_val_attributes_s *real = NULL; @@ -650,6 +675,7 @@ API int iotcon_list_foreach_attributes(iotcon_list_h list, API int iotcon_list_destroy(iotcon_list_h list) { + FN_CALL; GList *cur = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); diff --git a/src/ic-lite-resource.c b/src/ic-lite-resource.c index c77c3dd..16917c6 100644 --- a/src/ic-lite-resource.c +++ b/src/ic-lite-resource.c @@ -39,6 +39,7 @@ API int iotcon_lite_resource_create(const char *uri_path, void *user_data, iotcon_lite_resource_h *resource_handle) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -63,6 +64,7 @@ API int iotcon_lite_resource_create(const char *uri_path, API int iotcon_lite_resource_destroy(iotcon_lite_resource_h resource) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -83,6 +85,7 @@ API int iotcon_lite_resource_destroy(iotcon_lite_resource_h resource) API int iotcon_lite_resource_update_attributes(iotcon_lite_resource_h resource, iotcon_attributes_h attributes) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -103,6 +106,7 @@ API int iotcon_lite_resource_update_attributes(iotcon_lite_resource_h resource, API int iotcon_lite_resource_get_attributes(iotcon_lite_resource_h resource, iotcon_attributes_h *attributes) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == attributes, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/src/ic-observation.c b/src/ic-observation.c index 02c12c3..2f508a1 100644 --- a/src/ic-observation.c +++ b/src/ic-observation.c @@ -24,6 +24,7 @@ API int iotcon_observers_create(iotcon_observers_h *ret_observers) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == ret_observers, IOTCON_ERROR_INVALID_PARAMETER); @@ -41,6 +42,7 @@ API int iotcon_observers_create(iotcon_observers_h *ret_observers) API int iotcon_observers_destroy(iotcon_observers_h observers) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == observers, IOTCON_ERROR_INVALID_PARAMETER); @@ -53,6 +55,7 @@ API int iotcon_observers_destroy(iotcon_observers_h observers) API int iotcon_observers_add(iotcon_observers_h observers, int obs_id) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == observers, IOTCON_ERROR_INVALID_PARAMETER); @@ -65,6 +68,7 @@ API int iotcon_observers_add(iotcon_observers_h observers, int obs_id) API int iotcon_observers_remove(iotcon_observers_h observers, int obs_id) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == observers, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/src/ic-options.c b/src/ic-options.c index ad3821a..846cca1 100644 --- a/src/ic-options.c +++ b/src/ic-options.c @@ -67,6 +67,7 @@ iotcon_options_h icl_options_ref(iotcon_options_h options) API int iotcon_options_create(iotcon_options_h *ret_options) { + FN_CALL; iotcon_options_h options; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -89,6 +90,7 @@ API int iotcon_options_create(iotcon_options_h *ret_options) API int iotcon_options_destroy(iotcon_options_h options) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER); @@ -109,6 +111,7 @@ API int iotcon_options_destroy(iotcon_options_h options) API int iotcon_options_add(iotcon_options_h options, unsigned short id, const char *data) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER); RETVM_IF(1 < options->ref_count, IOTCON_ERROR_INVALID_PARAMETER, @@ -131,6 +134,7 @@ API int iotcon_options_add(iotcon_options_h options, unsigned short id, API int iotcon_options_remove(iotcon_options_h options, unsigned short id) { + FN_CALL; gboolean is_removed; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -150,6 +154,7 @@ API int iotcon_options_remove(iotcon_options_h options, unsigned short id) API int iotcon_options_lookup(iotcon_options_h options, unsigned short id, char **data) { + FN_CALL; char *value; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -171,6 +176,7 @@ API int iotcon_options_lookup(iotcon_options_h options, unsigned short id, API int iotcon_options_foreach(iotcon_options_h options, iotcon_options_foreach_cb cb, void *user_data) { + FN_CALL; GHashTableIter iter; gpointer key, value; diff --git a/src/ic-presence.c b/src/ic-presence.c index 7c59cbc..8e37397 100644 --- a/src/ic-presence.c +++ b/src/ic-presence.c @@ -115,6 +115,7 @@ API int iotcon_remove_presence_cb(iotcon_presence_h presence) API int iotcon_presence_get_host_address(iotcon_presence_h presence, char **host_address) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == presence, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER); @@ -128,6 +129,7 @@ API int iotcon_presence_get_host_address(iotcon_presence_h presence, API int iotcon_presence_get_connectivity_type(iotcon_presence_h presence, iotcon_connectivity_type_e *connectivity_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == presence, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -141,6 +143,7 @@ API int iotcon_presence_get_connectivity_type(iotcon_presence_h presence, API int iotcon_presence_get_resource_type(iotcon_presence_h presence, char **resource_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == presence, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == resource_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -154,6 +157,7 @@ API int iotcon_presence_get_resource_type(iotcon_presence_h presence, API int iotcon_presence_response_get_host_address( iotcon_presence_response_h response, char **host_address) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER); @@ -167,6 +171,7 @@ API int iotcon_presence_response_get_host_address( API int iotcon_presence_response_get_connectivity_type( iotcon_presence_response_h response, iotcon_connectivity_type_e *connectivity_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -180,6 +185,7 @@ API int iotcon_presence_response_get_connectivity_type( API int iotcon_presence_response_get_resource_type( iotcon_presence_response_h response, char **resource_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == resource_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -193,6 +199,7 @@ API int iotcon_presence_response_get_resource_type( API int iotcon_presence_response_get_result(iotcon_presence_response_h response, iotcon_presence_result_e *result) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == result, IOTCON_ERROR_INVALID_PARAMETER); @@ -206,6 +213,7 @@ API int iotcon_presence_response_get_result(iotcon_presence_response_h response, API int iotcon_presence_response_get_trigger(iotcon_presence_response_h response, iotcon_presence_trigger_e *trigger) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == trigger, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/src/ic-provisioning-struct.c b/src/ic-provisioning-struct.c index fef6060..3173c1a 100644 --- a/src/ic-provisioning-struct.c +++ b/src/ic-provisioning-struct.c @@ -412,6 +412,7 @@ API int iotcon_provisioning_device_get_connectivity_type( iotcon_provisioning_device_h device, iotcon_connectivity_type_e *connectivity_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == device, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -425,6 +426,7 @@ API int iotcon_provisioning_device_get_connectivity_type( API int iotcon_provisioning_device_get_id(iotcon_provisioning_device_h device, char **device_id) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == device, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == device_id, IOTCON_ERROR_INVALID_PARAMETER); @@ -461,6 +463,7 @@ static int _provisioning_parse_oxm(OicSecOxm_t oic_oxm, iotcon_provisioning_oxm_ API int iotcon_provisioning_device_get_oxm(iotcon_provisioning_device_h device, iotcon_provisioning_oxm_e *oxm) { + FN_CALL; int ret; iotcon_provisioning_oxm_e temp; @@ -485,6 +488,7 @@ API int iotcon_provisioning_device_get_oxm(iotcon_provisioning_device_h device, API int iotcon_provisioning_device_is_owned(iotcon_provisioning_device_h device, bool *is_owned) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == device, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == device->device, IOTCON_ERROR_INVALID_PARAMETER); @@ -522,6 +526,7 @@ void icl_provisioning_device_print(iotcon_provisioning_device_h device) API int iotcon_provisioning_acl_create(iotcon_provisioning_acl_h *acl) { + FN_CALL; iotcon_provisioning_acl_h temp; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -553,6 +558,7 @@ iotcon_provisioning_acl_h icl_provisioning_acl_ref(iotcon_provisioning_acl_h acl API int iotcon_provisioning_acl_destroy(iotcon_provisioning_acl_h acl) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == acl, IOTCON_ERROR_INVALID_PARAMETER); @@ -611,6 +617,7 @@ int icl_provisioning_acl_clone(iotcon_provisioning_acl_h acl, API int iotcon_provisioning_acl_set_subject(iotcon_provisioning_acl_h acl, iotcon_provisioning_device_h device) { + FN_CALL; OCProvisionDev_t *dev; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -633,6 +640,7 @@ API int iotcon_provisioning_acl_set_subject(iotcon_provisioning_acl_h acl, API int iotcon_provisioning_acl_set_all_subject(iotcon_provisioning_acl_h acl) { + FN_CALL; OCProvisionDev_t *dev; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -671,6 +679,7 @@ OCProvisionDev_t* icl_provisioning_acl_get_subject(iotcon_provisioning_acl_h acl API int iotcon_provisioning_acl_add_resource(iotcon_provisioning_acl_h acl, const char *uri_path) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == acl, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER); @@ -684,6 +693,7 @@ API int iotcon_provisioning_acl_add_resource(iotcon_provisioning_acl_h acl, API int iotcon_provisioning_acl_set_permission(iotcon_provisioning_acl_h acl, int permission) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == acl, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(permission <= 0 || IOTCON_PERMISSION_FULL_CONTROL < permission, diff --git a/src/ic-query.c b/src/ic-query.c index 750c54e..fa9cd3d 100644 --- a/src/ic-query.c +++ b/src/ic-query.c @@ -29,6 +29,7 @@ API int iotcon_query_create(iotcon_query_h *ret_query) { + FN_CALL; iotcon_query_h query; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -50,6 +51,7 @@ API int iotcon_query_create(iotcon_query_h *ret_query) API int iotcon_query_destroy(iotcon_query_h query) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER); @@ -63,6 +65,7 @@ API int iotcon_query_destroy(iotcon_query_h query) API int iotcon_query_get_resource_type(iotcon_query_h query, char **resource_type) { + FN_CALL; char *type; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -82,6 +85,7 @@ API int iotcon_query_get_resource_type(iotcon_query_h query, API int iotcon_query_get_interface(iotcon_query_h query, char **resource_iface) { + FN_CALL; char *iface = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -102,6 +106,7 @@ API int iotcon_query_get_interface(iotcon_query_h query, char **resource_iface) API int iotcon_query_set_resource_type(iotcon_query_h query, const char *resource_type) { + FN_CALL; int length_old = 0; int length_new = 0; char *value = NULL; @@ -134,6 +139,7 @@ API int iotcon_query_set_resource_type(iotcon_query_h query, API int iotcon_query_set_interface(iotcon_query_h query, const char *resource_iface) { + FN_CALL; int length_old = 0; int length_new = 0; char *value = NULL; @@ -166,6 +172,7 @@ API int iotcon_query_set_interface(iotcon_query_h query, const char *resource_if /* The full length of query should be less than or equal to 64. */ API int iotcon_query_add(iotcon_query_h query, const char *key, const char *value) { + FN_CALL; int query_len; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -190,6 +197,7 @@ API int iotcon_query_add(iotcon_query_h query, const char *key, const char *valu API int iotcon_query_remove(iotcon_query_h query, const char *key) { + FN_CALL; gboolean is_removed; int query_len; char *value; @@ -219,6 +227,7 @@ API int iotcon_query_remove(iotcon_query_h query, const char *key) API int iotcon_query_lookup(iotcon_query_h query, const char *key, char **data) { + FN_CALL; char *value = NULL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -240,6 +249,7 @@ API int iotcon_query_lookup(iotcon_query_h query, const char *key, char **data) API int iotcon_query_foreach(iotcon_query_h query, iotcon_query_foreach_cb cb, void *user_data) { + FN_CALL; GHashTableIter iter; gpointer key, value; diff --git a/src/ic-remote-resource-caching.c b/src/ic-remote-resource-caching.c index e22cb77..b812340 100644 --- a/src/ic-remote-resource-caching.c +++ b/src/ic-remote-resource-caching.c @@ -29,6 +29,7 @@ API int iotcon_remote_resource_start_caching(iotcon_remote_resource_h resource, iotcon_remote_resource_cached_representation_changed_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -61,6 +62,7 @@ API int iotcon_remote_resource_start_caching(iotcon_remote_resource_h resource, API int iotcon_remote_resource_stop_caching(iotcon_remote_resource_h resource) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -90,6 +92,7 @@ API int iotcon_remote_resource_get_cached_representation( iotcon_remote_resource_h resource, iotcon_representation_h *representation) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == representation, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/src/ic-remote-resource-crud.c b/src/ic-remote-resource-crud.c index 0de99b8..589da0f 100644 --- a/src/ic-remote-resource-crud.c +++ b/src/ic-remote-resource-crud.c @@ -25,6 +25,7 @@ API int iotcon_remote_resource_get(iotcon_remote_resource_h resource, iotcon_query_h query, iotcon_remote_resource_response_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -54,6 +55,7 @@ API int iotcon_remote_resource_put(iotcon_remote_resource_h resource, iotcon_remote_resource_response_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -84,6 +86,7 @@ API int iotcon_remote_resource_post(iotcon_remote_resource_h resource, iotcon_remote_resource_response_cb cb, void *user_data) { + FN_CALL; int ret; @@ -111,6 +114,7 @@ API int iotcon_remote_resource_post(iotcon_remote_resource_h resource, API int iotcon_remote_resource_delete(iotcon_remote_resource_h resource, iotcon_remote_resource_response_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -140,6 +144,7 @@ API int iotcon_remote_resource_observe_register( iotcon_remote_resource_observe_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -168,6 +173,7 @@ API int iotcon_remote_resource_observe_register( API int iotcon_remote_resource_observe_deregister( iotcon_remote_resource_h resource) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); diff --git a/src/ic-remote-resource-monitoring.c b/src/ic-remote-resource-monitoring.c index ddf41c7..cf133ef 100644 --- a/src/ic-remote-resource-monitoring.c +++ b/src/ic-remote-resource-monitoring.c @@ -28,6 +28,7 @@ API int iotcon_remote_resource_start_monitoring( iotcon_remote_resource_state_changed_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -63,6 +64,7 @@ API int iotcon_remote_resource_start_monitoring( API int iotcon_remote_resource_stop_monitoring(iotcon_remote_resource_h resource) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); diff --git a/src/ic-remote-resource.c b/src/ic-remote-resource.c index d2999cb..31af696 100644 --- a/src/ic-remote-resource.c +++ b/src/ic-remote-resource.c @@ -40,6 +40,7 @@ API int iotcon_find_resource(const char *host_address, iotcon_found_resource_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -166,6 +167,7 @@ void icl_remote_resource_unref(iotcon_remote_resource_h resource) API int iotcon_remote_resource_destroy(iotcon_remote_resource_h resource) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); @@ -205,6 +207,7 @@ static bool _icl_remote_resource_header_foreach_cb(unsigned short id, API int iotcon_remote_resource_clone(iotcon_remote_resource_h src, iotcon_remote_resource_h *dest) { + FN_CALL; int ret; iotcon_remote_resource_h resource = NULL; @@ -264,6 +267,7 @@ API int iotcon_remote_resource_clone(iotcon_remote_resource_h src, API int iotcon_remote_resource_get_uri_path(iotcon_remote_resource_h resource, char **uri_path) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER); @@ -278,6 +282,7 @@ API int iotcon_remote_resource_get_uri_path(iotcon_remote_resource_h resource, API int iotcon_remote_resource_get_host_address( iotcon_remote_resource_h resource, char **host_address) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER); @@ -292,6 +297,7 @@ API int iotcon_remote_resource_get_host_address( API int iotcon_remote_resource_get_connectivity_type( iotcon_remote_resource_h resource, iotcon_connectivity_type_e *connectivity_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -306,6 +312,7 @@ API int iotcon_remote_resource_get_connectivity_type( API int iotcon_remote_resource_get_device_id(iotcon_remote_resource_h resource, char **device_id) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == device_id, IOTCON_ERROR_INVALID_PARAMETER); @@ -322,6 +329,7 @@ API int iotcon_remote_resource_get_device_id(iotcon_remote_resource_h resource, API int iotcon_remote_resource_get_device_name(iotcon_remote_resource_h resource, char **device_name) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == device_name, IOTCON_ERROR_INVALID_PARAMETER); @@ -338,6 +346,7 @@ API int iotcon_remote_resource_get_device_name(iotcon_remote_resource_h resource API int iotcon_remote_resource_get_types(iotcon_remote_resource_h resource, iotcon_resource_types_h *types) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER); @@ -352,6 +361,7 @@ API int iotcon_remote_resource_get_types(iotcon_remote_resource_h resource, API int iotcon_remote_resource_get_interfaces(iotcon_remote_resource_h resource, iotcon_resource_interfaces_h *ifaces) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER); @@ -365,6 +375,7 @@ API int iotcon_remote_resource_get_interfaces(iotcon_remote_resource_h resource, API int iotcon_remote_resource_get_policies(iotcon_remote_resource_h resource, uint8_t *policies) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == policies, IOTCON_ERROR_INVALID_PARAMETER); @@ -377,6 +388,7 @@ API int iotcon_remote_resource_get_policies(iotcon_remote_resource_h resource, API int iotcon_remote_resource_get_options(iotcon_remote_resource_h resource, iotcon_options_h *options) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER); @@ -391,6 +403,7 @@ API int iotcon_remote_resource_get_options(iotcon_remote_resource_h resource, API int iotcon_remote_resource_set_options(iotcon_remote_resource_h resource, iotcon_options_h options) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); @@ -408,6 +421,7 @@ API int iotcon_remote_resource_set_options(iotcon_remote_resource_h resource, API int iotcon_remote_resource_get_checking_interval(iotcon_remote_resource_h resource, int *interval) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == interval, IOTCON_ERROR_INVALID_PARAMETER); @@ -421,6 +435,7 @@ API int iotcon_remote_resource_get_checking_interval(iotcon_remote_resource_h re API int iotcon_remote_resource_set_checking_interval(iotcon_remote_resource_h resource, int interval) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); diff --git a/src/ic-representation.c b/src/ic-representation.c index 2dc0288..ee27297 100644 --- a/src/ic-representation.c +++ b/src/ic-representation.c @@ -51,6 +51,7 @@ iotcon_representation_h icl_representation_ref(iotcon_representation_h repr) API int iotcon_representation_create(iotcon_representation_h *ret_repr) { + FN_CALL; iotcon_representation_h repr; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -73,6 +74,7 @@ API int iotcon_representation_create(iotcon_representation_h *ret_repr) API int iotcon_representation_destroy(iotcon_representation_h repr) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); @@ -107,6 +109,7 @@ API int iotcon_representation_destroy(iotcon_representation_h repr) API int iotcon_representation_get_uri_path(iotcon_representation_h repr, char **uri_path) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER); @@ -120,6 +123,7 @@ API int iotcon_representation_get_uri_path(iotcon_representation_h repr, API int iotcon_representation_set_uri_path(iotcon_representation_h repr, const char *uri_path) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER); @@ -139,6 +143,7 @@ API int iotcon_representation_set_uri_path(iotcon_representation_h repr, API int iotcon_representation_get_resource_types(iotcon_representation_h repr, iotcon_resource_types_h *types) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER); @@ -152,6 +157,7 @@ API int iotcon_representation_get_resource_types(iotcon_representation_h repr, API int iotcon_representation_set_resource_types(iotcon_representation_h repr, iotcon_resource_types_h types) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); @@ -169,6 +175,7 @@ API int iotcon_representation_set_resource_types(iotcon_representation_h repr, API int iotcon_representation_get_resource_interfaces( iotcon_representation_h repr, iotcon_resource_interfaces_h *ifaces) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER); @@ -182,6 +189,7 @@ API int iotcon_representation_get_resource_interfaces( API int iotcon_representation_set_resource_interfaces( iotcon_representation_h repr, iotcon_resource_interfaces_h ifaces) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); @@ -199,6 +207,7 @@ API int iotcon_representation_set_resource_interfaces( API int iotcon_representation_set_attributes(iotcon_representation_h repr, iotcon_attributes_h attributes) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); @@ -217,6 +226,7 @@ API int iotcon_representation_set_attributes(iotcon_representation_h repr, API int iotcon_representation_get_attributes(iotcon_representation_h repr, iotcon_attributes_h *attributes) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == attributes, IOTCON_ERROR_INVALID_PARAMETER); @@ -229,6 +239,7 @@ API int iotcon_representation_get_attributes(iotcon_representation_h repr, API int iotcon_representation_add_child(iotcon_representation_h parent, iotcon_representation_h child) { + FN_CALL; iotcon_representation_h repr; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -246,6 +257,7 @@ API int iotcon_representation_add_child(iotcon_representation_h parent, API int iotcon_representation_remove_child(iotcon_representation_h parent, iotcon_representation_h child) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == child, IOTCON_ERROR_INVALID_PARAMETER); @@ -261,6 +273,7 @@ API int iotcon_representation_remove_child(iotcon_representation_h parent, API int iotcon_representation_foreach_children(iotcon_representation_h parent, iotcon_children_cb cb, void *user_data) { + FN_CALL; GList *list, *next; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -281,6 +294,7 @@ API int iotcon_representation_foreach_children(iotcon_representation_h parent, API int iotcon_representation_get_child_count(iotcon_representation_h parent, unsigned int *count) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == count, IOTCON_ERROR_INVALID_PARAMETER); @@ -293,6 +307,7 @@ API int iotcon_representation_get_child_count(iotcon_representation_h parent, API int iotcon_representation_get_nth_child(iotcon_representation_h parent, int pos, iotcon_representation_h *child) { + FN_CALL; iotcon_representation_h repr; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); diff --git a/src/ic-request.c b/src/ic-request.c index 1e392f1..5eee5d3 100644 --- a/src/ic-request.c +++ b/src/ic-request.c @@ -21,6 +21,7 @@ API int iotcon_request_get_host_address(iotcon_request_h request, char **host_address) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER); @@ -34,6 +35,7 @@ API int iotcon_request_get_host_address(iotcon_request_h request, API int iotcon_request_get_connectivity_type(iotcon_request_h request, iotcon_connectivity_type_e *connectivity_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -48,6 +50,7 @@ API int iotcon_request_get_connectivity_type(iotcon_request_h request, API int iotcon_request_get_representation(iotcon_request_h request, iotcon_representation_h *repr) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); @@ -61,6 +64,7 @@ API int iotcon_request_get_representation(iotcon_request_h request, API int iotcon_request_get_request_type(iotcon_request_h request, iotcon_request_type_e *type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == type, IOTCON_ERROR_INVALID_PARAMETER); @@ -75,6 +79,7 @@ API int iotcon_request_get_request_type(iotcon_request_h request, API int iotcon_request_get_options(iotcon_request_h request, iotcon_options_h *options) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER); @@ -89,6 +94,7 @@ API int iotcon_request_get_options(iotcon_request_h request, /* The content of the request should not be freed by user. */ API int iotcon_request_get_query(iotcon_request_h request, iotcon_query_h *query) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER); @@ -103,6 +109,7 @@ API int iotcon_request_get_query(iotcon_request_h request, iotcon_query_h *query API int iotcon_request_get_observe_type(iotcon_request_h request, iotcon_observe_type_e *observe_type) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == observe_type, IOTCON_ERROR_INVALID_PARAMETER); @@ -115,6 +122,7 @@ API int iotcon_request_get_observe_type(iotcon_request_h request, API int iotcon_request_get_observe_id(iotcon_request_h request, int *observe_id) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == observe_id, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/src/ic-resource-interfaces.c b/src/ic-resource-interfaces.c index f6f4515..f998db9 100644 --- a/src/ic-resource-interfaces.c +++ b/src/ic-resource-interfaces.c @@ -37,6 +37,7 @@ iotcon_resource_interfaces_h icl_resource_interfaces_ref( API int iotcon_resource_interfaces_create(iotcon_resource_interfaces_h *ret_ifaces) { + FN_CALL; iotcon_resource_interfaces_h ifaces; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -58,6 +59,7 @@ API int iotcon_resource_interfaces_create(iotcon_resource_interfaces_h *ret_ifac API int iotcon_resource_interfaces_destroy(iotcon_resource_interfaces_h ifaces) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER); @@ -98,6 +100,7 @@ static bool _icl_resource_interfaces_duplicate_check( API int iotcon_resource_interfaces_add(iotcon_resource_interfaces_h ifaces, const char *iface) { + FN_CALL; char *resource_iface; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -127,6 +130,7 @@ API int iotcon_resource_interfaces_add(iotcon_resource_interfaces_h ifaces, API int iotcon_resource_interfaces_remove(iotcon_resource_interfaces_h ifaces, const char *iface) { + FN_CALL; GList *node; char *node_data; @@ -153,6 +157,7 @@ API int iotcon_resource_interfaces_remove(iotcon_resource_interfaces_h ifaces, API int iotcon_resource_interfaces_foreach(iotcon_resource_interfaces_h ifaces, iotcon_resource_interfaces_foreach_cb cb, void *user_data) { + FN_CALL; GList *node; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -171,6 +176,7 @@ API int iotcon_resource_interfaces_foreach(iotcon_resource_interfaces_h ifaces, API int iotcon_resource_interfaces_clone(iotcon_resource_interfaces_h src, iotcon_resource_interfaces_h *dest) { + FN_CALL; GList *node; char *resource_iface; iotcon_resource_interfaces_h resource_ifaces; diff --git a/src/ic-resource-types.c b/src/ic-resource-types.c index 7886a82..35c9812 100644 --- a/src/ic-resource-types.c +++ b/src/ic-resource-types.c @@ -37,6 +37,7 @@ iotcon_resource_types_h icl_resource_types_ref(iotcon_resource_types_h types) API int iotcon_resource_types_create(iotcon_resource_types_h *ret_types) { + FN_CALL; iotcon_resource_types_h types; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -58,6 +59,7 @@ API int iotcon_resource_types_create(iotcon_resource_types_h *ret_types) API int iotcon_resource_types_destroy(iotcon_resource_types_h types) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER); @@ -98,6 +100,7 @@ static bool _icl_resource_types_duplicate_check(iotcon_resource_types_h types, * Duplicate strings are not allowed. */ API int iotcon_resource_types_add(iotcon_resource_types_h types, const char *type) { + FN_CALL; char *resource_type; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -127,6 +130,7 @@ API int iotcon_resource_types_add(iotcon_resource_types_h types, const char *typ API int iotcon_resource_types_remove(iotcon_resource_types_h types, const char *type) { + FN_CALL; GList *found_node; char *node_data; @@ -153,6 +157,7 @@ API int iotcon_resource_types_remove(iotcon_resource_types_h types, API int iotcon_resource_types_foreach(iotcon_resource_types_h types, iotcon_resource_types_foreach_cb cb, void *user_data) { + FN_CALL; GList *node; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -171,6 +176,7 @@ API int iotcon_resource_types_foreach(iotcon_resource_types_h types, API int iotcon_resource_types_clone(iotcon_resource_types_h src, iotcon_resource_types_h *dest) { + FN_CALL; GList *node; char *resource_type; iotcon_resource_types_h resource_types; diff --git a/src/ic-resource.c b/src/ic-resource.c index ef8bdfb..215652b 100644 --- a/src/ic-resource.c +++ b/src/ic-resource.c @@ -111,6 +111,7 @@ API int iotcon_resource_create(const char *uri_path, void *user_data, iotcon_resource_h *resource_handle) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -201,6 +202,7 @@ API int iotcon_resource_bind_type(iotcon_resource_h resource, API int iotcon_resource_set_request_handler(iotcon_resource_h resource, iotcon_request_handler_cb cb, void *user_data) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER); @@ -216,6 +218,7 @@ API int iotcon_resource_set_request_handler(iotcon_resource_h resource, API int iotcon_resource_bind_child_resource(iotcon_resource_h parent, iotcon_resource_h child) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -244,6 +247,7 @@ API int iotcon_resource_bind_child_resource(iotcon_resource_h parent, API int iotcon_resource_unbind_child_resource(iotcon_resource_h parent, iotcon_resource_h child) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -277,6 +281,7 @@ API int iotcon_resource_unbind_child_resource(iotcon_resource_h parent, API int iotcon_resource_get_child_count(iotcon_resource_h resource, unsigned int *count) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == count, IOTCON_ERROR_INVALID_PARAMETER); @@ -290,6 +295,7 @@ API int iotcon_resource_get_child_count(iotcon_resource_h resource, API int iotcon_resource_get_nth_child(iotcon_resource_h parent, int index, iotcon_resource_h *child) { + FN_CALL; iotcon_resource_h resource; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -313,6 +319,7 @@ API int iotcon_resource_get_nth_child(iotcon_resource_h parent, int index, /* The content of the resource should not be freed by user. */ API int iotcon_resource_get_uri_path(iotcon_resource_h resource, char **uri_path) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER); @@ -327,6 +334,7 @@ API int iotcon_resource_get_uri_path(iotcon_resource_h resource, char **uri_path API int iotcon_resource_get_types(iotcon_resource_h resource, iotcon_resource_types_h *types) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER); @@ -340,6 +348,7 @@ API int iotcon_resource_get_types(iotcon_resource_h resource, API int iotcon_resource_get_interfaces(iotcon_resource_h resource, iotcon_resource_interfaces_h *ifaces) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER); @@ -352,6 +361,7 @@ API int iotcon_resource_get_interfaces(iotcon_resource_h resource, API int iotcon_resource_get_policies(iotcon_resource_h resource, uint8_t *policies) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == policies, IOTCON_ERROR_INVALID_PARAMETER); @@ -364,6 +374,7 @@ API int iotcon_resource_get_policies(iotcon_resource_h resource, uint8_t *polici API int iotcon_resource_notify(iotcon_resource_h resource, iotcon_representation_h repr, iotcon_observers_h observers, iotcon_qos_e qos) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); diff --git a/src/ic-response.c b/src/ic-response.c index f40ab9a..4c38407 100644 --- a/src/ic-response.c +++ b/src/ic-response.c @@ -57,6 +57,7 @@ API int iotcon_response_create(iotcon_request_h request, API int iotcon_response_destroy(iotcon_response_h resp) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); @@ -72,6 +73,7 @@ API int iotcon_response_destroy(iotcon_response_h resp) API int iotcon_response_get_options(iotcon_response_h resp, iotcon_options_h *options) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER); @@ -85,6 +87,7 @@ API int iotcon_response_get_options(iotcon_response_h resp, API int iotcon_response_get_representation(iotcon_response_h resp, iotcon_representation_h *repr) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER); @@ -99,6 +102,7 @@ API int iotcon_response_get_representation(iotcon_response_h resp, API int iotcon_response_get_result(iotcon_response_h resp, iotcon_response_result_e *result) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == result, IOTCON_ERROR_INVALID_PARAMETER); @@ -111,6 +115,7 @@ API int iotcon_response_get_result(iotcon_response_h resp, API int iotcon_response_set_result(iotcon_response_h resp, iotcon_response_result_e result) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); @@ -127,6 +132,7 @@ API int iotcon_response_set_result(iotcon_response_h resp, API int iotcon_response_set_representation(iotcon_response_h resp, iotcon_representation_h repr) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); @@ -145,6 +151,7 @@ API int iotcon_response_set_representation(iotcon_response_h resp, API int iotcon_response_set_options(iotcon_response_h resp, iotcon_options_h options) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/src/ic.c b/src/ic.c index ba62008..68e357f 100644 --- a/src/ic.c +++ b/src/ic.c @@ -81,6 +81,7 @@ int icl_initialize(const char *file_path, bool is_pt) API int iotcon_initialize(const char *file_path) { + FN_CALL; return icl_initialize(file_path, false); } @@ -104,6 +105,7 @@ API int iotcon_deinitialize(void) API int iotcon_get_timeout(int *timeout_seconds) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == timeout_seconds, IOTCON_ERROR_INVALID_PARAMETER); @@ -115,6 +117,7 @@ API int iotcon_get_timeout(int *timeout_seconds) API int iotcon_set_timeout(int timeout_seconds) { + FN_CALL; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); if (ICL_TIMEOUT_MAX < timeout_seconds || timeout_seconds <= 0) { ERR("timeout_seconds(%d) must be in range from 1 to 3600", timeout_seconds); @@ -128,6 +131,7 @@ API int iotcon_set_timeout(int timeout_seconds) API int iotcon_add_generated_pin_cb(iotcon_generated_pin_cb cb, void *user_data) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); @@ -144,6 +148,7 @@ API int iotcon_add_generated_pin_cb(iotcon_generated_pin_cb cb, void *user_data) API int iotcon_remove_generated_pin_cb(iotcon_generated_pin_cb cb) { + FN_CALL; int ret; RETV_IF(false == ic_utils_check_ocf_feature(), IOTCON_ERROR_NOT_SUPPORTED); -- 2.7.4