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.common.types_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect_interface/3/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core.sounddose_interface/3/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.core/2 --previous_hash 003735b3fd3c94c53b02a6eb5e099731f7062610 --ninja -d out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core-V3-ndk-source/gen/staging/android/hardware/audio/core/IBluetooth.cpp.d -h out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core-V3-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core-V3-ndk-source/gen/staging -Nhardware/interfaces/audio/aidl hardware/interfaces/audio/aidl/android/hardware/audio/core/IBluetooth.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/core/IBluetooth.h>
22 #include <aidl/android/media/audio/common/Boolean.h>
23 #include <aidl/android/media/audio/common/Float.h>
24 #include <aidl/android/media/audio/common/Int.h>
25 #ifdef BINDER_STABILITY_SUPPORT
26 #include <android/binder_stability.h>
27 #endif  // BINDER_STABILITY_SUPPORT
28 
29 namespace aidl::android::media::audio::common {
30 class Boolean;
31 class Float;
32 class Int;
33 }  // namespace aidl::android::media::audio::common
34 namespace aidl {
35 namespace android {
36 namespace hardware {
37 namespace audio {
38 namespace core {
39 class IBluetoothDelegator;
40 
41 class IBluetooth : public ::ndk::ICInterface {
42 public:
43   typedef IBluetoothDelegator DefaultDelegator;
44   static const char* descriptor;
45   IBluetooth();
46   virtual ~IBluetooth();
47 
48   class ScoConfig {
49   public:
50     typedef std::false_type fixed_size;
51     static const char* descriptor;
52 
53     enum class Mode : int8_t {
54       UNSPECIFIED = 0,
55       SCO = 1,
56       SCO_WB = 2,
57       SCO_SWB = 3,
58     };
59 
60     std::optional<::aidl::android::media::audio::common::Boolean> isEnabled;
61     std::optional<::aidl::android::media::audio::common::Boolean> isNrecEnabled;
62     ::aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode mode = ::aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode::UNSPECIFIED;
63     std::optional<std::string> debugName;
64 
65     binder_status_t readFromParcel(const AParcel* parcel);
66     binder_status_t writeToParcel(AParcel* parcel) const;
67 
68     inline bool operator==(const ScoConfig& _rhs) const {
69       return std::tie(isEnabled, isNrecEnabled, mode, debugName) == std::tie(_rhs.isEnabled, _rhs.isNrecEnabled, _rhs.mode, _rhs.debugName);
70     }
71     inline bool operator<(const ScoConfig& _rhs) const {
72       return std::tie(isEnabled, isNrecEnabled, mode, debugName) < std::tie(_rhs.isEnabled, _rhs.isNrecEnabled, _rhs.mode, _rhs.debugName);
73     }
74     inline bool operator!=(const ScoConfig& _rhs) const {
75       return !(*this == _rhs);
76     }
77     inline bool operator>(const ScoConfig& _rhs) const {
78       return _rhs < *this;
79     }
80     inline bool operator>=(const ScoConfig& _rhs) const {
81       return !(*this < _rhs);
82     }
83     inline bool operator<=(const ScoConfig& _rhs) const {
84       return !(_rhs < *this);
85     }
86 
87     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()88     inline std::string toString() const {
89       std::ostringstream _aidl_os;
90       _aidl_os << "ScoConfig{";
91       _aidl_os << "isEnabled: " << ::android::internal::ToString(isEnabled);
92       _aidl_os << ", isNrecEnabled: " << ::android::internal::ToString(isNrecEnabled);
93       _aidl_os << ", mode: " << ::android::internal::ToString(mode);
94       _aidl_os << ", debugName: " << ::android::internal::ToString(debugName);
95       _aidl_os << "}";
96       return _aidl_os.str();
97     }
98   };
99   class HfpConfig {
100   public:
101     typedef std::false_type fixed_size;
102     static const char* descriptor;
103 
104     std::optional<::aidl::android::media::audio::common::Boolean> isEnabled;
105     std::optional<::aidl::android::media::audio::common::Int> sampleRate;
106     std::optional<::aidl::android::media::audio::common::Float> volume;
107 
108     binder_status_t readFromParcel(const AParcel* parcel);
109     binder_status_t writeToParcel(AParcel* parcel) const;
110 
111     inline bool operator==(const HfpConfig& _rhs) const {
112       return std::tie(isEnabled, sampleRate, volume) == std::tie(_rhs.isEnabled, _rhs.sampleRate, _rhs.volume);
113     }
114     inline bool operator<(const HfpConfig& _rhs) const {
115       return std::tie(isEnabled, sampleRate, volume) < std::tie(_rhs.isEnabled, _rhs.sampleRate, _rhs.volume);
116     }
117     inline bool operator!=(const HfpConfig& _rhs) const {
118       return !(*this == _rhs);
119     }
120     inline bool operator>(const HfpConfig& _rhs) const {
121       return _rhs < *this;
122     }
123     inline bool operator>=(const HfpConfig& _rhs) const {
124       return !(*this < _rhs);
125     }
126     inline bool operator<=(const HfpConfig& _rhs) const {
127       return !(_rhs < *this);
128     }
129 
130     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
131     enum : int32_t { VOLUME_MIN = 0 };
132     enum : int32_t { VOLUME_MAX = 1 };
toString()133     inline std::string toString() const {
134       std::ostringstream _aidl_os;
135       _aidl_os << "HfpConfig{";
136       _aidl_os << "isEnabled: " << ::android::internal::ToString(isEnabled);
137       _aidl_os << ", sampleRate: " << ::android::internal::ToString(sampleRate);
138       _aidl_os << ", volume: " << ::android::internal::ToString(volume);
139       _aidl_os << "}";
140       return _aidl_os.str();
141     }
142   };
143   static inline const int32_t version = true ? 2 : 3;
144   static inline const std::string hash = true ? "003735b3fd3c94c53b02a6eb5e099731f7062610" : "notfrozen";
145   static constexpr uint32_t TRANSACTION_setScoConfig = FIRST_CALL_TRANSACTION + 0;
146   static constexpr uint32_t TRANSACTION_setHfpConfig = FIRST_CALL_TRANSACTION + 1;
147 
148   static std::shared_ptr<IBluetooth> fromBinder(const ::ndk::SpAIBinder& binder);
149   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IBluetooth>& instance);
150   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IBluetooth>* instance);
151   static bool setDefaultImpl(const std::shared_ptr<IBluetooth>& impl);
152   static const std::shared_ptr<IBluetooth>& getDefaultImpl();
153   virtual ::ndk::ScopedAStatus setScoConfig(const ::aidl::android::hardware::audio::core::IBluetooth::ScoConfig& in_config, ::aidl::android::hardware::audio::core::IBluetooth::ScoConfig* _aidl_return) = 0;
154   virtual ::ndk::ScopedAStatus setHfpConfig(const ::aidl::android::hardware::audio::core::IBluetooth::HfpConfig& in_config, ::aidl::android::hardware::audio::core::IBluetooth::HfpConfig* _aidl_return) = 0;
155   virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
156   virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
157 private:
158   static std::shared_ptr<IBluetooth> default_impl;
159 };
160 class IBluetoothDefault : public IBluetooth {
161 public:
162   ::ndk::ScopedAStatus setScoConfig(const ::aidl::android::hardware::audio::core::IBluetooth::ScoConfig& in_config, ::aidl::android::hardware::audio::core::IBluetooth::ScoConfig* _aidl_return) override;
163   ::ndk::ScopedAStatus setHfpConfig(const ::aidl::android::hardware::audio::core::IBluetooth::HfpConfig& in_config, ::aidl::android::hardware::audio::core::IBluetooth::HfpConfig* _aidl_return) override;
164   ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
165   ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
166   ::ndk::SpAIBinder asBinder() override;
167   bool isRemote() override;
168 };
169 }  // namespace core
170 }  // namespace audio
171 }  // namespace hardware
172 }  // namespace android
173 }  // namespace aidl
174 namespace aidl {
175 namespace android {
176 namespace hardware {
177 namespace audio {
178 namespace core {
toString(IBluetooth::ScoConfig::Mode val)179 [[nodiscard]] static inline std::string toString(IBluetooth::ScoConfig::Mode val) {
180   switch(val) {
181   case IBluetooth::ScoConfig::Mode::UNSPECIFIED:
182     return "UNSPECIFIED";
183   case IBluetooth::ScoConfig::Mode::SCO:
184     return "SCO";
185   case IBluetooth::ScoConfig::Mode::SCO_WB:
186     return "SCO_WB";
187   case IBluetooth::ScoConfig::Mode::SCO_SWB:
188     return "SCO_SWB";
189   default:
190     return std::to_string(static_cast<int8_t>(val));
191   }
192 }
193 }  // namespace core
194 }  // namespace audio
195 }  // namespace hardware
196 }  // namespace android
197 }  // namespace aidl
198 namespace ndk {
199 namespace internal {
200 #pragma clang diagnostic push
201 #pragma clang diagnostic ignored "-Wc++17-extensions"
202 template <>
203 constexpr inline std::array<aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode, 4> enum_values<aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode> = {
204   aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode::UNSPECIFIED,
205   aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode::SCO,
206   aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode::SCO_WB,
207   aidl::android::hardware::audio::core::IBluetooth::ScoConfig::Mode::SCO_SWB,
208 };
209 #pragma clang diagnostic pop
210 }  // namespace internal
211 }  // namespace ndk
212