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