iotcon_state_h state;
int64_t handle;
unsigned int sub_id;
- bool is_observable;
+ int properties;
};
struct icl_resource resource = {0};
RETV_IF(NULL == lite_resource, IOTCON_ERROR_INVALID_PARAMETER);
- if (false == lite_resource->is_observable)
+ if (false == (IOTCON_OBSERVABLE & lite_resource->properties))
return IOTCON_ERROR_NONE;
resource.handle = lite_resource->handle;
return IOTCON_ERROR_IOTIVITY;
}
- resource->is_observable = properties & IOTCON_OBSERVABLE;
+ resource->properties = properties;
resource->uri_path = ic_utils_strdup(uri_path);
ret = icl_state_clone(state, &(resource->state));
resource->types = icl_resource_types_ref(res_types);
resource->uri_path = ic_utils_strdup(uri_path);
resource->ifaces = ifaces;
- resource->is_observable = properties & IOTCON_OBSERVABLE;
+ resource->properties = properties;
snprintf(sig_name, sizeof(sig_name), "%s_%u", IC_DBUS_SIGNAL_REQUEST_HANDLER,
signal_number);
}
-API int iotcon_resource_is_observable(iotcon_resource_h resource, bool *observable)
+API int iotcon_resource_get_properties(iotcon_resource_h resource, int *properties)
{
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
- RETV_IF(NULL == observable, IOTCON_ERROR_INVALID_PARAMETER);
+ RETV_IF(NULL == properties, IOTCON_ERROR_INVALID_PARAMETER);
- *observable = resource->is_observable;
+ *properties = resource->properties;
return IOTCON_ERROR_NONE;
}
* @see iotcon_resource_get_uri_path()
* @see iotcon_resource_get_types()
* @see iotcon_resource_get_interfaces()
- * @see iotcon_resource_is_observable()
+ * @see iotcon_resource_get_properties()
*/
int iotcon_resource_get_number_of_children(iotcon_resource_h resource, int *number);
* @see iotcon_resource_get_uri_path()
* @see iotcon_resource_get_types()
* @see iotcon_resource_get_interfaces()
- * @see iotcon_resource_is_observable()
+ * @see iotcon_resource_get_properties()
*/
int iotcon_resource_get_nth_child(iotcon_resource_h parent, int index,
iotcon_resource_h *child);
* @see iotcon_resource_get_nth_child()
* @see iotcon_resource_get_types()
* @see iotcon_resource_get_interfaces()
- * @see iotcon_resource_is_observable()
+ * @see iotcon_resource_get_properties()
*/
int iotcon_resource_get_uri_path(iotcon_resource_h resource, char **uri_path);
* @see iotcon_resource_get_nth_child()
* @see iotcon_resource_get_uri_path()
* @see iotcon_resource_get_interfaces()
- * @see iotcon_resource_is_observable()
+ * @see iotcon_resource_get_properties()
*/
int iotcon_resource_get_types(iotcon_resource_h resource, iotcon_resource_types_h *types);
* @see iotcon_resource_get_nth_child()
* @see iotcon_resource_get_uri_path()
* @see iotcon_resource_get_types()
- * @see iotcon_resource_is_observable()
+ * @see iotcon_resource_get_properties()
*/
int iotcon_resource_get_interfaces(iotcon_resource_h resource, int *ifaces);
* @since_tizen 3.0
*
* @param[in] resource The handle of the resource
- * @param[out] observable The value of observable
+ * @param[out] properties The properties of resource
*
* @return 0 on success, otherwise a negative error value.
* @retval #IOTCON_ERROR_NONE Successful
* @see iotcon_resource_get_types()
* @see iotcon_resource_get_interfaces()
*/
-int iotcon_resource_is_observable(iotcon_resource_h resource, bool *observable);
+int iotcon_resource_get_properties(iotcon_resource_h resource, int *properties);
/**
* @}