1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 1 --hash 32dabbc53f6f51763228400e3dea8e11c36d677f -t --stability vintf --min_sdk_version current --ninja -d out/soong/.intermediates/hardware/interfaces/wifi/netlinkinterceptor/aidl/android.hardware.net.nlinterceptor-V1-ndk-source/gen/staging/android/hardware/net/nlinterceptor/IInterceptor.cpp.d -h out/soong/.intermediates/hardware/interfaces/wifi/netlinkinterceptor/aidl/android.hardware.net.nlinterceptor-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/wifi/netlinkinterceptor/aidl/android.hardware.net.nlinterceptor-V1-ndk-source/gen/staging -Nhardware/interfaces/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1 hardware/interfaces/wifi/netlinkinterceptor/aidl/aidl_api/android.hardware.net.nlinterceptor/1/android/hardware/net/nlinterceptor/IInterceptor.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/net/nlinterceptor/IInterceptor.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 net {
26 namespace nlinterceptor {
27 class BnInterceptor : public ::ndk::BnCInterface<IInterceptor> {
28 public:
29   BnInterceptor();
30   virtual ~BnInterceptor();
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 IInterceptorDelegator : public BnInterceptor {
38 public:
IInterceptorDelegator(const std::shared_ptr<IInterceptor> & impl)39   explicit IInterceptorDelegator(const std::shared_ptr<IInterceptor> &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 != IInterceptor::version) {
45         __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Mismatched versions of delegator and implementation is not allowed.");
46      }
47   }
48 
createSocket(int32_t in_nlFamily,int32_t in_clientNlPid,const std::string & in_clientName,::aidl::android::hardware::net::nlinterceptor::InterceptedSocket * _aidl_return)49   ::ndk::ScopedAStatus createSocket(int32_t in_nlFamily, int32_t in_clientNlPid, const std::string& in_clientName, ::aidl::android::hardware::net::nlinterceptor::InterceptedSocket* _aidl_return) override {
50     return _impl->createSocket(in_nlFamily, in_clientNlPid, in_clientName, _aidl_return);
51   }
closeSocket(const::aidl::android::hardware::net::nlinterceptor::InterceptedSocket & in_handle)52   ::ndk::ScopedAStatus closeSocket(const ::aidl::android::hardware::net::nlinterceptor::InterceptedSocket& in_handle) override {
53     return _impl->closeSocket(in_handle);
54   }
subscribeGroup(const::aidl::android::hardware::net::nlinterceptor::InterceptedSocket & in_handle,int32_t in_nlGroup)55   ::ndk::ScopedAStatus subscribeGroup(const ::aidl::android::hardware::net::nlinterceptor::InterceptedSocket& in_handle, int32_t in_nlGroup) override {
56     return _impl->subscribeGroup(in_handle, in_nlGroup);
57   }
unsubscribeGroup(const::aidl::android::hardware::net::nlinterceptor::InterceptedSocket & in_handle,int32_t in_nlGroup)58   ::ndk::ScopedAStatus unsubscribeGroup(const ::aidl::android::hardware::net::nlinterceptor::InterceptedSocket& in_handle, int32_t in_nlGroup) override {
59     return _impl->unsubscribeGroup(in_handle, in_nlGroup);
60   }
61 protected:
62 private:
63   std::shared_ptr<IInterceptor> _impl;
64 };
65 
66 }  // namespace nlinterceptor
67 }  // namespace net
68 }  // namespace hardware
69 }  // namespace android
70 }  // namespace aidl
71