* Added flag KMESSAGE_CLONE_BUFFER, which will cause buffer passed to SetTo()

to be cloned.
* Added "flags" parameter to the SetTo(const void*,...) version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34155 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-11-20 13:52:23 +00:00
parent aea141f906
commit 0d1fab522b
2 changed files with 38 additions and 7 deletions
+6 -3
View File
@@ -29,7 +29,8 @@ public:
enum {
KMESSAGE_OWNS_BUFFER = 0x01,
KMESSAGE_INIT_FROM_BUFFER = 0x02,
KMESSAGE_READ_ONLY = 0x04,
KMESSAGE_CLONE_BUFFER = 0x04,
KMESSAGE_READ_ONLY = 0x08,
KMESSAGE_FLAG_MASK = 0x07,
};
@@ -42,8 +43,10 @@ public:
status_t SetTo(uint32 what, uint32 flags = 0);
status_t SetTo(void* buffer, int32 bufferSize,
uint32 what, uint32 flags = 0);
status_t SetTo(const void* buffer,
int32 bufferSize = -1);
status_t SetTo(const void* buffer, int32 bufferSize = -1,
uint32 flags = 0);
// KMESSAGE_INIT_FROM_BUFFER and
// KMESSAGE_READ_ONLY are implied
void Unset();
void SetWhat(uint32 what);