From: youngman Date: Thu, 22 Oct 2015 11:05:19 +0000 (+0900) Subject: (ACR) Specify Input parameter data type, clearly X-Git-Tag: accepted/tizen/mobile/20151201.031626~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8a71896d211ffc08b0a8219b05b72364f9f5658;p=platform%2Fcore%2Fiot%2Fiotcon.git (ACR) Specify Input parameter data type, clearly Change-Id: I8d4d9e726d3c84e8e3936e63154c7c09905b4334 Signed-off-by: youngman --- diff --git a/common/ic-dbus.xml b/common/ic-dbus.xml index b356977..9ad38e3 100644 --- a/common/ic-dbus.xml +++ b/common/ic-dbus.xml @@ -4,7 +4,7 @@ - + diff --git a/daemon/icd-dbus.c b/daemon/icd-dbus.c index e3f1f01..bbe4ffb 100644 --- a/daemon/icd-dbus.c +++ b/daemon/icd-dbus.c @@ -382,7 +382,7 @@ static gboolean _dbus_handle_register_resource(icDbus *object, const gchar *uri_path, const gchar* const *resource_types, gint ifaces, - guchar properties, + gint properties, guint signal_number) { FN_CALL; diff --git a/daemon/icd-ioty.c b/daemon/icd-ioty.c index 157cec9..61c1802 100644 --- a/daemon/icd-ioty.c +++ b/daemon/icd-ioty.c @@ -100,7 +100,7 @@ void icd_ioty_deinit(GThread *thread) OCResourceHandle icd_ioty_register_resource(const char *uri_path, - const char* const* res_types, int ifaces, uint8_t properties) + const char* const* res_types, int ifaces, int properties) { FN_CALL; int i; diff --git a/daemon/icd-ioty.h b/daemon/icd-ioty.h index 8524f3f..5875be8 100644 --- a/daemon/icd-ioty.h +++ b/daemon/icd-ioty.h @@ -60,7 +60,7 @@ GThread* icd_ioty_init(const char *addr, unsigned short port); void icd_ioty_deinit(GThread *thread); OCResourceHandle icd_ioty_register_resource(const char *uri_path, - const char* const* res_types, int ifaces, uint8_t properties); + const char* const* res_types, int ifaces, int properties); int icd_ioty_unregister_resource(OCResourceHandle handle); diff --git a/lib/icl-remote-resource-crud.c b/lib/icl-remote-resource-crud.c index 4399607..c3c6293 100644 --- a/lib/icl-remote-resource-crud.c +++ b/lib/icl-remote-resource-crud.c @@ -478,7 +478,7 @@ static void _icl_observe_conn_cleanup(icl_on_observe_s *cb_container) API int iotcon_remote_resource_observer_start(iotcon_remote_resource_h resource, - int observe_type, + iotcon_observe_type_e observe_type, iotcon_query_h query, iotcon_remote_resource_observe_cb cb, void *user_data) diff --git a/lib/icl-request.c b/lib/icl-request.c index a6f7bc5..d43f8fb 100644 --- a/lib/icl-request.c +++ b/lib/icl-request.c @@ -66,8 +66,7 @@ API int iotcon_request_get_query(iotcon_request_h request, iotcon_query_h *query } -API int iotcon_request_get_observer_action(iotcon_request_h request, - int *action) +API int iotcon_request_get_observer_action(iotcon_request_h request, int *action) { RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER); RETV_IF(NULL == action, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/lib/icl-resource.c b/lib/icl-resource.c index 4da5159..49dc550 100644 --- a/lib/icl-resource.c +++ b/lib/icl-resource.c @@ -162,7 +162,7 @@ static void _icl_resource_conn_cleanup(iotcon_resource_h resource) API int iotcon_resource_create(const char *uri_path, iotcon_resource_types_h res_types, int ifaces, - uint8_t properties, + int properties, iotcon_request_handler_cb cb, void *user_data, iotcon_resource_h *resource_handle) @@ -279,7 +279,8 @@ API int iotcon_resource_destroy(iotcon_resource_h resource) } -API int iotcon_resource_bind_interface(iotcon_resource_h resource, int iface) +API int iotcon_resource_bind_interface(iotcon_resource_h resource, + iotcon_interface_e iface) { FN_CALL; int ret; @@ -536,7 +537,7 @@ API int iotcon_resource_is_observable(iotcon_resource_h resource, bool *observab } -API int iotcon_notimsg_create(iotcon_representation_h repr, int iface, +API int iotcon_notimsg_create(iotcon_representation_h repr, iotcon_interface_e iface, iotcon_notimsg_h *notimsg_handle) { iotcon_notimsg_h msg; diff --git a/lib/icl-response.c b/lib/icl-response.c index 92c891a..3ef24f7 100644 --- a/lib/icl-response.c +++ b/lib/icl-response.c @@ -134,7 +134,7 @@ API int iotcon_response_set_header_options(iotcon_response_h resp, } -API int iotcon_response_set_interface(iotcon_response_h resp, int iface) +API int iotcon_response_set_interface(iotcon_response_h resp, iotcon_interface_e iface) { RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER); diff --git a/lib/include/iotcon-representation.h b/lib/include/iotcon-representation.h index 7695018..40c0d18 100644 --- a/lib/include/iotcon-representation.h +++ b/lib/include/iotcon-representation.h @@ -983,7 +983,7 @@ int iotcon_list_get_length(iotcon_list_h list, unsigned int *length); * * @see iotcon_list_foreach_int() */ -typedef int (*iotcon_list_int_cb)(int pos, const int value, void *user_data); +typedef int (*iotcon_list_int_cb)(int pos, int value, void *user_data); /** * @brief Gets all integer values of the given list by invoking the callback function. @@ -1023,7 +1023,7 @@ int iotcon_list_foreach_int(iotcon_list_h list, iotcon_list_int_cb cb, void *use * * @see iotcon_list_foreach_bool() */ -typedef int (*iotcon_list_bool_cb)(int pos, const bool value, void *user_data); +typedef int (*iotcon_list_bool_cb)(int pos, bool value, void *user_data); /** * @brief Gets all boolean values of the given list by invoking the callback function. @@ -1063,7 +1063,7 @@ int iotcon_list_foreach_bool(iotcon_list_h list, iotcon_list_bool_cb cb, void *u * * @see iotcon_list_foreach_double() */ -typedef int (*iotcon_list_double_cb)(int pos, const double value, void *user_data); +typedef int (*iotcon_list_double_cb)(int pos, double value, void *user_data); /** * @brief Gets all double values of the given list by invoking the callback function. diff --git a/lib/include/iotcon-struct.h b/lib/include/iotcon-struct.h index b1c7879..e3c7f12 100644 --- a/lib/include/iotcon-struct.h +++ b/lib/include/iotcon-struct.h @@ -1181,7 +1181,7 @@ int iotcon_response_set_header_options(iotcon_response_h resp, iotcon_options_h * @see iotcon_response_create() * @see iotcon_response_destroy() */ -int iotcon_response_set_interface(iotcon_response_h resp, int iface); +int iotcon_response_set_interface(iotcon_response_h resp, iotcon_interface_e iface); /** * @brief The handle of device information. diff --git a/lib/include/iotcon.h b/lib/include/iotcon.h index 49f7f93..65b2158 100644 --- a/lib/include/iotcon.h +++ b/lib/include/iotcon.h @@ -223,7 +223,7 @@ typedef void (*iotcon_request_handler_cb)(iotcon_resource_h resource, int iotcon_resource_create(const char *uri_path, iotcon_resource_types_h res_types, int ifaces, - uint8_t properties, + int properties, iotcon_request_handler_cb cb, void *user_data, iotcon_resource_h *resource_handle); @@ -285,7 +285,7 @@ int iotcon_resource_destroy(iotcon_resource_h resource_handle); * @see iotcon_resource_unbind_child_resource() * @see iotcon_request_handler_cb() */ -int iotcon_resource_bind_interface(iotcon_resource_h resource, int iface); +int iotcon_resource_bind_interface(iotcon_resource_h resource, iotcon_interface_e iface); /** * @brief Binds a type to the resource @@ -782,7 +782,7 @@ typedef void (*iotcon_remote_resource_observe_cb)(iotcon_remote_resource_h resou * @see iotcon_resource_notify() */ int iotcon_remote_resource_observer_start(iotcon_remote_resource_h resource, - int observe_type, + iotcon_observe_type_e observe_type, iotcon_query_h query, iotcon_remote_resource_observe_cb cb, void *user_data); @@ -848,7 +848,7 @@ int iotcon_response_send(iotcon_response_h resp); * @see iotcon_remote_resource_observer_stop() * @see iotcon_resource_notify() */ -int iotcon_notimsg_create(iotcon_representation_h repr, int iface, +int iotcon_notimsg_create(iotcon_representation_h repr, iotcon_interface_e iface, iotcon_notimsg_h *notimsg_handle); /**