|
| | 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.
|
template<typename... _Interfaces>
class sdbus::ProxyInterfaces< _Interfaces >
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:
- to call registerProxy(); in the class constructor, and, conversely,
- to call unregisterProxy(); in the class destructor, so that the signals are subscribed to and unsubscribed from at a proper time.
template<typename... _Interfaces>
Creates native-like proxy object instance.
- Parameters
-
| [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)