Realistic 3D camera system
3D camera system components
request_handler.hpp
Go to the documentation of this file.
1 //
2 // request_handler.hpp
3 // ~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef HTTP_SERVER3_REQUEST_HANDLER_HPP
12 #define HTTP_SERVER3_REQUEST_HANDLER_HPP
13 
14 #include <string>
15 #include <boost/noncopyable.hpp>
16 
17 namespace http {
18 namespace server3 {
19 
20 struct reply;
21 struct request;
22 
25  : private boost::noncopyable
26 {
27 public:
29  explicit request_handler(const std::string& doc_root);
30 
32  void handle_request(const request& req, reply& rep);
33 
34 private:
36  std::string doc_root_;
37 
40  static bool url_decode(const std::string& in, std::string& out);
41 };
42 
43 } // namespace server3
44 } // namespace http
45 
46 #endif // HTTP_SERVER3_REQUEST_HANDLER_HPP
The common handler for all incoming requests.
request_handler(const std::string &doc_root)
Construct with a directory containing files to be served.
A reply to be sent to a client.
Definition: reply.hpp:23
void handle_request(const request &req, reply &rep)
Handle a request and produce a reply.
A request received from a client.
Definition: request.hpp:22