Update snapshot(2018-01-04)
[platform/upstream/iotivity.git] / resource / csdk / stack / include / internal / ocresourcehandler.h
index 5ae5673..5d2ac03 100644 (file)
 #include "ocstackinternal.h"
 #include "ocserverrequest.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
 /**
  * Common JSON string components used by the stack to build JSON strings.
  * These details are exposed in ocstackconfig.h file in the form of documentation.
@@ -63,14 +67,28 @@ typedef enum
 
     /** "/oic/res/d/type" .*/
     OC_RESOURCE_TYPES_URI,
-
-    #ifdef WITH_PRESENCE
+#ifdef ROUTING_GATEWAY
+    /** "/oic/gateway" .*/
+    OC_GATEWAY_URI,
+#endif
+#ifdef WITH_PRESENCE
     /** "/oic/ad" .*/
     OC_PRESENCE,
-    #endif
+#endif
+
+#ifdef MQ_BROKER
+    /** "/oic/ps" .*/
+    OC_MQ_BROKER_URI,
+#endif
+
+#ifdef TCP_ADAPTER
+    /** "/oic/ping" .*/
+    OC_KEEPALIVE_RESOURCE_URI,
+#endif
 
     /** Max items in the list */
     OC_MAX_VIRTUAL_RESOURCES    //<s Max items in the list
+
 } OCVirtualResources;
 
 /**
@@ -168,14 +186,7 @@ void DeleteDeviceInfo();
  * Prepare payload for resource representation.
  */
 OCStackResult BuildResponseRepresentation(const OCResource *resourcePtr,
-                    OCRepPayload** payload);
-
-/**
- * Prepares a Payload for response.
- */
-OCStackResult BuildVirtualResourceResponse(const OCResource *resourcePtr,
-                                           OCDiscoveryPayload* payload,
-                                           OCDevAddr *endpoint);
+                    OCRepPayload** payload, OCDevAddr *devAddr);
 
 /**
  * A helper function that Maps an @ref OCEntityHandlerResult type to an
@@ -183,5 +194,7 @@ OCStackResult BuildVirtualResourceResponse(const OCResource *resourcePtr,
  */
 OCStackResult EntityHandlerCodeToOCStackCode(OCEntityHandlerResult ehResult);
 
+#ifdef __cplusplus
+}
+#endif // __cplusplus
 #endif //OC_RESOURCEHANDLER_H
-