1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk -Weverything -Wno-missing-permission-annotation -t --min_sdk_version current -pout/soong/.intermediates/hardware/interfaces/security/keymint/aidl/android.hardware.security.keymint_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/security/secureclock/aidl/android.hardware.security.secureclock_interface/1/preprocessed.aidl --ninja -d out/soong/.intermediates/system/security/keystore2/aidl/android.security.authorization-ndk-source/gen/staging/android/security/authorization/IKeystoreAuthorization.cpp.d -h out/soong/.intermediates/system/security/keystore2/aidl/android.security.authorization-ndk-source/gen/include/staging -o out/soong/.intermediates/system/security/keystore2/aidl/android.security.authorization-ndk-source/gen/staging -Nsystem/security/keystore2/aidl system/security/keystore2/aidl/android/security/authorization/IKeystoreAuthorization.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/security/keymint/HardwareAuthToken.h>
20 #include <aidl/android/hardware/security/keymint/HardwareAuthenticatorType.h>
21 #include <aidl/android/security/authorization/AuthorizationTokens.h>
22 #ifdef BINDER_STABILITY_SUPPORT
23 #include <android/binder_stability.h>
24 #endif  // BINDER_STABILITY_SUPPORT
25 
26 namespace aidl::android::hardware::security::keymint {
27 class HardwareAuthToken;
28 }  // namespace aidl::android::hardware::security::keymint
29 namespace aidl::android::security::authorization {
30 class AuthorizationTokens;
31 }  // namespace aidl::android::security::authorization
32 namespace aidl {
33 namespace android {
34 namespace security {
35 namespace authorization {
36 class IKeystoreAuthorizationDelegator;
37 
38 class IKeystoreAuthorization : public ::ndk::ICInterface {
39 public:
40   typedef IKeystoreAuthorizationDelegator DefaultDelegator;
41   static const char* descriptor;
42   IKeystoreAuthorization();
43   virtual ~IKeystoreAuthorization();
44 
45   static constexpr uint32_t TRANSACTION_addAuthToken = FIRST_CALL_TRANSACTION + 0;
46   static constexpr uint32_t TRANSACTION_onDeviceUnlocked = FIRST_CALL_TRANSACTION + 1;
47   static constexpr uint32_t TRANSACTION_onDeviceLocked = FIRST_CALL_TRANSACTION + 2;
48   static constexpr uint32_t TRANSACTION_onWeakUnlockMethodsExpired = FIRST_CALL_TRANSACTION + 3;
49   static constexpr uint32_t TRANSACTION_onNonLskfUnlockMethodsExpired = FIRST_CALL_TRANSACTION + 4;
50   static constexpr uint32_t TRANSACTION_getAuthTokensForCredStore = FIRST_CALL_TRANSACTION + 5;
51   static constexpr uint32_t TRANSACTION_getLastAuthTime = FIRST_CALL_TRANSACTION + 6;
52 
53   static std::shared_ptr<IKeystoreAuthorization> fromBinder(const ::ndk::SpAIBinder& binder);
54   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IKeystoreAuthorization>& instance);
55   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IKeystoreAuthorization>* instance);
56   static bool setDefaultImpl(const std::shared_ptr<IKeystoreAuthorization>& impl);
57   static const std::shared_ptr<IKeystoreAuthorization>& getDefaultImpl();
58   virtual ::ndk::ScopedAStatus addAuthToken(const ::aidl::android::hardware::security::keymint::HardwareAuthToken& in_authToken) = 0;
59   virtual ::ndk::ScopedAStatus onDeviceUnlocked(int32_t in_userId, const std::optional<std::vector<uint8_t>>& in_password) = 0;
60   virtual ::ndk::ScopedAStatus onDeviceLocked(int32_t in_userId, const std::vector<int64_t>& in_unlockingSids, bool in_weakUnlockEnabled) = 0;
61   virtual ::ndk::ScopedAStatus onWeakUnlockMethodsExpired(int32_t in_userId) = 0;
62   virtual ::ndk::ScopedAStatus onNonLskfUnlockMethodsExpired(int32_t in_userId) = 0;
63   virtual ::ndk::ScopedAStatus getAuthTokensForCredStore(int64_t in_challenge, int64_t in_secureUserId, int64_t in_authTokenMaxAgeMillis, ::aidl::android::security::authorization::AuthorizationTokens* _aidl_return) = 0;
64   virtual ::ndk::ScopedAStatus getLastAuthTime(int64_t in_secureUserId, const std::vector<::aidl::android::hardware::security::keymint::HardwareAuthenticatorType>& in_authTypes, int64_t* _aidl_return) = 0;
65 private:
66   static std::shared_ptr<IKeystoreAuthorization> default_impl;
67 };
68 class IKeystoreAuthorizationDefault : public IKeystoreAuthorization {
69 public:
70   ::ndk::ScopedAStatus addAuthToken(const ::aidl::android::hardware::security::keymint::HardwareAuthToken& in_authToken) override;
71   ::ndk::ScopedAStatus onDeviceUnlocked(int32_t in_userId, const std::optional<std::vector<uint8_t>>& in_password) override;
72   ::ndk::ScopedAStatus onDeviceLocked(int32_t in_userId, const std::vector<int64_t>& in_unlockingSids, bool in_weakUnlockEnabled) override;
73   ::ndk::ScopedAStatus onWeakUnlockMethodsExpired(int32_t in_userId) override;
74   ::ndk::ScopedAStatus onNonLskfUnlockMethodsExpired(int32_t in_userId) override;
75   ::ndk::ScopedAStatus getAuthTokensForCredStore(int64_t in_challenge, int64_t in_secureUserId, int64_t in_authTokenMaxAgeMillis, ::aidl::android::security::authorization::AuthorizationTokens* _aidl_return) override;
76   ::ndk::ScopedAStatus getLastAuthTime(int64_t in_secureUserId, const std::vector<::aidl::android::hardware::security::keymint::HardwareAuthenticatorType>& in_authTypes, int64_t* _aidl_return) override;
77   ::ndk::SpAIBinder asBinder() override;
78   bool isRemote() override;
79 };
80 }  // namespace authorization
81 }  // namespace security
82 }  // namespace android
83 }  // namespace aidl
84