int ret;
char *resource_uri_path = NULL;
iotcon_resource_types_h resource_types;
+ char *resource_device_id;
+ char *resource_device_name;
+ char *resource_host;
- LOG_DEBUG("thread id : ");
+ LOG_DEBUG("Resource Found");
+ /* get the resource URI */
ret = iotcon_remote_resource_get_uri_path(resource, &resource_uri_path);
if (IOTCON_ERROR_NONE != ret) {
LOG_ERR("Failed to get resource uri path");
return IOTCON_FUNC_CONTINUE;
}
+ LOG_DEBUG("resource uri : %s", resource_uri_path);
+
+ /* get the resource device id */
+ ret = iotcon_remote_resource_get_device_id(resource, &resource_device_id);
+ if (IOTCON_ERROR_NONE != ret) {
+ LOG_ERR("Failed to get resource device id");
+ return IOTCON_FUNC_CONTINUE;
+ }
+ LOG_DEBUG("resource device id : %s", resource_device_id);
+
+ /* get the resource device name */
+ ret = iotcon_remote_resource_get_device_name(resource,
+ &resource_device_name);
+ if (IOTCON_ERROR_NONE != ret) {
+ LOG_ERR("Failed to get resource device name");
+ return IOTCON_FUNC_CONTINUE;
+ }
+ LOG_DEBUG("resource device name : %s", resource_device_name);
+
+ /* get the resource host address */
+ ret = iotcon_remote_resource_get_host_address(resource, &resource_host);
+ if (IOTCON_ERROR_NONE != ret) {
+ LOG_ERR("Failed to get resource host address");
+ return IOTCON_FUNC_CONTINUE;
+ }
+ LOG_DEBUG("resource host : %s", resource_host);
ret = iotcon_remote_resource_get_types(resource, &resource_types);
- LOG_DEBUG("resource uri : %s", resource_uri_path);
+ if (IOTCON_ERROR_NONE != ret) {
+ LOG_ERR("Failed to get resource types");
+ return IOTCON_FUNC_CONTINUE;
+ }
return IOTCON_FUNC_CONTINUE;
}