2015-01-27 06:35:29 -05:00
|
|
|
#ifndef REQUEST_HANDLER_HPP
|
|
|
|
#define REQUEST_HANDLER_HPP
|
2011-01-09 16:42:27 -05:00
|
|
|
|
2013-06-26 19:48:02 -04:00
|
|
|
#include <string>
|
2011-01-09 16:42:27 -05:00
|
|
|
|
2014-05-11 12:03:05 -04:00
|
|
|
template <typename Iterator, class HandlerT> struct APIGrammar;
|
2013-12-16 05:29:38 -05:00
|
|
|
struct RouteParameters;
|
|
|
|
class OSRM;
|
|
|
|
|
2014-05-11 12:03:05 -04:00
|
|
|
namespace http
|
|
|
|
{
|
2015-01-27 05:45:33 -05:00
|
|
|
class reply;
|
|
|
|
struct request;
|
2014-03-03 12:47:34 -05:00
|
|
|
}
|
|
|
|
|
2014-05-07 10:50:48 -04:00
|
|
|
class RequestHandler
|
|
|
|
{
|
2013-12-13 17:26:57 -05:00
|
|
|
|
2014-05-11 12:03:05 -04:00
|
|
|
public:
|
2014-08-19 07:01:38 -04:00
|
|
|
using APIGrammarParser = APIGrammar<std::string::iterator, RouteParameters>;
|
2013-12-13 17:26:57 -05:00
|
|
|
|
|
|
|
RequestHandler();
|
2014-05-07 10:50:48 -04:00
|
|
|
RequestHandler(const RequestHandler &) = delete;
|
2013-12-13 17:26:57 -05:00
|
|
|
|
2015-01-27 05:45:33 -05:00
|
|
|
void handle_request(const http::request ¤t_request, http::reply ¤t_reply);
|
2014-05-11 12:03:05 -04:00
|
|
|
void RegisterRoutingMachine(OSRM *osrm);
|
2013-12-13 17:26:57 -05:00
|
|
|
|
2014-05-11 12:03:05 -04:00
|
|
|
private:
|
|
|
|
OSRM *routing_machine;
|
2011-01-09 16:42:27 -05:00
|
|
|
};
|
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
#endif // REQUEST_HANDLER_HPP
|