From: sung.goo.kim Date: Thu, 12 Nov 2015 01:01:22 +0000 (+0900) Subject: Fix enum (IOTCON_OBSERVE -> IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER) X-Git-Tag: submit/tizen/20151130.235229~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bdd0bdfb45a6c2ac32a026114bb92350c5da31cb;p=platform%2Fcore%2Fiot%2Fiotcon.git Fix enum (IOTCON_OBSERVE -> IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER) Change-Id: I27f14b373366414f449d932c064e67d87b96741e --- diff --git a/daemon/icd-ioty.c b/daemon/icd-ioty.c index 981a9fe..331f390 100644 --- a/daemon/icd-ioty.c +++ b/daemon/icd-ioty.c @@ -733,9 +733,9 @@ OCDoHandle icd_ioty_observer_start(GVariant *resource, int observe_type, return NULL; } - if (IOTCON_OBSERVE == observe_type) + if (IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER == observe_type) method = OC_REST_OBSERVE; - else if (IOTCON_OBSERVE_ALL == observe_type) + else if (IOTCON_OBSERVE_ACCEPT_OUT_OF_ORDER == observe_type) method = OC_REST_OBSERVE_ALL; else method = OC_REST_OBSERVE_ALL; diff --git a/doc/iotcon_doc.h b/doc/iotcon_doc.h index 304f13c..48a02b9 100644 --- a/doc/iotcon_doc.h +++ b/doc/iotcon_doc.h @@ -334,7 +334,7 @@ static void _on_resopnse_observe(iotcon_remote_resource_h resource, iotcon_error ... { int ret; - ret = iotcon_remote_resource_set_notify_cb(door_resource, IOTCON_OBSERVE_ALL, NULL, + ret = iotcon_remote_resource_set_notify_cb(door_resource, IOTCON_OBSERVE_ACCEPT_OUT_OF_ORDER, NULL, _on_resopnse_observe, NULL); if (IOTCON_ERROR_NONE != ret) return; diff --git a/lib/icl-remote-resource-caching.c b/lib/icl-remote-resource-caching.c index b8323ee..0ef72fa 100644 --- a/lib/icl-remote-resource-caching.c +++ b/lib/icl-remote-resource-caching.c @@ -275,7 +275,7 @@ static int _caching_observer_start(iotcon_remote_resource_h resource) RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); - ret = icl_remote_resource_observer_start(resource, IOTCON_OBSERVE, NULL, + ret = icl_remote_resource_observer_start(resource, IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER, NULL, _caching_observe_cb, resource, _caching_observe_cleanup, &sub_id, &handle); if (IOTCON_ERROR_NONE != ret) { ERR("icl_remote_resource_observer_start() Fail(%d)", ret); diff --git a/lib/include/iotcon-constant.h b/lib/include/iotcon-constant.h index 322c70c..9c351b5 100644 --- a/lib/include/iotcon-constant.h +++ b/lib/include/iotcon-constant.h @@ -252,8 +252,8 @@ typedef enum { * @since_tizen 3.0 */ typedef enum { - IOTCON_OBSERVE = 0, /**< Indicates observation request for most up-to-date notifications only */ - IOTCON_OBSERVE_ALL = 1 /**< Indicates observation request for all notifications including stale notifications */ + 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_type_e; /** diff --git a/test/iotcon-test-basic-client.c b/test/iotcon-test-basic-client.c index f753e69..1eba3da 100644 --- a/test/iotcon-test-basic-client.c +++ b/test/iotcon-test-basic-client.c @@ -570,7 +570,7 @@ static void _found_resource(iotcon_remote_resource_h resource, iotcon_error_e re } /* Set NOTIFY callback */ - ret = iotcon_remote_resource_set_notify_cb(resource_clone, IOTCON_OBSERVE, NULL, + ret = iotcon_remote_resource_set_notify_cb(resource_clone, IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER, NULL, _on_response, NULL); if (IOTCON_ERROR_NONE != ret) { ERR("iotcon_remote_resource_set_notify_cb() Fail(%d)", ret);