Skip to content

Commit db9a234

Browse files
committed
Merge github.com:mikhailberis/cpp-netlib into 0.7-devel
2 parents 5cc4ea3 + 53459a8 commit db9a234

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_REQUEST_CONCEPT_INC__
8+
# define __BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_REQUEST_CONCEPT_INC__
9+
10+
11+
# include <boost/concept_check.hpp>
12+
# include <boost/network/message/message_concept.hpp>
13+
14+
15+
namespace boost {
16+
namespace network {
17+
namespace http {
18+
template <
19+
class R
20+
>
21+
struct Request
22+
: Message<R> {
23+
typedef typename R::string_type string_type;
24+
25+
BOOST_CONCEPT_USAGE(Request) {
26+
27+
string_type uri = request.uri();
28+
string_type method = request.method();
29+
string_type http_version_major = request.http_version_major();
30+
string_type http_version_minor = request.http_version_minor();
31+
32+
(void)uri;
33+
(void)method;
34+
(void)http_version_major;
35+
(void)http_version_minor;
36+
}
37+
38+
private:
39+
40+
R request;
41+
};
42+
} // namespace http
43+
} // namespace network
44+
} // namespace boost
45+
46+
47+
#endif // __BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_REQUEST_CONCEPT_INC__
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_RESPONSE_CONCEPT_INC__
8+
# define __BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_RESPONSE_CONCEPT_INC__
9+
10+
11+
namespace boost {
12+
namespace network {
13+
namespace http {
14+
template <
15+
class R
16+
>
17+
struct Response
18+
: Message<R> {
19+
20+
BOOST_CONCEPT_USAGE(Response) {
21+
22+
// version
23+
// status
24+
// message
25+
}
26+
27+
private:
28+
29+
R response;
30+
};
31+
} // namespace http
32+
} // namespace network
33+
} // namespace boost
34+
35+
36+
#endif // __BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_RESPONSE_CONCEPT_INC__

0 commit comments

Comments
 (0)