Remove OC_REST_CANCEL_OBSERVE from OCMethod.
authorZiran Sun <ziran.sun@samsung.com>
Mon, 12 Sep 2016 15:30:24 +0000 (16:30 +0100)
committerAshok Babu Channa <ashok.channa@samsung.com>
Wed, 28 Sep 2016 05:17:06 +0000 (05:17 +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/11703
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/stack/include/octypes.h
resource/csdk/stack/src/ocstack.c
service/resource-directory/src/rd_server.c

index 0864196d66a91e9696701584be6ecb6006d93a67..c38783cb4ad776508a90872d372c92a1b23b3d51 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 b7eef64b7687bf6617213635959da45967343168..fe27059725e33db41582ea38d7ea4d7494bf719f 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 11252d2d51906c9b5de2316bc2fe91fdd8201228..c9c72c280ce02dbe7cbc3791f03d549b92e047e3 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;