[IOT-2511] Get OCResourceHandle from resource
authorMartin Roesch <martin.roesch@kistler.com>
Mon, 17 Jul 2017 11:07:05 +0000 (13:07 +0200)
committerZiran Sun <ziran.sun@samsung.com>
Mon, 11 Sep 2017 09:21:33 +0000 (09:21 +0000)
Implement getResourceHandle() method in RCSResourceObject
to allow the resource to be published to a RD.

Change-Id: I3ea2a162ef1fa9f3beeb65e62a34d571300b8c2e
Signed-off-by: Martin Roesch <martin.roesch@kistler.com>
service/resource-encapsulation/include/RCSResourceObject.h
service/resource-encapsulation/src/serverBuilder/src/RCSResourceObject.cpp

index ff68863..506cd9a 100644 (file)
@@ -558,6 +558,11 @@ namespace OIC
              */
             std::vector< std::string > getTypes() const;
 
+            /**
+             * Returns the resource handle of the resource.
+             */
+             OCResourceHandle getResourceHandle() const;
+
         private:
             RCSResourceObject(const std::string&, uint8_t, RCSResourceAttributes&&);
 
index e2fefd4..bc22c3d 100644 (file)
@@ -543,6 +543,11 @@ namespace OIC
             return m_types;
         }
 
+        OCResourceHandle RCSResourceObject::getResourceHandle() const
+        {
+            return m_resourceHandle;
+        }
+
         RCSRepresentation RCSResourceObject::getRepresentation(const RCSRequest& request) const
         {
             if (request.getOCRequest()->getRequestType() == "GET")