sdbus-c++ 2.1.0
High-level C++ D-Bus library based on systemd D-Bus implementation
|
#include <ProxyInterfaces.h>
Public Member Functions | |
ProxyInterfaces (ServiceName destination, ObjectPath objectPath) | |
Creates native-like proxy object instance. | |
ProxyInterfaces (ServiceName destination, ObjectPath objectPath, dont_run_event_loop_thread_t) | |
Creates native-like proxy object instance. | |
ProxyInterfaces (IConnection &connection, ServiceName destination, ObjectPath objectPath) | |
Creates native-like proxy object instance. | |
ProxyInterfaces (std::unique_ptr< sdbus::IConnection > &&connection, ServiceName destination, ObjectPath objectPath) | |
Creates native-like proxy object instance. | |
ProxyInterfaces (std::unique_ptr< sdbus::IConnection > &&connection, ServiceName destination, ObjectPath objectPath, dont_run_event_loop_thread_t) | |
Creates native-like proxy object instance. | |
void | registerProxy () |
Registers handlers for D-Bus signals of the remote object. | |
void | unregisterProxy () |
Unregisters the proxy so it no more receives signals and async call replies. | |
const IProxy & | getProxy () const |
Returns reference to the underlying IProxy instance. | |
IProxy & | getProxy () |
Returns reference to the underlying IProxy instance. |
Protected Types | |
using | base_type = ProxyInterfaces |
Protected Member Functions | |
ProxyInterfaces (const ProxyInterfaces &)=delete | |
ProxyInterfaces & | operator= (const ProxyInterfaces &)=delete |
ProxyInterfaces (ProxyInterfaces &&)=delete | |
ProxyInterfaces & | operator= (ProxyInterfaces &&)=delete |
Protected Member Functions inherited from sdbus::ProxyObjectHolder | |
ProxyObjectHolder (std::unique_ptr< IProxy > &&proxy) | |
const IProxy & | getProxy () const |
IProxy & | getProxy () |
ProxyInterfaces is a helper template class that joins all interface classes of a remote D-Bus object generated by sdbus-c++-xml2cpp to be used on the client (the proxy) side, including some auxiliary classes. ProxyInterfaces is the class that native-like proxy implementation classes written by users should inherit from and implement all pure virtual methods. So the _Interfaces template parameter is a list of sdbus-c++-xml2cpp-generated proxy-side interface classes representing interfaces of the corresponding remote D-Bus object.
In the final adaptor class inherited from ProxyInterfaces, one needs to make sure:
|
inline |
Creates native-like proxy object instance.
[in] | destination | Bus name that provides a D-Bus object |
[in] | objectPath | Path of the D-Bus object |
This constructor overload creates a proxy that manages its own D-Bus connection(s). For more information on its behavior, consult createProxy(std::string,std::string)
|
inline |
Creates native-like proxy object instance.
[in] | destination | Bus name that provides a D-Bus object |
[in] | objectPath | Path of the D-Bus object |
This constructor overload creates a proxy that manages its own D-Bus connection(s). For more information on its behavior, consult createProxy(std::string,std::string,sdbus::dont_run_event_loop_thread_t)
|
inline |
Creates native-like proxy object instance.
[in] | connection | D-Bus connection to be used by the proxy object |
[in] | destination | Bus name that provides a D-Bus object |
[in] | objectPath | Path of the D-Bus object |
The proxy created this way just references a D-Bus connection owned and managed by the user. For more information on its behavior, consult createProxy(IConnection&,std::string,std::string)
|
inline |
Creates native-like proxy object instance.
[in] | connection | D-Bus connection to be used by the proxy object |
[in] | destination | Bus name that provides a D-Bus object |
[in] | objectPath | Path of the D-Bus object |
The proxy created this way becomes an owner of the connection. For more information on its behavior, consult createProxy(std::unique_ptr<sdbus::IConnection>&&,std::string,std::string)
|
inline |
Creates native-like proxy object instance.
[in] | connection | D-Bus connection to be used by the proxy object |
[in] | destination | Bus name that provides a D-Bus object |
[in] | objectPath | Path of the D-Bus object |
The proxy created this way becomes an owner of the connection. For more information on its behavior, consult createProxy(std::unique_ptr<sdbus::IConnection>&&,std::string,std::string,sdbus::dont_run_event_loop_thread_t)
|
inline |
Registers handlers for D-Bus signals of the remote object.
This function must be called in the constructor of the final proxy class that implements ProxyInterfaces.
See also IProxy::registerSignalHandler()
|
inline |
Unregisters the proxy so it no more receives signals and async call replies.
This function must be called in the destructor of the final proxy class that implements ProxyInterfaces.
See underlying IProxy::unregister()