author | Michael Krelin <hacker@klever.net> | 2005-01-29 21:21:05 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-01-29 21:21:05 (UTC) |
commit | ce1f37aae46ea95020d7b865f7a80e8abdfad0d8 (patch) (unidiff) | |
tree | 4964383ab8cd7e6d8ea821f1a615d1bbcf98dad8 /include/sitecing/sitecing_interface_cgi.h | |
parent | 3c75c860fc1ad5b3f5185e23ec6f438dd2528958 (diff) | |
download | sitecing-0.0.zip sitecing-0.0.tar.gz sitecing-0.0.tar.bz2 |
initial commit into repository0.0
Diffstat (limited to 'include/sitecing/sitecing_interface_cgi.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | include/sitecing/sitecing_interface_cgi.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/include/sitecing/sitecing_interface_cgi.h b/include/sitecing/sitecing_interface_cgi.h new file mode 100644 index 0000000..cab947c --- a/dev/null +++ b/include/sitecing/sitecing_interface_cgi.h | |||
@@ -0,0 +1,62 @@ | |||
1 | #ifndef __SITECING_SITECING_INTERFACE_CGI_H | ||
2 | #define __SITECING_SITECING_INTERFACE_CGI_H | ||
3 | |||
4 | #include <sstream> | ||
5 | #include <string> | ||
6 | #include <map> | ||
7 | #include "kingate/cgi_gateway.h" | ||
8 | #include "sitecing/sitecing_interface.h" | ||
9 | #include "sitecing/sitespace.h" | ||
10 | |||
11 | /** | ||
12 | * @file | ||
13 | * @brief The sitecing_interface_cgi class declaration. | ||
14 | */ | ||
15 | |||
16 | namespace sitecing { | ||
17 | using namespace std; | ||
18 | |||
19 | /** | ||
20 | * The interface to site-C-ing core for the CGI component. | ||
21 | */ | ||
22 | class sitecing_interface_cgi : public sitecing_interface { | ||
23 | public: | ||
24 | /** | ||
25 | * Pointer to the CGI gateway interface. | ||
26 | */ | ||
27 | kingate::cgi_gateway* cgigw; | ||
28 | /** | ||
29 | * Type for the map of headers to spit out. | ||
30 | */ | ||
31 | typedef map<string,string> headers_t; | ||
32 | /** | ||
33 | * The list of headers to spit out. | ||
34 | */ | ||
35 | headers_t headers; | ||
36 | /** | ||
37 | * Here is where we prebuffer output. | ||
38 | */ | ||
39 | ostringstream prebuffer; | ||
40 | /** | ||
41 | * Pointer to the sitespace object. | ||
42 | */ | ||
43 | sitespace *ss; // XXX: or does it belong to the generic interface? or should this 'generic' interface exist at all? | ||
44 | |||
45 | /** | ||
46 | * @param s Pointer to the sitespace object. | ||
47 | */ | ||
48 | sitecing_interface_cgi(sitespace *s); | ||
49 | |||
50 | /** | ||
51 | * @todo TODO: wish I could remember -- document me. | ||
52 | */ | ||
53 | void prepare(kingate::cgi_gateway *cg); | ||
54 | /** | ||
55 | * @todo TODO: wish I could remember -- document me. | ||
56 | */ | ||
57 | void flush(); | ||
58 | |||
59 | }; | ||
60 | } | ||
61 | |||
62 | #endif /* __SITECING_SITECING_INTERFACE_CGI_H */ | ||