Should GetManagedObjects include the current path?

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Sat Oct 19 22:04:16 UTC 2019


On Sat, 19 Oct 2019 22:18:26 +0200, David Henningsson wrote:

> This seems to indicate that just "/hello/world" should be returned
> and not "/hello", but
> 
>   - When calling AddMatch, the "path_namespace" in the example a few 
> lines below is written so that it does include the path itself ...

When adding properties, of course you have to specify the path of the
object that owns those properties. It all gets returned when
GetManagedObjects is called. Note this paragraph in the spec
<https://dbus.freedesktop.org/doc/dbus-specification.html>:

    An API can optionally make use of this interface for one or more
    sub-trees of objects. The root of each sub-tree implements this
    interface so other applications can get all objects, interfaces and
    properties in a single method call. It is appropriate to use this
    interface if users of the tree of objects are expected to be
    interested in all interfaces of all objects in the tree; a more
    granular API should be used if users of the objects are expected to
    be interested in a small subset of the objects, a small subset of
    their interfaces, or both.

In DBussy, my GetManagedObjects handler currently ignores the object
path and always returns info for “all objects in the tree”, since that
is the phrase used in the spec.


More information about the dbus mailing list