15 |
|
#include <map> |
16 |
|
#include <cstdlib> |
17 |
|
#include <ctime> |
18 |
+ |
#include <cstring> |
19 |
|
|
20 |
|
using namespace std; |
21 |
|
|
22 |
+ |
extern "C" |
23 |
+ |
{ |
24 |
|
#include <sys/types.h> |
25 |
|
#include <sys/stat.h> |
26 |
+ |
} |
27 |
|
|
28 |
|
#ifndef _WIN32 |
29 |
|
|
30 |
+ |
extern "C" |
31 |
+ |
{ |
32 |
|
#include <unistd.h> |
33 |
|
#include <dirent.h> |
34 |
+ |
} |
35 |
|
|
36 |
|
const char slash = '/'; |
37 |
|
|
55 |
|
return value != NULL ? value : ""; |
56 |
|
} |
57 |
|
|
58 |
+ |
class Host; |
59 |
+ |
|
60 |
|
class HostUpdate |
61 |
|
{ |
62 |
|
private: |
63 |
|
multimap<string, string> cgi; |
64 |
+ |
bool host; |
65 |
+ |
bool name; |
66 |
+ |
bool address; |
67 |
+ |
bool platform; |
68 |
+ |
bool since; |
69 |
|
void parse(const string& method); |
70 |
+ |
void mode(); |
71 |
|
void update(const string& agent); |
72 |
|
void display(); |
73 |
+ |
void display(const Host& host); |
74 |
|
public: |
75 |
|
HostUpdate(); |
76 |
< |
~HostUpdate(); |
76 |
> |
~HostUpdate() {} |
77 |
|
}; |
78 |
|
|
79 |
|
#endif // _HostUpdate_hpp_ |