chromium/device/gamepad/udev_gamepad_linux.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 "device/gamepad/udev_gamepad_linux.h"

#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "device/udev_linux/udev.h"

namespace device {

namespace {

// Extract the device |index| from a device node |path|. The path must begin
// with |prefix| and the remainder of the string must be parsable as an integer.
// Returns true if parsing succeeded.
bool DeviceIndexFromDevicePath(std::string_view path,
                               std::string_view prefix,
                               int* index) {}

// Small helper to avoid constructing a `std::string_view` from nullptr.
std::string_view ToStringView(const char* str) {}

}  // namespace

const char UdevGamepadLinux::kInputSubsystem[] =;
const char UdevGamepadLinux::kHidrawSubsystem[] =;

UdevGamepadLinux::UdevGamepadLinux(Type type,
                                   int index,
                                   std::string_view path,
                                   std::string_view syspath_prefix)
    :{}

// static
std::unique_ptr<UdevGamepadLinux> UdevGamepadLinux::Create(udev_device* dev) {}

}  // namespace device