1 /* 2 * This file is auto-generated. DO NOT MODIFY. 3 * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 2 --hash c12818c51418fbfc76f1b81eba6678d75cf526c1 -t --stability vintf --min_sdk_version 29 -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 --ninja -d out/soong/.intermediates/hardware/interfaces/media/bufferpool/aidl/android.hardware.media.bufferpool2-V2-ndk-source/gen/staging/android/hardware/media/bufferpool2/Buffer.cpp.d -h out/soong/.intermediates/hardware/interfaces/media/bufferpool/aidl/android.hardware.media.bufferpool2-V2-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/media/bufferpool/aidl/android.hardware.media.bufferpool2-V2-ndk-source/gen/staging -Iframeworks/base/core/java -Nhardware/interfaces/media/bufferpool/aidl/aidl_api/android.hardware.media.bufferpool2/2 hardware/interfaces/media/bufferpool/aidl/aidl_api/android.hardware.media.bufferpool2/2/android/hardware/media/bufferpool2/Buffer.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 <android/hardware_buffer_aidl.h> 20 #include <aidl/android/hardware/common/NativeHandle.h> 21 #ifdef BINDER_STABILITY_SUPPORT 22 #include <android/binder_stability.h> 23 #endif // BINDER_STABILITY_SUPPORT 24 25 namespace aidl::android::hardware::common { 26 class NativeHandle; 27 } // namespace aidl::android::hardware::common 28 namespace aidl { 29 namespace android { 30 namespace hardware { 31 namespace media { 32 namespace bufferpool2 { 33 class Buffer { 34 public: 35 typedef std::false_type fixed_size; 36 static const char* descriptor; 37 38 int32_t id = 0; 39 std::optional<::aidl::android::hardware::common::NativeHandle> buffer; 40 std::optional<::aidl::android::hardware::HardwareBuffer> hwbBuffer; 41 42 binder_status_t readFromParcel(const AParcel* parcel); 43 binder_status_t writeToParcel(AParcel* parcel) const; 44 45 inline bool operator==(const Buffer& _rhs) const { 46 return std::tie(id, buffer, hwbBuffer) == std::tie(_rhs.id, _rhs.buffer, _rhs.hwbBuffer); 47 } 48 inline bool operator<(const Buffer& _rhs) const { 49 return std::tie(id, buffer, hwbBuffer) < std::tie(_rhs.id, _rhs.buffer, _rhs.hwbBuffer); 50 } 51 inline bool operator!=(const Buffer& _rhs) const { 52 return !(*this == _rhs); 53 } 54 inline bool operator>(const Buffer& _rhs) const { 55 return _rhs < *this; 56 } 57 inline bool operator>=(const Buffer& _rhs) const { 58 return !(*this < _rhs); 59 } 60 inline bool operator<=(const Buffer& _rhs) const { 61 return !(_rhs < *this); 62 } 63 64 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; toString()65 inline std::string toString() const { 66 std::ostringstream _aidl_os; 67 _aidl_os << "Buffer{"; 68 _aidl_os << "id: " << ::android::internal::ToString(id); 69 _aidl_os << ", buffer: " << ::android::internal::ToString(buffer); 70 _aidl_os << ", hwbBuffer: " << ::android::internal::ToString(hwbBuffer); 71 _aidl_os << "}"; 72 return _aidl_os.str(); 73 } 74 }; 75 } // namespace bufferpool2 76 } // namespace media 77 } // namespace hardware 78 } // namespace android 79 } // namespace aidl 80