/* * This file is auto-generated. DO NOT MODIFY. * Using: /home/iscle/Android/Sdk/build-tools/35.0.1/aidl --lang=ndk -o generated -h generated/include --structured --stability=vintf --min_sdk_version=31 -I hardware_interfaces/common/aidl/aidl_api/android.hardware.common/current/ -I hardware_interfaces/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/ -I hardware_interfaces/audio/aidl/aidl_api/android.hardware.audio.common/current/ -I hardware_interfaces/audio/aidl/aidl_api/android.hardware.audio.effect/current/ -I system_hardware_interfaces/media/aidl_api/android.media.audio.common.types/current/ -I system_hardware_interfaces/media/aidl_api/android.media.audio.eraser.types/current/ hardware_interfaces/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Spatializer.aidl */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef BINDER_STABILITY_SUPPORT #include #endif // BINDER_STABILITY_SUPPORT #ifndef __BIONIC__ #define __assert2(a,b,c,d) ((void)0) #endif namespace aidl::android::hardware::audio::effect { class VendorExtension; } // namespace aidl::android::hardware::audio::effect namespace aidl { namespace android { namespace hardware { namespace audio { namespace effect { class Spatializer { public: typedef std::false_type fixed_size; static const char* descriptor; enum class Tag : int32_t { vendor = 0, supportedChannelLayout = 1, spatializationLevel = 2, spatializationMode = 3, headTrackingSensorId = 4, headTrackingMode = 5, headTrackingConnectionMode = 6, headTrackingSensorData = 7, spatializedChannelLayout = 8, }; class Id { public: typedef std::false_type fixed_size; static const char* descriptor; enum class Tag : int32_t { vendorExtensionTag = 0, commonTag = 1, }; // Expose tag symbols for legacy code static const inline Tag vendorExtensionTag = Tag::vendorExtensionTag; static const inline Tag commonTag = Tag::commonTag; template static constexpr bool _not_self = !std::is_same_v>, Id>; Id() : _value(std::in_place_index(vendorExtensionTag)>, ::aidl::android::hardware::audio::effect::VendorExtension()) { } template >> // NOLINTNEXTLINE(google-explicit-constructor) constexpr Id(_Tp&& _arg) : _value(std::forward<_Tp>(_arg)) {} template constexpr explicit Id(std::in_place_index_t<_Np>, _Tp&&... _args) : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {} template static Id make(_Tp&&... _args) { return Id(std::in_place_index(_tag)>, std::forward<_Tp>(_args)...); } template static Id make(std::initializer_list<_Tp> _il, _Up&&... _args) { return Id(std::in_place_index(_tag)>, std::move(_il), std::forward<_Up>(_args)...); } Tag getTag() const { return static_cast(_value.index()); } template const auto& get() const { if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); } return std::get(_tag)>(_value); } template auto& get() { if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); } return std::get(_tag)>(_value); } template void set(_Tp&&... _args) { _value.emplace(_tag)>(std::forward<_Tp>(_args)...); } binder_status_t readFromParcel(const AParcel* _parcel); binder_status_t writeToParcel(AParcel* _parcel) const; inline bool operator==(const Id& _rhs) const { return _value == _rhs._value; } inline bool operator<(const Id& _rhs) const { return _value < _rhs._value; } inline bool operator!=(const Id& _rhs) const { return !(*this == _rhs); } inline bool operator>(const Id& _rhs) const { return _rhs < *this; } inline bool operator>=(const Id& _rhs) const { return !(*this < _rhs); } inline bool operator<=(const Id& _rhs) const { return !(_rhs < *this); } static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; inline std::string toString() const { std::ostringstream os; os << "Id{"; switch (getTag()) { case vendorExtensionTag: os << "vendorExtensionTag: " << ::android::internal::ToString(get()); break; case commonTag: os << "commonTag: " << ::android::internal::ToString(get()); break; } os << "}"; return os.str(); } private: std::variant<::aidl::android::hardware::audio::effect::VendorExtension, ::aidl::android::hardware::audio::effect::Spatializer::Tag> _value; }; // Expose tag symbols for legacy code static const inline Tag vendor = Tag::vendor; static const inline Tag supportedChannelLayout = Tag::supportedChannelLayout; static const inline Tag spatializationLevel = Tag::spatializationLevel; static const inline Tag spatializationMode = Tag::spatializationMode; static const inline Tag headTrackingSensorId = Tag::headTrackingSensorId; static const inline Tag headTrackingMode = Tag::headTrackingMode; static const inline Tag headTrackingConnectionMode = Tag::headTrackingConnectionMode; static const inline Tag headTrackingSensorData = Tag::headTrackingSensorData; static const inline Tag spatializedChannelLayout = Tag::spatializedChannelLayout; template static constexpr bool _not_self = !std::is_same_v>, Spatializer>; Spatializer() : _value(std::in_place_index(vendor)>, ::aidl::android::hardware::audio::effect::VendorExtension()) { } template >> // NOLINTNEXTLINE(google-explicit-constructor) constexpr Spatializer(_Tp&& _arg) : _value(std::forward<_Tp>(_arg)) {} template constexpr explicit Spatializer(std::in_place_index_t<_Np>, _Tp&&... _args) : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {} template static Spatializer make(_Tp&&... _args) { return Spatializer(std::in_place_index(_tag)>, std::forward<_Tp>(_args)...); } template static Spatializer make(std::initializer_list<_Tp> _il, _Up&&... _args) { return Spatializer(std::in_place_index(_tag)>, std::move(_il), std::forward<_Up>(_args)...); } Tag getTag() const { return static_cast(_value.index()); } template const auto& get() const { if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); } return std::get(_tag)>(_value); } template auto& get() { if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); } return std::get(_tag)>(_value); } template void set(_Tp&&... _args) { _value.emplace(_tag)>(std::forward<_Tp>(_args)...); } binder_status_t readFromParcel(const AParcel* _parcel); binder_status_t writeToParcel(AParcel* _parcel) const; inline bool operator==(const Spatializer& _rhs) const { return _value == _rhs._value; } inline bool operator<(const Spatializer& _rhs) const { return _value < _rhs._value; } inline bool operator!=(const Spatializer& _rhs) const { return !(*this == _rhs); } inline bool operator>(const Spatializer& _rhs) const { return _rhs < *this; } inline bool operator>=(const Spatializer& _rhs) const { return !(*this < _rhs); } inline bool operator<=(const Spatializer& _rhs) const { return !(_rhs < *this); } static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; inline std::string toString() const { std::ostringstream os; os << "Spatializer{"; switch (getTag()) { case vendor: os << "vendor: " << ::android::internal::ToString(get()); break; case supportedChannelLayout: os << "supportedChannelLayout: " << ::android::internal::ToString(get()); break; case spatializationLevel: os << "spatializationLevel: " << ::android::internal::ToString(get()); break; case spatializationMode: os << "spatializationMode: " << ::android::internal::ToString(get()); break; case headTrackingSensorId: os << "headTrackingSensorId: " << ::android::internal::ToString(get()); break; case headTrackingMode: os << "headTrackingMode: " << ::android::internal::ToString(get()); break; case headTrackingConnectionMode: os << "headTrackingConnectionMode: " << ::android::internal::ToString(get()); break; case headTrackingSensorData: os << "headTrackingSensorData: " << ::android::internal::ToString(get()); break; case spatializedChannelLayout: os << "spatializedChannelLayout: " << ::android::internal::ToString(get()); break; } os << "}"; return os.str(); } private: 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; }; } // namespace effect } // namespace audio } // namespace hardware } // namespace android } // namespace aidl namespace aidl { namespace android { namespace hardware { namespace audio { namespace effect { [[nodiscard]] static inline std::string toString(Spatializer::Id::Tag val) { switch(val) { case Spatializer::Id::Tag::vendorExtensionTag: return "vendorExtensionTag"; case Spatializer::Id::Tag::commonTag: return "commonTag"; default: return std::to_string(static_cast(val)); } } } // namespace effect } // namespace audio } // namespace hardware } // namespace android } // namespace aidl namespace ndk { namespace internal { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc++17-extensions" template <> constexpr inline std::array enum_values = { aidl::android::hardware::audio::effect::Spatializer::Id::Tag::vendorExtensionTag, aidl::android::hardware::audio::effect::Spatializer::Id::Tag::commonTag, }; #pragma clang diagnostic pop } // namespace internal } // namespace ndk namespace aidl { namespace android { namespace hardware { namespace audio { namespace effect { [[nodiscard]] static inline std::string toString(Spatializer::Tag val) { switch(val) { case Spatializer::Tag::vendor: return "vendor"; case Spatializer::Tag::supportedChannelLayout: return "supportedChannelLayout"; case Spatializer::Tag::spatializationLevel: return "spatializationLevel"; case Spatializer::Tag::spatializationMode: return "spatializationMode"; case Spatializer::Tag::headTrackingSensorId: return "headTrackingSensorId"; case Spatializer::Tag::headTrackingMode: return "headTrackingMode"; case Spatializer::Tag::headTrackingConnectionMode: return "headTrackingConnectionMode"; case Spatializer::Tag::headTrackingSensorData: return "headTrackingSensorData"; case Spatializer::Tag::spatializedChannelLayout: return "spatializedChannelLayout"; default: return std::to_string(static_cast(val)); } } } // namespace effect } // namespace audio } // namespace hardware } // namespace android } // namespace aidl namespace ndk { namespace internal { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc++17-extensions" template <> constexpr inline std::array enum_values = { aidl::android::hardware::audio::effect::Spatializer::Tag::vendor, aidl::android::hardware::audio::effect::Spatializer::Tag::supportedChannelLayout, aidl::android::hardware::audio::effect::Spatializer::Tag::spatializationLevel, aidl::android::hardware::audio::effect::Spatializer::Tag::spatializationMode, aidl::android::hardware::audio::effect::Spatializer::Tag::headTrackingSensorId, aidl::android::hardware::audio::effect::Spatializer::Tag::headTrackingMode, aidl::android::hardware::audio::effect::Spatializer::Tag::headTrackingConnectionMode, aidl::android::hardware::audio::effect::Spatializer::Tag::headTrackingSensorData, aidl::android::hardware::audio::effect::Spatializer::Tag::spatializedChannelLayout, }; #pragma clang diagnostic pop } // namespace internal } // namespace ndk