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/IPooledGraphicBufferAllocator.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/IPooledGraphicBufferAllocator.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 <cstdint>
12 #include <memory>
13 #include <optional>
14 #include <string>
15 #include <vector>
16 #include <android/binder_interface_utils.h>
17 #include <android/binder_parcelable_utils.h>
18 #include <android/binder_to_string.h>
19 #include <aidl/android/hardware/media/c2/IPooledGraphicBufferAllocator.h>
20 #ifdef BINDER_STABILITY_SUPPORT
21 #include <android/binder_stability.h>
22 #endif  // BINDER_STABILITY_SUPPORT
23 
24 namespace aidl {
25 namespace android {
26 namespace hardware {
27 namespace media {
28 namespace c2 {
29 class IPooledGraphicBufferAllocatorDelegator;
30 
31 class IPooledGraphicBufferAllocator : public ::ndk::ICInterface {
32 public:
33   typedef IPooledGraphicBufferAllocatorDelegator DefaultDelegator;
34   static const char* descriptor;
35   IPooledGraphicBufferAllocator();
36   virtual ~IPooledGraphicBufferAllocator();
37 
38   class Allocation {
39   public:
40     typedef std::false_type fixed_size;
41     static const char* descriptor;
42 
43     int32_t bufferId = 0;
44     ::ndk::ScopedFileDescriptor fence;
45 
46     binder_status_t readFromParcel(const AParcel* parcel);
47     binder_status_t writeToParcel(AParcel* parcel) const;
48 
49     inline bool operator==(const Allocation& _rhs) const {
50       return std::tie(bufferId, fence) == std::tie(_rhs.bufferId, _rhs.fence);
51     }
52     inline bool operator<(const Allocation& _rhs) const {
53       return std::tie(bufferId, fence) < std::tie(_rhs.bufferId, _rhs.fence);
54     }
55     inline bool operator!=(const Allocation& _rhs) const {
56       return !(*this == _rhs);
57     }
58     inline bool operator>(const Allocation& _rhs) const {
59       return _rhs < *this;
60     }
61     inline bool operator>=(const Allocation& _rhs) const {
62       return !(*this < _rhs);
63     }
64     inline bool operator<=(const Allocation& _rhs) const {
65       return !(_rhs < *this);
66     }
67 
68     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()69     inline std::string toString() const {
70       std::ostringstream _aidl_os;
71       _aidl_os << "Allocation{";
72       _aidl_os << "bufferId: " << ::android::internal::ToString(bufferId);
73       _aidl_os << ", fence: " << ::android::internal::ToString(fence);
74       _aidl_os << "}";
75       return _aidl_os.str();
76     }
77   };
78   class Description {
79   public:
80     typedef std::false_type fixed_size;
81     static const char* descriptor;
82 
83     int32_t widthPixels = 0;
84     int32_t heightPixels = 0;
85     int32_t format = 0;
86     int64_t usage = 0L;
87 
88     binder_status_t readFromParcel(const AParcel* parcel);
89     binder_status_t writeToParcel(AParcel* parcel) const;
90 
91     inline bool operator==(const Description& _rhs) const {
92       return std::tie(widthPixels, heightPixels, format, usage) == std::tie(_rhs.widthPixels, _rhs.heightPixels, _rhs.format, _rhs.usage);
93     }
94     inline bool operator<(const Description& _rhs) const {
95       return std::tie(widthPixels, heightPixels, format, usage) < std::tie(_rhs.widthPixels, _rhs.heightPixels, _rhs.format, _rhs.usage);
96     }
97     inline bool operator!=(const Description& _rhs) const {
98       return !(*this == _rhs);
99     }
100     inline bool operator>(const Description& _rhs) const {
101       return _rhs < *this;
102     }
103     inline bool operator>=(const Description& _rhs) const {
104       return !(*this < _rhs);
105     }
106     inline bool operator<=(const Description& _rhs) const {
107       return !(_rhs < *this);
108     }
109 
110     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()111     inline std::string toString() const {
112       std::ostringstream _aidl_os;
113       _aidl_os << "Description{";
114       _aidl_os << "widthPixels: " << ::android::internal::ToString(widthPixels);
115       _aidl_os << ", heightPixels: " << ::android::internal::ToString(heightPixels);
116       _aidl_os << ", format: " << ::android::internal::ToString(format);
117       _aidl_os << ", usage: " << ::android::internal::ToString(usage);
118       _aidl_os << "}";
119       return _aidl_os.str();
120     }
121   };
122   static inline const int32_t version = 1;
123   static inline const std::string hash = "d4c3897135ef9475dee2021ac39a41ae79c7690e";
124   static constexpr uint32_t TRANSACTION_allocate = FIRST_CALL_TRANSACTION + 0;
125   static constexpr uint32_t TRANSACTION_deallocate = FIRST_CALL_TRANSACTION + 1;
126 
127   static std::shared_ptr<IPooledGraphicBufferAllocator> fromBinder(const ::ndk::SpAIBinder& binder);
128   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IPooledGraphicBufferAllocator>& instance);
129   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IPooledGraphicBufferAllocator>* instance);
130   static bool setDefaultImpl(const std::shared_ptr<IPooledGraphicBufferAllocator>& impl);
131   static const std::shared_ptr<IPooledGraphicBufferAllocator>& getDefaultImpl();
132   virtual ::ndk::ScopedAStatus allocate(const ::aidl::android::hardware::media::c2::IPooledGraphicBufferAllocator::Description& in_desc, ::aidl::android::hardware::media::c2::IPooledGraphicBufferAllocator::Allocation* _aidl_return) = 0;
133   virtual ::ndk::ScopedAStatus deallocate(int32_t in_id, bool* _aidl_return) = 0;
134   virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
135   virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
136 private:
137   static std::shared_ptr<IPooledGraphicBufferAllocator> default_impl;
138 };
139 class IPooledGraphicBufferAllocatorDefault : public IPooledGraphicBufferAllocator {
140 public:
141   ::ndk::ScopedAStatus allocate(const ::aidl::android::hardware::media::c2::IPooledGraphicBufferAllocator::Description& in_desc, ::aidl::android::hardware::media::c2::IPooledGraphicBufferAllocator::Allocation* _aidl_return) override;
142   ::ndk::ScopedAStatus deallocate(int32_t in_id, bool* _aidl_return) override;
143   ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
144   ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
145   ::ndk::SpAIBinder asBinder() override;
146   bool isRemote() override;
147 };
148 }  // namespace c2
149 }  // namespace media
150 }  // namespace hardware
151 }  // namespace android
152 }  // namespace aidl
153