OSDN Git Service

refresh.
[hmh/hhml.git] / lib / app.h
1 #ifndef APP_H
2 #define APP_H
3
4 #include "config.h"
5 #include "httpconst.h"
6 #include "ustring.h"
7 #include <iostream>
8
9 class  MotorEnv;
10 class  AppEnv {
11  public:
12     ustring  arg0;
13     ustring  datastore;
14     ustring  getHtml;
15     ustring  postHtml;
16     ustring  errorHtml;
17     ustring  getML;
18     ustring  postML;
19     size_t  postlimit;
20     size_t  postfilelimit;
21     ustring  mimetype;
22     bool  postfile;
23     enum {
24         CC_NONE,
25         CC_COOKIE,
26         CC_URL,
27         CC_NOCACHE,
28     }  cacheControl;
29     bool  debugDump;
30
31     AppEnv () {
32         cacheControl = CC_NONE;
33         postlimit = cPOSTLIMITDEFAULT;
34         postfilelimit = cPOSTFILELIMITDEFAULT;
35         postfile = false;
36         debugDump = false;
37     };
38     virtual  ~AppEnv () {};
39
40     virtual void  readOption (int argc, char** argv, MotorEnv* env);
41     virtual void  setDefault ();
42     virtual ustring  scriptName ();
43     virtual void  dump (std::ostream& out);
44 };
45
46 #endif /* APP_H */