#include "device/udev_linux/udev_watcher.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/threading/scoped_blocking_call.h"
namespace device {
UdevWatcher::Filter::Filter(std::string_view subsystem_in,
std::string_view devtype_in) { … }
UdevWatcher::Filter::Filter(const Filter&) = default;
UdevWatcher::Filter::~Filter() = default;
const char* UdevWatcher::Filter::devtype() const { … }
const char* UdevWatcher::Filter::subsystem() const { … }
UdevWatcher::Observer::~Observer() = default;
std::unique_ptr<UdevWatcher> UdevWatcher::StartWatching(
Observer* observer,
const std::vector<Filter>& filters) { … }
UdevWatcher::~UdevWatcher() { … }
void UdevWatcher::EnumerateExistingDevices() { … }
UdevWatcher::UdevWatcher(ScopedUdevPtr udev,
ScopedUdevMonitorPtr udev_monitor,
int monitor_fd,
Observer* observer,
const std::vector<Filter>& filters)
: … { … }
void UdevWatcher::OnMonitorReadable() { … }
}