co_usb
Loading...
Searching...
No Matches
event_handler.hpp
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <libusb.h>
9
#include <stop_token>
10
#include <utility>
11
12
namespace
co_usb::ev::detail
13
{
14
41
template
<
typename
Ty>
42
concept
EventHandler
=
requires
(Ty handler) {
43
{
44
handler.start(std::declval<libusb_context *>(), std::declval<std::stop_token>())
45
} -> std::same_as<bool>;
46
{ handler.ref() }
noexcept
-> std::same_as<void>;
47
{ handler.unref() }
noexcept
-> std::same_as<void>;
48
{ handler.stop() } -> std::same_as<void>;
49
};
50
51
}
// namespace co_usb::ev::detail
co_usb::ev::detail::EventHandler
Concept defining an event handler for libusb.
Definition
event_handler.hpp:42
co_usb::ev::detail
Definition
event_handler.hpp:13
include
co_usb
ev
detail
event_handler.hpp
Generated by
1.9.8