1 |
Douglas Thrift |
27 |
// Host Status |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _HostStatus_hpp_ |
8 |
|
|
#define _HostStatus_hpp_ |
9 |
|
|
|
10 |
|
|
#include <iostream> |
11 |
|
|
#include <string> |
12 |
|
|
#include <sstream> |
13 |
|
|
#include <map> |
14 |
|
|
#include <cstdlib> |
15 |
|
|
#include <ctime> |
16 |
|
|
|
17 |
|
|
#include <pstream.h> |
18 |
|
|
|
19 |
|
|
using namespace std; |
20 |
|
|
using namespace redi; |
21 |
|
|
|
22 |
|
|
inline string sgetenv(const string& name) |
23 |
|
|
{ |
24 |
|
|
char* value = getenv(name.c_str()); |
25 |
|
|
|
26 |
|
|
return value != NULL ? value : ""; |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
inline int sputenv(const string& name) { return putenv(name.c_str()); } |
30 |
|
|
inline void sunsetenv(const string& name) { unsetenv(name.c_str()); } |
31 |
|
|
|
32 |
|
|
class HostStatus |
33 |
|
|
{ |
34 |
|
|
private: |
35 |
|
|
multimap<string, string> cgi; |
36 |
|
|
void parse(); |
37 |
|
|
void mode(); |
38 |
|
|
void display(); |
39 |
|
|
public: |
40 |
|
|
HostStatus(); |
41 |
|
|
~HostStatus() {} |
42 |
|
|
}; |
43 |
|
|
|
44 |
|
|
#endif // _HostStatus_hpp_ |