IOTCON_RESPONSE_ERROR, /**< Indicates result of response for something error */
IOTCON_RESPONSE_RESOURCE_CREATED, /**< Indicates result of response for resource has created */
IOTCON_RESPONSE_RESOURCE_DELETED, /**< Indicates result of response for resource has deleted */
+ IOTCON_RESPONSE_RESOURCE_CHANGED, /**< Indicates result of response for resource has changed */
IOTCON_RESPONSE_SLOW, /**< Indicates result of response for slow resource */
IOTCON_RESPONSE_FORBIDDEN, /**< Indicates result of response for accessing unauthorized resource */
} iotcon_response_result_e;
return OC_EH_RESOURCE_CREATED;
case IOTCON_RESPONSE_RESOURCE_DELETED:
return OC_EH_RESOURCE_DELETED;
+ case IOTCON_RESPONSE_RESOURCE_CHANGED:
+ return OC_EH_CHANGED;
case IOTCON_RESPONSE_FORBIDDEN:
return OC_EH_FORBIDDEN;
case IOTCON_RESPONSE_ERROR:
{
switch (result) {
case OC_STACK_OK:
- case OC_STACK_RESOURCE_CHANGED:
return IOTCON_RESPONSE_OK;
case OC_STACK_RESOURCE_CREATED:
return IOTCON_RESPONSE_RESOURCE_CREATED;
case OC_STACK_RESOURCE_DELETED:
return IOTCON_RESPONSE_RESOURCE_DELETED;
+ case OC_STACK_RESOURCE_CHANGED:
+ return IOTCON_RESPONSE_RESOURCE_CHANGED;
case OC_STACK_UNAUTHORIZED_REQ:
return IOTCON_RESPONSE_FORBIDDEN;
case OC_STACK_ERROR:
return;
}
- if (IOTCON_RESPONSE_OK != response_result
- && IOTCON_RESPONSE_RESOURCE_CREATED != response_result) {
+ if (IOTCON_RESPONSE_RESOURCE_CREATED != response_result) {
ERR("_on_response_post Response error(%d)", response_result);
return;
}
return;
}
- if (IOTCON_RESPONSE_OK != response_result) {
+ if (IOTCON_RESPONSE_RESOURCE_CHANGED != response_result) {
ERR("_on_response_put Response error(%d)", response_result);
return;
}