summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp72
1 files changed, 53 insertions, 19 deletions
diff --git a/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp b/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp
index 08cb561..9b5e456 100644
--- a/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp
@@ -2,7 +2,7 @@
// windows/random_access_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)
@@ -59,11 +59,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 random-access handle service for the specified io_service.
@@ -74,18 +81,29 @@ public:
{
}
- /// Destroy all user-defined handler objects owned by the service.
- void shutdown_service()
- {
- service_impl_.shutdown_service();
- }
-
/// Construct a new random-access handle implementation.
void construct(implementation_type& impl)
{
service_impl_.construct(impl);
}
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a new random-access handle implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ service_impl_.move_construct(impl, other_impl);
+ }
+
+ /// Move-assign from another random-access handle implementation.
+ void move_assign(implementation_type& impl,
+ random_access_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 random-access handle implementation.
void destroy(implementation_type& impl)
{
@@ -94,9 +112,9 @@ public:
/// Assign an existing native handle to a random-access 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.
@@ -112,10 +130,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.
@@ -135,10 +159,12 @@ public:
/// Start an asynchronous write at the specified offset.
template <typename ConstBufferSequence, typename WriteHandler>
- void async_write_some_at(implementation_type& impl, boost::uint64_t offset,
- const ConstBufferSequence& buffers, WriteHandler handler)
+ void async_write_some_at(implementation_type& impl,
+ boost::uint64_t offset, const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- service_impl_.async_write_some_at(impl, offset, buffers, handler);
+ service_impl_.async_write_some_at(impl, offset, buffers,
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Read some data from the specified offset.
@@ -151,13 +177,21 @@ public:
/// Start an asynchronous read at the specified offset.
template <typename MutableBufferSequence, typename ReadHandler>
- void async_read_some_at(implementation_type& impl, boost::uint64_t offset,
- const MutableBufferSequence& buffers, ReadHandler handler)
+ void async_read_some_at(implementation_type& impl,
+ boost::uint64_t offset, const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- service_impl_.async_read_some_at(impl, offset, buffers, handler);
+ service_impl_.async_read_some_at(impl, offset, 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_;
};