| 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); | 
| Bowgo Tsai | 99f9a38 | 2020-01-21 18:31:23 +0800 | [diff] [blame] | 29 | bool GetOsVersion(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 30 | std::string* message); | 
|  | 31 | bool GetVndkVersion(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 32 | std::string* message); | 
| David Anderson | 1fb3fd7 | 2018-08-31 14:40:22 -0700 | [diff] [blame] | 33 | bool GetProduct(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); | 
|  | 34 | bool GetSerial(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); | 
|  | 35 | bool GetSecure(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); | 
|  | 36 | bool GetCurrentSlot(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 37 | std::string* message); | 
|  | 38 | bool GetSlotCount(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 39 | std::string* message); | 
|  | 40 | bool GetSlotSuccessful(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 41 | std::string* message); | 
|  | 42 | bool GetSlotUnbootable(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 43 | std::string* message); | 
|  | 44 | bool GetMaxDownloadSize(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 45 | std::string* message); | 
|  | 46 | bool GetUnlocked(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 47 | std::string* message); | 
|  | 48 | bool GetHasSlot(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); | 
|  | 49 | bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 50 | std::string* message); | 
| Hridya Valsaraju | bf9f8d1 | 2018-09-05 16:57:24 -0700 | [diff] [blame] | 51 | bool GetPartitionType(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 52 | std::string* message); | 
| David Anderson | 1fb3fd7 | 2018-08-31 14:40:22 -0700 | [diff] [blame] | 53 | bool GetPartitionIsLogical(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 54 | std::string* message); | 
|  | 55 | bool GetIsUserspace(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 56 | std::string* message); | 
| David Anderson | c091c17 | 2018-09-04 18:11:03 -0700 | [diff] [blame] | 57 | bool GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 58 | std::string* message); | 
| Hridya Valsaraju | 4af8090 | 2018-09-26 13:08:16 -0700 | [diff] [blame] | 59 | 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] | 60 | bool GetOffModeChargeState(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 61 | std::string* message); | 
| Hridya Valsaraju | 47658ca | 2018-09-28 11:41:22 -0700 | [diff] [blame] | 62 | bool GetBatteryVoltage(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 63 | std::string* message); | 
| Hridya Valsaraju | a534a5a | 2018-10-03 15:53:22 -0700 | [diff] [blame] | 64 | bool GetBatterySoCOk(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 65 | std::string* message); | 
| David Anderson | 90fe0a4 | 2018-11-05 18:01:32 -0800 | [diff] [blame] | 66 | bool GetSuperPartitionName(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 67 | std::string* message); | 
| David Anderson | ab8f466 | 2019-10-21 16:45:59 -0700 | [diff] [blame] | 68 | bool GetSnapshotUpdateStatus(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 69 | std::string* message); | 
| Bowgo Tsai | 33da5c9 | 2019-11-13 17:13:49 +0800 | [diff] [blame] | 70 | bool GetCpuAbi(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); | 
| Bowgo Tsai | 99f9a38 | 2020-01-21 18:31:23 +0800 | [diff] [blame] | 71 | bool GetSystemFingerprint(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 72 | std::string* message); | 
|  | 73 | bool GetVendorFingerprint(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 74 | std::string* message); | 
|  | 75 | bool GetDynamicPartition(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 76 | std::string* message); | 
|  | 77 | bool GetFirstApiLevel(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 78 | std::string* message); | 
|  | 79 | bool GetSecurityPatchLevel(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 80 | std::string* message); | 
|  | 81 | bool GetTrebleEnabled(FastbootDevice* device, const std::vector<std::string>& args, | 
|  | 82 | std::string* message); | 
| Hridya Valsaraju | a534a5a | 2018-10-03 15:53:22 -0700 | [diff] [blame] | 83 |  | 
| David Anderson | 0f62663 | 2018-08-31 16:44:25 -0700 | [diff] [blame] | 84 | // Helpers for getvar all. | 
|  | 85 | std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device); | 
|  | 86 | std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice* device); |