summaryrefslogtreecommitdiffabout
path: root/include/sitecing/sitecing_interface_cgi.h
Unidiff
Diffstat (limited to 'include/sitecing/sitecing_interface_cgi.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/sitecing_interface_cgi.h62
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
16namespace 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 */