1 /*
2  * Copyright (C) 2020 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 <android/hardware/fastboot/1.1/IFastboot.h>
19 #include <hidl/Status.h>
20 
21 namespace android {
22 namespace hardware {
23 namespace fastboot {
24 namespace V1_1 {
25 namespace implementation {
26 
27 using ::android::hardware::hidl_string;
28 using ::android::hardware::Return;
29 using ::android::hardware::Void;
30 using ::android::hardware::fastboot::V1_0::FileSystemType;
31 using ::android::hardware::fastboot::V1_0::Status;
32 using ::android::hardware::fastboot::V1_0::Result;
33 
34 struct Fastboot : public IFastboot {
35     // Methods from ::android::hardware::fastboot::V1_0::IFastboot follow.
36     Return<void> getPartitionType(const hidl_string& partitionName,
37                                   getPartitionType_cb _hidl_cb) override;
38     Return<void> doOemCommand(const hidl_string& oemCmd, doOemCommand_cb _hidl_cb) override;
39     Return<void> getVariant(getVariant_cb _hidl_cb) override;
40     Return<void> getOffModeChargeState(getOffModeChargeState_cb _hidl_cb) override;
41     Return<void> getBatteryVoltageFlashingThreshold(
42             getBatteryVoltageFlashingThreshold_cb _hidl_cb) override;
43     Return<void> doOemSpecificErase(doOemSpecificErase_cb _hidl_cb) override;
44 };
45 
46 extern "C" IFastboot* HIDL_FETCH_IFastboot(const char* name);
47 
48 }  // namespace implementation
49 }  // namespace V1_1
50 }  // namespace fastboot
51 }  // namespace hardware
52 }  // namespace android
53