swift
Public Member Functions | List of all members
swift::misc::CGenericDBusInterface Class Reference

Used for hand written interface based on virtual methods. More...

Inheritance diagram for swift::misc::CGenericDBusInterface:
[legend]

Public Member Functions

 CGenericDBusInterface (const QString &serviceName, const QString &path, const QString &interfaceName, const QDBusConnection &connection, QObject *parent=nullptr)
 Constructor.
 
void relayParentSignals ()
 For each signal in parent, attempt to connect to it an interface signal of the same name. More...
 
template<typename... Args>
void callDBus (QLatin1String method, Args &&...args)
 Call DBus, no return value.
 
template<typename Ret , typename... Args>
Ret callDBusRet (QLatin1String method, Args &&...args)
 Call DBus with synchronous return value.
 
template<typename Func , typename... Args>
QDBusPendingCallWatcher * callDBusAsync (QLatin1String method, Func callback, Args &&...args)
 Call DBus with asynchronous return value Callback can be any callable object taking a single argument of type QDBusPendingCallWatcher*.
 
template<typename Ret , typename... Args>
QFuture< Ret > callDBusFuture (QLatin1String method, Args &&...args)
 Call DBus with asynchronous return as a future.
 
void cancelAllPendingAsyncCalls ()
 Cancel all asynchronous DBus calls which are currently pending. More...
 

Detailed Description

Used for hand written interface based on virtual methods.

Allows to relay a message to DBus in a single code line

Definition at line 33 of file genericdbusinterface.h.

Member Function Documentation

◆ cancelAllPendingAsyncCalls()

void swift::misc::CGenericDBusInterface::cancelAllPendingAsyncCalls ( )
inline

Cancel all asynchronous DBus calls which are currently pending.

Warning
Don't call this from inside an async callback!

Definition at line 117 of file genericdbusinterface.h.

◆ relayParentSignals()

void swift::misc::CGenericDBusInterface::relayParentSignals ( )
inline

For each signal in parent, attempt to connect to it an interface signal of the same name.

See also
SWIFT_NO_RELAY

Definition at line 46 of file genericdbusinterface.h.


The documentation for this class was generated from the following file: