summaryrefslogtreecommitdiffabout
path: root/include/sitecing/sitecing_interface_cgi.h
authorMichael Krelin <hacker@klever.net>2005-01-29 21:21:05 (UTC)
committer Michael Krelin <hacker@klever.net>2005-01-29 21:21:05 (UTC)
commitce1f37aae46ea95020d7b865f7a80e8abdfad0d8 (patch) (side-by-side diff)
tree4964383ab8cd7e6d8ea821f1a615d1bbcf98dad8 /include/sitecing/sitecing_interface_cgi.h
parent3c75c860fc1ad5b3f5185e23ec6f438dd2528958 (diff)
downloadsitecing-ce1f37aae46ea95020d7b865f7a80e8abdfad0d8.zip
sitecing-ce1f37aae46ea95020d7b865f7a80e8abdfad0d8.tar.gz
sitecing-ce1f37aae46ea95020d7b865f7a80e8abdfad0d8.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.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 @@
+#ifndef __SITECING_SITECING_INTERFACE_CGI_H
+#define __SITECING_SITECING_INTERFACE_CGI_H
+
+#include <sstream>
+#include <string>
+#include <map>
+#include "kingate/cgi_gateway.h"
+#include "sitecing/sitecing_interface.h"
+#include "sitecing/sitespace.h"
+
+/**
+ * @file
+ * @brief The sitecing_interface_cgi class declaration.
+ */
+
+namespace sitecing {
+ using namespace std;
+
+ /**
+ * The interface to site-C-ing core for the CGI component.
+ */
+ class sitecing_interface_cgi : public sitecing_interface {
+ public:
+ /**
+ * Pointer to the CGI gateway interface.
+ */
+ kingate::cgi_gateway* cgigw;
+ /**
+ * Type for the map of headers to spit out.
+ */
+ typedef map<string,string> headers_t;
+ /**
+ * The list of headers to spit out.
+ */
+ headers_t headers;
+ /**
+ * Here is where we prebuffer output.
+ */
+ ostringstream prebuffer;
+ /**
+ * Pointer to the sitespace object.
+ */
+ sitespace *ss; // XXX: or does it belong to the generic interface? or should this 'generic' interface exist at all?
+
+ /**
+ * @param s Pointer to the sitespace object.
+ */
+ sitecing_interface_cgi(sitespace *s);
+
+ /**
+ * @todo TODO: wish I could remember -- document me.
+ */
+ void prepare(kingate::cgi_gateway *cg);
+ /**
+ * @todo TODO: wish I could remember -- document me.
+ */
+ void flush();
+
+ };
+}
+
+#endif /* __SITECING_SITECING_INTERFACE_CGI_H */