diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-23 13:16:26 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-12-23 14:43:26 (GMT) |
commit | 491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch) | |
tree | 10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp | |
parent | da7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff) | |
download | swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2 |
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
Diffstat (limited to '3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp | 68 |
1 files changed, 51 insertions, 17 deletions
diff --git a/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp b/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp index 418ea1e..7d0ec9c 100644 --- a/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp +++ b/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp @@ -2,7 +2,7 @@ // windows/stream_handle_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -57,11 +57,18 @@ public: typedef service_impl_type::implementation_type implementation_type; #endif - /// The native handle type. + /// (Deprecated: Use native_handle_type.) The native handle type. #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined native_type; #else - typedef service_impl_type::native_type native_type; + typedef service_impl_type::native_handle_type native_type; +#endif + + /// The native handle type. +#if defined(GENERATING_DOCUMENTATION) + typedef implementation_defined native_handle_type; +#else + typedef service_impl_type::native_handle_type native_handle_type; #endif /// Construct a new stream handle service for the specified io_service. @@ -71,18 +78,29 @@ public: { } - /// Destroy all user-defined handler objects owned by the service. - void shutdown_service() - { - service_impl_.shutdown_service(); - } - /// Construct a new stream handle implementation. void construct(implementation_type& impl) { service_impl_.construct(impl); } +#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Move-construct a new stream handle implementation. + void move_construct(implementation_type& impl, + implementation_type& other_impl) + { + service_impl_.move_construct(impl, other_impl); + } + + /// Move-assign from another stream handle implementation. + void move_assign(implementation_type& impl, + stream_handle_service& other_service, + implementation_type& other_impl) + { + service_impl_.move_assign(impl, other_service.service_impl_, other_impl); + } +#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Destroy a stream handle implementation. void destroy(implementation_type& impl) { @@ -91,9 +109,9 @@ public: /// Assign an existing native handle to a stream handle. boost::system::error_code assign(implementation_type& impl, - const native_type& native_handle, boost::system::error_code& ec) + const native_handle_type& handle, boost::system::error_code& ec) { - return service_impl_.assign(impl, native_handle, ec); + return service_impl_.assign(impl, handle, ec); } /// Determine whether the handle is open. @@ -109,10 +127,16 @@ public: return service_impl_.close(impl, ec); } - /// Get the native handle implementation. + /// (Deprecated: Use native_handle().) Get the native handle implementation. native_type native(implementation_type& impl) { - return service_impl_.native(impl); + return service_impl_.native_handle(impl); + } + + /// Get the native handle implementation. + native_handle_type native_handle(implementation_type& impl) + { + return service_impl_.native_handle(impl); } /// Cancel all asynchronous operations associated with the handle. @@ -133,9 +157,11 @@ public: /// Start an asynchronous write. template <typename ConstBufferSequence, typename WriteHandler> void async_write_some(implementation_type& impl, - const ConstBufferSequence& buffers, WriteHandler handler) + const ConstBufferSequence& buffers, + BOOST_ASIO_MOVE_ARG(WriteHandler) handler) { - service_impl_.async_write_some(impl, buffers, handler); + service_impl_.async_write_some(impl, buffers, + BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); } /// Read some data from the stream. @@ -149,12 +175,20 @@ public: /// Start an asynchronous read. template <typename MutableBufferSequence, typename ReadHandler> void async_read_some(implementation_type& impl, - const MutableBufferSequence& buffers, ReadHandler handler) + const MutableBufferSequence& buffers, + BOOST_ASIO_MOVE_ARG(ReadHandler) handler) { - service_impl_.async_read_some(impl, buffers, handler); + service_impl_.async_read_some(impl, buffers, + BOOST_ASIO_MOVE_CAST(ReadHandler)(handler)); } private: + // Destroy all user-defined handler objects owned by the service. + void shutdown_service() + { + service_impl_.shutdown_service(); + } + // The platform-specific implementation. service_impl_type service_impl_; }; |