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/Flags.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/Flags.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 #include <aidl/android/hardware/audio/effect/Flags.h>
22 #ifdef BINDER_STABILITY_SUPPORT
23 #include <android/binder_stability.h>
24 #endif  // BINDER_STABILITY_SUPPORT
25 
26 namespace aidl {
27 namespace android {
28 namespace hardware {
29 namespace audio {
30 namespace effect {
31 class Flags {
32 public:
33   typedef std::false_type fixed_size;
34   static const char* descriptor;
35 
36   enum class Type : int8_t {
37     INSERT = 0,
38     AUXILIARY = 1,
39     REPLACE = 2,
40     PRE_PROC = 3,
41     POST_PROC = 4,
42   };
43 
44   enum class Insert : int8_t {
45     ANY = 0,
46     FIRST = 1,
47     LAST = 2,
48     EXCLUSIVE = 3,
49   };
50 
51   enum class Volume : int8_t {
52     NONE = 0,
53     CTRL = 1,
54     IND = 2,
55     MONITOR = 3,
56   };
57 
58   enum class HardwareAccelerator : int8_t {
59     NONE = 0,
60     SIMPLE = 1,
61     TUNNEL = 2,
62   };
63 
64   ::aidl::android::hardware::audio::effect::Flags::Type type = ::aidl::android::hardware::audio::effect::Flags::Type::INSERT;
65   ::aidl::android::hardware::audio::effect::Flags::Insert insert = ::aidl::android::hardware::audio::effect::Flags::Insert::ANY;
66   ::aidl::android::hardware::audio::effect::Flags::Volume volume = ::aidl::android::hardware::audio::effect::Flags::Volume::NONE;
67   ::aidl::android::hardware::audio::effect::Flags::HardwareAccelerator hwAcceleratorMode = ::aidl::android::hardware::audio::effect::Flags::HardwareAccelerator::NONE;
68   bool offloadIndication = false;
69   bool deviceIndication = false;
70   bool audioModeIndication = false;
71   bool audioSourceIndication = false;
72   bool bypass = false;
73   bool sinkMetadataIndication = false;
74   bool sourceMetadataIndication = false;
75 
76   binder_status_t readFromParcel(const AParcel* parcel);
77   binder_status_t writeToParcel(AParcel* parcel) const;
78 
79   inline bool operator==(const Flags& _rhs) const {
80     return std::tie(type, insert, volume, hwAcceleratorMode, offloadIndication, deviceIndication, audioModeIndication, audioSourceIndication, bypass, sinkMetadataIndication, sourceMetadataIndication) == std::tie(_rhs.type, _rhs.insert, _rhs.volume, _rhs.hwAcceleratorMode, _rhs.offloadIndication, _rhs.deviceIndication, _rhs.audioModeIndication, _rhs.audioSourceIndication, _rhs.bypass, _rhs.sinkMetadataIndication, _rhs.sourceMetadataIndication);
81   }
82   inline bool operator<(const Flags& _rhs) const {
83     return std::tie(type, insert, volume, hwAcceleratorMode, offloadIndication, deviceIndication, audioModeIndication, audioSourceIndication, bypass, sinkMetadataIndication, sourceMetadataIndication) < std::tie(_rhs.type, _rhs.insert, _rhs.volume, _rhs.hwAcceleratorMode, _rhs.offloadIndication, _rhs.deviceIndication, _rhs.audioModeIndication, _rhs.audioSourceIndication, _rhs.bypass, _rhs.sinkMetadataIndication, _rhs.sourceMetadataIndication);
84   }
85   inline bool operator!=(const Flags& _rhs) const {
86     return !(*this == _rhs);
87   }
88   inline bool operator>(const Flags& _rhs) const {
89     return _rhs < *this;
90   }
91   inline bool operator>=(const Flags& _rhs) const {
92     return !(*this < _rhs);
93   }
94   inline bool operator<=(const Flags& _rhs) const {
95     return !(_rhs < *this);
96   }
97 
98   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()99   inline std::string toString() const {
100     std::ostringstream _aidl_os;
101     _aidl_os << "Flags{";
102     _aidl_os << "type: " << ::android::internal::ToString(type);
103     _aidl_os << ", insert: " << ::android::internal::ToString(insert);
104     _aidl_os << ", volume: " << ::android::internal::ToString(volume);
105     _aidl_os << ", hwAcceleratorMode: " << ::android::internal::ToString(hwAcceleratorMode);
106     _aidl_os << ", offloadIndication: " << ::android::internal::ToString(offloadIndication);
107     _aidl_os << ", deviceIndication: " << ::android::internal::ToString(deviceIndication);
108     _aidl_os << ", audioModeIndication: " << ::android::internal::ToString(audioModeIndication);
109     _aidl_os << ", audioSourceIndication: " << ::android::internal::ToString(audioSourceIndication);
110     _aidl_os << ", bypass: " << ::android::internal::ToString(bypass);
111     _aidl_os << ", sinkMetadataIndication: " << ::android::internal::ToString(sinkMetadataIndication);
112     _aidl_os << ", sourceMetadataIndication: " << ::android::internal::ToString(sourceMetadataIndication);
113     _aidl_os << "}";
114     return _aidl_os.str();
115   }
116 };
117 }  // namespace effect
118 }  // namespace audio
119 }  // namespace hardware
120 }  // namespace android
121 }  // namespace aidl
122 namespace aidl {
123 namespace android {
124 namespace hardware {
125 namespace audio {
126 namespace effect {
toString(Flags::Type val)127 [[nodiscard]] static inline std::string toString(Flags::Type val) {
128   switch(val) {
129   case Flags::Type::INSERT:
130     return "INSERT";
131   case Flags::Type::AUXILIARY:
132     return "AUXILIARY";
133   case Flags::Type::REPLACE:
134     return "REPLACE";
135   case Flags::Type::PRE_PROC:
136     return "PRE_PROC";
137   case Flags::Type::POST_PROC:
138     return "POST_PROC";
139   default:
140     return std::to_string(static_cast<int8_t>(val));
141   }
142 }
143 }  // namespace effect
144 }  // namespace audio
145 }  // namespace hardware
146 }  // namespace android
147 }  // namespace aidl
148 namespace ndk {
149 namespace internal {
150 #pragma clang diagnostic push
151 #pragma clang diagnostic ignored "-Wc++17-extensions"
152 template <>
153 constexpr inline std::array<aidl::android::hardware::audio::effect::Flags::Type, 5> enum_values<aidl::android::hardware::audio::effect::Flags::Type> = {
154   aidl::android::hardware::audio::effect::Flags::Type::INSERT,
155   aidl::android::hardware::audio::effect::Flags::Type::AUXILIARY,
156   aidl::android::hardware::audio::effect::Flags::Type::REPLACE,
157   aidl::android::hardware::audio::effect::Flags::Type::PRE_PROC,
158   aidl::android::hardware::audio::effect::Flags::Type::POST_PROC,
159 };
160 #pragma clang diagnostic pop
161 }  // namespace internal
162 }  // namespace ndk
163 namespace aidl {
164 namespace android {
165 namespace hardware {
166 namespace audio {
167 namespace effect {
toString(Flags::Insert val)168 [[nodiscard]] static inline std::string toString(Flags::Insert val) {
169   switch(val) {
170   case Flags::Insert::ANY:
171     return "ANY";
172   case Flags::Insert::FIRST:
173     return "FIRST";
174   case Flags::Insert::LAST:
175     return "LAST";
176   case Flags::Insert::EXCLUSIVE:
177     return "EXCLUSIVE";
178   default:
179     return std::to_string(static_cast<int8_t>(val));
180   }
181 }
182 }  // namespace effect
183 }  // namespace audio
184 }  // namespace hardware
185 }  // namespace android
186 }  // namespace aidl
187 namespace ndk {
188 namespace internal {
189 #pragma clang diagnostic push
190 #pragma clang diagnostic ignored "-Wc++17-extensions"
191 template <>
192 constexpr inline std::array<aidl::android::hardware::audio::effect::Flags::Insert, 4> enum_values<aidl::android::hardware::audio::effect::Flags::Insert> = {
193   aidl::android::hardware::audio::effect::Flags::Insert::ANY,
194   aidl::android::hardware::audio::effect::Flags::Insert::FIRST,
195   aidl::android::hardware::audio::effect::Flags::Insert::LAST,
196   aidl::android::hardware::audio::effect::Flags::Insert::EXCLUSIVE,
197 };
198 #pragma clang diagnostic pop
199 }  // namespace internal
200 }  // namespace ndk
201 namespace aidl {
202 namespace android {
203 namespace hardware {
204 namespace audio {
205 namespace effect {
toString(Flags::Volume val)206 [[nodiscard]] static inline std::string toString(Flags::Volume val) {
207   switch(val) {
208   case Flags::Volume::NONE:
209     return "NONE";
210   case Flags::Volume::CTRL:
211     return "CTRL";
212   case Flags::Volume::IND:
213     return "IND";
214   case Flags::Volume::MONITOR:
215     return "MONITOR";
216   default:
217     return std::to_string(static_cast<int8_t>(val));
218   }
219 }
220 }  // namespace effect
221 }  // namespace audio
222 }  // namespace hardware
223 }  // namespace android
224 }  // namespace aidl
225 namespace ndk {
226 namespace internal {
227 #pragma clang diagnostic push
228 #pragma clang diagnostic ignored "-Wc++17-extensions"
229 template <>
230 constexpr inline std::array<aidl::android::hardware::audio::effect::Flags::Volume, 4> enum_values<aidl::android::hardware::audio::effect::Flags::Volume> = {
231   aidl::android::hardware::audio::effect::Flags::Volume::NONE,
232   aidl::android::hardware::audio::effect::Flags::Volume::CTRL,
233   aidl::android::hardware::audio::effect::Flags::Volume::IND,
234   aidl::android::hardware::audio::effect::Flags::Volume::MONITOR,
235 };
236 #pragma clang diagnostic pop
237 }  // namespace internal
238 }  // namespace ndk
239 namespace aidl {
240 namespace android {
241 namespace hardware {
242 namespace audio {
243 namespace effect {
toString(Flags::HardwareAccelerator val)244 [[nodiscard]] static inline std::string toString(Flags::HardwareAccelerator val) {
245   switch(val) {
246   case Flags::HardwareAccelerator::NONE:
247     return "NONE";
248   case Flags::HardwareAccelerator::SIMPLE:
249     return "SIMPLE";
250   case Flags::HardwareAccelerator::TUNNEL:
251     return "TUNNEL";
252   default:
253     return std::to_string(static_cast<int8_t>(val));
254   }
255 }
256 }  // namespace effect
257 }  // namespace audio
258 }  // namespace hardware
259 }  // namespace android
260 }  // namespace aidl
261 namespace ndk {
262 namespace internal {
263 #pragma clang diagnostic push
264 #pragma clang diagnostic ignored "-Wc++17-extensions"
265 template <>
266 constexpr inline std::array<aidl::android::hardware::audio::effect::Flags::HardwareAccelerator, 3> enum_values<aidl::android::hardware::audio::effect::Flags::HardwareAccelerator> = {
267   aidl::android::hardware::audio::effect::Flags::HardwareAccelerator::NONE,
268   aidl::android::hardware::audio::effect::Flags::HardwareAccelerator::SIMPLE,
269   aidl::android::hardware::audio::effect::Flags::HardwareAccelerator::TUNNEL,
270 };
271 #pragma clang diagnostic pop
272 }  // namespace internal
273 }  // namespace ndk
274