// Host Update // // Douglas Thrift // // $Id$ #ifndef _Host_h_ #define _Host_h_ #include "HostUpdate.hpp" #ifndef _WIN32 #include #include #include #else #include #include typedef unsigned long in_addr_t; #endif class Host { private: #ifdef _WIN32 static unsigned count; static WSADATA data; #endif string host; string name; struct in_addr* address; public: Host(const string& host = "", const string& name = "", const string& address = ""); ~Host(); void setHost(const string& host) { this->host = host; } void setName(const string& name, bool lookup = false); void setAddress(const string& address, bool lookup = false); string getHost() const { return host; } string getName() const { return name; } string getAddress() const { return inet_ntoa(*address); } void operator++(); void operator++(int) { operator++(); } void operator--(); void operator--(int) { operator++(); } }; #endif // _Host_h_