sdbus-c++ 1.2.0
High-level C++ D-Bus library based on systemd D-Bus implementation
|
#include <ProxyInterfaces.h>
Public Member Functions | |
ProxyInterfaces (std::string destination, std::string objectPath) | |
Creates native-like proxy object instance. More... | |
ProxyInterfaces (IConnection &connection, std::string destination, std::string objectPath) | |
Creates native-like proxy object instance. More... | |
ProxyInterfaces (std::unique_ptr< sdbus::IConnection > &&connection, std::string destination, std::string objectPath) | |
Creates native-like proxy object instance. More... | |
void | registerProxy () |
Finishes proxy registration and makes the proxy ready for use. More... | |
void | unregisterProxy () |
Unregisters the proxy so it no more receives signals and async call replies. More... | |
const std::string & | getObjectPath () const |
Returns object path of the underlying DBus object. | |
Protected Types | |
using | base_type = ProxyInterfaces |
Additional Inherited Members | |
![]() | |
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 proxy class inherited from ProxyInterfaces, it is necessary to finish proxy registration in class constructor (finishRegistration();
), and, conversely, unregister the proxy in class destructor (unregister();
).
|
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] | 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 |
Finishes proxy registration and makes the proxy ready for use.
This function must be called in the constructor of the final proxy class that implements ProxyInterfaces.
For more information, see underlying IProxy::finishRegistration()
|
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()