History log of /haiku/headers/private/kernel/util/KMessage.h
Revision Date Author Comments
# 4d7a736b 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Some more style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34156 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d1fab52 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# 395fb089 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34152 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60bfde6e 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added data accessors for B_POINTER_TYPE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30124 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1209343 10-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Moved KMessage field printing from vfs_boot.cpp::get_boot_partitions() into
KMessage::Dump().
* Improved message dump output a bit (more concise).
* get_boot_partitions() now simply calls KMessage::Dump() instead.
* Added a KMessage::IsEmpty() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26365 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d79c7db 09-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Made Dump() const.
* Removed superfluous whitespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26347 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2d9a4022 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

ReceiveFrom() can now return the message_port_info for the received
message, if desired.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e09769a9 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added Dump() method. It prints some general info and a list of the
message fields, no data, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4bef3723 29-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

* Followed Ingo's suggestion and send the message manually in the runtime loader;
therefore, we could remove the ugly defines from KMessage again, and compile it
with KMESSAGE_CONTAINER_ONLY.
* Added KMessage::SetDeliveryInfo() to be able to send messages with a correct
header.
* Fixed a bug in KMessage::SendTo() that would not send the senderTeam when passing
a negative value for the parameter, but override it when passing in a valid
value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21740 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dad63129 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made header includable by C code. In this case a KMessage structure
with the same size as the class is defined.
* The SetTo() methods do now accept an unspecified (negative) bufferSize
in case of being told to initialize from the given buffer.
* Added handy Get*() methods returning a field element value or a
supplied default value, if the field element doesn't exist.
* Added also handy Set*() methods setting the value of first element of
a field, i.e. adding it, if it didn't exist before, otherwise
replacing the old value. Only for fixed size types.
* Moved _FindType() inline template method into the header.
* Made the source file fit for use in the boot loader. If the macro
KMESSAGE_CONTAINER_ONLY is defined, the message sending/receiving part
is omitted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21605 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5dc45eb4 27-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

* Unified handling of different BMessage formats into MessageAdapter.cpp
* Removed r5_message.cpp and dano_message.cpp accordingly
* Also moved out KMessage handling from Message.cpp to MessageAdapter.cpp
* Fixed some minor style issues in Message.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21514 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea69d9d3 25-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the kMessageHeaderMagic constant into the class. Made BMessage a friend of KMessage.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11059 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e81d2d26 23-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10982 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3a3ddf2 22-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added KMessage, a data container pretty much like BMessage, but
append-only and hence has very compact storage and a comparatively small
footprint implementation. Can be used for kernel->userland messaging.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10958 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4d7a736bbfa17722b92bc4c97f171ec7f3019983 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Some more style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34156 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d1fab522bfcb2635a8071761cebf28963a6bb40 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# 395fb0895f9242f1099faec8f797f97b24c74d16 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34152 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60bfde6e0f125800079da12306e1c041b4dc9fb9 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added data accessors for B_POINTER_TYPE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30124 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1209343884e1b6d0c1bfa79c30e40fdc52bd28b 10-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Moved KMessage field printing from vfs_boot.cpp::get_boot_partitions() into
KMessage::Dump().
* Improved message dump output a bit (more concise).
* get_boot_partitions() now simply calls KMessage::Dump() instead.
* Added a KMessage::IsEmpty() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26365 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d79c7db810628cc4ceb2ebc63e38086f7b703c2 09-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Made Dump() const.
* Removed superfluous whitespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26347 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2d9a40222fccb7e7e1461d40cb4b0e39003a3b8e 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

ReceiveFrom() can now return the message_port_info for the received
message, if desired.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e09769a94c99f86740a654b5cc6973bb96893fff 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added Dump() method. It prints some general info and a list of the
message fields, no data, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4bef3723a183cc1989f8d90308e427243e309d02 29-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

* Followed Ingo's suggestion and send the message manually in the runtime loader;
therefore, we could remove the ugly defines from KMessage again, and compile it
with KMESSAGE_CONTAINER_ONLY.
* Added KMessage::SetDeliveryInfo() to be able to send messages with a correct
header.
* Fixed a bug in KMessage::SendTo() that would not send the senderTeam when passing
a negative value for the parameter, but override it when passing in a valid
value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21740 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dad631290cc197343ef4dcb3065fdfae08b4c6bc 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made header includable by C code. In this case a KMessage structure
with the same size as the class is defined.
* The SetTo() methods do now accept an unspecified (negative) bufferSize
in case of being told to initialize from the given buffer.
* Added handy Get*() methods returning a field element value or a
supplied default value, if the field element doesn't exist.
* Added also handy Set*() methods setting the value of first element of
a field, i.e. adding it, if it didn't exist before, otherwise
replacing the old value. Only for fixed size types.
* Moved _FindType() inline template method into the header.
* Made the source file fit for use in the boot loader. If the macro
KMESSAGE_CONTAINER_ONLY is defined, the message sending/receiving part
is omitted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21605 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5dc45eb4fe439d5f272bbc04f2eae2a31ef9de92 27-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

* Unified handling of different BMessage formats into MessageAdapter.cpp
* Removed r5_message.cpp and dano_message.cpp accordingly
* Also moved out KMessage handling from Message.cpp to MessageAdapter.cpp
* Fixed some minor style issues in Message.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21514 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e05fe1042cce6e00d194a147802d4f9be 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea69d9d35f39f3833eaa6b4ecd4ae10fd39ec643 25-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the kMessageHeaderMagic constant into the class. Made BMessage a friend of KMessage.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11059 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e81d2d26458d7619bb4c4857c75077d5207bedc4 23-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10982 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3a3ddf24640e29463595d6cd412da0628def1d8 22-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added KMessage, a data container pretty much like BMessage, but
append-only and hence has very compact storage and a comparatively small
footprint implementation. Can be used for kernel->userland messaging.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10958 a95241bf-73f2-0310-859d-f6bbb57e9c96