From 9afcfb5cd8cf2ac7dbd0cf5c78ba74b1833a33bd Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 1 Oct 2016 13:22:30 +0200 Subject: [PATCH] =?UTF-8?q?spec:=20Recommend=20against=20using=20=E2=80=98?= =?UTF-8?q?/=E2=80=99=20for=20object=20paths?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. https://bugs.freedesktop.org/show_bug.cgi?id=37095 --- doc/dbus-specification.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index f57a498..b747c0b 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -587,6 +587,15 @@ + Using an object path of / is allowed, but + recommended against, as it makes versioning of interfaces hard. Any + signals emitted from a D-Bus object have the service’s 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. + + + For instance, if the owner of example.com is developing a D-Bus API for a music player, they might use the hierarchy of object paths that start with -- 2.7.4