Skip to content

Commit 3312a7b

Browse files
committed
Merge branch '0.8-devel' of git://github.com/mikhailberis/cpp-netlib into xmpp
2 parents 21f56c2 + 3efd6c0 commit 3312a7b

20 files changed

+144
-93
lines changed

boost/network/include/message.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//
99
// This is the modular include file for using the basic message type
1010

11+
#include <boost/network/tags.hpp>
1112
#include <boost/network/message.hpp>
1213

1314
#endif // BOOST_NETWORK_INCLUDE_MESSAGE_HPP_

boost/network/message.hpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef __NETWORK_MESSAGE_HPP__
77
#define __NETWORK_MESSAGE_HPP__
88

9-
#include "boost/network/message_fwd.hpp"
9+
#include <boost/network/message_fwd.hpp>
1010
#include <boost/network/traits/string.hpp>
1111
#include <boost/network/traits/ostringstream.hpp>
1212
#include <boost/network/traits/headers_container.hpp>
@@ -38,7 +38,7 @@ namespace boost { namespace network {
3838
/** The common message type.
3939
*/
4040
template <class Tag>
41-
class basic_message {
41+
struct basic_message {
4242
public:
4343

4444
typedef Tag tag;
@@ -138,9 +138,12 @@ namespace boost { namespace network {
138138
// swap for ADL
139139
left.swap(right);
140140
}
141-
142-
BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_string> >));
143-
BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_wstring> >));
141+
142+
// Commenting this out as we don't need to do this anymore.
143+
// BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_string> >));
144+
// BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_wstring> >));
145+
typedef basic_message<tags::default_string> message;
146+
typedef basic_message<tags::default_wstring> wmessage;
144147

145148
} // namespace network
146149
} // namespace boost

