// read_at.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 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)
#include <boost/asio/detail/config.hpp>
#include <cstddef>
-#include <boost/cstdint.hpp>
+#include <boost/asio/async_result.hpp>
#include <boost/asio/basic_streambuf_fwd.hpp>
+#include <boost/asio/detail/cstdint.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/detail/push_options.hpp>
*/
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers);
+ uint64_t offset, const MutableBufferSequence& buffers);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
*/
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+ uint64_t offset, const MutableBufferSequence& buffers,
boost::system::error_code& ec);
/// Attempt to read a certain amount of data at the specified offset before
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+ uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition);
/// Attempt to read a certain amount of data at the specified offset before
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+ uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, boost::system::error_code& ec);
-#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
*/
template <typename SyncRandomAccessReadDevice, typename Allocator>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b);
+ uint64_t offset, basic_streambuf<Allocator>& b);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
*/
template <typename SyncRandomAccessReadDevice, typename Allocator>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+ uint64_t offset, basic_streambuf<Allocator>& b,
boost::system::error_code& ec);
/// Attempt to read a certain amount of data at the specified offset before
template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+ uint64_t offset, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition);
/// Attempt to read a certain amount of data at the specified offset before
template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+ uint64_t offset, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition, boost::system::error_code& ec);
-#endif // !defined(BOOST_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
/*@}*/
/**
*/
template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d, boost::uint64_t offset,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
const MutableBufferSequence& buffers,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
*/
template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition, typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d,
- boost::uint64_t offset, const MutableBufferSequence& buffers,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
*/
template <typename AsyncRandomAccessReadDevice, typename Allocator,
typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d, boost::uint64_t offset,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
basic_streambuf<Allocator>& b, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
/// Start an asynchronous operation to read a certain amount of data at the
*/
template <typename AsyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition, typename ReadHandler>
-void async_read_at(AsyncRandomAccessReadDevice& d,
- boost::uint64_t offset, basic_streambuf<Allocator>& b,
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-#endif // !defined(BOOST_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
/*@}*/