History log of /haiku/src/kits/app/MessageUtils.cpp
Revision Date Author Comments
# fe88ae51 29-Aug-2020 John Scipione <jscipione@gmail.com>

AppKit: BMessage Add/Find/Get/Has/ReplaceNodeRef

This allows you to pass node_ref's around like you can entry_ref's.

Added node_ref_flatten(), node_ref_unflatten() and node_ref_swap() to
MessageUtils. These are close cousins to entry_ref_flatten(),
entry_ref_unflatten(), and entry_ref_swap() but for node_ref's.

Added B_NODE_REF_TYPE to TypeConstants.h in the Support Kit.

Added B_NODE_REF_TYPE to Debugger and ByteOrder in Support Kit,
B_NODE_REF_TYPE is treated the same as a B_REF_TYPE (entry_ref).

Add documentation for new NodeRef methods and B_NODE_REF_TYPE.

Change-Id: I32c6ed276bf1a7894a835b9fc9de5a882c35883c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3182
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# ad38b80f 30-Mar-2019 Augustin Cavalier <waddlesplash@gmail.com>

BMessage: Fix R5 checksum calculation on 64-bit.

Change-Id: I0d418883bb66c6ad9e351c955e213f5cbc975e56
Reviewed-on: https://review.haiku-os.org/c/1336
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 5ffbe7d7 30-Mar-2019 Augustin Cavalier <waddlesplash@gmail.com>

Change all references to "__INTEL__" to "__i386__".

They are functionally identical, but the former is a BeOS/Haiku-specfic
macro that we include in the compiler specs, and the latter is defined
by GCC.


# 41975f20 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed gcc 4 32 and 64 bit warnings in the libbe_build code. This time ported
them back to the Haiku versions.


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


# d7a16b23 31-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

* Fully switch to the Haiku message format so that it is also used for on-disk
storage.
* Remove reduntant information from the header (field_count vs. fields_size).
* Remove checksums previously used to validate the message passing by area
mechanism.
* Move variables that are purely used by the instance out of the header and into
the BMessage object.
* Use more sensible types for the different message fields.
* Reduce some field sizes to realistic values.
* Make size_t values into uint32 values so the message format will not change
when later moving to 64 bits.
* Pack the structures used for flat message storage so it doesn't change
because of padding.
* Fix message passing by area. It never worked because the created area was
never actually filled with any data!
* Some more allocation checks with graceful fallbacks (should be all now).
* Some more checks for negative index values (should also be all now).
* Make printing more inline with how the rest of the class works and make some
of the output more consistent.
* Also add the new unsigned types to PrintToStream() output.
* Fix printing of unknown types and invalid BMessages, it would always have
printed only the first entry respectively the same error.
* Added some clarifying comments.
* Cleanup.


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


# 2bf8fb3a 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Putting Message4 into place to become the new BMessage implementation. Will cleanup USING_MESSAGE4 now.

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


# 16ba0dc5 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Removing old BMessage implementation. Message4 will replace it in the next commit.
This will allow to fix message related problems like drag and drop and scripting.

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


# 4ceb1e51 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
to your UserBuildConfig:
AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
target the client handler, while the other will target the preferred handler of the
client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


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


# ae8de521 04-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed an obvious bug in _checksum_() that isn't triggered by its current use:
"temp" was added to "sum" in the loop, so that some int8 values were taken
into account more than once.
Cleanup.


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


# 02043d35 07-Sep-2004 ejakowatz <ejakowatz@nowhere.fake>

Added calc_padding() convenience function for calculating how much padding to add to a buffer in order for it to fall on a specified byte boundary.


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


# 76441bab 15-May-2004 DarkWyrm <darkwyrm@gmail.com>

Add header
Minor tweaks to BClipboard


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


# 3bc6d6c5 04-Jul-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes


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


# 80e96696 23-May-2003 ejakowatz <ejakowatz@nowhere.fake>

Little tweaks and fixes too numerous to count, but mostly involved with
adding entry_refs and BMessages. Lots of stuff for specifiers and also for
sending replies (with thanks to Mike Nordell).


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


# b1055b4c 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

This is all the code for the backing store for BMessage (BMessageBody &
BMessageField) for the "template madness" version. Also included is
BDataBuffer which is a little reference counting raw data container.


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


# 41975f20f06aba8438a5fe5679cfbe7d85b12dd5 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed gcc 4 32 and 64 bit warnings in the libbe_build code. This time ported
them back to the Haiku versions.


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


# d7a16b238f2207547080ea7eb0f4c430b6f25049 31-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

* Fully switch to the Haiku message format so that it is also used for on-disk
storage.
* Remove reduntant information from the header (field_count vs. fields_size).
* Remove checksums previously used to validate the message passing by area
mechanism.
* Move variables that are purely used by the instance out of the header and into
the BMessage object.
* Use more sensible types for the different message fields.
* Reduce some field sizes to realistic values.
* Make size_t values into uint32 values so the message format will not change
when later moving to 64 bits.
* Pack the structures used for flat message storage so it doesn't change
because of padding.
* Fix message passing by area. It never worked because the created area was
never actually filled with any data!
* Some more allocation checks with graceful fallbacks (should be all now).
* Some more checks for negative index values (should also be all now).
* Make printing more inline with how the rest of the class works and make some
of the output more consistent.
* Also add the new unsigned types to PrintToStream() output.
* Fix printing of unknown types and invalid BMessages, it would always have
printed only the first entry respectively the same error.
* Added some clarifying comments.
* Cleanup.


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


# 2bf8fb3a96fb88396d466474b6c66888168376f7 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Putting Message4 into place to become the new BMessage implementation. Will cleanup USING_MESSAGE4 now.

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


# 16ba0dc5ca98127d39c627ae8888ea61d907efc8 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Removing old BMessage implementation. Message4 will replace it in the next commit.
This will allow to fix message related problems like drag and drop and scripting.

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


# 4ceb1e519c0447147b1d8b54a324bb7fedd3a606 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
to your UserBuildConfig:
AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
target the client handler, while the other will target the preferred handler of the
client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


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


# ae8de5211dfa25aa93d1e1d60a6526f4d34e69de 04-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed an obvious bug in _checksum_() that isn't triggered by its current use:
"temp" was added to "sum" in the loop, so that some int8 values were taken
into account more than once.
Cleanup.


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


# 02043d35db79b85ebc1a1a90ba0dfb20901d9d3b 07-Sep-2004 ejakowatz <ejakowatz@nowhere.fake>

Added calc_padding() convenience function for calculating how much padding to add to a buffer in order for it to fall on a specified byte boundary.


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


# 76441bab6ebb9132d0bb0ab623087bd2b9e861e0 15-May-2004 DarkWyrm <darkwyrm@gmail.com>

Add header
Minor tweaks to BClipboard


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


# 3bc6d6c59a84213259bf4179c6296400a1e4cfe9 04-Jul-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes


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


# 80e966963f0265e159d6f964ecb4de54ee1dd678 23-May-2003 ejakowatz <ejakowatz@nowhere.fake>

Little tweaks and fixes too numerous to count, but mostly involved with
adding entry_refs and BMessages. Lots of stuff for specifiers and also for
sending replies (with thanks to Mike Nordell).


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


# b1055b4c2d670294fda455547a84928d9ba18eaa 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

This is all the code for the backing store for BMessage (BMessageBody &
BMessageField) for the "template madness" version. Also included is
BDataBuffer which is a little reference counting raw data container.


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