12 #ifndef ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP 13 #define ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP 15 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 17 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 21 #if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \ 22 || defined(GENERATING_DOCUMENTATION) 35 class object_handle_service
36 #if defined(GENERATING_DOCUMENTATION)
43 #if defined(GENERATING_DOCUMENTATION) 50 typedef detail::win_object_handle_service service_impl_type;
54 #if defined(GENERATING_DOCUMENTATION) 55 typedef implementation_defined implementation_type;
57 typedef service_impl_type::implementation_type implementation_type;
61 #if defined(GENERATING_DOCUMENTATION) 62 typedef implementation_defined native_handle_type;
64 typedef service_impl_type::native_handle_type native_handle_type;
69 :
asio::detail::service_base<object_handle_service>(io_service),
70 service_impl_(io_service)
75 void construct(implementation_type& impl)
77 service_impl_.construct(impl);
80 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 81 void move_construct(implementation_type& impl,
83 implementation_type& other_impl)
85 service_impl_.move_construct(impl, other_impl);
89 void move_assign(implementation_type& impl,
90 object_handle_service& other_service,
91 implementation_type& other_impl)
93 service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
95 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 98 void destroy(implementation_type& impl)
100 service_impl_.destroy(impl);
107 return service_impl_.assign(impl, handle, ec);
111 bool is_open(
const implementation_type& impl)
const 113 return service_impl_.is_open(impl);
120 return service_impl_.close(impl, ec);
124 native_handle_type native_handle(implementation_type& impl)
126 return service_impl_.native_handle(impl);
133 return service_impl_.cancel(impl, ec);
139 service_impl_.wait(impl, ec);
143 template <
typename WaitHandler>
146 async_wait(implementation_type& impl,
153 service_impl_.async_wait(impl,
init.handler);
155 return init.result.get();
160 void shutdown_service()
162 service_impl_.shutdown_service();
166 service_impl_type service_impl_;
174 #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) 177 #endif // ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
Class used to uniquely identify a service.
Provides core I/O functionality.
asio::basic_streambuf< Allocator > MatchCondition enable_if< is_match_condition< MatchCondition >::value >::type *detail::async_result_init< ReadHandler, void(asio::error_code, std::size_t)> init(ASIO_MOVE_CAST(ReadHandler)(handler))
ASIO_INITFN_RESULT_TYPE(ComposedConnectHandler, void(asio::error_code, Iterator)) async_connect(basic_socket< Protocol
asio::basic_streambuf< Allocator > CompletionCondition ASIO_MOVE_ARG(ReadHandler) handler)
Class to represent an error code value.
ASIO_DECL int close(int d, state_type &state, asio::error_code &ec)
#define ASIO_MOVE_CAST(type)
Base class for all io_service services.