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 5 --hash notfrozen -t --stability vintf --min_sdk_version 31 -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/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/4 --previous_hash ac25616dda1c45dc2915d3f5ac82687a1a6f6e46 --ninja -d out/soong/.intermediates/hardware/interfaces/bluetooth/audio/aidl/android.hardware.bluetooth.audio-V5-ndk-source/gen/staging/android/hardware/bluetooth/audio/LeAudioConfiguration.cpp.d -h out/soong/.intermediates/hardware/interfaces/bluetooth/audio/aidl/android.hardware.bluetooth.audio-V5-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/bluetooth/audio/aidl/android.hardware.bluetooth.audio-V5-ndk-source/gen/staging -Nhardware/interfaces/bluetooth/audio/aidl hardware/interfaces/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.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/bluetooth/audio/CodecType.h>
22 #include <aidl/android/hardware/bluetooth/audio/ConfigurationFlags.h>
23 #include <aidl/android/hardware/bluetooth/audio/LeAudioAseConfiguration.h>
24 #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.h>
25 #include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h>
26 #ifdef BINDER_STABILITY_SUPPORT
27 #include <android/binder_stability.h>
28 #endif  // BINDER_STABILITY_SUPPORT
29 
30 namespace aidl::android::hardware::bluetooth::audio {
31 class ConfigurationFlags;
32 class LeAudioAseConfiguration;
33 }  // namespace aidl::android::hardware::bluetooth::audio
34 namespace aidl {
35 namespace android {
36 namespace hardware {
37 namespace bluetooth {
38 namespace audio {
39 class LeAudioConfiguration {
40 public:
41   typedef std::false_type fixed_size;
42   static const char* descriptor;
43 
44   class StreamMap {
45   public:
46     typedef std::false_type fixed_size;
47     static const char* descriptor;
48 
49     class BluetoothDeviceAddress {
50     public:
51       typedef std::false_type fixed_size;
52       static const char* descriptor;
53 
54       enum class DeviceAddressType : int8_t {
55         BLE_ADDRESS_PUBLIC = 0,
56         BLE_ADDRESS_RANDOM = 1,
57       };
58 
59       std::array<uint8_t, 6> deviceAddress = {{}};
60       ::aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType deviceAddressType = ::aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType(0);
61 
62       binder_status_t readFromParcel(const AParcel* parcel);
63       binder_status_t writeToParcel(AParcel* parcel) const;
64 
65       inline bool operator==(const BluetoothDeviceAddress& _rhs) const {
66         return std::tie(deviceAddress, deviceAddressType) == std::tie(_rhs.deviceAddress, _rhs.deviceAddressType);
67       }
68       inline bool operator<(const BluetoothDeviceAddress& _rhs) const {
69         return std::tie(deviceAddress, deviceAddressType) < std::tie(_rhs.deviceAddress, _rhs.deviceAddressType);
70       }
71       inline bool operator!=(const BluetoothDeviceAddress& _rhs) const {
72         return !(*this == _rhs);
73       }
74       inline bool operator>(const BluetoothDeviceAddress& _rhs) const {
75         return _rhs < *this;
76       }
77       inline bool operator>=(const BluetoothDeviceAddress& _rhs) const {
78         return !(*this < _rhs);
79       }
80       inline bool operator<=(const BluetoothDeviceAddress& _rhs) const {
81         return !(_rhs < *this);
82       }
83 
84       static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()85       inline std::string toString() const {
86         std::ostringstream _aidl_os;
87         _aidl_os << "BluetoothDeviceAddress{";
88         _aidl_os << "deviceAddress: " << ::android::internal::ToString(deviceAddress);
89         _aidl_os << ", deviceAddressType: " << ::android::internal::ToString(deviceAddressType);
90         _aidl_os << "}";
91         return _aidl_os.str();
92       }
93     };
94     char16_t streamHandle = '\0';
95     int32_t audioChannelAllocation = 0;
96     bool isStreamActive = false;
97     std::optional<::aidl::android::hardware::bluetooth::audio::LeAudioAseConfiguration> aseConfiguration;
98     std::optional<::aidl::android::hardware::bluetooth::audio::ConfigurationFlags> flags;
99     std::optional<::aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap::BluetoothDeviceAddress> bluetoothDeviceAddress;
100 
101     binder_status_t readFromParcel(const AParcel* parcel);
102     binder_status_t writeToParcel(AParcel* parcel) const;
103 
104     inline bool operator==(const StreamMap& _rhs) const {
105       return std::tie(streamHandle, audioChannelAllocation, isStreamActive, aseConfiguration, flags, bluetoothDeviceAddress) == std::tie(_rhs.streamHandle, _rhs.audioChannelAllocation, _rhs.isStreamActive, _rhs.aseConfiguration, _rhs.flags, _rhs.bluetoothDeviceAddress);
106     }
107     inline bool operator<(const StreamMap& _rhs) const {
108       return std::tie(streamHandle, audioChannelAllocation, isStreamActive, aseConfiguration, flags, bluetoothDeviceAddress) < std::tie(_rhs.streamHandle, _rhs.audioChannelAllocation, _rhs.isStreamActive, _rhs.aseConfiguration, _rhs.flags, _rhs.bluetoothDeviceAddress);
109     }
110     inline bool operator!=(const StreamMap& _rhs) const {
111       return !(*this == _rhs);
112     }
113     inline bool operator>(const StreamMap& _rhs) const {
114       return _rhs < *this;
115     }
116     inline bool operator>=(const StreamMap& _rhs) const {
117       return !(*this < _rhs);
118     }
119     inline bool operator<=(const StreamMap& _rhs) const {
120       return !(_rhs < *this);
121     }
122 
123     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()124     inline std::string toString() const {
125       std::ostringstream _aidl_os;
126       _aidl_os << "StreamMap{";
127       _aidl_os << "streamHandle: " << ::android::internal::ToString(streamHandle);
128       _aidl_os << ", audioChannelAllocation: " << ::android::internal::ToString(audioChannelAllocation);
129       _aidl_os << ", isStreamActive: " << ::android::internal::ToString(isStreamActive);
130       _aidl_os << ", aseConfiguration: " << ::android::internal::ToString(aseConfiguration);
131       _aidl_os << ", flags: " << ::android::internal::ToString(flags);
132       _aidl_os << ", bluetoothDeviceAddress: " << ::android::internal::ToString(bluetoothDeviceAddress);
133       _aidl_os << "}";
134       return _aidl_os.str();
135     }
136   };
137   ::aidl::android::hardware::bluetooth::audio::CodecType codecType = ::aidl::android::hardware::bluetooth::audio::CodecType(0);
138   std::vector<::aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap> streamMap;
139   int32_t peerDelayUs = 0;
140   ::aidl::android::hardware::bluetooth::audio::LeAudioCodecConfiguration leAudioCodecConfig;
141   std::optional<std::vector<uint8_t>> vendorSpecificMetadata;
142 
143   binder_status_t readFromParcel(const AParcel* parcel);
144   binder_status_t writeToParcel(AParcel* parcel) const;
145 
146   inline bool operator==(const LeAudioConfiguration& _rhs) const {
147     return std::tie(codecType, streamMap, peerDelayUs, leAudioCodecConfig, vendorSpecificMetadata) == std::tie(_rhs.codecType, _rhs.streamMap, _rhs.peerDelayUs, _rhs.leAudioCodecConfig, _rhs.vendorSpecificMetadata);
148   }
149   inline bool operator<(const LeAudioConfiguration& _rhs) const {
150     return std::tie(codecType, streamMap, peerDelayUs, leAudioCodecConfig, vendorSpecificMetadata) < std::tie(_rhs.codecType, _rhs.streamMap, _rhs.peerDelayUs, _rhs.leAudioCodecConfig, _rhs.vendorSpecificMetadata);
151   }
152   inline bool operator!=(const LeAudioConfiguration& _rhs) const {
153     return !(*this == _rhs);
154   }
155   inline bool operator>(const LeAudioConfiguration& _rhs) const {
156     return _rhs < *this;
157   }
158   inline bool operator>=(const LeAudioConfiguration& _rhs) const {
159     return !(*this < _rhs);
160   }
161   inline bool operator<=(const LeAudioConfiguration& _rhs) const {
162     return !(_rhs < *this);
163   }
164 
165   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()166   inline std::string toString() const {
167     std::ostringstream _aidl_os;
168     _aidl_os << "LeAudioConfiguration{";
169     _aidl_os << "codecType: " << ::android::internal::ToString(codecType);
170     _aidl_os << ", streamMap: " << ::android::internal::ToString(streamMap);
171     _aidl_os << ", peerDelayUs: " << ::android::internal::ToString(peerDelayUs);
172     _aidl_os << ", leAudioCodecConfig: " << ::android::internal::ToString(leAudioCodecConfig);
173     _aidl_os << ", vendorSpecificMetadata: " << ::android::internal::ToString(vendorSpecificMetadata);
174     _aidl_os << "}";
175     return _aidl_os.str();
176   }
177 };
178 }  // namespace audio
179 }  // namespace bluetooth
180 }  // namespace hardware
181 }  // namespace android
182 }  // namespace aidl
183 namespace aidl {
184 namespace android {
185 namespace hardware {
186 namespace bluetooth {
187 namespace audio {
toString(LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType val)188 [[nodiscard]] static inline std::string toString(LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType val) {
189   switch(val) {
190   case LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType::BLE_ADDRESS_PUBLIC:
191     return "BLE_ADDRESS_PUBLIC";
192   case LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType::BLE_ADDRESS_RANDOM:
193     return "BLE_ADDRESS_RANDOM";
194   default:
195     return std::to_string(static_cast<int8_t>(val));
196   }
197 }
198 }  // namespace audio
199 }  // namespace bluetooth
200 }  // namespace hardware
201 }  // namespace android
202 }  // namespace aidl
203 namespace ndk {
204 namespace internal {
205 #pragma clang diagnostic push
206 #pragma clang diagnostic ignored "-Wc++17-extensions"
207 template <>
208 constexpr inline std::array<aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType, 2> enum_values<aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType> = {
209   aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType::BLE_ADDRESS_PUBLIC,
210   aidl::android::hardware::bluetooth::audio::LeAudioConfiguration::StreamMap::BluetoothDeviceAddress::DeviceAddressType::BLE_ADDRESS_RANDOM,
211 };
212 #pragma clang diagnostic pop
213 }  // namespace internal
214 }  // namespace ndk
215