Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
service: refactor the low-level service-side bindings
Main points of this implementation: On the base class level: * DBusObject is the main class exported on the bus. Unlike before, it now derives from Tp::Object, so it can be put in a SharedPtr etc... DBusService then inherits DBusObject and provides the additional service registration functionality. * AbstractDBusInterfaceAdaptee is the base class of all adaptees. This is a class that provides the mechanism that allows 'plugging' adaptees on the main DBusObject. There is no base class for the Adaptor anymore. On the generated level: * The Adaptor looks like before, api-wise, but is not exported * It relies purely on C++, there is no QMetaObject magic * The Adaptee creates the Adaptor internally when the object is about to be registered. The Adaptee is still fully usable when it is not registered * Adaptee properties act as cache variables for the values exported on the bus. They are always read/write, even if they are read-only on the bus, so that the implementation can set the values internally. * Writable properties have an additional signal on the Adaptee that notifies the implementation when a property was set from the bus. The property is set anyway, even if the implementation doesn't handle the new value * DBus API methods on the Adaptee can be implemented with a callback. They always return void and the return values are returned from the context (async API, yay!) * DBus API signals are implemented as emitFoo() slots on the Adaptee, which feels more natural than having Q_SIGNALS that are meant to be emitted instead of connected to. #5
- Loading branch information