ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostStatus/HostStatus.hpp
Revision: 34
Committed: 2003-11-15T01:06:43-08:00 (21 years, 7 months ago) by Douglas Thrift
File size: 948 byte(s)
Log Message:
It should work, but it doesn't.

File Contents

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

Properties

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