Android-cuttlefish cvd tool
input_paths_provider.h
Go to the documentation of this file.
1//
2// Copyright (C) 2024 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <vector>
19
23
24namespace cuttlefish {
25
26// Feature that provides access to the connections to the input devices.
27// Such connections are file descriptors over which (virtio_) input events can
28// be written to inject them to the VM and (virtio_) status updates can be read.
29class InputPathsProvider : public virtual SetupFeature {
30 public:
31 virtual ~InputPathsProvider() = default;
32
33 virtual std::string RotaryDevicePath() const = 0;
34 virtual std::string MousePath() const = 0;
35 virtual std::string GamepadPath() const = 0;
36 virtual std::string KeyboardPath() const = 0;
37 virtual std::string SwitchesPath() const = 0;
38 virtual std::vector<std::string> TouchscreenPaths() const = 0;
39 virtual std::vector<std::string> TouchpadPaths() const = 0;
40};
41
42fruit::Component<fruit::Required<const CuttlefishConfig::InstanceSpecific>,
45
46} // namespace cuttlefish
Definition: input_paths_provider.h:29
virtual std::vector< std::string > TouchpadPaths() const =0
virtual std::vector< std::string > TouchscreenPaths() const =0
virtual std::string RotaryDevicePath() const =0
virtual ~InputPathsProvider()=default
virtual std::string GamepadPath() const =0
virtual std::string MousePath() const =0
virtual std::string KeyboardPath() const =0
virtual std::string SwitchesPath() const =0
Definition: log_tee_creator.h:28
Definition: feature.h:48
Definition: alloc_driver.h:20
fruit::Component< fruit::Required< const CuttlefishConfig::InstanceSpecific >, InputPathsProvider, LogTeeCreator > VhostInputDevicesComponent()
Definition: input_paths_provider.cc:337