#include "ocserverrequest.h"
/**
- * Attributes used to form a proper OIC conforming JSON message.
- */
-#define OC_RSRVD_OC "oc"
-#define OC_RSRVD_PAYLOAD "payload"
-#define OC_RSRVD_HREF "href"
-#define OC_RSRVD_PROPERTY "prop"
-#define OC_RSRVD_REPRESENTATION "rep"
-#define OC_RSRVD_CONTENT_TYPE "ct"
-#define OC_RSRVD_RESOURCE_TYPE "rt"
-#define OC_RSRVD_RESOURCE_TYPE_PRESENCE "core.presence"
-#define OC_RSRVD_INTERFACE "if"
-#define OC_RSRVD_DEVICE_ID "di"
-#define OC_RSRVD_DEVICE_NAME "dn"
-#define OC_RSRVD_INTERFACE_DEFAULT "oc.mi.def"
-#define OC_RSRVD_INTERFACE_LL "oc.mi.ll"
-#define OC_RSRVD_INTERFACE_BATCH "oc.mi.b"
-#define OC_RSRVD_INTERFACE_GROUP "oc.mi.grp"
-#define OC_RSRVD_MFG_DATE "mndt"
-#define OC_RSRVD_FW_VERSION "mnfv"
-#define OC_RSRVD_HOST_NAME "hn"
-#define OC_RSRVD_MFG_NAME "mnmn"
-#define OC_RSRVD_MFG_URL "mnml"
-#define OC_RSRVD_MODEL_NUM "mnmo"
-#define OC_RSRVD_PLATFORM_VERSION "mnpv"
-#define OC_RSRVD_SUPPORT_URL "mnsl"
-#define OC_RSRVD_VERSION "icv"
-#define OC_RSRVD_OBSERVABLE "obs"
-#define OC_RSRVD_SECURE "sec"
-#define OC_RSRVD_HOSTING_PORT "port"
-#define OC_RSRVD_SERVER_INSTANCE_ID "sid"
-
-/**
* 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.
+ * Remember to update the documentation there if these are changed.
*/
#define OC_JSON_PREFIX "{\"oc\":["
#define OC_JSON_PREFIX_LEN (sizeof(OC_JSON_PREFIX) - 1)
* Parameter @ref handling returns by-reference the type of resource handling
* required by the internal stack based on the specified @ref request.
*/
-OCStackResult DetermineResourceHandling (OCServerRequest *request,
+OCStackResult DetermineResourceHandling (const OCServerRequest *request,
ResourceHandling *handling,
OCResource **resource);
/**
* Prepares a JSON string for response.
*/
-OCStackResult BuildVirtualResourceResponse(OCResource *resourcePtr,
+OCStackResult BuildVirtualResourceResponse(const OCResource *resourcePtr,
uint8_t filterOn,
- char *filterValue,
+ const char *filterValue,
char * out,
uint16_t *remaining,
- CAConnectivityType_t connType);
+ CATransportType_t connType);
/**
* A helper function that Maps an @ref OCEntityHandlerResult type to an