1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 1 --hash 2400346954240a5de495a1debc81429dd012d7b7 -t --stability vintf --min_sdk_version current --ninja -d out/soong/.intermediates/hardware/interfaces/boot/aidl/android.hardware.boot-V1-ndk-source/gen/staging/android/hardware/boot/IBootControl.cpp.d -h out/soong/.intermediates/hardware/interfaces/boot/aidl/android.hardware.boot-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/boot/aidl/android.hardware.boot-V1-ndk-source/gen/staging -Nhardware/interfaces/boot/aidl/aidl_api/android.hardware.boot/1 hardware/interfaces/boot/aidl/aidl_api/android.hardware.boot/1/android/hardware/boot/IBootControl.aidl
4  *
5  * DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
6  * ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
7  * AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
8  */
9 #pragma once
10 
11 #include <cstdint>
12 #include <memory>
13 #include <optional>
14 #include <string>
15 #include <vector>
16 #include <android/binder_interface_utils.h>
17 #include <aidl/android/hardware/boot/MergeStatus.h>
18 #ifdef BINDER_STABILITY_SUPPORT
19 #include <android/binder_stability.h>
20 #endif  // BINDER_STABILITY_SUPPORT
21 
22 namespace aidl {
23 namespace android {
24 namespace hardware {
25 namespace boot {
26 class IBootControlDelegator;
27 
28 class IBootControl : public ::ndk::ICInterface {
29 public:
30   typedef IBootControlDelegator DefaultDelegator;
31   static const char* descriptor;
32   IBootControl();
33   virtual ~IBootControl();
34 
35   enum : int32_t { INVALID_SLOT = -1 };
36   enum : int32_t { COMMAND_FAILED = -2 };
37   static inline const int32_t version = 1;
38   static inline const std::string hash = "2400346954240a5de495a1debc81429dd012d7b7";
39   static constexpr uint32_t TRANSACTION_getActiveBootSlot = FIRST_CALL_TRANSACTION + 0;
40   static constexpr uint32_t TRANSACTION_getCurrentSlot = FIRST_CALL_TRANSACTION + 1;
41   static constexpr uint32_t TRANSACTION_getNumberSlots = FIRST_CALL_TRANSACTION + 2;
42   static constexpr uint32_t TRANSACTION_getSnapshotMergeStatus = FIRST_CALL_TRANSACTION + 3;
43   static constexpr uint32_t TRANSACTION_getSuffix = FIRST_CALL_TRANSACTION + 4;
44   static constexpr uint32_t TRANSACTION_isSlotBootable = FIRST_CALL_TRANSACTION + 5;
45   static constexpr uint32_t TRANSACTION_isSlotMarkedSuccessful = FIRST_CALL_TRANSACTION + 6;
46   static constexpr uint32_t TRANSACTION_markBootSuccessful = FIRST_CALL_TRANSACTION + 7;
47   static constexpr uint32_t TRANSACTION_setActiveBootSlot = FIRST_CALL_TRANSACTION + 8;
48   static constexpr uint32_t TRANSACTION_setSlotAsUnbootable = FIRST_CALL_TRANSACTION + 9;
49   static constexpr uint32_t TRANSACTION_setSnapshotMergeStatus = FIRST_CALL_TRANSACTION + 10;
50 
51   static std::shared_ptr<IBootControl> fromBinder(const ::ndk::SpAIBinder& binder);
52   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IBootControl>& instance);
53   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IBootControl>* instance);
54   static bool setDefaultImpl(const std::shared_ptr<IBootControl>& impl);
55   static const std::shared_ptr<IBootControl>& getDefaultImpl();
56   virtual ::ndk::ScopedAStatus getActiveBootSlot(int32_t* _aidl_return) = 0;
57   virtual ::ndk::ScopedAStatus getCurrentSlot(int32_t* _aidl_return) = 0;
58   virtual ::ndk::ScopedAStatus getNumberSlots(int32_t* _aidl_return) = 0;
59   virtual ::ndk::ScopedAStatus getSnapshotMergeStatus(::aidl::android::hardware::boot::MergeStatus* _aidl_return) = 0;
60   virtual ::ndk::ScopedAStatus getSuffix(int32_t in_slot, std::string* _aidl_return) = 0;
61   virtual ::ndk::ScopedAStatus isSlotBootable(int32_t in_slot, bool* _aidl_return) = 0;
62   virtual ::ndk::ScopedAStatus isSlotMarkedSuccessful(int32_t in_slot, bool* _aidl_return) = 0;
63   virtual ::ndk::ScopedAStatus markBootSuccessful() = 0;
64   virtual ::ndk::ScopedAStatus setActiveBootSlot(int32_t in_slot) = 0;
65   virtual ::ndk::ScopedAStatus setSlotAsUnbootable(int32_t in_slot) = 0;
66   virtual ::ndk::ScopedAStatus setSnapshotMergeStatus(::aidl::android::hardware::boot::MergeStatus in_status) = 0;
67   virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
68   virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
69 private:
70   static std::shared_ptr<IBootControl> default_impl;
71 };
72 class IBootControlDefault : public IBootControl {
73 public:
74   ::ndk::ScopedAStatus getActiveBootSlot(int32_t* _aidl_return) override;
75   ::ndk::ScopedAStatus getCurrentSlot(int32_t* _aidl_return) override;
76   ::ndk::ScopedAStatus getNumberSlots(int32_t* _aidl_return) override;
77   ::ndk::ScopedAStatus getSnapshotMergeStatus(::aidl::android::hardware::boot::MergeStatus* _aidl_return) override;
78   ::ndk::ScopedAStatus getSuffix(int32_t in_slot, std::string* _aidl_return) override;
79   ::ndk::ScopedAStatus isSlotBootable(int32_t in_slot, bool* _aidl_return) override;
80   ::ndk::ScopedAStatus isSlotMarkedSuccessful(int32_t in_slot, bool* _aidl_return) override;
81   ::ndk::ScopedAStatus markBootSuccessful() override;
82   ::ndk::ScopedAStatus setActiveBootSlot(int32_t in_slot) override;
83   ::ndk::ScopedAStatus setSlotAsUnbootable(int32_t in_slot) override;
84   ::ndk::ScopedAStatus setSnapshotMergeStatus(::aidl::android::hardware::boot::MergeStatus in_status) override;
85   ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
86   ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
87   ::ndk::SpAIBinder asBinder() override;
88   bool isRemote() override;
89 };
90 }  // namespace boot
91 }  // namespace hardware
92 }  // namespace android
93 }  // namespace aidl
94