boost/network/message/wrappers/headers.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace boost { namespace network {
2525
};
2626

2727
template <class Tag>
28-
class basic_message;
28+
struct basic_message;
2929

3030
/** headers wrapper for messages.
3131
*

boost/network/message_fwd.hpp

+2-11
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,12 @@
66
#ifndef __2008817MESSAGE_FWD_INC__
77
# define __2008817MESSAGE_FWD_INC__
88

9-
10-
// Includes
11-
# include <boost/network/tags.hpp>
12-
13-
149
namespace boost {
1510
namespace network {
16-
template <
17-
class Tag
18-
>
19-
class basic_message;
2011

12+
template <class Tag>
13+
struct basic_message;
2114

22-
typedef basic_message<tags::default_string> message;
23-
typedef basic_message<tags::default_wstring> wmessage;
2415
} // namespace boost
2516
} // namespace network
2617

boost/network/protocol/http/impl/http_async_connection.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ namespace boost { namespace network { namespace http { namespace impl {
5050
resolve_function resolve,
5151
bool follow_redirect
5252
) :
53+
follow_redirect_(follow_redirect),
5354
resolver_(resolver),
5455
resolve_(resolve),
55-
follow_redirect_(follow_redirect),
5656
request_strand_(new boost::asio::io_service::strand(resolver->get_io_service()))
5757
{}
5858

@@ -303,11 +303,11 @@ namespace boost { namespace network { namespace http { namespace impl {
303303
}
304304
}
305305

306-
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
306+
bool follow_redirect_;
307307
boost::shared_ptr<resolver_type> resolver_;
308308
boost::shared_ptr<boost::asio::ip::tcp::socket> socket_;
309309
resolve_function resolve_;
310-
bool follow_redirect_;
310+
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
311311
string_type command_string_;
312312
string_type method;
313313
};

boost/network/protocol/http/impl/https_async_connection.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ namespace boost { namespace network { namespace http { namespace impl {
3939
bool follow_redirect,
4040
optional<string_type> const & certificate_filename = optional<string_type>()
4141
) :
42+
follow_redirect_(follow_redirect),
4243
resolver_(resolver),
44+
certificate_filename_(certificate_filename),
4345
resolve_(resolve),
44-
follow_redirect_(follow_redirect),
45-
request_strand_(new boost::asio::io_service::strand(resolver->get_io_service())),
46-
certificate_filename_(certificate_filename)
46+
request_strand_(new boost::asio::io_service::strand(resolver->get_io_service()))
4747
{}
4848

4949

@@ -337,13 +337,13 @@ namespace boost { namespace network { namespace http { namespace impl {
337337
}
338338
}
339339

340-
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
340+
bool follow_redirect_;
341341
boost::shared_ptr<resolver_type> resolver_;
342342
optional<string_type> certificate_filename_;
343343
resolve_function resolve_;
344344
boost::shared_ptr<boost::asio::ssl::context> context_;
345345
boost::shared_ptr<boost::asio::ssl::stream<boost::asio::ip::tcp::socket> > socket_;
346-
bool follow_redirect_;
346+
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
347347
string_type command_string_;
348348
string_type method;
349349
};

boost/network/protocol/http/message/wrappers/anchor.hpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/concept/requires.hpp>
11-
1210
namespace boost { namespace network { namespace http {
1311

1412
template <class Tag>
@@ -27,12 +25,8 @@ namespace boost { namespace network { namespace http {
2725
};
2826
}
2927

30-
template <class Message>
31-
struct Request;
32-
3328
template <class Tag> inline
34-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
35-
(impl::anchor_wrapper<Tag>))
29+
impl::anchor_wrapper<Tag>
3630
anchor(basic_request<Tag> const & request) {
3731
return impl::anchor_wrapper<Tag>(request);
3832
}

boost/network/protocol/http/message/wrappers/body.hpp

+3-10
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,16 @@ namespace boost { namespace network { namespace http {
3131

3232
} // namespace impl
3333

34-
template <class R>
35-
struct Response;
36-
37-
template <class R>
38-
struct Request;
39-
4034
template <class Tag>
4135
inline
42-
BOOST_CONCEPT_REQUIRES(((Response<basic_response<Tag> >)),
43-
(typename impl::body_wrapper<basic_response<Tag> >::string_type const))
36+
typename impl::body_wrapper<basic_response<Tag> >::string_type const
4437
body(basic_response<Tag> const & message) {
4538
return impl::body_wrapper<basic_response<Tag> >(message);
4639
}
4740

4841
template <class Tag>
49-
inline BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
50-
(typename impl::body_wrapper<basic_request<Tag> >::string_type const))
42+
inline
43+
typename impl::body_wrapper<basic_request<Tag> >::string_type const
5144
body(basic_request<Tag> const & message) {
5245
return impl::body_wrapper<basic_request<Tag> >(message);
5346
}

boost/network/protocol/http/message/wrappers/helper.hpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// http://www.boost.org/LICENSE_1_0.txt)
88

99
#include <boost/mpl/if.hpp>
10-
#include <boost/concept/requires.hpp>
1110

1211
#ifndef BOOST_NETWORK_DEFINE_HTTP_WRAPPER
1312
#define BOOST_NETWORK_DEFINE_HTTP_WRAPPER(name, accessor, pod_field) \
@@ -48,21 +47,21 @@
4847
: message_(message) {} \
4948
name##_wrapper(name##_wrapper const & other) \
5049
: message_(other.message_) {} \
51-
operator string_type () { \
50+
operator string_type () const { \
5251
return this->get_value(message_); \
5352
} \
5453
}; \
5554
\
5655
template <class Tag> \
57-
inline BOOST_CONCEPT_REQUIRES(((Response<basic_response<Tag> >)), \
58-
(name##_wrapper<basic_response<Tag> > const)) \
56+
inline \
57+
name##_wrapper<basic_response<Tag> > const \
5958
name (basic_response<Tag> const & message) { \
6059
return name##_wrapper<basic_response<Tag> >(message); \
6160
} \
6261
\
6362
template <class Tag> \
64-
inline BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)), \
65-
(name##_wrapper<basic_request<Tag> > const)) \
63+
inline \
64+
name##_wrapper<basic_request<Tag> > const \
6665
name (basic_request<Tag> const & message) { \
6766
return name##_wrapper<basic_request<Tag> >(message); \
6867
}

boost/network/protocol/http/message/wrappers/host.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
3532

3633
template <class Tag>
3734
inline
38-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
39-
(impl::host_wrapper<Tag>))
35+
impl::host_wrapper<Tag>
4036
host(basic_request<Tag> const & request) {
4137
return impl::host_wrapper<Tag>(request);
4238
}

boost/network/protocol/http/message/wrappers/path.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
3532

3633
template <class Tag>
3734
inline
38-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
39-
(impl::path_wrapper<Tag>))
35+
impl::path_wrapper<Tag>
4036
path(basic_request<Tag> const & request) {
4137
return impl::path_wrapper<Tag>(request);
4238
}

boost/network/protocol/http/message/wrappers/port.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
3532

3633
template <class Tag>
3734
inline
38-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
39-
(impl::port_wrapper<Tag>))
35+
impl::port_wrapper<Tag>
4036
port(basic_request<Tag> const & request) {
4137
return impl::port_wrapper<Tag>(request);
4238
}

boost/network/protocol/http/message/wrappers/protocol.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -29,8 +26,7 @@ namespace boost { namespace network { namespace http {
2926
}
3027

3128
template <class Tag> inline
32-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
33-
(impl::protocol_wrapper<Tag>))
29+
impl::protocol_wrapper<Tag>
3430
protocol(basic_request<Tag> const & request) {
3531
return impl::protocol_wrapper<Tag>(request);
3632
}

boost/network/protocol/http/message/wrappers/query.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -36,8 +33,7 @@ namespace boost { namespace network { namespace http {
3633

3734
template <class Tag>
3835
inline
39-
BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
40-
(impl::query_wrapper<Tag>))
36+
impl::query_wrapper<Tag>
4137
query(basic_request<Tag> const & request) {
4238
return impl::query_wrapper<Tag>(request);
4339
}

boost/network/protocol/http/message/wrappers/status.hpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// http://www.boost.org/LICENSE_1_0.txt)
99

1010
#include <boost/cstdint.hpp>
11-
#include <boost/concept/requires.hpp>
1211

1312
namespace boost { namespace network { namespace http {
1413

@@ -41,8 +40,7 @@ namespace boost { namespace network { namespace http {
4140

4241
template <class Tag>
4342
inline
44-
BOOST_CONCEPT_REQUIRES(((Response<basic_response<Tag> >)),
45-
(impl::status_wrapper<Tag>))
43+
impl::status_wrapper<Tag>
4644
status(basic_response<Tag> const & response) {
4745
return impl::status_wrapper<Tag>(response);
4846
}

boost/network/protocol/http/message/wrappers/status_message.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/concept/requires.hpp>
11-
1210
namespace boost { namespace network { namespace http {
1311

1412
template <class Tag>
@@ -39,9 +37,7 @@ namespace boost { namespace network { namespace http {
3937

4038
template <class Tag>
4139
inline
42-
BOOST_CONCEPT_REQUIRES(
43-
((Response<basic_response<Tag> >)),
44-
(impl::status_message_wrapper<Tag>))
40+
impl::status_message_wrapper<Tag>
4541
status_message(basic_response<Tag> const & response) {
4642
return impl::status_message_wrapper<Tag>(response);
4743
}

boost/network/protocol/http/message/wrappers/uri.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -29,8 +26,7 @@ namespace boost { namespace network { namespace http {
2926
}
3027

3128
template <class Tag> inline
32-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
33-
(impl::uri_wrapper<Tag>))
29+
impl::uri_wrapper<Tag>
3430
uri(basic_request<Tag> const & request) {
3531
return impl::uri_wrapper<Tag>(request);
3632
}

boost/network/protocol/http/message/wrappers/version.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/concept/requires.hpp>
11-
1210
namespace boost { namespace network { namespace http {
1311

1412
template <class Tag>
@@ -39,9 +37,7 @@ namespace boost { namespace network { namespace http {
3937

4038
template <class Tag>
4139
inline
42-
BOOST_CONCEPT_REQUIRES(
43-
((Response<basic_response<Tag> >)),
44-
(impl::version_wrapper<Tag>))
40+
impl::version_wrapper<Tag>
4541
version(basic_response<Tag> const & response) {
4642
return impl::version_wrapper<Tag>(response);
4743
}

0 commit comments

Comments
 (0)