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/IObserver.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/IObserver.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 "aidl/android/hardware/media/bufferpool2/IObserver.h" 12 13 #include <android/binder_ibinder.h> 14 #include <cassert> 15 16 #ifndef __BIONIC__ 17 #ifndef __assert2 18 #define __assert2(a,b,c,d) ((void)0) 19 #endif 20 #endif 21 22 namespace aidl { 23 namespace android { 24 namespace hardware { 25 namespace media { 26 namespace bufferpool2 { 27 class BnObserver : public ::ndk::BnCInterface<IObserver> { 28 public: 29 BnObserver(); 30 virtual ~BnObserver(); 31 ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) final; 32 ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) final; 33 protected: 34 ::ndk::SpAIBinder createBinder() override; 35 private: 36 }; 37 class IObserverDelegator : public BnObserver { 38 public: IObserverDelegator(const std::shared_ptr<IObserver> & impl)39 explicit IObserverDelegator(const std::shared_ptr<IObserver> &impl) : _impl(impl) { 40 int32_t _impl_ver = 0; 41 if (!impl->getInterfaceVersion(&_impl_ver).isOk()) {; 42 __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Delegator failed to get version of the implementation."); 43 } 44 if (_impl_ver != IObserver::version) { 45 __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Mismatched versions of delegator and implementation is not allowed."); 46 } 47 } 48 onMessage(int64_t in_connectionId,int32_t in_msgId)49 ::ndk::ScopedAStatus onMessage(int64_t in_connectionId, int32_t in_msgId) override { 50 return _impl->onMessage(in_connectionId, in_msgId); 51 } 52 protected: 53 private: 54 std::shared_ptr<IObserver> _impl; 55 }; 56 57 } // namespace bufferpool2 58 } // namespace media 59 } // namespace hardware 60 } // namespace android 61 } // namespace aidl 62