3#include "boost/capy/concept/io_awaitable.hpp"
4#include "boost/capy/continuation.hpp"
5#include "boost/capy/ex/io_env.hpp"
8#include <boost/capy/io_result.hpp>
45 boost::capy::io_env
const *env);
47 boost::capy::io_result<hotplug_event, device_ref>
await_resume();
62 boost::capy::io_env
const *io_env =
nullptr;
63 boost::capy::continuation cont;
69static_assert(boost::capy::IoAwaitable<hotplug_awaitable>,
"Not an IoAwaitable");
Definition context.hpp:14
usb_error
Definition error.hpp:10
use_service
Definition context.hpp:17
hotplug_event
enum class wrapper for hotplug events
Definition hotplug.hpp:13
Wrapper for nullable libusb_device that increments ref count on ctor and decrements on dtor.
Definition device_ref.hpp:17
Low-level awaitable primitive for strapping hotplug callbacks to a coroutine ecosystem.
Definition hotplug_awaitable.hpp:27
boost::capy::io_result< hotplug_event, device_ref > await_resume()
Definition hotplug_awaitable.cpp:52
std::coroutine_handle await_suspend(std::coroutine_handle<> h, boost::capy::io_env const *env)
suspends and registers the callback
Definition hotplug_awaitable.cpp:17
bool await_ready() noexcept
Definition hotplug_awaitable.cpp:12