ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostUpdate/HostUpdate.hpp
(Generate patch)

Comparing HostUpdate/HostUpdate.hpp (file contents):
Revision 2 by Douglas Thrift, 2003-11-05T18:29:00-08:00 vs.
Revision 192 by Douglas Thrift, 2004-08-22T21:23:29-07:00

# Line 1 | Line 1
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 <sstream>
14 > #include <set>
15 > #include <map>
16 > #include <cstdlib>
17 > #include <ctime>
18 > #include <cstring>
19 >
20 > using namespace std;
21 >
22 > extern "C"
23 > {
24 > #include <sys/types.h>
25 > #include <sys/stat.h>
26 > }
27 >
28 > #ifndef _WIN32
29 >
30 > extern "C"
31 > {
32 > #include <unistd.h>
33 > #include <dirent.h>
34 > }
35 >
36 > const char slash = '/';
37 >
38 > inline int mkdir(const char* path)
39 > {
40 >   return mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR);
41 > }
42 >
43 > #else
44 >
45 > #include <direct.h>
46 >
47 > const char slash = '\\';
48 >
49 > #endif
50 >
51 > inline string sgetenv(const string& name)
52 > {
53 >        char* value = getenv(name.c_str());
54 >
55 >        return value != NULL ? value : "";
56 > }
57 >
58 > class Host;
59 >
60 > class HostUpdate
61 > {
62 > private:
63 >        multimap<string, string> cgi;
64 >        bool host;
65 >        bool name;
66 >        bool address;
67 >        bool platform;
68 >        bool since;
69 >        void parse(const string& method);
70 >        void mode();
71 >        void update(const string& agent);
72 >        void display();
73 >        void display(const Host& host);
74 > public:
75 >        HostUpdate();
76 >        ~HostUpdate() {}
77 > };
78 >
79 > #endif // _HostUpdate_hpp_

Comparing HostUpdate/HostUpdate.hpp (property svn:eol-style):
Revision 2 by Douglas Thrift, 2003-11-05T18:29:00-08:00 vs.
Revision 192 by Douglas Thrift, 2004-08-22T21:23:29-07:00

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines