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 1 --hash notfrozen -t --stability vintf --min_sdk_version 33 -pout/soong/.intermediates/hardware/interfaces/contexthub/aidl/android.hardware.contexthub_interface/4/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/bluetooth/socket/aidl/android.hardware.bluetooth.socket-V1-ndk-source/gen/staging/android/hardware/bluetooth/socket/IBluetoothSocket.cpp.d -h out/soong/.intermediates/hardware/interfaces/bluetooth/socket/aidl/android.hardware.bluetooth.socket-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/bluetooth/socket/aidl/android.hardware.bluetooth.socket-V1-ndk-source/gen/staging -Nhardware/interfaces/bluetooth/socket/aidl hardware/interfaces/bluetooth/socket/aidl/android/hardware/bluetooth/socket/IBluetoothSocket.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/bluetooth/socket/IBluetoothSocket.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 bluetooth { 26 namespace socket { 27 class BnBluetoothSocket : public ::ndk::BnCInterface<IBluetoothSocket> { 28 public: 29 BnBluetoothSocket(); 30 virtual ~BnBluetoothSocket(); 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 IBluetoothSocketDelegator : public BnBluetoothSocket { 38 public: IBluetoothSocketDelegator(const std::shared_ptr<IBluetoothSocket> & impl)39 explicit IBluetoothSocketDelegator(const std::shared_ptr<IBluetoothSocket> &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 != IBluetoothSocket::version) { 45 __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Mismatched versions of delegator and implementation is not allowed."); 46 } 47 } 48 registerCallback(const std::shared_ptr<::aidl::android::hardware::bluetooth::socket::IBluetoothSocketCallback> & in_callback)49 ::ndk::ScopedAStatus registerCallback(const std::shared_ptr<::aidl::android::hardware::bluetooth::socket::IBluetoothSocketCallback>& in_callback) override { 50 return _impl->registerCallback(in_callback); 51 } getSocketCapabilities(::aidl::android::hardware::bluetooth::socket::SocketCapabilities * _aidl_return)52 ::ndk::ScopedAStatus getSocketCapabilities(::aidl::android::hardware::bluetooth::socket::SocketCapabilities* _aidl_return) override { 53 return _impl->getSocketCapabilities(_aidl_return); 54 } opened(const::aidl::android::hardware::bluetooth::socket::SocketContext & in_context)55 ::ndk::ScopedAStatus opened(const ::aidl::android::hardware::bluetooth::socket::SocketContext& in_context) override { 56 return _impl->opened(in_context); 57 } closed(int64_t in_socketId)58 ::ndk::ScopedAStatus closed(int64_t in_socketId) override { 59 return _impl->closed(in_socketId); 60 } 61 protected: 62 private: 63 std::shared_ptr<IBluetoothSocket> _impl; 64 }; 65 66 } // namespace socket 67 } // namespace bluetooth 68 } // namespace hardware 69 } // namespace android 70 } // namespace aidl 71