* BNetworkAddress isn't really BArchivable material, switched to BFlattenable

instead.
* Also actually implemented the serializing functionality this time, as usual
  completely untested, though :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39677 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-11-29 20:29:37 +00:00
parent bf5d40704e
commit e6cec9839d
3 changed files with 64 additions and 31 deletions
+10 -5
View File
@@ -16,7 +16,7 @@
#include <String.h>
class BNetworkAddress : public BArchivable {
class BNetworkAddress : public BFlattenable {
public:
BNetworkAddress();
BNetworkAddress(const char* address,
@@ -38,7 +38,6 @@ public:
BNetworkAddress(const in6_addr& address,
uint16 port = 0);
BNetworkAddress(const BNetworkAddress& other);
BNetworkAddress(BMessage* archive);
virtual ~BNetworkAddress();
status_t InitCheck() const;
@@ -117,12 +116,18 @@ public:
BString HostName() const;
BString ServiceName() const;
virtual status_t Archive(BMessage* into, bool deep = true) const;
static BArchivable* Instantiate(BMessage* archive);
bool Equals(const BNetworkAddress& other,
bool includePort = true) const;
// BFlattenable implementation
virtual bool IsFixedSize() const;
virtual type_code TypeCode() const;
virtual ssize_t FlattenedSize() const;
virtual status_t Flatten(void* buffer, ssize_t size) const;
virtual status_t Unflatten(type_code code, const void* buffer,
ssize_t size);
BNetworkAddress& operator=(const BNetworkAddress& other);
bool operator==(const BNetworkAddress& other) const;