[mpris] [ANN] MPRIS v2.0
kevin.krammer at gmx.at
Thu Aug 12 07:28:50 PDT 2010
On Thursday, 2010-08-12, Marc-André Lureau wrote:
> - (comment) the "CanDoThat" or "HasThis" pattern could probably use
> introspection instead, if DBus common usage permits having
> "incomplete" interfaces.
Dynamically changing an interface is not an option IMHO.
First, an interface is a contract. If an application claims to implement an
interface it should have all the specified methods, even if some of them raise
errors/exceptions due to not being fully implemented.
Second, not all languages can easily add/remove methods at runtime or at least
not without making calling them awkward.
Third, properties can be queried both separately as well as a whole set.
Introspection (IIRC) works on nodes, so it will always deliver all interfaces
of the queried node.
Fourth, D-Bus properties are often mapped to the bindings' object model's
property system which in turn is usually a well known concept for developers
already working with the respective object model.
Bindings might even have the option for poll for changes and mapping the
result into property change notifications (future versions of the standard
properties interface might even provide for change signalling by the service).
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the xdg