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/biometrics/common/aidl/android.hardware.biometrics.common_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/keymaster/aidl/android.hardware.keymaster_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/biometrics/fingerprint/aidl/android.hardware.biometrics.fingerprint_interface/4/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/biometrics/fingerprint/aidl/android.hardware.biometrics.fingerprint.virtualhal-ndk-source/gen/staging/android/hardware/biometrics/fingerprint/virtualhal/AcquiredInfoAndVendorCode.cpp.d -h out/soong/.intermediates/hardware/interfaces/biometrics/fingerprint/aidl/android.hardware.biometrics.fingerprint.virtualhal-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/biometrics/fingerprint/aidl/android.hardware.biometrics.fingerprint.virtualhal-ndk-source/gen/staging -Nhardware/interfaces/biometrics/fingerprint/aidl hardware/interfaces/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/AcquiredInfoAndVendorCode.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 <array>
12 #include <cassert>
13 #include <cstdint>
14 #include <memory>
15 #include <optional>
16 #include <string>
17 #include <type_traits>
18 #include <utility>
19 #include <variant>
20 #include <vector>
21 #include <android/binder_enums.h>
22 #include <android/binder_interface_utils.h>
23 #include <android/binder_parcelable_utils.h>
24 #include <android/binder_to_string.h>
25 #include <aidl/android/hardware/biometrics/fingerprint/AcquiredInfo.h>
26 #ifdef BINDER_STABILITY_SUPPORT
27 #include <android/binder_stability.h>
28 #endif // BINDER_STABILITY_SUPPORT
29
30 #ifndef __BIONIC__
31 #define __assert2(a,b,c,d) ((void)0)
32 #endif
33
34 namespace aidl {
35 namespace android {
36 namespace hardware {
37 namespace biometrics {
38 namespace fingerprint {
39 namespace virtualhal {
40 class AcquiredInfoAndVendorCode {
41 public:
42 typedef std::false_type fixed_size;
43 static const char* descriptor;
44
45 enum class Tag : int32_t {
46 acquiredInfo = 0,
47 vendorCode = 1,
48 };
49
50 // Expose tag symbols for legacy code
51 static const inline Tag acquiredInfo = Tag::acquiredInfo;
52 static const inline Tag vendorCode = Tag::vendorCode;
53
54 template<typename _Tp>
55 static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, AcquiredInfoAndVendorCode>;
56
AcquiredInfoAndVendorCode()57 AcquiredInfoAndVendorCode() : _value(std::in_place_index<static_cast<size_t>(acquiredInfo)>, ::aidl::android::hardware::biometrics::fingerprint::AcquiredInfo(::aidl::android::hardware::biometrics::fingerprint::AcquiredInfo::UNKNOWN)) { }
58
59 template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
60 // NOLINTNEXTLINE(google-explicit-constructor)
AcquiredInfoAndVendorCode(_Tp && _arg)61 constexpr AcquiredInfoAndVendorCode(_Tp&& _arg)
62 : _value(std::forward<_Tp>(_arg)) {}
63
64 template <size_t _Np, typename... _Tp>
AcquiredInfoAndVendorCode(std::in_place_index_t<_Np>,_Tp &&..._args)65 constexpr explicit AcquiredInfoAndVendorCode(std::in_place_index_t<_Np>, _Tp&&... _args)
66 : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
67
68 template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)69 static AcquiredInfoAndVendorCode make(_Tp&&... _args) {
70 return AcquiredInfoAndVendorCode(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
71 }
72
73 template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)74 static AcquiredInfoAndVendorCode make(std::initializer_list<_Tp> _il, _Up&&... _args) {
75 return AcquiredInfoAndVendorCode(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
76 }
77
getTag()78 Tag getTag() const {
79 return static_cast<Tag>(_value.index());
80 }
81
82 template <Tag _tag>
get()83 const auto& get() const {
84 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
85 return std::get<static_cast<size_t>(_tag)>(_value);
86 }
87
88 template <Tag _tag>
get()89 auto& get() {
90 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
91 return std::get<static_cast<size_t>(_tag)>(_value);
92 }
93
94 template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)95 void set(_Tp&&... _args) {
96 _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
97 }
98
99 binder_status_t readFromParcel(const AParcel* _parcel);
100 binder_status_t writeToParcel(AParcel* _parcel) const;
101
102 inline bool operator==(const AcquiredInfoAndVendorCode& _rhs) const {
103 return _value == _rhs._value;
104 }
105 inline bool operator<(const AcquiredInfoAndVendorCode& _rhs) const {
106 return _value < _rhs._value;
107 }
108 inline bool operator!=(const AcquiredInfoAndVendorCode& _rhs) const {
109 return !(*this == _rhs);
110 }
111 inline bool operator>(const AcquiredInfoAndVendorCode& _rhs) const {
112 return _rhs < *this;
113 }
114 inline bool operator>=(const AcquiredInfoAndVendorCode& _rhs) const {
115 return !(*this < _rhs);
116 }
117 inline bool operator<=(const AcquiredInfoAndVendorCode& _rhs) const {
118 return !(_rhs < *this);
119 }
120
121 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_LOCAL;
toString()122 inline std::string toString() const {
123 std::ostringstream os;
124 os << "AcquiredInfoAndVendorCode{";
125 switch (getTag()) {
126 case acquiredInfo: os << "acquiredInfo: " << ::android::internal::ToString(get<acquiredInfo>()); break;
127 case vendorCode: os << "vendorCode: " << ::android::internal::ToString(get<vendorCode>()); break;
128 }
129 os << "}";
130 return os.str();
131 }
132 private:
133 std::variant<::aidl::android::hardware::biometrics::fingerprint::AcquiredInfo, int32_t> _value;
134 };
135 } // namespace virtualhal
136 } // namespace fingerprint
137 } // namespace biometrics
138 } // namespace hardware
139 } // namespace android
140 } // namespace aidl
141 namespace aidl {
142 namespace android {
143 namespace hardware {
144 namespace biometrics {
145 namespace fingerprint {
146 namespace virtualhal {
toString(AcquiredInfoAndVendorCode::Tag val)147 [[nodiscard]] static inline std::string toString(AcquiredInfoAndVendorCode::Tag val) {
148 switch(val) {
149 case AcquiredInfoAndVendorCode::Tag::acquiredInfo:
150 return "acquiredInfo";
151 case AcquiredInfoAndVendorCode::Tag::vendorCode:
152 return "vendorCode";
153 default:
154 return std::to_string(static_cast<int32_t>(val));
155 }
156 }
157 } // namespace virtualhal
158 } // namespace fingerprint
159 } // namespace biometrics
160 } // namespace hardware
161 } // namespace android
162 } // namespace aidl
163 namespace ndk {
164 namespace internal {
165 #pragma clang diagnostic push
166 #pragma clang diagnostic ignored "-Wc++17-extensions"
167 template <>
168 constexpr inline std::array<aidl::android::hardware::biometrics::fingerprint::virtualhal::AcquiredInfoAndVendorCode::Tag, 2> enum_values<aidl::android::hardware::biometrics::fingerprint::virtualhal::AcquiredInfoAndVendorCode::Tag> = {
169 aidl::android::hardware::biometrics::fingerprint::virtualhal::AcquiredInfoAndVendorCode::Tag::acquiredInfo,
170 aidl::android::hardware::biometrics::fingerprint::virtualhal::AcquiredInfoAndVendorCode::Tag::vendorCode,
171 };
172 #pragma clang diagnostic pop
173 } // namespace internal
174 } // namespace ndk
175