From bfebafc256bd3280b235bcbf46691f25a0acf55f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 1 Oct 2016 13:22:30 +0200 Subject: [PATCH] =?utf8?q?spec:=20Recommend=20against=20using=20=E2=80=98/?= =?utf8?q?=E2=80=99=20for=20object=20paths?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37095 Reviewed-by: Simon McVittie --- doc/dbus-specification.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index f57a49830..b747c0bfe 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -586,6 +586,15 @@ plugins). + + 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 -- 2.47.3