2009-02-20 16:18:44 +01:00
|
|
|
#ifndef http_request_h
|
|
|
|
#define http_request_h
|
|
|
|
extern "C" {
|
|
|
|
#include <oi_socket.h>
|
|
|
|
#include <ebb_request_parser.h>
|
|
|
|
}
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class Connection {
|
|
|
|
public:
|
|
|
|
Connection ( void)
|
|
|
|
{
|
|
|
|
oi_socket_init (&socket, 30.0);
|
|
|
|
ebb_request_parser_init (&parser);
|
|
|
|
}
|
|
|
|
ebb_request_parser parser;
|
|
|
|
oi_socket socket;
|
|
|
|
};
|
|
|
|
|
|
|
|
class HttpRequest {
|
|
|
|
public:
|
2009-02-21 21:00:40 +01:00
|
|
|
HttpRequest (Connection &c) : connection(c) { ebb_request_init(&parser_info); }
|
2009-02-20 16:18:44 +01:00
|
|
|
~HttpRequest() { }
|
|
|
|
|
|
|
|
const string& Path () { return path; }
|
|
|
|
|
|
|
|
string path;
|
|
|
|
|
2009-02-21 21:00:40 +01:00
|
|
|
Connection &connection;
|
2009-02-20 16:18:44 +01:00
|
|
|
ebb_request parser_info;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // http_request_h
|