haiku/headers/private/mail/NodeMessage.h
Alexander G.M. Smith deb238df7d Tried to get MDR to compile under Zeta RC3 but to no avail, with lots of
brick wall collisions.  Along the way I found a few defines that no longer
exist in Haiku - changed B_BEOS_VERSION_DANO to use Haiku versions (anyone
rebuilding under Dano might want to undo it).  By the way, the BeOS version
number define system might be worth using, since it's a numerical compare
rather than #if defined(V1) || defined (V2) || defined (V3) and so on.

What sort of errors?  Besides needing libzeta.so for some things, the
networking compatibility compile doesn't work (libbind and all that).
Some examples among many:

In file included from /boot/home/Haiku/src/kits/mail/numailkit.cpp:14:
/boot/develop/headers/be/support/Autolock.h:3: using directive `BAutolock' introduced ambiguous type `BAutolock'

In file included from /boot/home/Haiku/src/kits/network/compat/libnet/netdebug.c:6:
/boot/home/Haiku/headers/private/net/netdebug.h:32: syntax error before `void'


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-01 23:59:24 +00:00

36 lines
1.2 KiB
C

#ifndef ZOIDBERG_GARGOYLE_NODE_MESSAGE_H
#define ZOIDBERG_GARGOYLE_NODE_MESSAGE_H
/* NodeMessage - "streaming" interface and support functions for BNodes
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
/*
These functions gives a nice BMessage interface to node attributes,
by letting you transfer attributes to and from BMessages. It makes
it so you can use all the convenient Find...() and Add...() functions
provided by BMessage for attributes too. You use it as follows:
BMessage m;
BNode n(path);
if (reading) { n>>m; printf("woohoo=%s\n",m.FindString("woohoo")) }
else { m.AddString("woohoo","it's howdy doody time"); n<<m; }
If there is more than one data item with a given name, the first
item is the one writen to the node.
*/
#include <Node.h>
#include <Message.h>
#if defined(HAIKU_TARGET_PLATFORM_DANO) || defined(HAIKU_TARGET_PLATFORM_HAIKU)
#define _IMPEXP_MAIL
#endif
_IMPEXP_MAIL BNode& operator<<(BNode& n, const BMessage& m);
_IMPEXP_MAIL BNode& operator>>(BNode& n, BMessage& m);
inline const BMessage& operator>>(const BMessage& m, BNode& n){n<<m;return m;}
inline BMessage& operator<<( BMessage& m, BNode& n){n>>m;return m;}
#endif /* ZOIDBERG_GARGOYLE_NODE_MESSAGE_H */