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 <[email protected]>
This commit is contained in:
John Scipione
2020-09-10 17:18:09 +00:00
committed by Adrien Destugues
parent 19a1dd49cf
commit fe88ae51ec
11 changed files with 288 additions and 7 deletions
+7
View File
@@ -5,15 +5,22 @@
#include <DataIO.h>
#include <Entry.h>
#include <Message.h>
#include <Node.h>
#include <SupportDefs.h>
namespace BPrivate { // Only putting these here because Be did
// entry_ref
status_t entry_ref_flatten(char* buffer, size_t* size, const entry_ref* ref);
status_t entry_ref_unflatten(entry_ref* ref, const char* buffer, size_t size);
status_t entry_ref_swap(char* buffer, size_t size);
// node_ref
status_t node_ref_flatten(char* buffer, size_t* size, const node_ref* ref);
status_t node_ref_unflatten(node_ref* ref, const char* buffer, size_t size);
status_t node_ref_swap(char* buffer, size_t size);
uint32 CalculateChecksum(const uint8 *buffer, int32 size);
} // namespace BPrivate