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/CodecSpecificCapabilitiesLtv.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/CodecSpecificCapabilitiesLtv.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/CodecSpecificCapabilitiesLtv.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 CodecSpecificCapabilitiesLtv {
40 public:
41 typedef std::false_type fixed_size;
42 static const char* descriptor;
43
44 class SupportedSamplingFrequencies {
45 public:
46 typedef std::false_type fixed_size;
47 static const char* descriptor;
48
49 int32_t bitmask = 0;
50
51 binder_status_t readFromParcel(const AParcel* parcel);
52 binder_status_t writeToParcel(AParcel* parcel) const;
53
54 inline bool operator==(const SupportedSamplingFrequencies& _rhs) const {
55 return std::tie(bitmask) == std::tie(_rhs.bitmask);
56 }
57 inline bool operator<(const SupportedSamplingFrequencies& _rhs) const {
58 return std::tie(bitmask) < std::tie(_rhs.bitmask);
59 }
60 inline bool operator!=(const SupportedSamplingFrequencies& _rhs) const {
61 return !(*this == _rhs);
62 }
63 inline bool operator>(const SupportedSamplingFrequencies& _rhs) const {
64 return _rhs < *this;
65 }
66 inline bool operator>=(const SupportedSamplingFrequencies& _rhs) const {
67 return !(*this < _rhs);
68 }
69 inline bool operator<=(const SupportedSamplingFrequencies& _rhs) const {
70 return !(_rhs < *this);
71 }
72
73 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
74 enum : int32_t { HZ8000 = 1 };
75 enum : int32_t { HZ11025 = 2 };
76 enum : int32_t { HZ16000 = 4 };
77 enum : int32_t { HZ22050 = 8 };
78 enum : int32_t { HZ24000 = 16 };
79 enum : int32_t { HZ32000 = 32 };
80 enum : int32_t { HZ44100 = 64 };
81 enum : int32_t { HZ48000 = 128 };
82 enum : int32_t { HZ88200 = 256 };
83 enum : int32_t { HZ96000 = 512 };
84 enum : int32_t { HZ176400 = 1024 };
85 enum : int32_t { HZ192000 = 2048 };
86 enum : int32_t { HZ384000 = 4096 };
toString()87 inline std::string toString() const {
88 std::ostringstream _aidl_os;
89 _aidl_os << "SupportedSamplingFrequencies{";
90 _aidl_os << "bitmask: " << ::android::internal::ToString(bitmask);
91 _aidl_os << "}";
92 return _aidl_os.str();
93 }
94 };
95 class SupportedFrameDurations {
96 public:
97 typedef std::false_type fixed_size;
98 static const char* descriptor;
99
100 int32_t bitmask = 0;
101
102 binder_status_t readFromParcel(const AParcel* parcel);
103 binder_status_t writeToParcel(AParcel* parcel) const;
104
105 inline bool operator==(const SupportedFrameDurations& _rhs) const {
106 return std::tie(bitmask) == std::tie(_rhs.bitmask);
107 }
108 inline bool operator<(const SupportedFrameDurations& _rhs) const {
109 return std::tie(bitmask) < std::tie(_rhs.bitmask);
110 }
111 inline bool operator!=(const SupportedFrameDurations& _rhs) const {
112 return !(*this == _rhs);
113 }
114 inline bool operator>(const SupportedFrameDurations& _rhs) const {
115 return _rhs < *this;
116 }
117 inline bool operator>=(const SupportedFrameDurations& _rhs) const {
118 return !(*this < _rhs);
119 }
120 inline bool operator<=(const SupportedFrameDurations& _rhs) const {
121 return !(_rhs < *this);
122 }
123
124 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
125 enum : int32_t { US7500 = 1 };
126 enum : int32_t { US10000 = 2 };
127 enum : int32_t { US20000 = 4 };
128 enum : int32_t { US7500PREFERRED = 16 };
129 enum : int32_t { US10000PREFERRED = 32 };
130 enum : int32_t { US20000PREFERRED = 64 };
toString()131 inline std::string toString() const {
132 std::ostringstream _aidl_os;
133 _aidl_os << "SupportedFrameDurations{";
134 _aidl_os << "bitmask: " << ::android::internal::ToString(bitmask);
135 _aidl_os << "}";
136 return _aidl_os.str();
137 }
138 };
139 class SupportedAudioChannelCounts {
140 public:
141 typedef std::false_type fixed_size;
142 static const char* descriptor;
143
144 int32_t bitmask = 0;
145
146 binder_status_t readFromParcel(const AParcel* parcel);
147 binder_status_t writeToParcel(AParcel* parcel) const;
148
149 inline bool operator==(const SupportedAudioChannelCounts& _rhs) const {
150 return std::tie(bitmask) == std::tie(_rhs.bitmask);
151 }
152 inline bool operator<(const SupportedAudioChannelCounts& _rhs) const {
153 return std::tie(bitmask) < std::tie(_rhs.bitmask);
154 }
155 inline bool operator!=(const SupportedAudioChannelCounts& _rhs) const {
156 return !(*this == _rhs);
157 }
158 inline bool operator>(const SupportedAudioChannelCounts& _rhs) const {
159 return _rhs < *this;
160 }
161 inline bool operator>=(const SupportedAudioChannelCounts& _rhs) const {
162 return !(*this < _rhs);
163 }
164 inline bool operator<=(const SupportedAudioChannelCounts& _rhs) const {
165 return !(_rhs < *this);
166 }
167
168 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
169 enum : int32_t { ONE = 1 };
170 enum : int32_t { TWO = 2 };
171 enum : int32_t { THREE = 4 };
172 enum : int32_t { FOUR = 8 };
173 enum : int32_t { FIVE = 16 };
174 enum : int32_t { SIX = 32 };
175 enum : int32_t { SEVEN = 64 };
176 enum : int32_t { EIGHT = 128 };
toString()177 inline std::string toString() const {
178 std::ostringstream _aidl_os;
179 _aidl_os << "SupportedAudioChannelCounts{";
180 _aidl_os << "bitmask: " << ::android::internal::ToString(bitmask);
181 _aidl_os << "}";
182 return _aidl_os.str();
183 }
184 };
185 class SupportedOctetsPerCodecFrame {
186 public:
187 typedef std::false_type fixed_size;
188 static const char* descriptor;
189
190 int32_t min = 0;
191 int32_t max = 0;
192
193 binder_status_t readFromParcel(const AParcel* parcel);
194 binder_status_t writeToParcel(AParcel* parcel) const;
195
196 inline bool operator==(const SupportedOctetsPerCodecFrame& _rhs) const {
197 return std::tie(min, max) == std::tie(_rhs.min, _rhs.max);
198 }
199 inline bool operator<(const SupportedOctetsPerCodecFrame& _rhs) const {
200 return std::tie(min, max) < std::tie(_rhs.min, _rhs.max);
201 }
202 inline bool operator!=(const SupportedOctetsPerCodecFrame& _rhs) const {
203 return !(*this == _rhs);
204 }
205 inline bool operator>(const SupportedOctetsPerCodecFrame& _rhs) const {
206 return _rhs < *this;
207 }
208 inline bool operator>=(const SupportedOctetsPerCodecFrame& _rhs) const {
209 return !(*this < _rhs);
210 }
211 inline bool operator<=(const SupportedOctetsPerCodecFrame& _rhs) const {
212 return !(_rhs < *this);
213 }
214
215 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()216 inline std::string toString() const {
217 std::ostringstream _aidl_os;
218 _aidl_os << "SupportedOctetsPerCodecFrame{";
219 _aidl_os << "min: " << ::android::internal::ToString(min);
220 _aidl_os << ", max: " << ::android::internal::ToString(max);
221 _aidl_os << "}";
222 return _aidl_os.str();
223 }
224 };
225 class SupportedMaxCodecFramesPerSDU {
226 public:
227 typedef std::false_type fixed_size;
228 static const char* descriptor;
229
230 int32_t value = 0;
231
232 binder_status_t readFromParcel(const AParcel* parcel);
233 binder_status_t writeToParcel(AParcel* parcel) const;
234
235 inline bool operator==(const SupportedMaxCodecFramesPerSDU& _rhs) const {
236 return std::tie(value) == std::tie(_rhs.value);
237 }
238 inline bool operator<(const SupportedMaxCodecFramesPerSDU& _rhs) const {
239 return std::tie(value) < std::tie(_rhs.value);
240 }
241 inline bool operator!=(const SupportedMaxCodecFramesPerSDU& _rhs) const {
242 return !(*this == _rhs);
243 }
244 inline bool operator>(const SupportedMaxCodecFramesPerSDU& _rhs) const {
245 return _rhs < *this;
246 }
247 inline bool operator>=(const SupportedMaxCodecFramesPerSDU& _rhs) const {
248 return !(*this < _rhs);
249 }
250 inline bool operator<=(const SupportedMaxCodecFramesPerSDU& _rhs) const {
251 return !(_rhs < *this);
252 }
253
254 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()255 inline std::string toString() const {
256 std::ostringstream _aidl_os;
257 _aidl_os << "SupportedMaxCodecFramesPerSDU{";
258 _aidl_os << "value: " << ::android::internal::ToString(value);
259 _aidl_os << "}";
260 return _aidl_os.str();
261 }
262 };
263 enum class Tag : int32_t {
264 supportedSamplingFrequencies = 0,
265 supportedFrameDurations = 1,
266 supportedAudioChannelCounts = 2,
267 supportedOctetsPerCodecFrame = 3,
268 supportedMaxCodecFramesPerSDU = 4,
269 };
270
271 // Expose tag symbols for legacy code
272 static const inline Tag supportedSamplingFrequencies = Tag::supportedSamplingFrequencies;
273 static const inline Tag supportedFrameDurations = Tag::supportedFrameDurations;
274 static const inline Tag supportedAudioChannelCounts = Tag::supportedAudioChannelCounts;
275 static const inline Tag supportedOctetsPerCodecFrame = Tag::supportedOctetsPerCodecFrame;
276 static const inline Tag supportedMaxCodecFramesPerSDU = Tag::supportedMaxCodecFramesPerSDU;
277
278 template<typename _Tp>
279 static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, CodecSpecificCapabilitiesLtv>;
280
CodecSpecificCapabilitiesLtv()281 CodecSpecificCapabilitiesLtv() : _value(std::in_place_index<static_cast<size_t>(supportedSamplingFrequencies)>, ::aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::SupportedSamplingFrequencies()) { }
282
283 template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
284 // NOLINTNEXTLINE(google-explicit-constructor)
CodecSpecificCapabilitiesLtv(_Tp && _arg)285 constexpr CodecSpecificCapabilitiesLtv(_Tp&& _arg)
286 : _value(std::forward<_Tp>(_arg)) {}
287
288 template <size_t _Np, typename... _Tp>
CodecSpecificCapabilitiesLtv(std::in_place_index_t<_Np>,_Tp &&..._args)289 constexpr explicit CodecSpecificCapabilitiesLtv(std::in_place_index_t<_Np>, _Tp&&... _args)
290 : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
291
292 template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)293 static CodecSpecificCapabilitiesLtv make(_Tp&&... _args) {
294 return CodecSpecificCapabilitiesLtv(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
295 }
296
297 template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)298 static CodecSpecificCapabilitiesLtv make(std::initializer_list<_Tp> _il, _Up&&... _args) {
299 return CodecSpecificCapabilitiesLtv(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
300 }
301
getTag()302 Tag getTag() const {
303 return static_cast<Tag>(_value.index());
304 }
305
306 template <Tag _tag>
get()307 const auto& get() const {
308 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
309 return std::get<static_cast<size_t>(_tag)>(_value);
310 }
311
312 template <Tag _tag>
get()313 auto& get() {
314 if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
315 return std::get<static_cast<size_t>(_tag)>(_value);
316 }
317
318 template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)319 void set(_Tp&&... _args) {
320 _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
321 }
322
323 binder_status_t readFromParcel(const AParcel* _parcel);
324 binder_status_t writeToParcel(AParcel* _parcel) const;
325
326 inline bool operator==(const CodecSpecificCapabilitiesLtv& _rhs) const {
327 return _value == _rhs._value;
328 }
329 inline bool operator<(const CodecSpecificCapabilitiesLtv& _rhs) const {
330 return _value < _rhs._value;
331 }
332 inline bool operator!=(const CodecSpecificCapabilitiesLtv& _rhs) const {
333 return !(*this == _rhs);
334 }
335 inline bool operator>(const CodecSpecificCapabilitiesLtv& _rhs) const {
336 return _rhs < *this;
337 }
338 inline bool operator>=(const CodecSpecificCapabilitiesLtv& _rhs) const {
339 return !(*this < _rhs);
340 }
341 inline bool operator<=(const CodecSpecificCapabilitiesLtv& _rhs) const {
342 return !(_rhs < *this);
343 }
344
345 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()346 inline std::string toString() const {
347 std::ostringstream os;
348 os << "CodecSpecificCapabilitiesLtv{";
349 switch (getTag()) {
350 case supportedSamplingFrequencies: os << "supportedSamplingFrequencies: " << ::android::internal::ToString(get<supportedSamplingFrequencies>()); break;
351 case supportedFrameDurations: os << "supportedFrameDurations: " << ::android::internal::ToString(get<supportedFrameDurations>()); break;
352 case supportedAudioChannelCounts: os << "supportedAudioChannelCounts: " << ::android::internal::ToString(get<supportedAudioChannelCounts>()); break;
353 case supportedOctetsPerCodecFrame: os << "supportedOctetsPerCodecFrame: " << ::android::internal::ToString(get<supportedOctetsPerCodecFrame>()); break;
354 case supportedMaxCodecFramesPerSDU: os << "supportedMaxCodecFramesPerSDU: " << ::android::internal::ToString(get<supportedMaxCodecFramesPerSDU>()); break;
355 }
356 os << "}";
357 return os.str();
358 }
359 private:
360 std::variant<::aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::SupportedSamplingFrequencies, ::aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::SupportedFrameDurations, ::aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::SupportedAudioChannelCounts, ::aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::SupportedOctetsPerCodecFrame, ::aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::SupportedMaxCodecFramesPerSDU> _value;
361 };
362 } // namespace audio
363 } // namespace bluetooth
364 } // namespace hardware
365 } // namespace android
366 } // namespace aidl
367 namespace aidl {
368 namespace android {
369 namespace hardware {
370 namespace bluetooth {
371 namespace audio {
toString(CodecSpecificCapabilitiesLtv::Tag val)372 [[nodiscard]] static inline std::string toString(CodecSpecificCapabilitiesLtv::Tag val) {
373 switch(val) {
374 case CodecSpecificCapabilitiesLtv::Tag::supportedSamplingFrequencies:
375 return "supportedSamplingFrequencies";
376 case CodecSpecificCapabilitiesLtv::Tag::supportedFrameDurations:
377 return "supportedFrameDurations";
378 case CodecSpecificCapabilitiesLtv::Tag::supportedAudioChannelCounts:
379 return "supportedAudioChannelCounts";
380 case CodecSpecificCapabilitiesLtv::Tag::supportedOctetsPerCodecFrame:
381 return "supportedOctetsPerCodecFrame";
382 case CodecSpecificCapabilitiesLtv::Tag::supportedMaxCodecFramesPerSDU:
383 return "supportedMaxCodecFramesPerSDU";
384 default:
385 return std::to_string(static_cast<int32_t>(val));
386 }
387 }
388 } // namespace audio
389 } // namespace bluetooth
390 } // namespace hardware
391 } // namespace android
392 } // namespace aidl
393 namespace ndk {
394 namespace internal {
395 #pragma clang diagnostic push
396 #pragma clang diagnostic ignored "-Wc++17-extensions"
397 template <>
398 constexpr inline std::array<aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::Tag, 5> enum_values<aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::Tag> = {
399 aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::Tag::supportedSamplingFrequencies,
400 aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::Tag::supportedFrameDurations,
401 aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::Tag::supportedAudioChannelCounts,
402 aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::Tag::supportedOctetsPerCodecFrame,
403 aidl::android::hardware::bluetooth::audio::CodecSpecificCapabilitiesLtv::Tag::supportedMaxCodecFramesPerSDU,
404 };
405 #pragma clang diagnostic pop
406 } // namespace internal
407 } // namespace ndk
408