OSDN Git Service

to-code option.
[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  postFileHtml;
17     ustring  errorHtml;
18     ustring  getML;
19     ustring  postML;
20     ustring  postFileML;
21     size_t  postlimit;
22     size_t  postfilelimit;
23     ustring  mimetype;
24     ustring  ocode;
25     enum {
26         CC_NONE,
27         CC_COOKIE,
28         CC_URL,
29         CC_NOCACHE,
30     }  cacheControl;
31     bool  debugDump;
32
33     AppEnv () {
34         cacheControl = CC_NONE;
35         postlimit = cPOSTLIMITDEFAULT;
36         postfilelimit = cPOSTFILELIMITDEFAULT;
37         debugDump = false;
38     };
39     virtual  ~AppEnv () {};
40
41     virtual void  readOption (int argc, char** argv, MotorEnv* env);
42     virtual void  setDefault ();
43     virtual ustring  scriptName ();
44     virtual void  dump (std::ostream& out);
45     virtual void  setErrorLog (const ustring& path, bool fappend = false);
46 };
47
48 #endif /* APP_H */