* See http://iotivity.org and http://openinterconnect.org for more information.
*
* @subsection CAPI_IOT_CONNECTIVITY_MODULE_RESOURCE Resource
- * A Resource is a component in a server that can be viewed and conrolled by another client.\n
+ * A Resource is a component in a server that can be viewed and controlled by another client.\n
* There are different resource types, for example a temperature sensor, a light controller etc.\n
*
* @subsection CAPI_IOT_CONNECTIVITY_MODULE_RESOURCE_REGISTRATION Resource registration
*/
typedef enum {
IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER = 0, /**< Indicates observation request for most up-to-date notifications only */
- IOTCON_OBSERVE_ACCEPT_OUT_OF_ORDER = 1 /**< Indicates observation request for all notifications including stale notifications */
+ IOTCON_OBSERVE_ACCEPT_OUT_OF_ORDER = 1 /**< Indicates observation request for all notifications including state notifications */
} iotcon_observe_policy_e;
/**
return;
}
- ret = itocon_state_set_list(state, "ids", list);
+ ret = iotcon_state_add_list(state, "ids", list);
if (IOTCON_ERROR_NONE != ret) {
iotcon_list_destroy(list);
iotcon_state_destroy(state);
* This API provides that the users manages resources without request handler.
* When client request by CRUD functions, internal default request handler will be invoked.
* The default request handler will create response and send to client automatically.
- * When updated state by iotcon_lite_update_state(), changes will notify to observers.
+ * When updated state by iotcon_lite_resource_update_state(), changes will notify to observers.
*
* Example :
* @code
int ret;
iotcon_resource_h resource = NULL;
iotcon_resource_interfaces_h resource_ifaces = NULL;
- iotcon_resource_interfaces_h resource_types = NULL;
+ iotcon_resource_types_h resource_types = NULL;
ret = iotcon_resource_types_create(&resource_types);
if (IOTCON_ERROR_NONE != ret)
int ret;
iotcon_resource_h resource = NULL;
iotcon_resource_interfaces_h resource_ifaces = NULL;
- iotcon_resource_interfaces_h resource_types = NULL;
+ iotcon_resource_types_h resource_types = NULL;
ret = iotcon_resource_types_create(&resource_types);
if (IOTCON_ERROR_NONE != ret)
int ret;
int properties;
iotcon_resource_interfaces_h resource_ifaces = NULL;
- iotcon_resource_interfaces_h resource_types = NULL;
+ iotcon_resource_types_h resource_types = NULL;
iotcon_resource_h resource_door = NULL;
// 1. create room resource
const char *resource_type);
/**
- * @brief Binds a request handler to the resource.
+ * @brief Sets a request handler to the resource.
* @details When the resource receive CRUD request, iotcon_request_handler_cb() will be
* called.
*
* @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory
*
* @see iotcon_response_destroy()
- * @see iotcon_response_set()
*/
int iotcon_response_create(iotcon_request_h request, iotcon_response_h *response);
* @param[in] resp The handle of the response
*
* @see iotcon_response_create()
- * @see iotcon_response_set()
*/
void iotcon_response_destroy(iotcon_response_h resp);
return;
}
- ret = itocon_state_set_int(state, "brightness", 75);
+ ret = iotcon_state_add_int(state, "brightness", 75);
if (IOTCON_ERROR_NONE != ret) {
iotcon_state_destroy(state);
iotcon_representation_destroy(representation);