ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostStatus/HostStatus.hpp
Revision: 32
Committed: 2003-11-14T23:44:08-08:00 (21 years, 7 months ago) by Douglas Thrift
File size: 806 byte(s)
Log Message:
Everything's coming up roses.

File Contents

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

Properties

Name Value
svn:eol-style native
svn:keywords Id