spec: Recommend against using ‘/’ for object paths

As discussed in http://0pointer.de/blog/projects/versioning-dbus.html
and in https://dbus.freedesktop.org/doc/dbus-api-design.html,
un-versioned object paths make it hard to work out which interface a
signal was emitted from.

Clarify this in the specification to try and avoid people making this
mistake.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37095
Reviewed-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
Philip Withnall 2016-10-01 13:22:30 +02:00 committed by Simon McVittie
parent 693f75a88b
commit bfebafc256

View file

@ -586,6 +586,15 @@
plugins).
</para>
<para>
Using an object path of <literal>/</literal> is allowed, but
recommended against, as it makes versioning of interfaces hard. Any
signals emitted from a D-Bus object have the services unique bus name
associated with them, rather than its well-known name. This means that
receipients of the signals must rely entirely on the signal name and
object path to work out which interface the signal originated from.
</para>
<para>
For instance, if the owner of <literal>example.com</literal> is
developing a D-Bus API for a music player, they might use the