27#ifndef SDBUS_CXX_PROXYINTERFACES_H_
28#define SDBUS_CXX_PROXYINTERFACES_H_
50 class ProxyObjectHolder
53 explicit ProxyObjectHolder(std::unique_ptr<IProxy>&& proxy)
54 : proxy_(std::move(proxy))
56 assert(proxy_ !=
nullptr);
61 assert(proxy_ !=
nullptr);
67 assert(proxy_ !=
nullptr);
72 std::unique_ptr<IProxy> proxy_;
91 template <
typename... Interfaces>
93 :
protected ProxyObjectHolder
94 ,
public Interfaces...
97 ProxyInterfaces(
const ProxyInterfaces&) =
delete;
98 ProxyInterfaces& operator=(
const ProxyInterfaces&) =
delete;
99 ProxyInterfaces(ProxyInterfaces&&) =
delete;
100 ProxyInterfaces& operator=(ProxyInterfaces&&) =
delete;
112 : ProxyObjectHolder(
createProxy(std::move(destination), std::move(objectPath)))
127 : ProxyObjectHolder(
createProxy(std::move(destination), std::move(objectPath), dont_run_event_loop_thread))
143 : ProxyObjectHolder(
createProxy(connection, std::move(destination), std::move(objectPath)))
159 : ProxyObjectHolder(
createProxy(std::move(connection), std::move(destination), std::move(objectPath)))
175 : ProxyObjectHolder(
createProxy(std::move(connection), std::move(destination), std::move(objectPath), dont_run_event_loop_thread))
189 (Interfaces::registerProxy(), ...);
207 using ProxyObjectHolder::getProxy;
std::unique_ptr< IProxy > createProxy(IConnection &connection, ServiceName destination, ObjectPath objectPath)
Creates a proxy object for a specific remote D-Bus object.
Definition IConnection.h:61
virtual void unregister()=0
Unregisters proxy's signal handlers and stops receiving replies to pending async calls.
Definition ProxyInterfaces.h:95
void registerProxy()
Registers handlers for D-Bus signals of the remote object.
Definition ProxyInterfaces.h:187
ProxyInterfaces(std::unique_ptr< IConnection > &&connection, ServiceName destination, ObjectPath objectPath, dont_run_event_loop_thread_t)
Creates native-like proxy object instance.
Definition ProxyInterfaces.h:174
ProxyInterfaces(ServiceName destination, ObjectPath objectPath, dont_run_event_loop_thread_t)
Creates native-like proxy object instance.
Definition ProxyInterfaces.h:126
ProxyInterfaces(ServiceName destination, ObjectPath objectPath)
Creates native-like proxy object instance.
Definition ProxyInterfaces.h:111
ProxyInterfaces(std::unique_ptr< IConnection > &&connection, ServiceName destination, ObjectPath objectPath)
Creates native-like proxy object instance.
Definition ProxyInterfaces.h:158
void unregisterProxy()
Unregisters the proxy so it no more receives signals and async call replies.
Definition ProxyInterfaces.h:199
ProxyInterfaces(IConnection &connection, ServiceName destination, ObjectPath objectPath)
Creates native-like proxy object instance.
Definition ProxyInterfaces.h:142
const IProxy & getProxy() const
Returns reference to the underlying IProxy instance.
Definition ProxyInterfaces.h:59
Definition TypeTraits.h:101