Changed the directory structure, added a build script
[theodwalha.git] / theodwalha / include / module.hpp
blobe1f40e0267e9f1632f24f6dcc5f1651b1f8068ce
1 #pragma once
3 #include <string>
4 #include <boost/function.hpp>
5 #include <theodwalha/request.hpp>
7 namespace request_handler_command
9 enum type
11 continue_processing,
12 stop
16 namespace request_handler_result
18 enum type
20 no_match,
21 success,
22 error
26 namespace request_handler_return_code
28 enum type
30 ok,
31 forbidden,
32 not_found
36 struct module_result
38 request_handler_command::type command;
39 request_handler_result::type result;
40 std::string error_message;
41 request_handler_return_code::type return_code;
43 std::string
44 content_type,
45 content;
47 void success();
48 void text();
49 void html();
50 void set_type(std::string const & new_content_type);
53 typedef void request_handler_function_type(http_request & request, module_result & output);
54 typedef boost::function<request_handler_function_type> request_handler_function;