#include <asyncdbusinterface.h>
Public Member Functions | |
AsyncDBusInterface (const QString &service, const QString &path, const QString &interface, const QDBusConnection &connection, QObject *parent=0) |
In QtDBus, the QDBusInterface class which the developer is supposed to use makes introspection calls synchronously. It is not clear (and not documented), what is the benefit of these introspection calls, probably invalid use and some errors are catched earlier if introspection data is available.
However this introspection data is requested synchronously, so constructing a new QDBusInterface can block your thread if the endpoint serving that introspection data on D-Bus is stuck.
ContextKit tries to be asynchronous, so this behavior of QDBusInterface is unacceptable and this is why QDBusAbstractInterface has to be used instead (it is simpler, it doesn't use introspection at all).
Unfortunately QDBusAbstractInterface only has a protected constructor, so we need this wrapper class, which makes that constructor available to us.
So this class is internal to ContextKit, it is distributed only, because we use it in several subprojects, do not use it through ContextKit. If you find this useful, copy the source instead.
AsyncDBusInterface::AsyncDBusInterface | ( | const QString & | service, | |
const QString & | path, | |||
const QString & | interface, | |||
const QDBusConnection & | connection, | |||
QObject * | parent = 0 | |||
) |