-rw-r--r-- | include/sitecing/sitecing_interface_cgi.h | 29 |
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 | |||
@@ -38,3 +38,11 @@ namespace sitecing { | |||
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 | /** |
@@ -50,3 +58,4 @@ namespace sitecing { | |||
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 | */ |
@@ -54,5 +63,17 @@ namespace sitecing { | |||
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 | ||