X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9bccf239c1506c7eea0bddea44d9e4b76ad1d93..5cbda74b6606482f5286a5599fc60f3f91995a52:/include/wx/sckaddr.h diff --git a/include/wx/sckaddr.h b/include/wx/sckaddr.h index 3fbb01ce98..09646f4ae0 100644 --- a/include/wx/sckaddr.h +++ b/include/wx/sckaddr.h @@ -1,11 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: sckaddr.h +// Name: wx/sckaddr.h // Purpose: Network address classes // Author: Guilhem Lavaux -// Modified by: +// Modified by: Vadim Zeitlin to switch to wxSockAddressImpl implementation // Created: 26/04/1997 // RCS-ID: $Id$ // Copyright: (c) 1997, 1998 Guilhem Lavaux +// (c) 2008, 2009 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,6 +21,11 @@ class wxSockAddressImpl; +// forward declare it instead of including the system headers defining it which +// can bring in under Windows which we don't want to include from +// public wx headers +struct sockaddr; + // Any socket address kind class WXDLLIMPEXP_NET wxSockAddress : public wxObject { @@ -41,6 +47,10 @@ public: virtual void Clear(); virtual Family Type() = 0; + // accessors for the low level address represented by this object + const sockaddr *GetAddressData() const; + int GetAddressDataLen() const; + // we need to be able to create copies of the addresses polymorphically // (i.e. without knowing the exact address class) virtual wxSockAddress *Clone() const = 0; @@ -128,9 +138,14 @@ public: // IPv4-specific methods: bool Hostname(unsigned long addr); - bool BroadcastAddress(); + // make base class methods hidden by our overload visible + // + // FIXME-VC6: replace this with "using IPAddress::Hostname" (not supported + // by VC6) when support for it is dropped + wxString Hostname() const { return wxIPaddress::Hostname(); } + bool Hostname(const wxString& name) { return wxIPaddress::Hostname(name); } - using wxIPaddress::Hostname; + bool BroadcastAddress(); private: virtual void DoInitImpl();