2 * This file was generated by the CommonAPI Generators.
3 * Used org.genivi.commonapi.core 2.1.4.qualifier.
4 * Used org.franca.core 0.8.10.201309262002.
6 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
7 * If a copy of the MPL was not distributed with this file, You can obtain one at
8 * http://mozilla.org/MPL/2.0/.
10 #ifndef COMMONAPI_TESTS_Extended_Interface_PROXY_H_
11 #define COMMONAPI_TESTS_Extended_Interface_PROXY_H_
13 #include "ExtendedInterfaceProxyBase.h"
15 #include "TestInterfaceProxy.h"
17 #if !defined (COMMONAPI_INTERNAL_COMPILATION)
18 #define COMMONAPI_INTERNAL_COMPILATION
22 #undef COMMONAPI_INTERNAL_COMPILATION
27 template <typename ... _AttributeExtensions>
28 class ExtendedInterfaceProxy: virtual public ExtendedInterface, virtual public ExtendedInterfaceProxyBase
29 , virtual public TestInterfaceProxy<_AttributeExtensions...>
30 , public _AttributeExtensions... {
32 ExtendedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
33 ~ExtendedInterfaceProxy();
35 typedef ExtendedInterface InterfaceType;
37 inline static const char* getInterfaceId() {
38 return(ExtendedInterface::getInterfaceId());
44 * Calls TestIntMethodExtended with synchronous semantics.
46 * All const parameters are input parameters to this method.
47 * The CallStatus will be filled when the method returns and indicate either
48 * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
51 virtual void TestIntMethodExtended(const uint32_t& inInt, CommonAPI::CallStatus& callStatus);
53 * Calls TestIntMethodExtended with asynchronous semantics.
55 * The provided callback will be called when the reply to this call arrives or
56 * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
57 * or which type of error has occurred. In case of any error, ONLY the CallStatus
58 * will have a defined value.
59 * The std::future returned by this method will be fulfilled at arrival of the reply.
60 * It will provide the same value for CallStatus as will be handed to the callback.
62 virtual std::future<CommonAPI::CallStatus> TestIntMethodExtendedAsync(const uint32_t& inInt, TestIntMethodExtendedAsyncCallback callback);
66 * Returns the CommonAPI address of the remote partner this proxy communicates with.
68 virtual std::string getAddress() const;
71 * Returns the domain of the remote partner this proxy communicates with.
73 virtual const std::string& getDomain() const;
76 * Returns the service ID of the remote partner this proxy communicates with.
78 virtual const std::string& getServiceId() const;
81 * Returns the instance ID of the remote partner this proxy communicates with.
83 virtual const std::string& getInstanceId() const;
86 * Returns true if the remote partner for this proxy is currently known to be available.
88 virtual bool isAvailable() const;
91 * Returns true if the remote partner for this proxy is available.
93 virtual bool isAvailableBlocking() const;
96 * Returns the wrapper class that is used to (de-)register for notifications about
97 * the availability of the remote partner of this proxy.
99 virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
102 * Returns the wrapper class that is used to access version information of the remote
103 * partner of this proxy.
105 virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
108 std::shared_ptr<ExtendedInterfaceProxyBase> delegate_;
113 // ExtendedInterfaceProxy Implementation
115 template <typename ... _AttributeExtensions>
116 ExtendedInterfaceProxy<_AttributeExtensions...>::ExtendedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
117 TestInterfaceProxy<_AttributeExtensions...>(delegate),
118 delegate_(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)),
119 _AttributeExtensions(*(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)))... {
122 template <typename ... _AttributeExtensions>
123 ExtendedInterfaceProxy<_AttributeExtensions...>::~ExtendedInterfaceProxy() {
126 template <typename ... _AttributeExtensions>
127 void ExtendedInterfaceProxy<_AttributeExtensions...>::TestIntMethodExtended(const uint32_t& inInt, CommonAPI::CallStatus& callStatus) {
128 delegate_->TestIntMethodExtended(inInt, callStatus);
131 template <typename ... _AttributeExtensions>
132 std::future<CommonAPI::CallStatus> ExtendedInterfaceProxy<_AttributeExtensions...>::TestIntMethodExtendedAsync(const uint32_t& inInt, TestIntMethodExtendedAsyncCallback callback) {
133 return delegate_->TestIntMethodExtendedAsync(inInt, callback);
136 template <typename ... _AttributeExtensions>
137 std::string ExtendedInterfaceProxy<_AttributeExtensions...>::getAddress() const {
138 return delegate_->getAddress();
141 template <typename ... _AttributeExtensions>
142 const std::string& ExtendedInterfaceProxy<_AttributeExtensions...>::getDomain() const {
143 return delegate_->getDomain();
146 template <typename ... _AttributeExtensions>
147 const std::string& ExtendedInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
148 return delegate_->getServiceId();
151 template <typename ... _AttributeExtensions>
152 const std::string& ExtendedInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
153 return delegate_->getInstanceId();
156 template <typename ... _AttributeExtensions>
157 bool ExtendedInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
158 return delegate_->isAvailable();
161 template <typename ... _AttributeExtensions>
162 bool ExtendedInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
163 return delegate_->isAvailableBlocking();
166 template <typename ... _AttributeExtensions>
167 CommonAPI::ProxyStatusEvent& ExtendedInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
168 return delegate_->getProxyStatusEvent();
171 template <typename ... _AttributeExtensions>
172 CommonAPI::InterfaceVersionAttribute& ExtendedInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
173 return delegate_->getInterfaceVersionAttribute();
179 } // namespace commonapi
182 #endif // COMMONAPI_TESTS_Extended_Interface_PROXY_H_