14 |
|
#include <set> |
15 |
|
#include <map> |
16 |
|
#include <cstdlib> |
17 |
+ |
#include <ctime> |
18 |
|
|
19 |
|
using namespace std; |
20 |
|
|
26 |
|
#include <unistd.h> |
27 |
|
#include <dirent.h> |
28 |
|
|
29 |
+ |
const char slash = '/'; |
30 |
+ |
|
31 |
|
inline int mkdir(const char* path) |
32 |
|
{ |
33 |
|
return mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR); |
37 |
|
|
38 |
|
#include <direct.h> |
39 |
|
|
40 |
+ |
const char slash = '\\'; |
41 |
+ |
|
42 |
|
#endif |
43 |
|
|
44 |
|
inline string sgetenv(const string& name) |
45 |
|
{ |
46 |
|
char* value = getenv(name.c_str()); |
47 |
< |
|
47 |
> |
|
48 |
|
return value != NULL ? value : ""; |
49 |
|
} |
50 |
|
|
51 |
+ |
class Host; |
52 |
+ |
|
53 |
|
class HostUpdate |
54 |
|
{ |
55 |
|
private: |
57 |
|
void parse(const string& method); |
58 |
|
void update(const string& agent); |
59 |
|
void display(); |
60 |
+ |
void display(const Host& host); |
61 |
|
public: |
62 |
|
HostUpdate(); |
63 |
< |
~HostUpdate(); |
63 |
> |
~HostUpdate() {} |
64 |
|
}; |
65 |
|
|
66 |
|
#endif // _HostUpdate_hpp_ |