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 5 --hash notfrozen -t --stability vintf --min_sdk_version 31 -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/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/4 --previous_hash ac25616dda1c45dc2915d3f5ac82687a1a6f6e46 --ninja -d out/soong/.intermediates/hardware/interfaces/bluetooth/audio/aidl/android.hardware.bluetooth.audio-V5-ndk-source/gen/staging/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.cpp.d -h out/soong/.intermediates/hardware/interfaces/bluetooth/audio/aidl/android.hardware.bluetooth.audio-V5-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/bluetooth/audio/aidl/android.hardware.bluetooth.audio-V5-ndk-source/gen/staging -Nhardware/interfaces/bluetooth/audio/aidl hardware/interfaces/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificConfigurationLtv.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/bluetooth/audio/CodecSpecificConfigurationLtv.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 bluetooth {
38 namespace audio {
39 class CodecSpecificConfigurationLtv {
40 public:
41 typedef std::false_type fixed_size;
42 static const char* descriptor;
43
44 enum class SamplingFrequency : int8_t {
45 HZ8000 = 1,
46 HZ11025 = 2,
47 HZ16000 = 3,
48 HZ22050 = 4,
49 HZ24000 = 5,
50 HZ32000 = 6,
51 HZ44100 = 7,
52 HZ48000 = 8,
53 HZ88200 = 9,
54 HZ96000 = 10,
55 HZ176400 = 11,
56 HZ192000 = 12,
57 HZ384000 = 13,
58 };
59
60 enum class FrameDuration : int8_t {
61 US7500 = 0,
62 US10000 = 1,
63 US20000 = 2,
64 };
65
66 class AudioChannelAllocation {
67 public:
68 typedef std::false_type fixed_size;
69 static const char* descriptor;
70
71 int32_t bitmask = 0;
72
73 binder_status_t readFromParcel(const AParcel* parcel);
74 binder_status_t writeToParcel(AParcel* parcel) const;
75
76 inline bool operator==(const AudioChannelAllocation& _rhs) const {
77 return std::tie(bitmask) == std::tie(_rhs.bitmask);
78 }
79 inline bool operator<(const AudioChannelAllocation& _rhs) const {
80 return std::tie(bitmask) < std::tie(_rhs.bitmask);
81 }
82 inline bool operator!=(const AudioChannelAllocation& _rhs) const {
83 return !(*this == _rhs);
84 }
85 inline bool operator>(const AudioChannelAllocation& _rhs) const {
86 return _rhs < *this;
87 }
88 inline bool operator>=(const AudioChannelAllocation& _rhs) const {
89 return !(*this < _rhs);
90 }
91 inline bool operator<=(const AudioChannelAllocation& _rhs) const {
92 return !(_rhs < *this);
93 }
94
95 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
96 enum : int32_t { NOT_ALLOWED = 0 };
97 enum : int32_t { FRONT_LEFT = 1 };
98 enum : int32_t { FRONT_RIGHT = 2 };
99 enum : int32_t { FRONT_CENTER = 4 };
100 enum : int32_t { LOW_FREQUENCY_EFFECTS_1 = 8 };
101 enum : int32_t { BACK_LEFT = 16 };
102 enum : int32_t { BACK_RIGHT = 32 };
103 enum : int32_t { FRONT_LEFT_OF_CENTER = 64 };
104 enum : int32_t { FRONT_RIGHT_OF_CENTER = 128 };
105 enum : int32_t { BACK_CENTER = 256 };
106 enum : int32_t { LOW_FREQUENCY_EFFECTS_2 = 512 };
107 enum : int32_t { SIDE_LEFT = 1024 };
108 enum : int32_t { SIDE_RIGHT = 2048 };
109 enum : int32_t { TOP_FRONT_LEFT = 4096 };
110 enum : int32_t { TOP_FRONT_RIGHT = 8192 };
111 enum : int32_t { TOP_FRONT_CENTER = 16384 };
112 enum : int32_t { TOP_CENTER = 32768 };
113 enum : int32_t { TOP_BACK_LEFT = 65536 };
114 enum : int32_t { TOP_BACK_RIGHT = 131072 };
115 enum : int32_t { TOP_SIDE_LEFT = 262144 };
116 enum : int32_t { TOP_SIDE_RIGHT = 524288 };
117 enum : int32_t { TOP_BACK_CENTER = 1048576 };
118 enum : int32_t { BOTTOM_FRONT_CENTER = 2097152 };
119 enum : int32_t { BOTTOM_FRONT_LEFT = 4194304 };
120 enum : int32_t { BOTTOM_FRONT_RIGHT = 8388608 };
121 enum : int32_t { FRONT_LEFT_WIDE = 16777216 };
122 enum : int32_t { FRONT_RIGHT_WIDE = 33554432 };
123 enum : int32_t { LEFT_SURROUND = 67108864 };
124 enum : int32_t { RIGHT_SURROUND = 134217728 };
125 enum : int32_t { MONO = 0 };
toString()126 inline std::string toString() const {
127 std::ostringstream _aidl_os;
128 _aidl_os << "AudioChannelAllocation{";
129 _aidl_os << "bitmask: " << ::android::internal::ToString(bitmask);
130 _aidl_os << "}";
131 return _aidl_os.str();
132 }
133 };
134 class OctetsPerCodecFrame {
135 public:
136 typedef std::false_type fixed_size;
137 static const char* descriptor;
138
139 int32_t value = 0;
140
141 binder_status_t readFromParcel(const AParcel* parcel);
142 binder_status_t writeToParcel(AParcel* parcel) const;
143
144 inline bool operator==(const OctetsPerCodecFrame& _rhs) const {
145 return std::tie(value) == std::tie(_rhs.value);
146 }
147 inline bool operator<(const OctetsPerCodecFrame& _rhs) const {
148 return std::tie(value) < std::tie(_rhs.value);
149 }
150 inline bool operator!=(const OctetsPerCodecFrame& _rhs) const {
151 return !(*this == _rhs);
152 }
153 inline bool operator>(const OctetsPerCodecFrame& _rhs) const {
154 return _rhs < *this;
155 }
156 inline bool operator>=(const OctetsPerCodecFrame& _rhs) const {
157 return !(*this < _rhs);
158 }
159 inline bool operator<=(const OctetsPerCodecFrame& _rhs) const {
160 return !(_rhs < *this);
161 }
162
163 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()164 inline std::string toString() const {
165 std::ostringstream _aidl_os;
166 _aidl_os << "OctetsPerCodecFrame{";
167 _aidl_os << "value: " << ::android::internal::ToString(value);
168 _aidl_os << "}";
169 return _aidl_os.str();
170 }
171 };
172 class CodecFrameBlocksPerSDU {
173 public:
174 typedef std::false_type fixed_size;
175 static const char* descriptor;
176
177 int32_t value = 0;
178
179 binder_status_t readFromParcel(const AParcel* parcel);
180 binder_status_t writeToParcel(AParcel* parcel) const;
181
182 inline bool operator==(const CodecFrameBlocksPerSDU& _rhs) const {
183 return std::tie(value) == std::tie(_rhs.value);
184 }
185 inline bool operator<(const CodecFrameBlocksPerSDU& _rhs) const {
186 return std::tie(value) < std::tie(_rhs.value);
187 }
188 inline bool operator!=(const CodecFrameBlocksPerSDU& _rhs) const {
189 return !(*this == _rhs);
190 }
191 inline bool operator>(const CodecFrameBlocksPerSDU& _rhs) const {
192 return _rhs < *this;
193 }
194 inline bool operator>=(const CodecFrameBlocksPerSDU& _rhs) const {
195 return !(*this < _rhs);
196 }
197 inline bool operator<=(const CodecFrameBlocksPerSDU& _rhs) const {
198 return !(_rhs < *this);
199 }
200
201 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()202 inline std::string toString() const {
203 std::ostringstream _aidl_os;
204 _aidl_os << "CodecFrameBlocksPerSDU{";
205 _aidl_os << "value: " << ::android::internal::ToString(value);
206 _aidl_os << "}";
207 return _aidl_os.str();
208 }
209 };
210 enum class Tag : int32_t {
211 codecFrameBlocksPerSDU = 0,
212 samplingFrequency = 1,
213 frameDuration = 2,
214 audioChannelAllocation = 3,
215 octetsPerCodecFrame = 4,
216 };
217
218 // Expose tag symbols for legacy code
219 static const inline Tag codecFrameBlocksPerSDU = Tag::codecFrameBlocksPerSDU;
220 static const inline Tag samplingFrequency = Tag::samplingFrequency;
221 static const inline Tag frameDuration = Tag::frameDuration;
222 static const inline Tag audioChannelAllocation = Tag::audioChannelAllocation;
223 static const inline Tag octetsPerCodecFrame = Tag::octetsPerCodecFrame;
224
225 template<typename _Tp>
226 static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, CodecSpecificConfigurationLtv>;
227
CodecSpecificConfigurationLtv()228 CodecSpecificConfigurationLtv() : _value(std::in_place_index<static_cast<size_t>(codecFrameBlocksPerSDU)>, ::aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::CodecFrameBlocksPerSDU()) { }
229
230 template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
231 // NOLINTNEXTLINE(google-explicit-constructor)
CodecSpecificConfigurationLtv(_Tp && _arg)232 constexpr CodecSpecificConfigurationLtv(_Tp&& _arg)
233 : _value(std::forward<_Tp>(_arg)) {}
234
235 template <size_t _Np, typename... _Tp>
CodecSpecificConfigurationLtv(std::in_place_index_t<_Np>,_Tp &&..._args)236 constexpr explicit CodecSpecificConfigurationLtv(std::in_place_index_t<_Np>, _Tp&&... _args)
237 : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
238
239 template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)240 static CodecSpecificConfigurationLtv make(_Tp&&... _args) {
241 return CodecSpecificConfigurationLtv(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
242 }
243
244 template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)245 static CodecSpecificConfigurationLtv make(std::initializer_list<_Tp> _il, _Up&&... _args) {
246 return CodecSpecificConfigurationLtv(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
247 }
248
getTag()249 Tag getTag() const {
250 return static_cast<Tag>(_value.index());
251 }
252
253 template <Tag _tag>
get()254 const auto& get() const {
255 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
256 return std::get<static_cast<size_t>(_tag)>(_value);
257 }
258
259 template <Tag _tag>
get()260 auto& get() {
261 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
262 return std::get<static_cast<size_t>(_tag)>(_value);
263 }
264
265 template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)266 void set(_Tp&&... _args) {
267 _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
268 }
269
270 binder_status_t readFromParcel(const AParcel* _parcel);
271 binder_status_t writeToParcel(AParcel* _parcel) const;
272
273 inline bool operator==(const CodecSpecificConfigurationLtv& _rhs) const {
274 return _value == _rhs._value;
275 }
276 inline bool operator<(const CodecSpecificConfigurationLtv& _rhs) const {
277 return _value < _rhs._value;
278 }
279 inline bool operator!=(const CodecSpecificConfigurationLtv& _rhs) const {
280 return !(*this == _rhs);
281 }
282 inline bool operator>(const CodecSpecificConfigurationLtv& _rhs) const {
283 return _rhs < *this;
284 }
285 inline bool operator>=(const CodecSpecificConfigurationLtv& _rhs) const {
286 return !(*this < _rhs);
287 }
288 inline bool operator<=(const CodecSpecificConfigurationLtv& _rhs) const {
289 return !(_rhs < *this);
290 }
291
292 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()293 inline std::string toString() const {
294 std::ostringstream os;
295 os << "CodecSpecificConfigurationLtv{";
296 switch (getTag()) {
297 case codecFrameBlocksPerSDU: os << "codecFrameBlocksPerSDU: " << ::android::internal::ToString(get<codecFrameBlocksPerSDU>()); break;
298 case samplingFrequency: os << "samplingFrequency: " << ::android::internal::ToString(get<samplingFrequency>()); break;
299 case frameDuration: os << "frameDuration: " << ::android::internal::ToString(get<frameDuration>()); break;
300 case audioChannelAllocation: os << "audioChannelAllocation: " << ::android::internal::ToString(get<audioChannelAllocation>()); break;
301 case octetsPerCodecFrame: os << "octetsPerCodecFrame: " << ::android::internal::ToString(get<octetsPerCodecFrame>()); break;
302 }
303 os << "}";
304 return os.str();
305 }
306 private:
307 std::variant<::aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::CodecFrameBlocksPerSDU, ::aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency, ::aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::FrameDuration, ::aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::AudioChannelAllocation, ::aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::OctetsPerCodecFrame> _value;
308 };
309 } // namespace audio
310 } // namespace bluetooth
311 } // namespace hardware
312 } // namespace android
313 } // namespace aidl
314 namespace aidl {
315 namespace android {
316 namespace hardware {
317 namespace bluetooth {
318 namespace audio {
toString(CodecSpecificConfigurationLtv::SamplingFrequency val)319 [[nodiscard]] static inline std::string toString(CodecSpecificConfigurationLtv::SamplingFrequency val) {
320 switch(val) {
321 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ8000:
322 return "HZ8000";
323 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ11025:
324 return "HZ11025";
325 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ16000:
326 return "HZ16000";
327 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ22050:
328 return "HZ22050";
329 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ24000:
330 return "HZ24000";
331 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ32000:
332 return "HZ32000";
333 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ44100:
334 return "HZ44100";
335 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ48000:
336 return "HZ48000";
337 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ88200:
338 return "HZ88200";
339 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ96000:
340 return "HZ96000";
341 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ176400:
342 return "HZ176400";
343 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ192000:
344 return "HZ192000";
345 case CodecSpecificConfigurationLtv::SamplingFrequency::HZ384000:
346 return "HZ384000";
347 default:
348 return std::to_string(static_cast<int8_t>(val));
349 }
350 }
351 } // namespace audio
352 } // namespace bluetooth
353 } // namespace hardware
354 } // namespace android
355 } // namespace aidl
356 namespace ndk {
357 namespace internal {
358 #pragma clang diagnostic push
359 #pragma clang diagnostic ignored "-Wc++17-extensions"
360 template <>
361 constexpr inline std::array<aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency, 13> enum_values<aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency> = {
362 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ8000,
363 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ11025,
364 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ16000,
365 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ22050,
366 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ24000,
367 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ32000,
368 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ44100,
369 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ48000,
370 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ88200,
371 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ96000,
372 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ176400,
373 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ192000,
374 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::SamplingFrequency::HZ384000,
375 };
376 #pragma clang diagnostic pop
377 } // namespace internal
378 } // namespace ndk
379 namespace aidl {
380 namespace android {
381 namespace hardware {
382 namespace bluetooth {
383 namespace audio {
toString(CodecSpecificConfigurationLtv::FrameDuration val)384 [[nodiscard]] static inline std::string toString(CodecSpecificConfigurationLtv::FrameDuration val) {
385 switch(val) {
386 case CodecSpecificConfigurationLtv::FrameDuration::US7500:
387 return "US7500";
388 case CodecSpecificConfigurationLtv::FrameDuration::US10000:
389 return "US10000";
390 case CodecSpecificConfigurationLtv::FrameDuration::US20000:
391 return "US20000";
392 default:
393 return std::to_string(static_cast<int8_t>(val));
394 }
395 }
396 } // namespace audio
397 } // namespace bluetooth
398 } // namespace hardware
399 } // namespace android
400 } // namespace aidl
401 namespace ndk {
402 namespace internal {
403 #pragma clang diagnostic push
404 #pragma clang diagnostic ignored "-Wc++17-extensions"
405 template <>
406 constexpr inline std::array<aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::FrameDuration, 3> enum_values<aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::FrameDuration> = {
407 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::FrameDuration::US7500,
408 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::FrameDuration::US10000,
409 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::FrameDuration::US20000,
410 };
411 #pragma clang diagnostic pop
412 } // namespace internal
413 } // namespace ndk
414 namespace aidl {
415 namespace android {
416 namespace hardware {
417 namespace bluetooth {
418 namespace audio {
toString(CodecSpecificConfigurationLtv::Tag val)419 [[nodiscard]] static inline std::string toString(CodecSpecificConfigurationLtv::Tag val) {
420 switch(val) {
421 case CodecSpecificConfigurationLtv::Tag::codecFrameBlocksPerSDU:
422 return "codecFrameBlocksPerSDU";
423 case CodecSpecificConfigurationLtv::Tag::samplingFrequency:
424 return "samplingFrequency";
425 case CodecSpecificConfigurationLtv::Tag::frameDuration:
426 return "frameDuration";
427 case CodecSpecificConfigurationLtv::Tag::audioChannelAllocation:
428 return "audioChannelAllocation";
429 case CodecSpecificConfigurationLtv::Tag::octetsPerCodecFrame:
430 return "octetsPerCodecFrame";
431 default:
432 return std::to_string(static_cast<int32_t>(val));
433 }
434 }
435 } // namespace audio
436 } // namespace bluetooth
437 } // namespace hardware
438 } // namespace android
439 } // namespace aidl
440 namespace ndk {
441 namespace internal {
442 #pragma clang diagnostic push
443 #pragma clang diagnostic ignored "-Wc++17-extensions"
444 template <>
445 constexpr inline std::array<aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::Tag, 5> enum_values<aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::Tag> = {
446 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::Tag::codecFrameBlocksPerSDU,
447 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::Tag::samplingFrequency,
448 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::Tag::frameDuration,
449 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::Tag::audioChannelAllocation,
450 aidl::android::hardware::bluetooth::audio::CodecSpecificConfigurationLtv::Tag::octetsPerCodecFrame,
451 };
452 #pragma clang diagnostic pop
453 } // namespace internal
454 } // namespace ndk
455