#include "services/device/serial/serial_device_enumerator_linux.h"
#include <stdint.h>
#include <memory>
#include <string_view>
#include <utility>
#include <vector>
#include "base/check_op.h"
#include "base/files/file_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/threading/scoped_blocking_call.h"
#include "components/device_event_log/device_event_log.h"
#include "device/udev_linux/udev.h"
namespace device {
namespace {
struct SerialDriverInfo { … };
std::vector<SerialDriverInfo> ReadSerialDriverInfo(const base::FilePath& path) { … }
}
std::unique_ptr<SerialDeviceEnumeratorLinux>
SerialDeviceEnumeratorLinux::Create() { … }
SerialDeviceEnumeratorLinux::SerialDeviceEnumeratorLinux(
const base::FilePath& tty_driver_info_path)
: … { … }
SerialDeviceEnumeratorLinux::~SerialDeviceEnumeratorLinux() { … }
void SerialDeviceEnumeratorLinux::OnDeviceAdded(ScopedUdevDevicePtr device) { … }
void SerialDeviceEnumeratorLinux::OnDeviceChanged(ScopedUdevDevicePtr device) { … }
void SerialDeviceEnumeratorLinux::OnDeviceRemoved(ScopedUdevDevicePtr device) { … }
void SerialDeviceEnumeratorLinux::CreatePort(ScopedUdevDevicePtr device,
const std::string& syspath) { … }
}