#include "services/device/generic_sensor/linux/sensor_device_manager.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/threading/scoped_blocking_call.h"
#include "services/device/generic_sensor/linux/sensor_data_linux.h"
#include "services/device/public/cpp/generic_sensor/sensor_reading.h"
namespace device {
namespace {
std::string StringOrEmptyIfNull(const char* value) { … }
}
SensorDeviceManager::SensorDeviceManager(base::WeakPtr<Delegate> delegate)
: … { … }
SensorDeviceManager::~SensorDeviceManager() { … }
void SensorDeviceManager::MaybeStartEnumeration() { … }
std::string SensorDeviceManager::GetUdevDeviceGetSubsystem(udev_device* dev) { … }
std::string SensorDeviceManager::GetUdevDeviceGetSyspath(udev_device* dev) { … }
std::string SensorDeviceManager::GetUdevDeviceGetSysattrValue(
udev_device* dev,
const std::string& attribute) { … }
std::string SensorDeviceManager::GetUdevDeviceGetDevnode(udev_device* dev) { … }
void SensorDeviceManager::OnDeviceAdded(ScopedUdevDevicePtr dev) { … }
void SensorDeviceManager::OnDeviceRemoved(ScopedUdevDevicePtr dev) { … }
void SensorDeviceManager::OnDeviceChanged(ScopedUdevDevicePtr) { … }
}