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