1 /*
2 * This file is auto-generated. DO NOT MODIFY.
3 * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 4 --hash 8a6cd86630181a4df6f20056259ec200ffe39209 -t --stability vintf --min_sdk_version current --ninja -d out/soong/.intermediates/hardware/interfaces/biometrics/common/aidl/android.hardware.biometrics.common-V4-ndk-source/gen/staging/android/hardware/biometrics/common/OperationState.cpp.d -h out/soong/.intermediates/hardware/interfaces/biometrics/common/aidl/android.hardware.biometrics.common-V4-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/biometrics/common/aidl/android.hardware.biometrics.common-V4-ndk-source/gen/staging -Nhardware/interfaces/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/4 hardware/interfaces/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/4/android/hardware/biometrics/common/OperationState.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/common/OperationState.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 common {
39 class OperationState {
40 public:
41 typedef std::false_type fixed_size;
42 static const char* descriptor;
43
44 class FingerprintOperationState {
45 public:
46 typedef std::false_type fixed_size;
47 static const char* descriptor;
48
49 ::ndk::AParcelableHolder extension{::ndk::STABILITY_VINTF};
50 bool isHardwareIgnoringTouches = false;
51
52 binder_status_t readFromParcel(const AParcel* parcel);
53 binder_status_t writeToParcel(AParcel* parcel) const;
54
55 inline bool operator==(const FingerprintOperationState& _rhs) const {
56 return std::tie(extension, isHardwareIgnoringTouches) == std::tie(_rhs.extension, _rhs.isHardwareIgnoringTouches);
57 }
58 inline bool operator<(const FingerprintOperationState& _rhs) const {
59 return std::tie(extension, isHardwareIgnoringTouches) < std::tie(_rhs.extension, _rhs.isHardwareIgnoringTouches);
60 }
61 inline bool operator!=(const FingerprintOperationState& _rhs) const {
62 return !(*this == _rhs);
63 }
64 inline bool operator>(const FingerprintOperationState& _rhs) const {
65 return _rhs < *this;
66 }
67 inline bool operator>=(const FingerprintOperationState& _rhs) const {
68 return !(*this < _rhs);
69 }
70 inline bool operator<=(const FingerprintOperationState& _rhs) const {
71 return !(_rhs < *this);
72 }
73
74 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()75 inline std::string toString() const {
76 std::ostringstream _aidl_os;
77 _aidl_os << "FingerprintOperationState{";
78 _aidl_os << "extension: " << ::android::internal::ToString(extension);
79 _aidl_os << ", isHardwareIgnoringTouches: " << ::android::internal::ToString(isHardwareIgnoringTouches);
80 _aidl_os << "}";
81 return _aidl_os.str();
82 }
83 };
84 class FaceOperationState {
85 public:
86 typedef std::false_type fixed_size;
87 static const char* descriptor;
88
89 ::ndk::AParcelableHolder extension{::ndk::STABILITY_VINTF};
90
91 binder_status_t readFromParcel(const AParcel* parcel);
92 binder_status_t writeToParcel(AParcel* parcel) const;
93
94 inline bool operator==(const FaceOperationState& _rhs) const {
95 return std::tie(extension) == std::tie(_rhs.extension);
96 }
97 inline bool operator<(const FaceOperationState& _rhs) const {
98 return std::tie(extension) < std::tie(_rhs.extension);
99 }
100 inline bool operator!=(const FaceOperationState& _rhs) const {
101 return !(*this == _rhs);
102 }
103 inline bool operator>(const FaceOperationState& _rhs) const {
104 return _rhs < *this;
105 }
106 inline bool operator>=(const FaceOperationState& _rhs) const {
107 return !(*this < _rhs);
108 }
109 inline bool operator<=(const FaceOperationState& _rhs) const {
110 return !(_rhs < *this);
111 }
112
113 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()114 inline std::string toString() const {
115 std::ostringstream _aidl_os;
116 _aidl_os << "FaceOperationState{";
117 _aidl_os << "extension: " << ::android::internal::ToString(extension);
118 _aidl_os << "}";
119 return _aidl_os.str();
120 }
121 };
122 enum class Tag : int32_t {
123 fingerprintOperationState = 0,
124 faceOperationState = 1,
125 };
126
127 // Expose tag symbols for legacy code
128 static const inline Tag fingerprintOperationState = Tag::fingerprintOperationState;
129 static const inline Tag faceOperationState = Tag::faceOperationState;
130
131 template<typename _Tp>
132 static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, OperationState>;
133
OperationState()134 OperationState() : _value(std::in_place_index<static_cast<size_t>(fingerprintOperationState)>, ::aidl::android::hardware::biometrics::common::OperationState::FingerprintOperationState()) { }
135
136 template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
137 // NOLINTNEXTLINE(google-explicit-constructor)
OperationState(_Tp && _arg)138 constexpr OperationState(_Tp&& _arg)
139 : _value(std::forward<_Tp>(_arg)) {}
140
141 template <size_t _Np, typename... _Tp>
OperationState(std::in_place_index_t<_Np>,_Tp &&..._args)142 constexpr explicit OperationState(std::in_place_index_t<_Np>, _Tp&&... _args)
143 : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
144
145 template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)146 static OperationState make(_Tp&&... _args) {
147 return OperationState(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
148 }
149
150 template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)151 static OperationState make(std::initializer_list<_Tp> _il, _Up&&... _args) {
152 return OperationState(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
153 }
154
getTag()155 Tag getTag() const {
156 return static_cast<Tag>(_value.index());
157 }
158
159 template <Tag _tag>
get()160 const auto& get() const {
161 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
162 return std::get<static_cast<size_t>(_tag)>(_value);
163 }
164
165 template <Tag _tag>
get()166 auto& get() {
167 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
168 return std::get<static_cast<size_t>(_tag)>(_value);
169 }
170
171 template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)172 void set(_Tp&&... _args) {
173 _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
174 }
175
176 binder_status_t readFromParcel(const AParcel* _parcel);
177 binder_status_t writeToParcel(AParcel* _parcel) const;
178
179 inline bool operator==(const OperationState& _rhs) const {
180 return _value == _rhs._value;
181 }
182 inline bool operator<(const OperationState& _rhs) const {
183 return _value < _rhs._value;
184 }
185 inline bool operator!=(const OperationState& _rhs) const {
186 return !(*this == _rhs);
187 }
188 inline bool operator>(const OperationState& _rhs) const {
189 return _rhs < *this;
190 }
191 inline bool operator>=(const OperationState& _rhs) const {
192 return !(*this < _rhs);
193 }
194 inline bool operator<=(const OperationState& _rhs) const {
195 return !(_rhs < *this);
196 }
197
198 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()199 inline std::string toString() const {
200 std::ostringstream os;
201 os << "OperationState{";
202 switch (getTag()) {
203 case fingerprintOperationState: os << "fingerprintOperationState: " << ::android::internal::ToString(get<fingerprintOperationState>()); break;
204 case faceOperationState: os << "faceOperationState: " << ::android::internal::ToString(get<faceOperationState>()); break;
205 }
206 os << "}";
207 return os.str();
208 }
209 private:
210 std::variant<::aidl::android::hardware::biometrics::common::OperationState::FingerprintOperationState, ::aidl::android::hardware::biometrics::common::OperationState::FaceOperationState> _value;
211 };
212 } // namespace common
213 } // namespace biometrics
214 } // namespace hardware
215 } // namespace android
216 } // namespace aidl
217 namespace aidl {
218 namespace android {
219 namespace hardware {
220 namespace biometrics {
221 namespace common {
toString(OperationState::Tag val)222 [[nodiscard]] static inline std::string toString(OperationState::Tag val) {
223 switch(val) {
224 case OperationState::Tag::fingerprintOperationState:
225 return "fingerprintOperationState";
226 case OperationState::Tag::faceOperationState:
227 return "faceOperationState";
228 default:
229 return std::to_string(static_cast<int32_t>(val));
230 }
231 }
232 } // namespace common
233 } // namespace biometrics
234 } // namespace hardware
235 } // namespace android
236 } // namespace aidl
237 namespace ndk {
238 namespace internal {
239 #pragma clang diagnostic push
240 #pragma clang diagnostic ignored "-Wc++17-extensions"
241 template <>
242 constexpr inline std::array<aidl::android::hardware::biometrics::common::OperationState::Tag, 2> enum_values<aidl::android::hardware::biometrics::common::OperationState::Tag> = {
243 aidl::android::hardware::biometrics::common::OperationState::Tag::fingerprintOperationState,
244 aidl::android::hardware::biometrics::common::OperationState::Tag::faceOperationState,
245 };
246 #pragma clang diagnostic pop
247 } // namespace internal
248 } // namespace ndk
249