chromium/device/udev_linux/fake_udev_loader.cc

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

#include "device/udev_linux/fake_udev_loader.h"

#include <utility>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/ranges/algorithm.h"

struct udev {};

struct udev_list_entry {};

struct udev_device {};

struct udev_enumerate {};

struct udev_monitor {};

namespace testing {

FakeUdevLoader::FakeUdevLoader() {}

FakeUdevLoader::~FakeUdevLoader() {}

udev_device* FakeUdevLoader::AddFakeDevice(
    std::string name,
    std::string syspath,
    std::string subsystem,
    std::optional<std::string> devnode,
    std::optional<std::string> devtype,
    std::map<std::string, std::string> sysattrs,
    std::map<std::string, std::string> properties) {}

void FakeUdevLoader::Reset() {}

const char* FakeUdevLoader::udev_device_get_action(udev_device* device) {}

const char* FakeUdevLoader::udev_device_get_devnode(udev_device* device) {}

const char* FakeUdevLoader::udev_device_get_devtype(udev_device* device) {}

udev_device* FakeUdevLoader::udev_device_get_parent(udev_device* device) {}

udev_device* FakeUdevLoader::udev_device_get_parent_with_subsystem_devtype(
    udev_device* device,
    const char* subsystem,
    const char* devtype) {}

udev_list_entry* FakeUdevLoader::udev_device_get_properties_list_entry(
    struct udev_device* device) {}

const char* FakeUdevLoader::udev_device_get_property_value(udev_device* device,
                                                           const char* key) {}

const char* FakeUdevLoader::udev_device_get_subsystem(udev_device* device) {}

const char* FakeUdevLoader::udev_device_get_sysattr_value(udev_device* device,
                                                          const char* sysattr) {}

const char* FakeUdevLoader::udev_device_get_sysname(udev_device* device) {}

const char* FakeUdevLoader::udev_device_get_syspath(udev_device* device) {}

udev_device* FakeUdevLoader::udev_device_new_from_devnum(udev* udev_context,
                                                         char type,
                                                         dev_t devnum) {}

udev_device* FakeUdevLoader::udev_device_new_from_subsystem_sysname(
    udev* udev_context,
    const char* subsystem,
    const char* sysname) {}

udev_device* FakeUdevLoader::udev_device_new_from_syspath(udev* udev_context,
                                                          const char* syspath) {}

void FakeUdevLoader::udev_device_unref(udev_device* device) {}

int FakeUdevLoader::udev_enumerate_add_match_subsystem(
    udev_enumerate* enumeration_context,
    const char* subsystem) {}

udev_list_entry* FakeUdevLoader::udev_enumerate_get_list_entry(
    udev_enumerate* enumeration_context) {}

udev_enumerate* FakeUdevLoader::udev_enumerate_new(udev* udev_context) {}

int FakeUdevLoader::udev_enumerate_scan_devices(
    udev_enumerate* enumeration_context) {}

void FakeUdevLoader::udev_enumerate_unref(udev_enumerate* enumeration_context) {}

udev_list_entry* FakeUdevLoader::udev_list_entry_get_next(
    udev_list_entry* list_entry) {}

const char* FakeUdevLoader::udev_list_entry_get_name(
    udev_list_entry* list_entry) {}

int FakeUdevLoader::udev_monitor_enable_receiving(udev_monitor* monitor) {}

int FakeUdevLoader::udev_monitor_filter_add_match_subsystem_devtype(
    udev_monitor* monitor,
    const char* subsystem,
    const char* devtype) {}

int FakeUdevLoader::udev_monitor_get_fd(udev_monitor* monitor) {}

udev_monitor* FakeUdevLoader::udev_monitor_new_from_netlink(udev* udev_context,
                                                            const char* name) {}

udev_device* FakeUdevLoader::udev_monitor_receive_device(
    udev_monitor* monitor) {}

void FakeUdevLoader::udev_monitor_unref(udev_monitor* monitor) {}

udev* FakeUdevLoader::udev_new() {}

void FakeUdevLoader::udev_unref(udev* udev_context) {}

}  // namespace testing