blob: be8a81441e670c624d80442022c26a3883b6228e [file] [log] [blame]
Steven Moreland33e87b82016-11-22 15:34:39 -08001#ifndef ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H
2#define ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H
Connor O'Brienfe25fd82016-10-10 12:31:37 -07003
4#include <android/hardware/boot/1.0/IBootControl.h>
5#include <hidl/Status.h>
6
7#include <hidl/MQDescriptor.h>
8namespace android {
9namespace hardware {
10namespace boot {
11namespace V1_0 {
12namespace implementation {
13
14using ::android::hardware::boot::V1_0::BoolResult;
15using ::android::hardware::boot::V1_0::CommandResult;
16using ::android::hardware::boot::V1_0::IBootControl;
17using ::android::hardware::Return;
18using ::android::hardware::Void;
19using ::android::hardware::hidl_vec;
20using ::android::hardware::hidl_string;
21using ::android::sp;
22
23struct BootControl : public IBootControl {
24 BootControl(boot_control_module_t* module);
25 // Methods from ::android::hardware::boot::V1_0::IBootControl follow.
26 Return<uint32_t> getNumberSlots() override;
27 Return<uint32_t> getCurrentSlot() override;
28 Return<void> markBootSuccessful(markBootSuccessful_cb _hidl_cb) override;
29 Return<void> setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) override;
30 Return<void> setSlotAsUnbootable(uint32_t slot, setSlotAsUnbootable_cb _hidl_cb) override;
31 Return<BoolResult> isSlotBootable(uint32_t slot) override;
32 Return<BoolResult> isSlotMarkedSuccessful(uint32_t slot) override;
33 Return<void> getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) override;
34private:
35 boot_control_module_t* mModule;
36};
37
38extern "C" IBootControl* HIDL_FETCH_IBootControl(const char* name);
39
40} // namespace implementation
41} // namespace V1_0
42} // namespace boot
43} // namespace hardware
44} // namespace android
45
Steven Moreland33e87b82016-11-22 15:34:39 -080046#endif // ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H