Android-cuttlefish cvd tool
stop.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
17#pragma once
18
19#include <string>
20#include <vector>
21
28
29namespace cuttlefish {
30
32 public:
33 CvdStopCommandHandler(InstanceManager& instance_manager);
34
35 Result<void> Handle(const CommandRequest& request) override;
36 std::vector<std::string> CmdList() const override;
37 Result<std::vector<Flag>> Flags(const CommandRequest& request) override;
38
39 std::string SummaryHelp() const override;
40 std::vector<HelpParagraph> Description() const override;
41 bool RequiresDeviceExists() const override { return true; }
42
43 private:
44 struct {
46 bool clear_instance_dirs = false;
48
50};
51
52} // namespace cuttlefish
Definition: command_request.h:33
Definition: command_handler.h:28
std::vector< std::string > CmdList() const override
Definition: stop.cpp:90
bool RequiresDeviceExists() const override
Definition: stop.h:41
std::string SummaryHelp() const override
Definition: stop.cpp:94
CvdStopCommandHandler(InstanceManager &instance_manager)
Definition: stop.cpp:46
struct cuttlefish::CvdStopCommandHandler::@17 flags_
std::vector< HelpParagraph > Description() const override
Definition: stop.cpp:98
Result< std::vector< Flag > > Flags(const CommandRequest &request) override
Definition: stop.cpp:121
size_t wait_for_launcher_secs
Definition: stop.h:45
InstanceManager & instance_manager_
Definition: stop.h:49
Result< void > Handle(const CommandRequest &request) override
Definition: stop.cpp:49
bool clear_instance_dirs
Definition: stop.h:46
Definition: instance_manager.h:50
Definition: alloc_driver.h:20
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30