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