1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 1 --hash d877e8a1608a00fd9068bcd7e69ea480a7ea17f0 -t --stability vintf --min_sdk_version current -pout/soong/.intermediates/hardware/interfaces/security/keymint/aidl/android.hardware.security.keymint_interface/4/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/gatekeeper/aidl/android.hardware.gatekeeper-V1-ndk-source/gen/staging/android/hardware/gatekeeper/IGatekeeper.cpp.d -h out/soong/.intermediates/hardware/interfaces/gatekeeper/aidl/android.hardware.gatekeeper-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/gatekeeper/aidl/android.hardware.gatekeeper-V1-ndk-source/gen/staging -Nhardware/interfaces/gatekeeper/aidl/aidl_api/android.hardware.gatekeeper/1 hardware/interfaces/gatekeeper/aidl/aidl_api/android.hardware.gatekeeper/1/android/hardware/gatekeeper/IGatekeeper.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_ibinder_platform.h>
17 #include <android/binder_interface_utils.h>
18 #include <android/binder_parcel_platform.h>
19 #include <aidl/android/hardware/gatekeeper/GatekeeperEnrollResponse.h>
20 #include <aidl/android/hardware/gatekeeper/GatekeeperVerifyResponse.h>
21 #ifdef BINDER_STABILITY_SUPPORT
22 #include <android/binder_stability.h>
23 #endif  // BINDER_STABILITY_SUPPORT
24 
25 namespace aidl::android::hardware::gatekeeper {
26 class GatekeeperEnrollResponse;
27 class GatekeeperVerifyResponse;
28 }  // namespace aidl::android::hardware::gatekeeper
29 namespace aidl {
30 namespace android {
31 namespace hardware {
32 namespace gatekeeper {
33 class IGatekeeperDelegator;
34 
35 class IGatekeeper : public ::ndk::ICInterface {
36 public:
37   typedef IGatekeeperDelegator DefaultDelegator;
38   static const char* descriptor;
39   IGatekeeper();
40   virtual ~IGatekeeper();
41 
42   enum : int32_t { STATUS_REENROLL = 1 };
43   enum : int32_t { STATUS_OK = 0 };
44   enum : int32_t { ERROR_GENERAL_FAILURE = -1 };
45   enum : int32_t { ERROR_RETRY_TIMEOUT = -2 };
46   enum : int32_t { ERROR_NOT_IMPLEMENTED = -3 };
47   static inline const int32_t version = 1;
48   static inline const std::string hash = "d877e8a1608a00fd9068bcd7e69ea480a7ea17f0";
49   static constexpr uint32_t TRANSACTION_deleteAllUsers = FIRST_CALL_TRANSACTION + 0;
50   static constexpr uint32_t TRANSACTION_deleteUser = FIRST_CALL_TRANSACTION + 1;
51   static constexpr uint32_t TRANSACTION_enroll = FIRST_CALL_TRANSACTION + 2;
52   static constexpr uint32_t TRANSACTION_verify = FIRST_CALL_TRANSACTION + 3;
53 
54   static std::shared_ptr<IGatekeeper> fromBinder(const ::ndk::SpAIBinder& binder);
55   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IGatekeeper>& instance);
56   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IGatekeeper>* instance);
57   static bool setDefaultImpl(const std::shared_ptr<IGatekeeper>& impl);
58   static const std::shared_ptr<IGatekeeper>& getDefaultImpl();
59   virtual ::ndk::ScopedAStatus deleteAllUsers() = 0;
60   virtual ::ndk::ScopedAStatus deleteUser(int32_t in_uid) = 0;
61   virtual ::ndk::ScopedAStatus enroll(int32_t in_uid, const std::vector<uint8_t>& in_currentPasswordHandle, const std::vector<uint8_t>& in_currentPassword, const std::vector<uint8_t>& in_desiredPassword, ::aidl::android::hardware::gatekeeper::GatekeeperEnrollResponse* _aidl_return) = 0;
62   virtual ::ndk::ScopedAStatus verify(int32_t in_uid, int64_t in_challenge, const std::vector<uint8_t>& in_enrolledPasswordHandle, const std::vector<uint8_t>& in_providedPassword, ::aidl::android::hardware::gatekeeper::GatekeeperVerifyResponse* _aidl_return) = 0;
63   virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
64   virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
65 private:
66   static std::shared_ptr<IGatekeeper> default_impl;
67 };
68 class IGatekeeperDefault : public IGatekeeper {
69 public:
70   ::ndk::ScopedAStatus deleteAllUsers() override;
71   ::ndk::ScopedAStatus deleteUser(int32_t in_uid) override;
72   ::ndk::ScopedAStatus enroll(int32_t in_uid, const std::vector<uint8_t>& in_currentPasswordHandle, const std::vector<uint8_t>& in_currentPassword, const std::vector<uint8_t>& in_desiredPassword, ::aidl::android::hardware::gatekeeper::GatekeeperEnrollResponse* _aidl_return) override;
73   ::ndk::ScopedAStatus verify(int32_t in_uid, int64_t in_challenge, const std::vector<uint8_t>& in_enrolledPasswordHandle, const std::vector<uint8_t>& in_providedPassword, ::aidl::android::hardware::gatekeeper::GatekeeperVerifyResponse* _aidl_return) override;
74   ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
75   ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
76   ::ndk::SpAIBinder asBinder() override;
77   bool isRemote() override;
78 };
79 }  // namespace gatekeeper
80 }  // namespace hardware
81 }  // namespace android
82 }  // namespace aidl
83