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 -Werror -Weverything --structured --version 4 --hash notfrozen -t --stability vintf --min_sdk_version 29 --previous_api_dir=system/hardware/interfaces/media/aidl_api/android.media.audio.common.types/3 --previous_hash 0c86a38729dd5d560fe3a0eca6aa9d8cf83efb00 --ninja -d out/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types-V4-ndk-source/gen/staging/android/media/audio/common/Spatialization.cpp.d -h out/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types-V4-ndk-source/gen/include/staging -o out/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types-V4-ndk-source/gen/staging -Nsystem/hardware/interfaces/media/aidl system/hardware/interfaces/media/aidl/android/media/audio/common/Spatialization.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 <cstdint>
13 #include <memory>
14 #include <optional>
15 #include <string>
16 #include <vector>
17 #include <android/binder_enums.h>
18 #include <android/binder_interface_utils.h>
19 #include <android/binder_parcelable_utils.h>
20 #include <android/binder_to_string.h>
21 #ifdef BINDER_STABILITY_SUPPORT
22 #include <android/binder_stability.h>
23 #endif  // BINDER_STABILITY_SUPPORT
24 
25 namespace aidl {
26 namespace android {
27 namespace media {
28 namespace audio {
29 namespace common {
30 class Spatialization {
31 public:
32   typedef std::false_type fixed_size;
33   static const char* descriptor;
34 
35   enum class Level : int8_t {
36     NONE = 0,
37     MULTICHANNEL = 1,
38     BED_PLUS_OBJECTS = 2,
39   };
40 
41   enum class Mode : int8_t {
42     BINAURAL = 0,
43     TRANSAURAL = 1,
44   };
45 
46 
47   binder_status_t readFromParcel(const AParcel* parcel);
48   binder_status_t writeToParcel(AParcel* parcel) const;
49 
50   inline bool operator==(const Spatialization&) const {
51     return std::tie() == std::tie();
52   }
53   inline bool operator<(const Spatialization&) const {
54     return std::tie() < std::tie();
55   }
56   inline bool operator!=(const Spatialization& _rhs) const {
57     return !(*this == _rhs);
58   }
59   inline bool operator>(const Spatialization& _rhs) const {
60     return _rhs < *this;
61   }
62   inline bool operator>=(const Spatialization& _rhs) const {
63     return !(*this < _rhs);
64   }
65   inline bool operator<=(const Spatialization& _rhs) const {
66     return !(_rhs < *this);
67   }
68 
69   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()70   inline std::string toString() const {
71     std::ostringstream _aidl_os;
72     _aidl_os << "Spatialization{";
73     _aidl_os << "}";
74     return _aidl_os.str();
75   }
76 };
77 }  // namespace common
78 }  // namespace audio
79 }  // namespace media
80 }  // namespace android
81 }  // namespace aidl
82 namespace aidl {
83 namespace android {
84 namespace media {
85 namespace audio {
86 namespace common {
toString(Spatialization::Level val)87 [[nodiscard]] static inline std::string toString(Spatialization::Level val) {
88   switch(val) {
89   case Spatialization::Level::NONE:
90     return "NONE";
91   case Spatialization::Level::MULTICHANNEL:
92     return "MULTICHANNEL";
93   case Spatialization::Level::BED_PLUS_OBJECTS:
94     return "BED_PLUS_OBJECTS";
95   default:
96     return std::to_string(static_cast<int8_t>(val));
97   }
98 }
99 }  // namespace common
100 }  // namespace audio
101 }  // namespace media
102 }  // namespace android
103 }  // namespace aidl
104 namespace ndk {
105 namespace internal {
106 #pragma clang diagnostic push
107 #pragma clang diagnostic ignored "-Wc++17-extensions"
108 template <>
109 constexpr inline std::array<aidl::android::media::audio::common::Spatialization::Level, 3> enum_values<aidl::android::media::audio::common::Spatialization::Level> = {
110   aidl::android::media::audio::common::Spatialization::Level::NONE,
111   aidl::android::media::audio::common::Spatialization::Level::MULTICHANNEL,
112   aidl::android::media::audio::common::Spatialization::Level::BED_PLUS_OBJECTS,
113 };
114 #pragma clang diagnostic pop
115 }  // namespace internal
116 }  // namespace ndk
117 namespace aidl {
118 namespace android {
119 namespace media {
120 namespace audio {
121 namespace common {
toString(Spatialization::Mode val)122 [[nodiscard]] static inline std::string toString(Spatialization::Mode val) {
123   switch(val) {
124   case Spatialization::Mode::BINAURAL:
125     return "BINAURAL";
126   case Spatialization::Mode::TRANSAURAL:
127     return "TRANSAURAL";
128   default:
129     return std::to_string(static_cast<int8_t>(val));
130   }
131 }
132 }  // namespace common
133 }  // namespace audio
134 }  // namespace media
135 }  // namespace android
136 }  // namespace aidl
137 namespace ndk {
138 namespace internal {
139 #pragma clang diagnostic push
140 #pragma clang diagnostic ignored "-Wc++17-extensions"
141 template <>
142 constexpr inline std::array<aidl::android::media::audio::common::Spatialization::Mode, 2> enum_values<aidl::android::media::audio::common::Spatialization::Mode> = {
143   aidl::android::media::audio::common::Spatialization::Mode::BINAURAL,
144   aidl::android::media::audio::common::Spatialization::Mode::TRANSAURAL,
145 };
146 #pragma clang diagnostic pop
147 }  // namespace internal
148 }  // namespace ndk
149