Menu

[r754]: / framework / branches / refactoring / http_context.cpp  Maximize  Restore  History

Download this file

56 lines (43 with data), 757 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#define CPPCMS_SOURCE
#include "cgi_api.h"
#include "service.h"
#include "http_context.h"
#include "http_request.h"
#include "http_response.h"
namespace cppcms {
namespace http {
struct context::data {
http::request request;
http::response response;
data(context &cntx) :
request(cntx.connection()),
response(cntx)
{
}
};
context::context(impl::cgi::connection *conn) :
conn_(conn)
{
d.reset(new data(*this));
}
context::~context()
{
}
impl::cgi::connection &context::connection()
{
return *conn_;
}
http::request &context::request()
{
return d->request;
}
http::response &context::response()
{
return d->response;
}
cppcms_config const &context::settings()
{
return conn_->service().settings();
}
} // http
} // cppcms
MongoDB Logo MongoDB