+
+ GAddress *GetAddress() const { return m_address; }
+ void SetAddress(GAddress *address);
+
+ // 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;
+
+protected:
+ GAddress *m_address;
+
+private:
+ void Init();
+};
+
+// Interface to an IP address (either IPV4 or IPV6)
+class WXDLLIMPEXP_NET wxIPaddress : public wxSockAddress {
+ DECLARE_ABSTRACT_CLASS(wxIPaddress)
+public:
+ wxIPaddress();
+ wxIPaddress(const wxIPaddress& other);
+ virtual ~wxIPaddress();
+
+ virtual bool Hostname(const wxString& name) = 0;
+ virtual bool Service(const wxString& name) = 0;
+ virtual bool Service(unsigned short port) = 0;
+
+ virtual bool LocalHost() = 0;
+ virtual bool IsLocalHost() const = 0;
+
+ virtual bool AnyAddress() = 0;
+
+ virtual wxString IPAddress() const = 0;
+
+ virtual wxString Hostname() const = 0;
+ virtual unsigned short Service() const = 0;