#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 "{\"oic\":["
#define OC_JSON_PREFIX_LEN (sizeof(OC_JSON_PREFIX) - 1)
#define OC_JSON_SUFFIX "]}"
#define OC_JSON_SUFFIX_LEN (sizeof(OC_JSON_SUFFIX) - 1)
* no entity handler.
*/
OCEntityHandlerResult defaultResourceEHandler(OCEntityHandlerFlag flag,
- OCEntityHandlerRequest * request);
+ OCEntityHandlerRequest * request, void* callbackParam);
/**
* Get string value associated with a virtual resource type.
OCServerRequest *request);
/**
- * Internal API used to save all of the device's information for use in device
+ * Internal API used to save all of the platform's information for use in platform
* discovery requests.
*/
-OCStackResult SaveDeviceInfo(OCDeviceInfo deviceInfo);
+OCStackResult SavePlatformInfo(OCPlatformInfo info);
+
+/**
+ * Internal API used to save all of the device's information for use in platform
+ * discovery requests.
+ * The device name is received from the appliation.
+ * The deviceID, spec version and data model verson are initialized by the stack.
+ */
+OCStackResult SaveDeviceInfo(OCDeviceInfo info);
+
+/**
+ * Internal API used to clear the platform information.
+ */
+void DeletePlatformInfo();
/**
* Internal API used to clear the device information.
const char *filterValue,
char * out,
uint16_t *remaining,
- CAConnectivityType_t connType);
+ CATransportAdapter_t adapter);
/**
* A helper function that Maps an @ref OCEntityHandlerResult type to an