Android-cuttlefish cvd tool
event_devices.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 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
17#pragma once
18
19#include <string>
20#include <vector>
21
28
29namespace cuttlefish {
30
32 public:
33 CvdInputDevicesHandler(InstanceManager& instance_manager);
34
35 Result<void> Handle(const CommandRequest& request) override;
36 std::vector<std::string> CmdList() const override;
37
38 bool RequiresDeviceExists() const override { return true; }
39 std::string SummaryHelp() const override;
40 std::vector<HelpParagraph> Description() const override;
41 Result<std::vector<Flag>> Flags(const CommandRequest& request) override;
42
43 private:
45 std::vector<std::string> args);
47 std::vector<std::string> args);
49 std::vector<std::string> args);
50
52 struct {
53 std::string device_name;
55};
56
57} // namespace cuttlefish
Definition: command_request.h:33
Definition: command_handler.h:28
Definition: event_devices.h:31
InstanceManager & instance_manager_
Definition: event_devices.h:51
std::string SummaryHelp() const override
Definition: event_devices.cpp:122
struct cuttlefish::CvdInputDevicesHandler::@14 flags_
CvdInputDevicesHandler(InstanceManager &instance_manager)
Definition: event_devices.cpp:114
bool RequiresDeviceExists() const override
Definition: event_devices.h:38
Result< std::vector< Flag > > Flags(const CommandRequest &request) override
Definition: event_devices.cpp:156
std::vector< std::string > CmdList() const override
Definition: event_devices.cpp:118
Result< void > ListDevices(const CommandRequest &request, std::vector< std::string > args)
Definition: event_devices.cpp:190
Result< void > Handle(const CommandRequest &request) override
Definition: event_devices.cpp:168
Result< void > InjectEvents(const CommandRequest &request, std::vector< std::string > args)
Definition: event_devices.cpp:240
std::string device_name
Definition: event_devices.h:53
Result< void > CaptureEvents(const CommandRequest &request, std::vector< std::string > args)
Definition: event_devices.cpp:214
std::vector< HelpParagraph > Description() const override
Definition: event_devices.cpp:126
Definition: instance_manager.h:50
Definition: alloc_driver.h:20
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30