00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _WEBFORM_H
00021 #define _WEBFORM_H
00022
00023 #ifdef _WIN32
00024 #define STL_USING_STRING
00025 #include <stlhelper.h>
00026 #else
00027 #include <string>
00028 #endif
00029
00030 namespace Cgi {
00031
00032 class Web;
00033 class Form;
00034 class Cookies;
00035
00036
00038
00039 class WebForm
00040 {
00041 public:
00042 WebForm(Web *,const std::string &);
00043 virtual ~WebForm();
00044
00045 virtual void Process() = 0;
00046
00047 virtual void Select(const std::string &) = 0;
00048 virtual void List() = 0;
00049 virtual void Display( long = 0 ) = 0;
00050
00051 Form *GetForm();
00052 Cookies *GetCookies();
00053 std::string GetCgiName();
00054 Web *GetWeb();
00055
00056 std::string GetDate();
00057 std::string GetFormName();
00058 virtual void nbprintf(char *format, ...);
00059 virtual void nbfprintf(FILE *,char *format, ...);
00060 virtual void eprintf(char *format, ...);
00061 void SetContentType(const std::string&);
00062 void SetContentDisposition(const std::string&);
00063 void SetLocation(const std::string&);
00064 std::string GetRequestMethod();
00065
00066 protected:
00067 Web *m_pclWeb;
00068 std::string m_strFormName;
00069
00070 private:
00071 };
00072
00073 }
00074
00075 #endif // _WEBFORM_H