(ACR) Specify Input parameter data type, clearly
authoryoungman <yman.jung@samsung.com>
Thu, 22 Oct 2015 11:05:19 +0000 (20:05 +0900)
committeryoungman <yman.jung@samsung.com>
Tue, 3 Nov 2015 11:08:20 +0000 (20:08 +0900)
Change-Id: I8d4d9e726d3c84e8e3936e63154c7c09905b4334
Signed-off-by: youngman <yman.jung@samsung.com>
common/ic-dbus.xml
daemon/icd-dbus.c
daemon/icd-ioty.c
daemon/icd-ioty.h
lib/icl-remote-resource-crud.c
lib/icl-request.c
lib/icl-resource.c
lib/icl-response.c
lib/include/iotcon-representation.h
lib/include/iotcon-struct.h
lib/include/iotcon.h

index b356977..9ad38e3 100644 (file)
@@ -4,7 +4,7 @@
                        <arg type="s" name="uri_path" direction="in"/>
                        <arg type="as" name="resource_types" direction="in"/>
                        <arg type="i" name="ifaces" direction="in"/>
-                       <arg type="y" name="properties" direction="in"/>
+                       <arg type="i" name="properties" direction="in"/>
                        <arg type="u" name="signal_number" direction="in"/>
                        <arg type="x" name="resource" direction="out"/>
                </method>
index e3f1f01..bbe4ffb 100644 (file)
@@ -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;
index 157cec9..61c1802 100644 (file)
@@ -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;
index 8524f3f..5875be8 100644 (file)
@@ -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);
 
index 4399607..c3c6293 100644 (file)
@@ -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)
index a6f7bc5..d43f8fb 100644 (file)
@@ -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);
index 4da5159..49dc550 100644 (file)
@@ -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;
index 92c891a..3ef24f7 100644 (file)
@@ -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);
 
index 7695018..40c0d18 100644 (file)
@@ -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.
index b1c7879..e3c7f12 100644 (file)
@@ -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.
index 49f7f93..65b2158 100644 (file)
@@ -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);
 
 /**