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/IStreamIn.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/IStreamIn.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 <aidl/android/hardware/audio/common/SinkMetadata.h>
20 #include <aidl/android/hardware/audio/core/IStreamCommon.h>
21 #include <aidl/android/hardware/audio/core/IStreamIn.h>
22 #include <aidl/android/media/audio/common/MicrophoneDynamicInfo.h>
23 #ifdef BINDER_STABILITY_SUPPORT
24 #include <android/binder_stability.h>
25 #endif  // BINDER_STABILITY_SUPPORT
26 
27 namespace aidl::android::hardware::audio::common {
28 class SinkMetadata;
29 }  // namespace aidl::android::hardware::audio::common
30 namespace aidl::android::hardware::audio::core {
31 class IStreamCommon;
32 }  // namespace aidl::android::hardware::audio::core
33 namespace aidl::android::media::audio::common {
34 class MicrophoneDynamicInfo;
35 }  // namespace aidl::android::media::audio::common
36 namespace aidl {
37 namespace android {
38 namespace hardware {
39 namespace audio {
40 namespace core {
41 class IStreamInDelegator;
42 
43 class IStreamIn : public ::ndk::ICInterface {
44 public:
45   typedef IStreamInDelegator DefaultDelegator;
46   static const char* descriptor;
47   IStreamIn();
48   virtual ~IStreamIn();
49 
50   enum class MicrophoneDirection : int32_t {
51     UNSPECIFIED = 0,
52     FRONT = 1,
53     BACK = 2,
54     EXTERNAL = 3,
55   };
56 
57   enum : int32_t { MIC_FIELD_DIMENSION_WIDE_ANGLE = -1 };
58   enum : int32_t { MIC_FIELD_DIMENSION_NO_ZOOM = 0 };
59   enum : int32_t { MIC_FIELD_DIMENSION_MAX_ZOOM = 1 };
60   enum : int32_t { HW_GAIN_MIN = 0 };
61   enum : int32_t { HW_GAIN_MAX = 1 };
62   static inline const int32_t version = true ? 2 : 3;
63   static inline const std::string hash = true ? "003735b3fd3c94c53b02a6eb5e099731f7062610" : "notfrozen";
64   static constexpr uint32_t TRANSACTION_getStreamCommon = FIRST_CALL_TRANSACTION + 0;
65   static constexpr uint32_t TRANSACTION_getActiveMicrophones = FIRST_CALL_TRANSACTION + 1;
66   static constexpr uint32_t TRANSACTION_getMicrophoneDirection = FIRST_CALL_TRANSACTION + 2;
67   static constexpr uint32_t TRANSACTION_setMicrophoneDirection = FIRST_CALL_TRANSACTION + 3;
68   static constexpr uint32_t TRANSACTION_getMicrophoneFieldDimension = FIRST_CALL_TRANSACTION + 4;
69   static constexpr uint32_t TRANSACTION_setMicrophoneFieldDimension = FIRST_CALL_TRANSACTION + 5;
70   static constexpr uint32_t TRANSACTION_updateMetadata = FIRST_CALL_TRANSACTION + 6;
71   static constexpr uint32_t TRANSACTION_getHwGain = FIRST_CALL_TRANSACTION + 7;
72   static constexpr uint32_t TRANSACTION_setHwGain = FIRST_CALL_TRANSACTION + 8;
73 
74   static std::shared_ptr<IStreamIn> fromBinder(const ::ndk::SpAIBinder& binder);
75   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IStreamIn>& instance);
76   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IStreamIn>* instance);
77   static bool setDefaultImpl(const std::shared_ptr<IStreamIn>& impl);
78   static const std::shared_ptr<IStreamIn>& getDefaultImpl();
79   virtual ::ndk::ScopedAStatus getStreamCommon(std::shared_ptr<::aidl::android::hardware::audio::core::IStreamCommon>* _aidl_return) = 0;
80   virtual ::ndk::ScopedAStatus getActiveMicrophones(std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo>* _aidl_return) = 0;
81   virtual ::ndk::ScopedAStatus getMicrophoneDirection(::aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection* _aidl_return) = 0;
82   virtual ::ndk::ScopedAStatus setMicrophoneDirection(::aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection in_direction) = 0;
83   virtual ::ndk::ScopedAStatus getMicrophoneFieldDimension(float* _aidl_return) = 0;
84   virtual ::ndk::ScopedAStatus setMicrophoneFieldDimension(float in_zoom) = 0;
85   virtual ::ndk::ScopedAStatus updateMetadata(const ::aidl::android::hardware::audio::common::SinkMetadata& in_sinkMetadata) = 0;
86   virtual ::ndk::ScopedAStatus getHwGain(std::vector<float>* _aidl_return) = 0;
87   virtual ::ndk::ScopedAStatus setHwGain(const std::vector<float>& in_channelGains) = 0;
88   virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
89   virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
90 private:
91   static std::shared_ptr<IStreamIn> default_impl;
92 };
93 class IStreamInDefault : public IStreamIn {
94 public:
95   ::ndk::ScopedAStatus getStreamCommon(std::shared_ptr<::aidl::android::hardware::audio::core::IStreamCommon>* _aidl_return) override;
96   ::ndk::ScopedAStatus getActiveMicrophones(std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo>* _aidl_return) override;
97   ::ndk::ScopedAStatus getMicrophoneDirection(::aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection* _aidl_return) override;
98   ::ndk::ScopedAStatus setMicrophoneDirection(::aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection in_direction) override;
99   ::ndk::ScopedAStatus getMicrophoneFieldDimension(float* _aidl_return) override;
100   ::ndk::ScopedAStatus setMicrophoneFieldDimension(float in_zoom) override;
101   ::ndk::ScopedAStatus updateMetadata(const ::aidl::android::hardware::audio::common::SinkMetadata& in_sinkMetadata) override;
102   ::ndk::ScopedAStatus getHwGain(std::vector<float>* _aidl_return) override;
103   ::ndk::ScopedAStatus setHwGain(const std::vector<float>& in_channelGains) override;
104   ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
105   ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
106   ::ndk::SpAIBinder asBinder() override;
107   bool isRemote() override;
108 };
109 }  // namespace core
110 }  // namespace audio
111 }  // namespace hardware
112 }  // namespace android
113 }  // namespace aidl
114 namespace aidl {
115 namespace android {
116 namespace hardware {
117 namespace audio {
118 namespace core {
toString(IStreamIn::MicrophoneDirection val)119 [[nodiscard]] static inline std::string toString(IStreamIn::MicrophoneDirection val) {
120   switch(val) {
121   case IStreamIn::MicrophoneDirection::UNSPECIFIED:
122     return "UNSPECIFIED";
123   case IStreamIn::MicrophoneDirection::FRONT:
124     return "FRONT";
125   case IStreamIn::MicrophoneDirection::BACK:
126     return "BACK";
127   case IStreamIn::MicrophoneDirection::EXTERNAL:
128     return "EXTERNAL";
129   default:
130     return std::to_string(static_cast<int32_t>(val));
131   }
132 }
133 }  // namespace core
134 }  // namespace audio
135 }  // namespace hardware
136 }  // namespace android
137 }  // namespace aidl
138 namespace ndk {
139 namespace internal {
140 #pragma clang diagnostic push
141 #pragma clang diagnostic ignored "-Wc++17-extensions"
142 template <>
143 constexpr inline std::array<aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection, 4> enum_values<aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection> = {
144   aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection::UNSPECIFIED,
145   aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection::FRONT,
146   aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection::BACK,
147   aidl::android::hardware::audio::core::IStreamIn::MicrophoneDirection::EXTERNAL,
148 };
149 #pragma clang diagnostic pop
150 }  // namespace internal
151 }  // namespace ndk
152