chromium/media/device_monitors/device_monitor_udev.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// libudev is used for monitoring device changes.

#include "media/device_monitors/device_monitor_udev.h"

#include <string>
#include <vector>

#include "base/functional/bind.h"
#include "base/sequence_checker.h"
#include "base/system/system_monitor.h"
#include "base/task/thread_pool.h"
#include "device/udev_linux/udev.h"
#include "device/udev_linux/udev_watcher.h"

namespace {

struct SubsystemMap {};

const char kAudioSubsystem[] =;
const char kVideoSubsystem[] =;

// Add more subsystems here for monitoring.
const SubsystemMap kSubsystemMap[] =;

}  // namespace

namespace media {

// Wraps a device::UdevWatcher with an API that makes it easier to use from
// DeviceMonitorLinux. Since it is essentially a wrapper around blocking udev
// calls, Initialize() must be called from a task runner that can block.
class DeviceMonitorLinux::BlockingTaskRunnerHelper
    : public device::UdevWatcher::Observer {};

DeviceMonitorLinux::BlockingTaskRunnerHelper::BlockingTaskRunnerHelper() {}

void DeviceMonitorLinux::BlockingTaskRunnerHelper::Initialize() {}

void DeviceMonitorLinux::BlockingTaskRunnerHelper::OnDeviceAdded(
    device::ScopedUdevDevicePtr device) {}

void DeviceMonitorLinux::BlockingTaskRunnerHelper::OnDeviceRemoved(
    device::ScopedUdevDevicePtr device) {}

void DeviceMonitorLinux::BlockingTaskRunnerHelper::OnDeviceChanged(
    device::ScopedUdevDevicePtr device) {}

void DeviceMonitorLinux::BlockingTaskRunnerHelper::OnDevicesChanged(
    device::ScopedUdevDevicePtr device) {}

DeviceMonitorLinux::DeviceMonitorLinux()
    :{}

DeviceMonitorLinux::~DeviceMonitorLinux() = default;

}  // namespace media