(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 b3569777bce7b61609bd8643865bf55db3a0d6ca..9ad38e3ead522e83c37ad1e4cdb62f675aa33558 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 e3f1f01a5865498389b4da850a4d6577165e5807..bbe4ffbd8be3b5356ba83a9a9b938b045d30aeb0 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 157cec969b4a30d91da70fdee452d0772260bd68..61c1802fc9982057ca7286efdd39b0f697145497 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 8524f3f3320963ff331319d611ec7374ce2c5d95..5875be81dda871ea00bff904373fabbb68cea4c3 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 43996072df9c8664e21e5408dc27789af12ac371..c3c62931d8b1299c9fb52d6a12ce8efbbe567d42 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 a6f7bc5d5f24356de9e5c701eddf898a8eb19c40..d43f8fb7a9ed12aee01b3f1f6565300297131f3a 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 4da515956803d4b7628baf8177c4272e9ed10ff0..49dc55065fc37b23530d2b34bc15b91878261d47 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 92c891adfdd18cfd79549994fa5d55027a8b7ae5..3ef24f7fdaf13ba98c953fc6c9e8ba56cdaa7e24 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 76950183b573490a2bef5cb74f38fe3957b4036b..40c0d18652ab8e2d2ca0a19521a9cb26bff7ca01 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 b1c7879a5efd7a687ac4d91cd30aa65db386e7c8..e3c7f12a940e1be8a6be7a62eccbbe875ac0c163 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 49f7f9352d441424eb04e689bab3b9e2ce6daec1..65b215826b8a11262674d7aa65d1b4ab99d6cf27 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);
 
 /**