When exposing some code to D-Bus using Qt D-Bus bindings, when should one use a Qt Adaptor over a Qt Interface? I'm having a difficult time understanding how exactly they differ since it seems like they provide the same functionality.
+1
A:
Per http://doc.trolltech.com/4.3/qdbusabstractinterface.html, "QDBusAbstractInterface class is the base class for all D-Bus interfaces in the QtDBus binding", while, per http://doc.trolltech.com/4.3/qdbusabstractadaptor.html, "QDBusAbstractAdaptor class is the starting point for all objects intending to provide interfaces to the external world using D-Bus". So, the former is used in the interface itself, the latter is used to provide the interface, i.e., for "exposing some code to D-Bus" you'd write a class inheriting the adaptor and "define the D-Bus interface it is implementing using the Q_CLASSINFO macro in the class definition" (also a quote from the second of the above URLs).
Alex Martelli
2009-05-27 23:54:03