From 082059d40330fb02e36fe22437502f181535f783 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Tue, 17 Dec 2002 01:24:44 +0000 Subject: [PATCH] Checked-in the update Scott Mansfield made to these BNet* classes declarations to male them binary compatible. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2264 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/net/NetAddress.h | 30 ++++++++++++++++-------------- headers/os/net/NetBuffer.h | 25 +++++++++++++++++-------- headers/os/net/NetDebug.h | 2 ++ 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/headers/os/net/NetAddress.h b/headers/os/net/NetAddress.h index 2f8e5ca566..a5baf72df5 100644 --- a/headers/os/net/NetAddress.h +++ b/headers/os/net/NetAddress.h @@ -42,7 +42,7 @@ class BNetAddress : public BArchivable { public: BNetAddress( BMessage* archive ); - virtual ~BNetAddress( void ); + virtual ~BNetAddress(); virtual status_t Archive( BMessage* into, bool deep = true ) const; static BArchivable* Instantiate( BMessage* archive ); @@ -56,7 +56,7 @@ public: BNetAddress& operator=( const BNetAddress& ); - status_t InitCheck( void ); + status_t InitCheck(); status_t SetTo( const char* hostname, const char* protocol, const char* service ); status_t SetTo( const char* hostname = NULL, unsigned short port = 0 ); @@ -68,32 +68,34 @@ public: status_t GetAddr( struct sockaddr_in& sa ) const; status_t GetAddr( in_addr& addr, unsigned short* port = NULL ) const; - inline NLAddress *GetImpl( void ) const; + inline NLAddress *GetImpl() const; protected: -// Attributes. - status_t fInitialized; + status_t m_init; + +private: + virtual void _ReservedBNetAddressFBCCruft1(); + virtual void _ReservedBNetAddressFBCCruft2(); + virtual void _ReservedBNetAddressFBCCruft3(); + virtual void _ReservedBNetAddressFBCCruft4(); + virtual void _ReservedBNetAddressFBCCruft5(); + virtual void _ReservedBNetAddressFBCCruft6(); + +// Private copy helper. + status_t clone( const BNetAddress& RefParam ); - // Class-specific attributes. Basically re-encapsulate the saddr_in - // struct (the POSiX version, hopefully). We can be inheritance-friendly - // here and still not break binary compatibility with R5. int32 fFamily; // Encapsulation of sockaddr::sin_family int32 fPort; // Encapsulation of sockaddr::sin_port int32 fAddress; // Encapsulation of sockaddr::sin_addr.s_addr -private: -// Private copy helper. - status_t clone( const BNetAddress& RefParam ); - // Not used, here to maintain R5 binary compatiblilty. int32 fPrivateData[6]; }; -// WARNING: This method, as it stands, breaks R5 compatibility *STM*. inline NLAddress* BNetAddress::GetImpl( void ) const { - return NULL; // Cheeky, yes; but no Nettle stuff is allowed... + return NULL; } #endif // <-- #ifndef _NETADDRESS_H diff --git a/headers/os/net/NetBuffer.h b/headers/os/net/NetBuffer.h index ec296ff786..30554c16f5 100644 --- a/headers/os/net/NetBuffer.h +++ b/headers/os/net/NetBuffer.h @@ -91,29 +91,38 @@ public: protected: // Attributes. - status_t fInitialized; + status_t m_init; + +private: + virtual void _ReservedBNetBufferFBCCruft1(); + virtual void _ReservedBNetBufferFBCCruft2(); + virtual void _ReservedBNetBufferFBCCruft3(); + virtual void _ReservedBNetBufferFBCCruft4(); + virtual void _ReservedBNetBufferFBCCruft5(); + virtual void _ReservedBNetBufferFBCCruft6(); + unsigned char* fData; int32 fDataSize; int32 fStackSize; int32 fCapacity; - -private: + +// Not used, here to maintain R5 binary compatiblilty. + int32 fPrivateData[5]; + // Private class helpers. status_t clone( const BNetBuffer& ); status_t dpop( int32, int32, void* ); status_t dpush( int32, int32, const void* ); status_t resize( int32 NewSize, bool RegenStack = false ); - -// Not used, here to maintain R5 binary compatiblilty. - int32 fPrivateData[5]; }; -// WARNING: This method, as it stands, breaks R5 compatibility *STM*. inline NLPacket* BNetBuffer::GetImpl( void ) const { - return NULL; // Cheeky, yes; but no Nettle stuff is allowed... + return NULL; } #endif // <-- #ifndef _NETBUFFER_H +/*=------------------------------------------------------------------- End -=*/ + diff --git a/headers/os/net/NetDebug.h b/headers/os/net/NetDebug.h index 176b3a3a10..32e4df1ac5 100644 --- a/headers/os/net/NetDebug.h +++ b/headers/os/net/NetDebug.h @@ -54,3 +54,5 @@ public: #endif // <-- #ifndef _NETDEBUG_H +/*=------------------------------------------------------------------- End -=*/ +