• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "host/commands/cvd/server_command/host_tool_target_manager.h"
18 
19 #include "common/libs/utils/contains.h"
20 #include "common/libs/utils/files.h"
21 #include "host/commands/cvd/common_utils.h"
22 
23 namespace cuttlefish {
24 
OperationToBinsMapComponent()25 fruit::Component<OperationToBinsMap> OperationToBinsMapComponent() {
26   return fruit::createComponent().registerProvider(
27       [](void) -> OperationToBinsMap {
28         OperationToBinsMap op_to_possible_bins_map;
29         op_to_possible_bins_map["stop"] =
30             std::vector<std::string>{"cvd_internal_stop", "stop_cvd"};
31         op_to_possible_bins_map["start"] =
32             std::vector<std::string>{"cvd_internal_start", "launch_cvd"};
33         op_to_possible_bins_map["status"] =
34             std::vector<std::string>{"cvd_internal_status", "cvd_status"};
35         op_to_possible_bins_map["restart"] =
36             std::vector<std::string>{"restart_cvd"};
37         op_to_possible_bins_map["powerwash"] =
38             std::vector<std::string>{"powerwash_cvd"};
39         return op_to_possible_bins_map;
40       });
41 }
42 
43 }  // namespace cuttlefish
44