#include <udev_monitor.hpp>
|
| static bool | library_available () |
| | True iff libudev can be loaded right now (Linux dlopen probe).
|
◆ ChangeCallback
◆ UdevMonitor() [1/2]
| pulp::runtime::UdevMonitor::UdevMonitor |
( |
| ) |
|
|
default |
◆ ~UdevMonitor()
| pulp::runtime::UdevMonitor::~UdevMonitor |
( |
| ) |
|
◆ UdevMonitor() [2/2]
| pulp::runtime::UdevMonitor::UdevMonitor |
( |
const UdevMonitor & | | ) |
|
|
delete |
◆ library_available()
| bool pulp::runtime::UdevMonitor::library_available |
( |
| ) |
|
|
static |
True iff libudev can be loaded right now (Linux dlopen probe).
Always false on non-Linux. Cheap; does not start a monitor.
◆ operator=()
◆ running()
| bool pulp::runtime::UdevMonitor::running |
( |
| ) |
const |
|
inline |
◆ start()
| bool pulp::runtime::UdevMonitor::start |
( |
const std::vector< std::string > & | subsystems, |
|
|
ChangeCallback | on_change ) |
Begin watching subsystems (e.g.
{"sound"}). on_change fires on a dedicated monitor thread for each add/remove. Returns false (starting nothing) on non-Linux, when libudev is unavailable, or when the netlink monitor can't be set up. A second start() while running is a no-op false.
◆ stop()
| void pulp::runtime::UdevMonitor::stop |
( |
| ) |
|
Stop the monitor thread and release handles.
Safe when not running and from the destructor; idempotent.
The documentation for this class was generated from the following file: