Remove unused pkg dependancy
[platform/upstream/iotivity.git] / resource / csdk / stack / include / ocpayload.h
index 95ff3cb..204af4f 100644 (file)
 #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
 
@@ -73,6 +74,8 @@ size_t calcDimTotal(const size_t dimensions[MAX_REP_ARRAY_DEPTH]);
 
 OCRepPayload* OCRepPayloadClone(const OCRepPayload* payload);
 
+OCRepPayload* OCRepPayloadBatchClone(const OCRepPayload* repPayload);
+
 void OCRepPayloadAppend(OCRepPayload* parent, OCRepPayload* child);
 
 bool OCRepPayloadSetUri(OCRepPayload* payload, const char* uri);
@@ -248,17 +251,6 @@ OCResourcePayload* OCDiscoveryPayloadGetResource(OCDiscoveryPayload* payload, si
 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);
@@ -279,11 +271,19 @@ OCStringLL* OCCreateOCStringLL(const char* text);
 /**
  * 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