+ * This structure describes the platform properties. All non-Null properties will be included
+ * in a platform discovery request.
+ */
+typedef struct
+{
+ char *platformID;
+ char *manufacturerName;
+ char *manufacturerUrl;
+ char *modelNumber;
+ char *dateOfManufacture;
+ char *platformVersion;
+ char *operatingSystemVersion;
+ char *hardwareVersion;
+ char *firmwareVersion;
+ char *supportUrl;
+ char *systemTime;
+
+} OCPlatformInfo;
+
+/**
+ * This structure is expected as input for device properties.
+ * device name is mandatory and expected from the application.
+ * device id of type UUID will be generated by the stack.
+ */
+typedef struct
+{
+ char *deviceName;
+
+} OCDeviceInfo;
+
+// Enum to describe the type of object held by the OCPayload object
+typedef enum
+{
+ PAYLOAD_TYPE_INVALID,
+ PAYLOAD_TYPE_DISCOVERY,
+ PAYLOAD_TYPE_DEVICE,
+ PAYLOAD_TYPE_PLATFORM,
+ PAYLOAD_TYPE_REPRESENTATION,
+ PAYLOAD_TYPE_SECURITY,
+ PAYLOAD_TYPE_PRESENCE
+} OCPayloadType;
+
+typedef struct
+{
+ // The type of message that was received
+ OCPayloadType type;
+} OCPayload;
+
+typedef enum
+{
+ OCREP_PROP_NULL,
+ OCREP_PROP_INT,
+ OCREP_PROP_DOUBLE,
+ OCREP_PROP_BOOL,
+ OCREP_PROP_STRING,
+ OCREP_PROP_OBJECT,
+ OCREP_PROP_ARRAY
+}OCRepPayloadPropType;
+
+#define MAX_REP_ARRAY_DEPTH 3
+typedef struct
+{
+ OCRepPayloadPropType type;
+ size_t dimensions[MAX_REP_ARRAY_DEPTH];
+
+ union
+ {
+ int64_t* iArray;
+ double* dArray;
+ bool* bArray;
+ char** strArray;
+ struct OCRepPayload** objArray;
+ };
+} OCRepPayloadValueArray;
+
+typedef struct OCRepPayloadValue
+{
+ char* name;
+ OCRepPayloadPropType type;
+ union
+ {
+ int64_t i;
+ double d;
+ bool b;
+ char* str;
+ struct OCRepPayload* obj;
+ OCRepPayloadValueArray arr;
+ };
+ struct OCRepPayloadValue* next;
+
+} OCRepPayloadValue;
+
+typedef struct OCStringLL
+{
+ struct OCStringLL *next;
+ char* value;
+} OCStringLL;
+
+// used for get/set/put/observe/etc representations
+typedef struct OCRepPayload
+{
+ OCPayload base;
+ char* uri;
+ OCStringLL* types;
+ OCStringLL* interfaces;
+ OCRepPayloadValue* values;
+ struct OCRepPayload* next;
+} OCRepPayload;
+
+// used inside a discovery payload
+typedef struct OCResourcePayload
+{
+ char* uri;
+ uint8_t* sid;
+ OCStringLL* types;
+ OCStringLL* interfaces;
+ uint8_t bitmap;
+ bool secure;
+ uint16_t port;
+ struct OCResourcePayload* next;
+} OCResourcePayload;
+
+typedef struct
+{
+ OCPayload base;
+ OCResourcePayload* resources;
+} OCDiscoveryPayload;
+
+typedef struct
+{
+ OCPayload base;
+ char* uri;
+ uint8_t* sid;
+ char* deviceName;
+ char* specVersion;
+ char* dataModelVersion;
+} OCDevicePayload;
+
+typedef struct
+{
+ OCPayload base;
+ char* uri;
+ OCPlatformInfo info;
+} OCPlatformPayload;
+
+typedef struct
+{
+ OCPayload base;
+ char* securityData;
+} OCSecurityPayload;
+#ifdef WITH_PRESENCE
+typedef struct
+{
+ OCPayload base;
+ uint32_t sequenceNumber;
+ uint32_t maxAge;
+ OCPresenceTrigger trigger;
+ char* resourceType;
+} OCPresencePayload;
+#endif
+
+/**