Skip to content

Commit d9c30d7

Browse files
committed
Getting the client_constructor_test to compile!
1 parent 3654e3f commit d9c30d7

File tree

7 files changed

+33
-117
lines changed

7 files changed

+33
-117
lines changed

boost/network/message/transformers.hpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <boost/network/message/transformers/selectors.hpp>
1515
#include <boost/network/message/transformers/to_upper.hpp>
1616
#include <boost/network/message/transformers/to_lower.hpp>
17-
17+
#include <boost/network/message/message_base.hpp>
1818
#include <boost/type_traits.hpp>
1919

2020
namespace boost { namespace network {
@@ -37,23 +37,22 @@ namespace boost { namespace network {
3737
};
3838

3939
template <class Algorithm, class Selector>
40-
struct transform_impl : public get_real_algorithm<Algorithm, Selector>::type { };
40+
struct transform_impl : public get_real_algorithm<Algorithm, Selector>::type { };
4141
} // namspace impl
4242

4343
template <class Algorithm, class Selector>
44-
inline impl::transform_impl<Algorithm, Selector>
45-
transform(Algorithm, Selector) {
46-
return impl::transform_impl<Algorithm, Selector>();
47-
}
48-
49-
template <class Tag, class Algorithm, class Selector>
50-
inline basic_message<Tag> &
51-
operator<< (basic_message<Tag> & msg_,
52-
impl::transform_impl<Algorithm, Selector>
53-
const & transformer) {
54-
transformer(msg_);
55-
return msg_;
56-
}
44+
inline impl::transform_impl<Algorithm, Selector>
45+
transform(Algorithm, Selector) {
46+
return impl::transform_impl<Algorithm, Selector>();
47+
}
48+
49+
template <class Algorithm, class Selector>
50+
message_base & operator<< (
51+
message_base & msg_,
52+
impl::transform_impl<Algorithm, Selector> const & transformer) {
53+
transformer(msg_);
54+
return msg_;
55+
}
5756

5857
} // namespace network
5958

boost/network/message/wrappers/headers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <boost/shared_container_iterator.hpp>
1212
#include <boost/range/iterator_range.hpp>
1313
#include <boost/range/functions.hpp>
14-
#include <boost/network/detail/wrapper_base.hpp>
14+
#include <boost/network/message/message_base.hpp>
1515

1616
namespace boost { namespace network {
1717

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
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/response/response_base.hpp>
11+
1012
namespace boost { namespace network { namespace http {
1113

1214
namespace impl {

boost/network/protocol/http/policies/async_connection.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ struct simple_async_connection_manager : connection_manager {
2828
bool follow_redirects,
2929
optional<std::string> openssl_certificate,
3030
optional<std::string> openssl_verify_path);
31+
simple_async_connection_manager(bool cache_resolved,
32+
bool follow_redirects,
33+
std::string const & openssl_certificate,
34+
std::string const & openssl_verify_path);
3135
virtual shared_ptr<client_connection> get_connection(
3236
asio::io_service & service,
3337
request_base const & request); // override
@@ -46,6 +50,10 @@ struct http_1_1_async_connection_manager : connection_manager, enable_shared_fro
4650
bool follow_redirects,
4751
optional<std::string> openssl_certificate,
4852
optional<std::string> openssl_verify_path);
53+
http_1_1_async_connection_manager(bool cache_resolved,
54+
bool follow_redirects,
55+
std::string const & openssl_certificate,
56+
std::string const & openssl_verify_path);
4957
virtual shared_ptr<client_connection> get_connection(
5058
asio::io_service & service,
5159
request_base const & request); // override

libs/network/test/http/client_constructor_test.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,28 @@
77
#define BOOST_TEST_MODULE HTTP 1.0 Client Constructor Test
88
#include <boost/network/include/http/client.hpp>
99
#include <boost/test/unit_test.hpp>
10-
#include "client_types.hpp"
1110

1211
namespace http = boost::network::http;
1312

14-
BOOST_AUTO_TEST_CASE_TEMPLATE(http_client_constructor_test, client, client_types) {
15-
client instance;
13+
BOOST_AUTO_TEST_CASE(http_client_constructor_test) {
14+
http::client instance;
1615
boost::asio::io_service io_service;
17-
client instance2(io_service);
18-
client instance3(http::_io_service=io_service);
16+
http::client instance2(io_service);
17+
http::client instance3(http::_io_service=io_service);
1918
}
2019

21-
BOOST_AUTO_TEST_CASE_TEMPLATE(http_cient_constructor_params_test, client, client_types) {
22-
client instance(
20+
BOOST_AUTO_TEST_CASE(http_cient_constructor_params_test) {
21+
http::client instance(
2322
http::_follow_redirects=true,
2423
http::_cache_resolved=true
2524
);
2625
boost::asio::io_service io_service;
27-
client instance2(
26+
http::client instance2(
2827
http::_follow_redirects=true,
2928
http::_io_service=io_service,
3029
http::_cache_resolved=true
3130
);
32-
client instance3(
31+
http::client instance3(
3332
http::_openssl_certificate="foo",
3433
http::_openssl_verify_path="bar"
3534
);

libs/network/test/http/client_types.hpp

Lines changed: 0 additions & 68 deletions
This file was deleted.

libs/network/test/http/tag_types.hpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)