1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 1 --hash d4c3897135ef9475dee2021ac39a41ae79c7690e -t --stability vintf --min_sdk_version 30 -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/media/bufferpool/aidl/android.hardware.media.bufferpool2_interface/2/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/staging/android/hardware/media/c2/IComponentStore.cpp.d -h out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/staging -Iframeworks/native/aidl/gui -Iframeworks/base/core/java -Nhardware/interfaces/media/c2/aidl/aidl_api/android.hardware.media.c2/1 hardware/interfaces/media/c2/aidl/aidl_api/android.hardware.media.c2/1/android/hardware/media/c2/IComponentStore.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/media/bufferpool2/IClientManager.h>
22 #include <aidl/android/hardware/media/c2/Buffer.h>
23 #include <aidl/android/hardware/media/c2/IComponent.h>
24 #include <aidl/android/hardware/media/c2/IComponentInterface.h>
25 #include <aidl/android/hardware/media/c2/IComponentListener.h>
26 #include <aidl/android/hardware/media/c2/IComponentStore.h>
27 #include <aidl/android/hardware/media/c2/IConfigurable.h>
28 #include <aidl/android/hardware/media/c2/IInputSurface.h>
29 #include <aidl/android/hardware/media/c2/StructDescriptor.h>
30 #ifdef BINDER_STABILITY_SUPPORT
31 #include <android/binder_stability.h>
32 #endif  // BINDER_STABILITY_SUPPORT
33 
34 namespace aidl::android::hardware::media::bufferpool2 {
35 class IClientManager;
36 }  // namespace aidl::android::hardware::media::bufferpool2
37 namespace aidl::android::hardware::media::c2 {
38 class Buffer;
39 class IComponent;
40 class IComponentInterface;
41 class IComponentListener;
42 class IConfigurable;
43 class IInputSurface;
44 class StructDescriptor;
45 }  // namespace aidl::android::hardware::media::c2
46 namespace aidl {
47 namespace android {
48 namespace hardware {
49 namespace media {
50 namespace c2 {
51 class IComponentStoreDelegator;
52 
53 class IComponentStore : public ::ndk::ICInterface {
54 public:
55   typedef IComponentStoreDelegator DefaultDelegator;
56   static const char* descriptor;
57   IComponentStore();
58   virtual ~IComponentStore();
59 
60   class ComponentTraits {
61   public:
62     typedef std::false_type fixed_size;
63     static const char* descriptor;
64 
65     enum class Kind : int32_t {
66       OTHER = 0,
67       DECODER = 1,
68       ENCODER = 2,
69     };
70 
71     enum class Domain : int32_t {
72       OTHER = 0,
73       VIDEO = 1,
74       AUDIO = 2,
75       IMAGE = 3,
76     };
77 
78     std::string name;
79     ::aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain domain = ::aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain(0);
80     ::aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Kind kind = ::aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Kind(0);
81     int32_t rank = 0;
82     std::string mediaType;
83     std::vector<std::string> aliases;
84 
85     binder_status_t readFromParcel(const AParcel* parcel);
86     binder_status_t writeToParcel(AParcel* parcel) const;
87 
88     inline bool operator==(const ComponentTraits& _rhs) const {
89       return std::tie(name, domain, kind, rank, mediaType, aliases) == std::tie(_rhs.name, _rhs.domain, _rhs.kind, _rhs.rank, _rhs.mediaType, _rhs.aliases);
90     }
91     inline bool operator<(const ComponentTraits& _rhs) const {
92       return std::tie(name, domain, kind, rank, mediaType, aliases) < std::tie(_rhs.name, _rhs.domain, _rhs.kind, _rhs.rank, _rhs.mediaType, _rhs.aliases);
93     }
94     inline bool operator!=(const ComponentTraits& _rhs) const {
95       return !(*this == _rhs);
96     }
97     inline bool operator>(const ComponentTraits& _rhs) const {
98       return _rhs < *this;
99     }
100     inline bool operator>=(const ComponentTraits& _rhs) const {
101       return !(*this < _rhs);
102     }
103     inline bool operator<=(const ComponentTraits& _rhs) const {
104       return !(_rhs < *this);
105     }
106 
107     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()108     inline std::string toString() const {
109       std::ostringstream _aidl_os;
110       _aidl_os << "ComponentTraits{";
111       _aidl_os << "name: " << ::android::internal::ToString(name);
112       _aidl_os << ", domain: " << ::android::internal::ToString(domain);
113       _aidl_os << ", kind: " << ::android::internal::ToString(kind);
114       _aidl_os << ", rank: " << ::android::internal::ToString(rank);
115       _aidl_os << ", mediaType: " << ::android::internal::ToString(mediaType);
116       _aidl_os << ", aliases: " << ::android::internal::ToString(aliases);
117       _aidl_os << "}";
118       return _aidl_os.str();
119     }
120   };
121   static inline const int32_t version = 1;
122   static inline const std::string hash = "d4c3897135ef9475dee2021ac39a41ae79c7690e";
123   static constexpr uint32_t TRANSACTION_copyBuffer = FIRST_CALL_TRANSACTION + 0;
124   static constexpr uint32_t TRANSACTION_createComponent = FIRST_CALL_TRANSACTION + 1;
125   static constexpr uint32_t TRANSACTION_createInterface = FIRST_CALL_TRANSACTION + 2;
126   static constexpr uint32_t TRANSACTION_getConfigurable = FIRST_CALL_TRANSACTION + 3;
127   static constexpr uint32_t TRANSACTION_getPoolClientManager = FIRST_CALL_TRANSACTION + 4;
128   static constexpr uint32_t TRANSACTION_getStructDescriptors = FIRST_CALL_TRANSACTION + 5;
129   static constexpr uint32_t TRANSACTION_listComponents = FIRST_CALL_TRANSACTION + 6;
130   static constexpr uint32_t TRANSACTION_createInputSurface = FIRST_CALL_TRANSACTION + 7;
131 
132   static std::shared_ptr<IComponentStore> fromBinder(const ::ndk::SpAIBinder& binder);
133   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IComponentStore>& instance);
134   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IComponentStore>* instance);
135   static bool setDefaultImpl(const std::shared_ptr<IComponentStore>& impl);
136   static const std::shared_ptr<IComponentStore>& getDefaultImpl();
137   virtual ::ndk::ScopedAStatus copyBuffer(const ::aidl::android::hardware::media::c2::Buffer& in_src, const ::aidl::android::hardware::media::c2::Buffer& in_dst) = 0;
138   virtual ::ndk::ScopedAStatus createComponent(const std::string& in_name, const std::shared_ptr<::aidl::android::hardware::media::c2::IComponentListener>& in_listener, const std::shared_ptr<::aidl::android::hardware::media::bufferpool2::IClientManager>& in_pool, std::shared_ptr<::aidl::android::hardware::media::c2::IComponent>* _aidl_return) = 0;
139   virtual ::ndk::ScopedAStatus createInterface(const std::string& in_name, std::shared_ptr<::aidl::android::hardware::media::c2::IComponentInterface>* _aidl_return) = 0;
140   virtual ::ndk::ScopedAStatus getConfigurable(std::shared_ptr<::aidl::android::hardware::media::c2::IConfigurable>* _aidl_return) = 0;
141   virtual ::ndk::ScopedAStatus getPoolClientManager(std::shared_ptr<::aidl::android::hardware::media::bufferpool2::IClientManager>* _aidl_return) = 0;
142   virtual ::ndk::ScopedAStatus getStructDescriptors(const std::vector<int32_t>& in_indices, std::vector<::aidl::android::hardware::media::c2::StructDescriptor>* _aidl_return) = 0;
143   virtual ::ndk::ScopedAStatus listComponents(std::vector<::aidl::android::hardware::media::c2::IComponentStore::ComponentTraits>* _aidl_return) = 0;
144   virtual ::ndk::ScopedAStatus createInputSurface(std::shared_ptr<::aidl::android::hardware::media::c2::IInputSurface>* _aidl_return) = 0;
145   virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
146   virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
147 private:
148   static std::shared_ptr<IComponentStore> default_impl;
149 };
150 class IComponentStoreDefault : public IComponentStore {
151 public:
152   ::ndk::ScopedAStatus copyBuffer(const ::aidl::android::hardware::media::c2::Buffer& in_src, const ::aidl::android::hardware::media::c2::Buffer& in_dst) override;
153   ::ndk::ScopedAStatus createComponent(const std::string& in_name, const std::shared_ptr<::aidl::android::hardware::media::c2::IComponentListener>& in_listener, const std::shared_ptr<::aidl::android::hardware::media::bufferpool2::IClientManager>& in_pool, std::shared_ptr<::aidl::android::hardware::media::c2::IComponent>* _aidl_return) override;
154   ::ndk::ScopedAStatus createInterface(const std::string& in_name, std::shared_ptr<::aidl::android::hardware::media::c2::IComponentInterface>* _aidl_return) override;
155   ::ndk::ScopedAStatus getConfigurable(std::shared_ptr<::aidl::android::hardware::media::c2::IConfigurable>* _aidl_return) override;
156   ::ndk::ScopedAStatus getPoolClientManager(std::shared_ptr<::aidl::android::hardware::media::bufferpool2::IClientManager>* _aidl_return) override;
157   ::ndk::ScopedAStatus getStructDescriptors(const std::vector<int32_t>& in_indices, std::vector<::aidl::android::hardware::media::c2::StructDescriptor>* _aidl_return) override;
158   ::ndk::ScopedAStatus listComponents(std::vector<::aidl::android::hardware::media::c2::IComponentStore::ComponentTraits>* _aidl_return) override;
159   ::ndk::ScopedAStatus createInputSurface(std::shared_ptr<::aidl::android::hardware::media::c2::IInputSurface>* _aidl_return) override;
160   ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
161   ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
162   ::ndk::SpAIBinder asBinder() override;
163   bool isRemote() override;
164 };
165 }  // namespace c2
166 }  // namespace media
167 }  // namespace hardware
168 }  // namespace android
169 }  // namespace aidl
170 namespace aidl {
171 namespace android {
172 namespace hardware {
173 namespace media {
174 namespace c2 {
toString(IComponentStore::ComponentTraits::Kind val)175 [[nodiscard]] static inline std::string toString(IComponentStore::ComponentTraits::Kind val) {
176   switch(val) {
177   case IComponentStore::ComponentTraits::Kind::OTHER:
178     return "OTHER";
179   case IComponentStore::ComponentTraits::Kind::DECODER:
180     return "DECODER";
181   case IComponentStore::ComponentTraits::Kind::ENCODER:
182     return "ENCODER";
183   default:
184     return std::to_string(static_cast<int32_t>(val));
185   }
186 }
187 }  // namespace c2
188 }  // namespace media
189 }  // namespace hardware
190 }  // namespace android
191 }  // namespace aidl
192 namespace ndk {
193 namespace internal {
194 #pragma clang diagnostic push
195 #pragma clang diagnostic ignored "-Wc++17-extensions"
196 template <>
197 constexpr inline std::array<aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Kind, 3> enum_values<aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Kind> = {
198   aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Kind::OTHER,
199   aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Kind::DECODER,
200   aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Kind::ENCODER,
201 };
202 #pragma clang diagnostic pop
203 }  // namespace internal
204 }  // namespace ndk
205 namespace aidl {
206 namespace android {
207 namespace hardware {
208 namespace media {
209 namespace c2 {
toString(IComponentStore::ComponentTraits::Domain val)210 [[nodiscard]] static inline std::string toString(IComponentStore::ComponentTraits::Domain val) {
211   switch(val) {
212   case IComponentStore::ComponentTraits::Domain::OTHER:
213     return "OTHER";
214   case IComponentStore::ComponentTraits::Domain::VIDEO:
215     return "VIDEO";
216   case IComponentStore::ComponentTraits::Domain::AUDIO:
217     return "AUDIO";
218   case IComponentStore::ComponentTraits::Domain::IMAGE:
219     return "IMAGE";
220   default:
221     return std::to_string(static_cast<int32_t>(val));
222   }
223 }
224 }  // namespace c2
225 }  // namespace media
226 }  // namespace hardware
227 }  // namespace android
228 }  // namespace aidl
229 namespace ndk {
230 namespace internal {
231 #pragma clang diagnostic push
232 #pragma clang diagnostic ignored "-Wc++17-extensions"
233 template <>
234 constexpr inline std::array<aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain, 4> enum_values<aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain> = {
235   aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain::OTHER,
236   aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain::VIDEO,
237   aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain::AUDIO,
238   aidl::android::hardware::media::c2::IComponentStore::ComponentTraits::Domain::IMAGE,
239 };
240 #pragma clang diagnostic pop
241 }  // namespace internal
242 }  // namespace ndk
243