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 --structured --version 3 --hash notfrozen -t --stability vintf --min_sdk_version current -pout/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.eraser.types_interface/1/preprocessed.aidl -pout/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.common_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/fmq/aidl/android.hardware.common.fmq_interface/1/preprocessed.aidl --previous_api_dir=hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.effect/2 --previous_hash 54d5a2e1d59066b57e35eb7bcb5ebc72a1259c1c --ninja -d out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect-V3-ndk-source/gen/staging/android/hardware/audio/effect/Eraser.cpp.d -h out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect-V3-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect-V3-ndk-source/gen/staging -Nhardware/interfaces/audio/aidl hardware/interfaces/audio/aidl/android/hardware/audio/effect/Eraser.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/audio/effect/Eraser.h>
26 #include <aidl/android/hardware/audio/effect/VendorExtension.h>
27 #include <aidl/android/media/audio/eraser/Capability.h>
28 #include <aidl/android/media/audio/eraser/Configuration.h>
29 #ifdef BINDER_STABILITY_SUPPORT
30 #include <android/binder_stability.h>
31 #endif // BINDER_STABILITY_SUPPORT
32
33 #ifndef __BIONIC__
34 #define __assert2(a,b,c,d) ((void)0)
35 #endif
36
37 namespace aidl::android::hardware::audio::effect {
38 class VendorExtension;
39 } // namespace aidl::android::hardware::audio::effect
40 namespace aidl::android::media::audio::eraser {
41 class Capability;
42 class Configuration;
43 } // namespace aidl::android::media::audio::eraser
44 namespace aidl {
45 namespace android {
46 namespace hardware {
47 namespace audio {
48 namespace effect {
49 class Eraser {
50 public:
51 typedef std::false_type fixed_size;
52 static const char* descriptor;
53
54 enum class Tag : int32_t {
55 vendor = 0,
56 capability = 1,
57 configuration = 2,
58 };
59
60 class Id {
61 public:
62 typedef std::false_type fixed_size;
63 static const char* descriptor;
64
65 enum class Tag : int32_t {
66 vendorExtensionTag = 0,
67 commonTag = 1,
68 };
69
70 // Expose tag symbols for legacy code
71 static const inline Tag vendorExtensionTag = Tag::vendorExtensionTag;
72 static const inline Tag commonTag = Tag::commonTag;
73
74 template<typename _Tp>
75 static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, Id>;
76
Id()77 Id() : _value(std::in_place_index<static_cast<size_t>(vendorExtensionTag)>, ::aidl::android::hardware::audio::effect::VendorExtension()) { }
78
79 template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
80 // NOLINTNEXTLINE(google-explicit-constructor)
Id(_Tp && _arg)81 constexpr Id(_Tp&& _arg)
82 : _value(std::forward<_Tp>(_arg)) {}
83
84 template <size_t _Np, typename... _Tp>
Id(std::in_place_index_t<_Np>,_Tp &&..._args)85 constexpr explicit Id(std::in_place_index_t<_Np>, _Tp&&... _args)
86 : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
87
88 template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)89 static Id make(_Tp&&... _args) {
90 return Id(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
91 }
92
93 template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)94 static Id make(std::initializer_list<_Tp> _il, _Up&&... _args) {
95 return Id(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
96 }
97
getTag()98 Tag getTag() const {
99 return static_cast<Tag>(_value.index());
100 }
101
102 template <Tag _tag>
get()103 const auto& get() const {
104 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
105 return std::get<static_cast<size_t>(_tag)>(_value);
106 }
107
108 template <Tag _tag>
get()109 auto& get() {
110 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
111 return std::get<static_cast<size_t>(_tag)>(_value);
112 }
113
114 template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)115 void set(_Tp&&... _args) {
116 _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
117 }
118
119 binder_status_t readFromParcel(const AParcel* _parcel);
120 binder_status_t writeToParcel(AParcel* _parcel) const;
121
122 inline bool operator==(const Id& _rhs) const {
123 return _value == _rhs._value;
124 }
125 inline bool operator<(const Id& _rhs) const {
126 return _value < _rhs._value;
127 }
128 inline bool operator!=(const Id& _rhs) const {
129 return !(*this == _rhs);
130 }
131 inline bool operator>(const Id& _rhs) const {
132 return _rhs < *this;
133 }
134 inline bool operator>=(const Id& _rhs) const {
135 return !(*this < _rhs);
136 }
137 inline bool operator<=(const Id& _rhs) const {
138 return !(_rhs < *this);
139 }
140
141 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()142 inline std::string toString() const {
143 std::ostringstream os;
144 os << "Id{";
145 switch (getTag()) {
146 case vendorExtensionTag: os << "vendorExtensionTag: " << ::android::internal::ToString(get<vendorExtensionTag>()); break;
147 case commonTag: os << "commonTag: " << ::android::internal::ToString(get<commonTag>()); break;
148 }
149 os << "}";
150 return os.str();
151 }
152 private:
153 std::variant<::aidl::android::hardware::audio::effect::VendorExtension, ::aidl::android::hardware::audio::effect::Eraser::Tag> _value;
154 };
155 // Expose tag symbols for legacy code
156 static const inline Tag vendor = Tag::vendor;
157 static const inline Tag capability = Tag::capability;
158 static const inline Tag configuration = Tag::configuration;
159
160 template<typename _Tp>
161 static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, Eraser>;
162
Eraser()163 Eraser() : _value(std::in_place_index<static_cast<size_t>(vendor)>, ::aidl::android::hardware::audio::effect::VendorExtension()) { }
164
165 template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
166 // NOLINTNEXTLINE(google-explicit-constructor)
Eraser(_Tp && _arg)167 constexpr Eraser(_Tp&& _arg)
168 : _value(std::forward<_Tp>(_arg)) {}
169
170 template <size_t _Np, typename... _Tp>
Eraser(std::in_place_index_t<_Np>,_Tp &&..._args)171 constexpr explicit Eraser(std::in_place_index_t<_Np>, _Tp&&... _args)
172 : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
173
174 template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)175 static Eraser make(_Tp&&... _args) {
176 return Eraser(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
177 }
178
179 template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)180 static Eraser make(std::initializer_list<_Tp> _il, _Up&&... _args) {
181 return Eraser(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
182 }
183
getTag()184 Tag getTag() const {
185 return static_cast<Tag>(_value.index());
186 }
187
188 template <Tag _tag>
get()189 const auto& get() const {
190 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
191 return std::get<static_cast<size_t>(_tag)>(_value);
192 }
193
194 template <Tag _tag>
get()195 auto& get() {
196 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
197 return std::get<static_cast<size_t>(_tag)>(_value);
198 }
199
200 template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)201 void set(_Tp&&... _args) {
202 _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
203 }
204
205 binder_status_t readFromParcel(const AParcel* _parcel);
206 binder_status_t writeToParcel(AParcel* _parcel) const;
207
208 inline bool operator==(const Eraser& _rhs) const {
209 return _value == _rhs._value;
210 }
211 inline bool operator<(const Eraser& _rhs) const {
212 return _value < _rhs._value;
213 }
214 inline bool operator!=(const Eraser& _rhs) const {
215 return !(*this == _rhs);
216 }
217 inline bool operator>(const Eraser& _rhs) const {
218 return _rhs < *this;
219 }
220 inline bool operator>=(const Eraser& _rhs) const {
221 return !(*this < _rhs);
222 }
223 inline bool operator<=(const Eraser& _rhs) const {
224 return !(_rhs < *this);
225 }
226
227 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()228 inline std::string toString() const {
229 std::ostringstream os;
230 os << "Eraser{";
231 switch (getTag()) {
232 case vendor: os << "vendor: " << ::android::internal::ToString(get<vendor>()); break;
233 case capability: os << "capability: " << ::android::internal::ToString(get<capability>()); break;
234 case configuration: os << "configuration: " << ::android::internal::ToString(get<configuration>()); break;
235 }
236 os << "}";
237 return os.str();
238 }
239 private:
240 std::variant<::aidl::android::hardware::audio::effect::VendorExtension, ::aidl::android::media::audio::eraser::Capability, ::aidl::android::media::audio::eraser::Configuration> _value;
241 };
242 } // namespace effect
243 } // namespace audio
244 } // namespace hardware
245 } // namespace android
246 } // namespace aidl
247 namespace aidl {
248 namespace android {
249 namespace hardware {
250 namespace audio {
251 namespace effect {
toString(Eraser::Id::Tag val)252 [[nodiscard]] static inline std::string toString(Eraser::Id::Tag val) {
253 switch(val) {
254 case Eraser::Id::Tag::vendorExtensionTag:
255 return "vendorExtensionTag";
256 case Eraser::Id::Tag::commonTag:
257 return "commonTag";
258 default:
259 return std::to_string(static_cast<int32_t>(val));
260 }
261 }
262 } // namespace effect
263 } // namespace audio
264 } // namespace hardware
265 } // namespace android
266 } // namespace aidl
267 namespace ndk {
268 namespace internal {
269 #pragma clang diagnostic push
270 #pragma clang diagnostic ignored "-Wc++17-extensions"
271 template <>
272 constexpr inline std::array<aidl::android::hardware::audio::effect::Eraser::Id::Tag, 2> enum_values<aidl::android::hardware::audio::effect::Eraser::Id::Tag> = {
273 aidl::android::hardware::audio::effect::Eraser::Id::Tag::vendorExtensionTag,
274 aidl::android::hardware::audio::effect::Eraser::Id::Tag::commonTag,
275 };
276 #pragma clang diagnostic pop
277 } // namespace internal
278 } // namespace ndk
279 namespace aidl {
280 namespace android {
281 namespace hardware {
282 namespace audio {
283 namespace effect {
toString(Eraser::Tag val)284 [[nodiscard]] static inline std::string toString(Eraser::Tag val) {
285 switch(val) {
286 case Eraser::Tag::vendor:
287 return "vendor";
288 case Eraser::Tag::capability:
289 return "capability";
290 case Eraser::Tag::configuration:
291 return "configuration";
292 default:
293 return std::to_string(static_cast<int32_t>(val));
294 }
295 }
296 } // namespace effect
297 } // namespace audio
298 } // namespace hardware
299 } // namespace android
300 } // namespace aidl
301 namespace ndk {
302 namespace internal {
303 #pragma clang diagnostic push
304 #pragma clang diagnostic ignored "-Wc++17-extensions"
305 template <>
306 constexpr inline std::array<aidl::android::hardware::audio::effect::Eraser::Tag, 3> enum_values<aidl::android::hardware::audio::effect::Eraser::Tag> = {
307 aidl::android::hardware::audio::effect::Eraser::Tag::vendor,
308 aidl::android::hardware::audio::effect::Eraser::Tag::capability,
309 aidl::android::hardware::audio::effect::Eraser::Tag::configuration,
310 };
311 #pragma clang diagnostic pop
312 } // namespace internal
313 } // namespace ndk
314