chromium/services/device/public/cpp/test/fake_usb_device_info.cc

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

#include "services/device/public/cpp/test/fake_usb_device_info.h"

#include <utility>

#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "services/device/public/cpp/usb/usb_utils.h"

namespace device {

void FakeUsbDeviceInfo::Observer::OnDeviceRemoved(
    scoped_refptr<FakeUsbDeviceInfo> device) {}

FakeUsbDeviceInfo::FakeUsbDeviceInfo(uint16_t usb_version,
                                     uint8_t device_class,
                                     uint8_t device_subclass,
                                     uint8_t device_protocol,
                                     uint16_t device_version,
                                     uint16_t vendor_id,
                                     uint16_t product_id,
                                     uint32_t bus_number,
                                     uint32_t port_number,
                                     const std::string& manufacturer_string,
                                     const std::string& product_string,
                                     const std::string& serial_number) {}

FakeUsbDeviceInfo::FakeUsbDeviceInfo(uint16_t vendor_id,
                                     uint16_t product_id,
                                     const std::string& manufacturer_string,
                                     const std::string& product_string,
                                     const std::string& serial_number)
    :{}

FakeUsbDeviceInfo::FakeUsbDeviceInfo(
    uint16_t vendor_id,
    uint16_t product_id,
    const std::string& manufacturer_string,
    const std::string& product_string,
    const std::string& serial_number,
    std::vector<mojom::UsbConfigurationInfoPtr> configurations)
    :{}

FakeUsbDeviceInfo::FakeUsbDeviceInfo(uint16_t vendor_id,
                                     uint16_t product_id,
                                     const std::string& manufacturer_string,
                                     const std::string& product_string,
                                     const std::string& serial_number,
                                     const GURL& webusb_landing_page)
    :{}

FakeUsbDeviceInfo::FakeUsbDeviceInfo(uint16_t vendor_id, uint16_t product_id)
    :{}

FakeUsbDeviceInfo::FakeUsbDeviceInfo(
    uint16_t vendor_id,
    uint16_t product_id,
    uint8_t device_class,
    std::vector<mojom::UsbConfigurationInfoPtr> configurations)
    :{}

FakeUsbDeviceInfo::~FakeUsbDeviceInfo() = default;

bool FakeUsbDeviceInfo::SetActiveConfig(uint8_t value) {}

void FakeUsbDeviceInfo::AddConfig(mojom::UsbConfigurationInfoPtr config) {}

void FakeUsbDeviceInfo::AddObserver(Observer* observer) {}

void FakeUsbDeviceInfo::RemoveObserver(Observer* observer) {}

void FakeUsbDeviceInfo::NotifyDeviceRemoved() {}

mojom::UsbConfigurationInfoPtr FakeUsbDeviceInfo::CreateConfiguration(
    uint8_t device_class,
    uint8_t subclass_code,
    uint8_t protocol_code,
    uint8_t configuration_value) {}

}  // namespace device