Android-cuttlefish cvd tool
snapshot.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 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
25
26namespace cuttlefish {
27
29 public:
31
32 Result<void> Handle(const CommandRequest& request) override;
33 std::vector<std::string> CmdList() const override;
34
35 std::string SummaryHelp() const override;
36 bool RequiresDeviceExists() const override { return true; }
37 Result<std::string> DetailedHelp(const CommandRequest& request) override;
38
39 private:
41 const CommandRequest& request, const std::string& subcmd,
42 std::vector<std::string>& subcmd_args,
43 std::unordered_map<std::string, std::string> envs);
44
46};
47
48} // namespace cuttlefish
Definition: command_request.h:33
Definition: command_handler.h:28
Definition: snapshot.h:28
Result< std::string > DetailedHelp(const CommandRequest &request) override
Definition: snapshot.cpp:109
CvdSnapshotCommandHandler(InstanceManager &instance_manager)
Definition: snapshot.cpp:76
std::string SummaryHelp() const override
Definition: snapshot.cpp:105
Result< Command > GenerateCommand(const CommandRequest &request, const std::string &subcmd, std::vector< std::string > &subcmd_args, std::unordered_map< std::string, std::string > envs)
Definition: snapshot.cpp:114
InstanceManager & instance_manager_
Definition: snapshot.h:45
Result< void > Handle(const CommandRequest &request) override
Definition: snapshot.cpp:80
bool RequiresDeviceExists() const override
Definition: snapshot.h:36
std::vector< std::string > CmdList() const override
Definition: snapshot.cpp:101
Definition: instance_manager.h:50
Definition: alloc_driver.h:20
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30