version 0.1.6
[fms.git] / include / http / ipagehandler.h
diff --git a/include/http/ipagehandler.h b/include/http/ipagehandler.h
new file mode 100644 (file)
index 0000000..7624c4a
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef _ipagehandler_\r
+#define _ipagehandler_\r
+\r
+#include <shttpd.h>\r
+#include <string>\r
+#include <map>\r
+\r
+class IPageHandler\r
+{\r
+public:\r
+\r
+       /**\r
+               \brief Handles request for a page\r
+               \r
+               \return true if request was handled, false if it was ignored\r
+       */\r
+       const bool Handle(shttpd_arg *arg);\r
+\r
+private:\r
+       void HandlePost(shttpd_arg *arg);\r
+       void HadleGet(shttpd_arg *arg);\r
+       virtual const bool WillHandleURI(const std::string &uri)=0;\r
+       virtual const std::string GeneratePage(const std::string &method, const std::map<std::string,std::string> &queryvars)=0;\r
+       \r
+};\r
+\r
+#endif // _ipagehandler_\r