4 |
|
// |
5 |
|
// $Id$ |
6 |
|
|
7 |
< |
#ifndef _Host_h_ |
8 |
< |
#define _Host_h_ |
7 |
> |
#ifndef _Host_hpp_ |
8 |
> |
#define _Host_hpp_ |
9 |
|
|
10 |
|
#include "HostUpdate.hpp" |
11 |
|
|
12 |
|
#ifndef _WIN32 |
13 |
|
|
14 |
– |
#include <sys/types.h> |
14 |
|
#include <sys/socket.h> |
15 |
|
#include <netdb.h> |
16 |
|
|
33 |
|
string host; |
34 |
|
string name; |
35 |
|
struct in_addr* address; |
36 |
+ |
string platform; |
37 |
|
public: |
38 |
< |
Host(const string& host = "", const string& name = "", |
39 |
< |
const string& address = ""); |
38 |
> |
Host(const string& host, const string& name = "", const string& address = |
39 |
> |
"", const string& platform = "Unknown"); |
40 |
|
~Host(); |
41 |
|
void setHost(const string& host) { this->host = host; } |
42 |
|
void setName(const string& name, bool lookup = false); |
43 |
|
void setAddress(const string& address, bool lookup = false); |
44 |
+ |
void setPlatform(const string& platform) { this->platform = platform; } |
45 |
|
string getHost() const { return host; } |
46 |
|
string getName() const { return name; } |
47 |
|
string getAddress() const { return inet_ntoa(*address); } |
48 |
+ |
string getPlatform() const { return platform; } |
49 |
|
void operator++(); |
50 |
|
void operator++(int) { operator++(); } |
51 |
|
void operator--(); |
52 |
< |
void operator--(int) { operator++(); } |
52 |
> |
void operator--(int) { operator--(); } |
53 |
|
}; |
54 |
|
|
55 |
< |
#endif // _Host_h_ |
55 |
> |
#endif // _Host_hpp_ |