Remove OC_REST_CANCEL_OBSERVE from OCMethod.
authorZiran Sun <ziran.sun@samsung.com>
Mon, 12 Sep 2016 15:30:24 +0000 (16:30 +0100)
committerZiran Sun <ziran.sun@samsung.com>
Wed, 28 Sep 2016 09:11:53 +0000 (09:11 +0000)
OC_REST_CANCEL_OBSERVE was created for internal uses but
has not been used. Since it is defined as one of OCMethod,
Users attemp to call it in OCDoResrouce(...). OCDoResrouce(...)
is to discover or Perform requests on a specified resource and
OCCancel(...) should be used to cancel the operation supported in
OCDoResource(...).

Bug: https://jira.iotivity.org/browse/IOT-1240
Change-Id: Ie40d8961949f1fa3f0c2c04899c58d6ae62241af
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12329
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/stack/include/octypes.h
resource/csdk/stack/src/ocstack.c
service/resource-directory/src/rd_server.c

index 0864196..c38783c 100644 (file)
@@ -797,9 +797,6 @@ typedef enum
     /** Register observe request for all notifications, including stale notifications.*/
     OC_REST_OBSERVE_ALL    = (1 << 5),
 
-    /** De-register observation, intended for internal use.*/
-    OC_REST_CANCEL_OBSERVE = (1 << 6),
-
 #ifdef WITH_PRESENCE
     /** Subscribe for all presence notifications of a particular resource.*/
     OC_REST_PRESENCE       = (1 << 7),
index f7d5cd1..af53eb9 100644 (file)
@@ -2727,7 +2727,6 @@ OCStackResult OCDoResource(OCDoHandle *handle,
     case OC_REST_GET:
     case OC_REST_OBSERVE:
     case OC_REST_OBSERVE_ALL:
-    case OC_REST_CANCEL_OBSERVE:
         requestInfo.method = CA_GET;
         break;
     case OC_REST_PUT:
index 11252d2..c9c72c2 100644 (file)
@@ -148,7 +148,6 @@ static OCEntityHandlerResult rdEntityHandler(OCEntityHandlerFlag flag,
             case OC_REST_DELETE:
             case OC_REST_OBSERVE:
             case OC_REST_OBSERVE_ALL:
-            case OC_REST_CANCEL_OBSERVE:
             case OC_REST_PRESENCE:
             case OC_REST_NOMETHOD:
                 break;