1 |
< |
// Host Update |
2 |
< |
// |
3 |
< |
// Douglas Thrift |
4 |
< |
// |
5 |
< |
// $Id$ |
6 |
< |
|
7 |
< |
#ifndef _HostUpdate_h_ |
8 |
< |
#define _HostUpdate_h_ |
9 |
< |
|
10 |
< |
#include <iostream> |
11 |
< |
#include <cgicc/Cgicc.h> |
12 |
< |
|
13 |
< |
using namespace std; |
14 |
< |
using namespace cgicc; |
15 |
< |
|
16 |
< |
class HostUpdate |
17 |
< |
{ |
18 |
< |
private: |
19 |
< |
Cgicc cgi; |
20 |
< |
public: |
21 |
< |
HostUpdate(); |
22 |
< |
~HostUpdate(); |
23 |
< |
}; |
24 |
< |
|
25 |
< |
#endif // _HostUpdate_h_ |
1 |
> |
// Host Update |
2 |
> |
// |
3 |
> |
// Douglas Thrift |
4 |
> |
// |
5 |
> |
// $Id$ |
6 |
> |
|
7 |
> |
#ifndef _HostUpdate_hpp_ |
8 |
> |
#define _HostUpdate_hpp_ |
9 |
> |
|
10 |
> |
#include <iostream> |
11 |
> |
#include <fstream> |
12 |
> |
#include <string> |
13 |
> |
#include <set> |
14 |
> |
#include <cgicc/Cgicc.h> |
15 |
> |
|
16 |
> |
#include <sys/types.h> |
17 |
> |
#include <sys/stat.h> |
18 |
> |
|
19 |
> |
#ifndef _WIN32 |
20 |
> |
|
21 |
> |
#include <unistd.h> |
22 |
> |
#include <dirent.h> |
23 |
> |
|
24 |
> |
inline int mkdir(const char* path) |
25 |
> |
{ |
26 |
> |
return mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR); |
27 |
> |
} |
28 |
> |
|
29 |
> |
#else |
30 |
> |
|
31 |
> |
#include <direct.h> |
32 |
> |
|
33 |
> |
#endif |
34 |
> |
|
35 |
> |
using namespace std; |
36 |
> |
using namespace cgicc; |
37 |
> |
|
38 |
> |
class HostUpdate |
39 |
> |
{ |
40 |
> |
private: |
41 |
> |
Cgicc cgi; |
42 |
> |
void update(CgiEnvironment& env, const string& agent); |
43 |
> |
void display(CgiEnvironment& env); |
44 |
> |
public: |
45 |
> |
HostUpdate(); |
46 |
> |
~HostUpdate(); |
47 |
> |
}; |
48 |
> |
|
49 |
> |
#endif // _HostUpdate_hpp_ |