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 --previous_api_dir=hardware/interfaces/vibrator/aidl/aidl_api/android.hardware.vibrator/2 --previous_hash ea8742d6993e1a82917da38b9938e537aa7fcb54 --ninja -d out/soong/.intermediates/hardware/interfaces/vibrator/aidl/android.hardware.vibrator-V3-ndk-source/gen/staging/android/hardware/vibrator/IVibrationSession.cpp.d -h out/soong/.intermediates/hardware/interfaces/vibrator/aidl/android.hardware.vibrator-V3-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/vibrator/aidl/android.hardware.vibrator-V3-ndk-source/gen/staging -Iframeworks/native/aidl/binder -Nhardware/interfaces/vibrator/aidl hardware/interfaces/vibrator/aidl/android/hardware/vibrator/IVibrationSession.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/vibrator/IVibrationSession.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 vibrator { 26 class BnVibrationSession : public ::ndk::BnCInterface<IVibrationSession> { 27 public: 28 BnVibrationSession(); 29 virtual ~BnVibrationSession(); 30 ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) final; 31 ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) final; 32 protected: 33 ::ndk::SpAIBinder createBinder() override; 34 private: 35 }; 36 class IVibrationSessionDelegator : public BnVibrationSession { 37 public: IVibrationSessionDelegator(const std::shared_ptr<IVibrationSession> & impl)38 explicit IVibrationSessionDelegator(const std::shared_ptr<IVibrationSession> &impl) : _impl(impl) { 39 int32_t _impl_ver = 0; 40 if (!impl->getInterfaceVersion(&_impl_ver).isOk()) {; 41 __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Delegator failed to get version of the implementation."); 42 } 43 if (_impl_ver != IVibrationSession::version) { 44 __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Mismatched versions of delegator and implementation is not allowed."); 45 } 46 } 47 close()48 ::ndk::ScopedAStatus close() override { 49 return _impl->close(); 50 } abort()51 ::ndk::ScopedAStatus abort() override { 52 return _impl->abort(); 53 } 54 protected: 55 private: 56 std::shared_ptr<IVibrationSession> _impl; 57 }; 58 59 } // namespace vibrator 60 } // namespace hardware 61 } // namespace android 62 } // namespace aidl 63