CGIFast.h

00001 // $Id: CGIFast.h 21 2010-09-05 04:18:17Z cschwarz1 $
00002 
00003 #ifndef BASE_CGIFAST_H
00004 #define BASE_CGIFAST_H
00005 
00006 #include <fcgiapp.h>
00007 #include "CGI.h"
00008 
00009 namespace base_cgi {
00011 
00015     class PPBASE_CGI_EXPORT CGIFast: public CGI {
00016     public:
00018 
00021         CGIFast(const base::String &program);
00022 
00024         void flush();
00025 
00027 
00032         const char *getenv(const char *var, const char *defval = NULL) const;
00033 
00035 
00038         void init(FCGX_Request *request);
00039 
00041 
00045         void out(const char *s, size_t len = base::String::npos);
00046 
00047     private:
00049 
00052         int inChar();
00053 
00055 
00060         int inLine(char *buf, int len);
00061 
00062         FCGX_Request *_request;   
00063     };
00064 }
00065 
00066 #endif