connectivity_type validation check when creating remote resource 81/79781/3
authorDonghee Ye <donghee.ye@samsung.com>
Wed, 13 Jul 2016 02:14:26 +0000 (11:14 +0900)
committerDonghee Ye <donghee.ye@samsung.com>
Wed, 13 Jul 2016 05:22:07 +0000 (14:22 +0900)
Change-Id: Ifd1fd169f646cccf74a3f2e3d63bd031f8f27a36

lib/icl-remote-resource.c
lib/include/iotcon-remote-resource.h

index 1cba6ed..94c01a1 100644 (file)
@@ -88,6 +88,8 @@ API int iotcon_remote_resource_create(const char *host_address,
        RETV_IF(NULL == resource_types, IOTCON_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == resource_ifaces, IOTCON_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == resource_handle, IOTCON_ERROR_INVALID_PARAMETER);
+       RETVM_IF(IOTCON_CONNECTIVITY_ALL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER,
+               "Should use specific connectivity type of the remote resource");
 
        resource = calloc(1, sizeof(struct icl_remote_resource));
        if (NULL == resource) {
index 505a67d..ee9eaea 100644 (file)
@@ -124,7 +124,10 @@ static void _find_light_resource()
  * if @a remote_resource is no longer needed.
  *
  * @param[in] host_address The host address of the resource
- * @param[in] connectivity_type The connectivity type
+ * @param[in] connectivity_type The connectivity type. Can not use @a IOTCON_CONNECTIVITY_ALL. \n
+ * Connectivity type of specific remote resource(It has specific host address, not @a IOTCON_MULTICAST_ADDRESS) is already decided. \n
+ * Use specific connectivity type of the remote resource. \n
+ * You can refer to the @a iotcon_remote_resource_get_connectivity_type().
  * @param[in] uri_path The URI path of the resource
  * @param[in] policies The policies of the resource\n Set of #iotcon_resource_policy_e
  * @param[in] resource_types The resource types of the resource. For example, "core.light"