00001
00002
00003 #ifndef BASE_CGISTD_H
00004 #define BASE_CGISTD_H
00005
00006 #include "CGI.h"
00007
00008 namespace base_cgi {
00010
00014 class PPBASE_CGI_EXPORT CGIStd: public CGI {
00015 public:
00017
00020 CGIStd(const base::String &program);
00021
00023
00027 void exec(const base::String &qstr, const base::String &prog);
00028
00030 void flush();
00031
00033
00038 const char *getenv(const char *var, const char *defval = NULL) const;
00039
00041
00045 void out(const char *s, size_t len = base::String::npos);
00046
00048
00051 void setOutput(std::ostream *os);
00052
00053 private:
00055
00058 int inChar();
00059
00061
00066 int inLine(char *buf, int len);
00067
00068 std::ostream *_out;
00069 };
00070 }
00071
00072 #endif