|
| 1 | +#ifndef BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CLIENT_CONNECTION_HPP_20111103 |
| 2 | +#define BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CLIENT_CONNECTION_HPP_20111103 |
| 3 | + |
| 4 | +// Copyright 2011 Dean Michael Berris <dberris@google.com>. |
| 5 | +// Copyright 2011 Google, Inc. |
| 6 | +// Distributed under the Boost Software License, Version 1.0. |
| 7 | +// (See accompanying file LICENSE_1_0.txt or copy at |
| 8 | +// http://www.boost.org/LICENSE_1_0.txt) |
| 9 | + |
| 10 | +#include <boost/function.hpp> |
| 11 | +#include <boost/range/iterator_range.hpp> |
| 12 | +#include <boost/system/error_code.hpp> |
| 13 | +#include <boost/network/protocol/http/request/request_base.hpp> |
| 14 | +#include <boost/network/protocol/http/response.hpp> |
| 15 | + |
| 16 | +namespace boost { namespace network { namespace http { |
| 17 | + |
| 18 | +struct client_connection { |
| 19 | + typedef function<void(iterator_range<char const *> const &, |
| 20 | + system::error_code const &)> |
| 21 | + callback_type; |
| 22 | + virtual response send_request(std::string const & method, |
| 23 | + request_base const & request, |
| 24 | + bool get_body, |
| 25 | + callback_type callback) = 0; |
| 26 | + virtual void reset() = 0; |
| 27 | + virtual ~client_connection() = 0; |
| 28 | +}; |
| 29 | + |
| 30 | +} /* http */ |
| 31 | + |
| 32 | +} /* network */ |
| 33 | + |
| 34 | +} /* boost */ |
| 35 | + |
| 36 | +#ifdef BOOST_NETWORK_NO_LIB |
| 37 | +#include <boost/network/protocol/http/client/client_connection.ipp> |
| 38 | +#endif |
| 39 | + |
| 40 | +#endif /* BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CLIENT_CONNECTION_HPP_20111103 */ |
0 commit comments