Hridya Valsaraju | 31d2c26 | 2018-07-20 13:35:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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 <functional> |
| 19 | #include <string> |
| 20 | #include <vector> |
| 21 | |
| 22 | class FastbootDevice; |
| 23 | |
David Anderson | 1fb3fd7 | 2018-08-31 14:40:22 -0700 | [diff] [blame] | 24 | bool GetVersion(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); |
| 25 | bool GetBootloaderVersion(FastbootDevice* device, const std::vector<std::string>& args, |
| 26 | std::string* message); |
| 27 | bool GetBasebandVersion(FastbootDevice* device, const std::vector<std::string>& args, |
| 28 | std::string* message); |
| 29 | bool GetProduct(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); |
| 30 | bool GetSerial(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); |
| 31 | bool GetSecure(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); |
| 32 | bool GetCurrentSlot(FastbootDevice* device, const std::vector<std::string>& args, |
| 33 | std::string* message); |
| 34 | bool GetSlotCount(FastbootDevice* device, const std::vector<std::string>& args, |
| 35 | std::string* message); |
| 36 | bool GetSlotSuccessful(FastbootDevice* device, const std::vector<std::string>& args, |
| 37 | std::string* message); |
| 38 | bool GetSlotUnbootable(FastbootDevice* device, const std::vector<std::string>& args, |
| 39 | std::string* message); |
| 40 | bool GetMaxDownloadSize(FastbootDevice* device, const std::vector<std::string>& args, |
| 41 | std::string* message); |
| 42 | bool GetUnlocked(FastbootDevice* device, const std::vector<std::string>& args, |
| 43 | std::string* message); |
| 44 | bool GetHasSlot(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); |
| 45 | bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& args, |
| 46 | std::string* message); |
Hridya Valsaraju | bf9f8d1 | 2018-09-05 16:57:24 -0700 | [diff] [blame] | 47 | bool GetPartitionType(FastbootDevice* device, const std::vector<std::string>& args, |
| 48 | std::string* message); |
David Anderson | 1fb3fd7 | 2018-08-31 14:40:22 -0700 | [diff] [blame] | 49 | bool GetPartitionIsLogical(FastbootDevice* device, const std::vector<std::string>& args, |
| 50 | std::string* message); |
| 51 | bool GetIsUserspace(FastbootDevice* device, const std::vector<std::string>& args, |
| 52 | std::string* message); |
David Anderson | c091c17 | 2018-09-04 18:11:03 -0700 | [diff] [blame] | 53 | bool GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args, |
| 54 | std::string* message); |
Hridya Valsaraju | 4af8090 | 2018-09-26 13:08:16 -0700 | [diff] [blame] | 55 | bool GetVariant(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); |
Hridya Valsaraju | 7c9bbe9 | 2018-09-27 10:41:01 -0700 | [diff] [blame^] | 56 | bool GetOffModeChargeState(FastbootDevice* device, const std::vector<std::string>& args, |
| 57 | std::string* message); |
David Anderson | 0f62663 | 2018-08-31 16:44:25 -0700 | [diff] [blame] | 58 | |
| 59 | // Helpers for getvar all. |
| 60 | std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device); |
| 61 | std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice* device); |