1 /*
2 * This file is auto-generated. DO NOT MODIFY.
3 * Using: out/host/linux-x86/bin/aidl --lang=cpp -Weverything -Wno-missing-permission-annotation -t --min_sdk_version current --ninja -d out/soong/.intermediates/frameworks/base/core/java/android.security.rkp_aidl-cpp-source/gen/staging/android/security/rkp/IGetKeyCallback.cpp.d -h out/soong/.intermediates/frameworks/base/core/java/android.security.rkp_aidl-cpp-source/gen/include/staging -o out/soong/.intermediates/frameworks/base/core/java/android.security.rkp_aidl-cpp-source/gen/staging -Nframeworks/base/core/java frameworks/base/core/java/android/security/rkp/IGetKeyCallback.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 <android/security/rkp/IGetKeyCallback.h>
12 #include <android/security/rkp/RemotelyProvisionedKey.h>
13 #include <array>
14 #include <binder/Enums.h>
15 #include <binder/IBinder.h>
16 #include <binder/IInterface.h>
17 #include <binder/Status.h>
18 #include <binder/Trace.h>
19 #include <cstdint>
20 #include <string>
21 #include <utils/String16.h>
22 #include <utils/StrongPointer.h>
23
24 namespace android::security::rkp {
25 class RemotelyProvisionedKey;
26 } // namespace android::security::rkp
27 namespace android {
28 namespace security {
29 namespace rkp {
30 class LIBBINDER_EXPORTED IGetKeyCallbackDelegator;
31
32 class LIBBINDER_EXPORTED IGetKeyCallback : public ::android::IInterface {
33 public:
34 typedef IGetKeyCallbackDelegator DefaultDelegator;
35 DECLARE_META_INTERFACE(GetKeyCallback)
36 enum class ErrorCode : int8_t {
37 ERROR_UNKNOWN = 1,
38 ERROR_REQUIRES_SECURITY_PATCH = 2,
39 ERROR_PENDING_INTERNET_CONNECTIVITY = 3,
40 ERROR_PERMANENT = 5,
41 };
42 virtual ::android::binder::Status onSuccess(const ::android::security::rkp::RemotelyProvisionedKey& key) = 0;
43 virtual ::android::binder::Status onCancel() = 0;
44 virtual ::android::binder::Status onError(::android::security::rkp::IGetKeyCallback::ErrorCode error, const ::android::String16& description) = 0;
45 }; // class IGetKeyCallback
46
47 class LIBBINDER_EXPORTED IGetKeyCallbackDefault : public IGetKeyCallback {
48 public:
onAsBinder()49 ::android::IBinder* onAsBinder() override {
50 return nullptr;
51 }
onSuccess(const::android::security::rkp::RemotelyProvisionedKey &)52 ::android::binder::Status onSuccess(const ::android::security::rkp::RemotelyProvisionedKey& /*key*/) override {
53 return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
54 }
onCancel()55 ::android::binder::Status onCancel() override {
56 return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
57 }
onError(::android::security::rkp::IGetKeyCallback::ErrorCode,const::android::String16 &)58 ::android::binder::Status onError(::android::security::rkp::IGetKeyCallback::ErrorCode /*error*/, const ::android::String16& /*description*/) override {
59 return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
60 }
61 }; // class IGetKeyCallbackDefault
62 } // namespace rkp
63 } // namespace security
64 } // namespace android
65 namespace android {
66 namespace security {
67 namespace rkp {
toString(IGetKeyCallback::ErrorCode val)68 [[nodiscard]] static inline std::string toString(IGetKeyCallback::ErrorCode val) {
69 switch(val) {
70 case IGetKeyCallback::ErrorCode::ERROR_UNKNOWN:
71 return "ERROR_UNKNOWN";
72 case IGetKeyCallback::ErrorCode::ERROR_REQUIRES_SECURITY_PATCH:
73 return "ERROR_REQUIRES_SECURITY_PATCH";
74 case IGetKeyCallback::ErrorCode::ERROR_PENDING_INTERNET_CONNECTIVITY:
75 return "ERROR_PENDING_INTERNET_CONNECTIVITY";
76 case IGetKeyCallback::ErrorCode::ERROR_PERMANENT:
77 return "ERROR_PERMANENT";
78 default:
79 return std::to_string(static_cast<int8_t>(val));
80 }
81 }
82 } // namespace rkp
83 } // namespace security
84 } // namespace android
85 namespace android {
86 namespace internal {
87 #pragma clang diagnostic push
88 #pragma clang diagnostic ignored "-Wc++17-extensions"
89 template <>
90 constexpr inline std::array<::android::security::rkp::IGetKeyCallback::ErrorCode, 4> enum_values<::android::security::rkp::IGetKeyCallback::ErrorCode> = {
91 ::android::security::rkp::IGetKeyCallback::ErrorCode::ERROR_UNKNOWN,
92 ::android::security::rkp::IGetKeyCallback::ErrorCode::ERROR_REQUIRES_SECURITY_PATCH,
93 ::android::security::rkp::IGetKeyCallback::ErrorCode::ERROR_PENDING_INTERNET_CONNECTIVITY,
94 ::android::security::rkp::IGetKeyCallback::ErrorCode::ERROR_PERMANENT,
95 };
96 #pragma clang diagnostic pop
97 } // namespace internal
98 } // namespace android
99