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/ITelephony.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/ITelephony.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/ITelephony.h>
22 #include <aidl/android/media/audio/common/AudioMode.h>
23 #include <aidl/android/media/audio/common/Boolean.h>
24 #include <aidl/android/media/audio/common/Float.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 } // namespace aidl::android::media::audio::common
33 namespace aidl {
34 namespace android {
35 namespace hardware {
36 namespace audio {
37 namespace core {
38 class ITelephonyDelegator;
39
40 class ITelephony : public ::ndk::ICInterface {
41 public:
42 typedef ITelephonyDelegator DefaultDelegator;
43 static const char* descriptor;
44 ITelephony();
45 virtual ~ITelephony();
46
47 class TelecomConfig {
48 public:
49 typedef std::false_type fixed_size;
50 static const char* descriptor;
51
52 enum class TtyMode : int32_t {
53 UNSPECIFIED = -1,
54 OFF = 0,
55 FULL = 1,
56 HCO = 2,
57 VCO = 3,
58 };
59
60 std::optional<::aidl::android::media::audio::common::Float> voiceVolume;
61 ::aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode ttyMode = ::aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode::UNSPECIFIED;
62 std::optional<::aidl::android::media::audio::common::Boolean> isHacEnabled;
63
64 binder_status_t readFromParcel(const AParcel* parcel);
65 binder_status_t writeToParcel(AParcel* parcel) const;
66
67 inline bool operator==(const TelecomConfig& _rhs) const {
68 return std::tie(voiceVolume, ttyMode, isHacEnabled) == std::tie(_rhs.voiceVolume, _rhs.ttyMode, _rhs.isHacEnabled);
69 }
70 inline bool operator<(const TelecomConfig& _rhs) const {
71 return std::tie(voiceVolume, ttyMode, isHacEnabled) < std::tie(_rhs.voiceVolume, _rhs.ttyMode, _rhs.isHacEnabled);
72 }
73 inline bool operator!=(const TelecomConfig& _rhs) const {
74 return !(*this == _rhs);
75 }
76 inline bool operator>(const TelecomConfig& _rhs) const {
77 return _rhs < *this;
78 }
79 inline bool operator>=(const TelecomConfig& _rhs) const {
80 return !(*this < _rhs);
81 }
82 inline bool operator<=(const TelecomConfig& _rhs) const {
83 return !(_rhs < *this);
84 }
85
86 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
87 enum : int32_t { VOICE_VOLUME_MIN = 0 };
88 enum : int32_t { VOICE_VOLUME_MAX = 1 };
toString()89 inline std::string toString() const {
90 std::ostringstream _aidl_os;
91 _aidl_os << "TelecomConfig{";
92 _aidl_os << "voiceVolume: " << ::android::internal::ToString(voiceVolume);
93 _aidl_os << ", ttyMode: " << ::android::internal::ToString(ttyMode);
94 _aidl_os << ", isHacEnabled: " << ::android::internal::ToString(isHacEnabled);
95 _aidl_os << "}";
96 return _aidl_os.str();
97 }
98 };
99 static inline const int32_t version = true ? 2 : 3;
100 static inline const std::string hash = true ? "003735b3fd3c94c53b02a6eb5e099731f7062610" : "notfrozen";
101 static constexpr uint32_t TRANSACTION_getSupportedAudioModes = FIRST_CALL_TRANSACTION + 0;
102 static constexpr uint32_t TRANSACTION_switchAudioMode = FIRST_CALL_TRANSACTION + 1;
103 static constexpr uint32_t TRANSACTION_setTelecomConfig = FIRST_CALL_TRANSACTION + 2;
104
105 static std::shared_ptr<ITelephony> fromBinder(const ::ndk::SpAIBinder& binder);
106 static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<ITelephony>& instance);
107 static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<ITelephony>* instance);
108 static bool setDefaultImpl(const std::shared_ptr<ITelephony>& impl);
109 static const std::shared_ptr<ITelephony>& getDefaultImpl();
110 virtual ::ndk::ScopedAStatus getSupportedAudioModes(std::vector<::aidl::android::media::audio::common::AudioMode>* _aidl_return) = 0;
111 virtual ::ndk::ScopedAStatus switchAudioMode(::aidl::android::media::audio::common::AudioMode in_mode) = 0;
112 virtual ::ndk::ScopedAStatus setTelecomConfig(const ::aidl::android::hardware::audio::core::ITelephony::TelecomConfig& in_config, ::aidl::android::hardware::audio::core::ITelephony::TelecomConfig* _aidl_return) = 0;
113 virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
114 virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
115 private:
116 static std::shared_ptr<ITelephony> default_impl;
117 };
118 class ITelephonyDefault : public ITelephony {
119 public:
120 ::ndk::ScopedAStatus getSupportedAudioModes(std::vector<::aidl::android::media::audio::common::AudioMode>* _aidl_return) override;
121 ::ndk::ScopedAStatus switchAudioMode(::aidl::android::media::audio::common::AudioMode in_mode) override;
122 ::ndk::ScopedAStatus setTelecomConfig(const ::aidl::android::hardware::audio::core::ITelephony::TelecomConfig& in_config, ::aidl::android::hardware::audio::core::ITelephony::TelecomConfig* _aidl_return) override;
123 ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
124 ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
125 ::ndk::SpAIBinder asBinder() override;
126 bool isRemote() override;
127 };
128 } // namespace core
129 } // namespace audio
130 } // namespace hardware
131 } // namespace android
132 } // namespace aidl
133 namespace aidl {
134 namespace android {
135 namespace hardware {
136 namespace audio {
137 namespace core {
toString(ITelephony::TelecomConfig::TtyMode val)138 [[nodiscard]] static inline std::string toString(ITelephony::TelecomConfig::TtyMode val) {
139 switch(val) {
140 case ITelephony::TelecomConfig::TtyMode::UNSPECIFIED:
141 return "UNSPECIFIED";
142 case ITelephony::TelecomConfig::TtyMode::OFF:
143 return "OFF";
144 case ITelephony::TelecomConfig::TtyMode::FULL:
145 return "FULL";
146 case ITelephony::TelecomConfig::TtyMode::HCO:
147 return "HCO";
148 case ITelephony::TelecomConfig::TtyMode::VCO:
149 return "VCO";
150 default:
151 return std::to_string(static_cast<int32_t>(val));
152 }
153 }
154 } // namespace core
155 } // namespace audio
156 } // namespace hardware
157 } // namespace android
158 } // namespace aidl
159 namespace ndk {
160 namespace internal {
161 #pragma clang diagnostic push
162 #pragma clang diagnostic ignored "-Wc++17-extensions"
163 template <>
164 constexpr inline std::array<aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode, 5> enum_values<aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode> = {
165 aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode::UNSPECIFIED,
166 aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode::OFF,
167 aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode::FULL,
168 aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode::HCO,
169 aidl::android::hardware::audio::core::ITelephony::TelecomConfig::TtyMode::VCO,
170 };
171 #pragma clang diagnostic pop
172 } // namespace internal
173 } // namespace ndk
174