AsyncDBusInterface Class Reference

This is a workaround for QtDBus to be asynchronous. More...

#include <asyncdbusinterface.h>

List of all members.

Public Member Functions

 AsyncDBusInterface (const QString &service, const QString &path, const QString &interface, const QDBusConnection &connection, QObject *parent=0)


Detailed Description

This is a workaround for QtDBus to be asynchronous.

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.


Constructor & Destructor Documentation

AsyncDBusInterface::AsyncDBusInterface ( const QString &  service,
const QString &  path,
const QString &  interface,
const QDBusConnection &  connection,
QObject *  parent = 0 
)


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

Generated on Sun Apr 21 16:11:51 2013 for libcontextsubscriber by  doxygen 1.5.6