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/MicrophoneDynamicInfo.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/MicrophoneDynamicInfo.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/media/audio/common/MicrophoneDynamicInfo.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 media {
29 namespace audio {
30 namespace common {
31 class MicrophoneDynamicInfo {
32 public:
33   typedef std::false_type fixed_size;
34   static const char* descriptor;
35 
36   enum class ChannelMapping : int32_t {
37     UNUSED = 0,
38     DIRECT = 1,
39     PROCESSED = 2,
40   };
41 
42   std::string id;
43   std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo::ChannelMapping> channelMapping;
44 
45   binder_status_t readFromParcel(const AParcel* parcel);
46   binder_status_t writeToParcel(AParcel* parcel) const;
47 
48   inline bool operator==(const MicrophoneDynamicInfo& _rhs) const {
49     return std::tie(id, channelMapping) == std::tie(_rhs.id, _rhs.channelMapping);
50   }
51   inline bool operator<(const MicrophoneDynamicInfo& _rhs) const {
52     return std::tie(id, channelMapping) < std::tie(_rhs.id, _rhs.channelMapping);
53   }
54   inline bool operator!=(const MicrophoneDynamicInfo& _rhs) const {
55     return !(*this == _rhs);
56   }
57   inline bool operator>(const MicrophoneDynamicInfo& _rhs) const {
58     return _rhs < *this;
59   }
60   inline bool operator>=(const MicrophoneDynamicInfo& _rhs) const {
61     return !(*this < _rhs);
62   }
63   inline bool operator<=(const MicrophoneDynamicInfo& _rhs) const {
64     return !(_rhs < *this);
65   }
66 
67   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()68   inline std::string toString() const {
69     std::ostringstream _aidl_os;
70     _aidl_os << "MicrophoneDynamicInfo{";
71     _aidl_os << "id: " << ::android::internal::ToString(id);
72     _aidl_os << ", channelMapping: " << ::android::internal::ToString(channelMapping);
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(MicrophoneDynamicInfo::ChannelMapping val)87 [[nodiscard]] static inline std::string toString(MicrophoneDynamicInfo::ChannelMapping val) {
88   switch(val) {
89   case MicrophoneDynamicInfo::ChannelMapping::UNUSED:
90     return "UNUSED";
91   case MicrophoneDynamicInfo::ChannelMapping::DIRECT:
92     return "DIRECT";
93   case MicrophoneDynamicInfo::ChannelMapping::PROCESSED:
94     return "PROCESSED";
95   default:
96     return std::to_string(static_cast<int32_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::MicrophoneDynamicInfo::ChannelMapping, 3> enum_values<aidl::android::media::audio::common::MicrophoneDynamicInfo::ChannelMapping> = {
110   aidl::android::media::audio::common::MicrophoneDynamicInfo::ChannelMapping::UNUSED,
111   aidl::android::media::audio::common::MicrophoneDynamicInfo::ChannelMapping::DIRECT,
112   aidl::android::media::audio::common::MicrophoneDynamicInfo::ChannelMapping::PROCESSED,
113 };
114 #pragma clang diagnostic pop
115 }  // namespace internal
116 }  // namespace ndk
117