#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
+
#include <stdbool.h>
#include <inttypes.h>
#include "octypes.h"
-#ifdef __WITH_TLS__
+#if defined(__WITH_TLS__) || defined(__WITH_DTLS__)
#include "securevirtualresourcetypes.h"
#endif
OCRepPayload* OCRepPayloadClone(const OCRepPayload* payload);
+OCRepPayload* OCRepPayloadBatchClone(const OCRepPayload* repPayload);
+
void OCRepPayloadAppend(OCRepPayload* parent, OCRepPayload* child);
bool OCRepPayloadSetUri(OCRepPayload* payload, const char* uri);
void OCDiscoveryResourceDestroy(OCResourcePayload* payload);
void OCDiscoveryPayloadDestroy(OCDiscoveryPayload* payload);
-// Device Payload
-OCDevicePayload* OCDevicePayloadCreate(const char* sid, const char* dname,
- const OCStringLL *types, const char* specVer, const char* dmVer);
-void OCDevicePayloadDestroy(OCDevicePayload* payload);
-
-// Platform Payload
-OCPlatformPayload* OCPlatformPayloadCreate(const OCPlatformInfo* platformInfo);
-OCPlatformPayload* OCPlatformPayloadCreateAsOwner(OCPlatformInfo* platformInfo);
-void OCPlatformInfoDestroy(OCPlatformInfo *info);
-void OCPlatformPayloadDestroy(OCPlatformPayload* payload);
-
// Presence Payload
OCPresencePayload* OCPresencePayloadCreate(uint32_t seqNum, uint32_t maxAge,
OCPresenceTrigger trigger, const char* resourceType);
/**
* This function creates a string from a list (with separated contents if several)
* @param ll Pointer to list
- * @return newly allocated string
+ * @return newly allocated string. Caller takes ownership and must later free this memory with OICFree.
* @note separator is ',' (according to rfc4180)
**/
char* OCCreateString(const OCStringLL* ll);
+/**
+ * This function copies contents (and allocates if necessary)
+ * @param dest existing bytestring (or null to allocate here)
+ * @param source existing bytestring
+ * @return true of success false on any errors
+ **/
+bool OCByteStringCopy(OCByteString *dest, const OCByteString *source);
+
#ifdef __cplusplus
}
#endif