version 0.1.6
[fms.git] / include / http / ipagehandler.h
1 #ifndef _ipagehandler_\r
2 #define _ipagehandler_\r
3 \r
4 #include <shttpd.h>\r
5 #include <string>\r
6 #include <map>\r
7 \r
8 class IPageHandler\r
9 {\r
10 public:\r
11 \r
12         /**\r
13                 \brief Handles request for a page\r
14                 \r
15                 \return true if request was handled, false if it was ignored\r
16         */\r
17         const bool Handle(shttpd_arg *arg);\r
18 \r
19 private:\r
20         void HandlePost(shttpd_arg *arg);\r
21         void HadleGet(shttpd_arg *arg);\r
22         virtual const bool WillHandleURI(const std::string &uri)=0;\r
23         virtual const std::string GeneratePage(const std::string &method, const std::map<std::string,std::string> &queryvars)=0;\r
24         \r
25 };\r
26 \r
27 #endif  // _ipagehandler_\r