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.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/include/sitecing/sitecing_interface_cgi.h b/include/sitecing/sitecing_interface_cgi.h
index cab947c..da538d6 100644
--- a/include/sitecing/sitecing_interface_cgi.h
+++ b/include/sitecing/sitecing_interface_cgi.h
@@ -33,30 +33,51 @@ namespace sitecing {
33 * The list of headers to spit out. 33 * The list of headers to spit out.
34 */ 34 */
35 headers_t headers; 35 headers_t headers;
36 /** 36 /**
37 * Here is where we prebuffer output. 37 * Here is where we prebuffer output.
38 */ 38 */
39 ostringstream prebuffer; 39 stringbuf prebuffer;
40 /**
41 * Output stream, initially going to prebuffer.
42 */
43 ostream outs;
44 /**
45 * Have headers been sent yet?
46 */
47 bool headers_flushed;
40 /** 48 /**
41 * Pointer to the sitespace object. 49 * Pointer to the sitespace object.
42 */ 50 */
43 sitespace *ss; // XXX: or does it belong to the generic interface? or should this 'generic' interface exist at all? 51 sitespace *ss; // XXX: or does it belong to the generic interface? or should this 'generic' interface exist at all?
44 52
45 /** 53 /**
46 * @param s Pointer to the sitespace object. 54 * @param s Pointer to the sitespace object.
47 */ 55 */
48 sitecing_interface_cgi(sitespace *s); 56 sitecing_interface_cgi(sitespace *s);
49 57
50 /** 58 /**
51 * @todo TODO: wish I could remember -- document me. 59 * Set up interface for the (possibly, new) cgi gateway object,
60 * reset headers, empty buffer, etc.
52 */ 61 */
53 void prepare(kingate::cgi_gateway *cg); 62 void prepare(kingate::cgi_gateway *cg);
54 /** 63 /**
55 * @todo TODO: wish I could remember -- document me. 64 * Flush output stream.
65 */
66 void flush(bool keep_buffering=false);
67 /**
68 * Send headers to the output stream, if we haven't yet.
69 */
70 void flush_headers();
71 /**
72 * Are we buffering now?
73 */
74 bool is_buffering();
75 /**
76 * Control output buffering.
56 */ 77 */
57 void flush(); 78 void set_buffering(bool do_buffer);
58 79
59 }; 80 };
60} 81}
61 82
62#endif /* __SITECING_SITECING_INTERFACE_CGI_H */ 83#endif /* __SITECING_SITECING_INTERFACE_CGI_H */