Clarification on ObjectManager GetManagedObjects & InterfacesRemoved

David Zeuthen zeuthen at gmail.com
Tue Mar 31 07:36:13 PDT 2015


Hi,

On Mon, Mar 30, 2015 at 7:29 PM, Tony Asleson <tasleson at redhat.com> wrote:

> From the specification[1] for GetManagedObjects:
>
> The return value of this method is a dict whose keys are object paths.
> All returned object paths are children of the object path implementing
> this interface, i.e. their object paths start with the ObjectManager's
> object path plus '/'.
>
> Each value is a dict whose keys are interfaces names. Each value in this
> inner dict is the same dict that would be returned by the
> org.freedesktop.DBus.Properties.GetAll() method for that combination of
> object path and interface. If an interface has no properties, the empty
> dict is returned.
>
> I'm confused, because when I look at udisks2 for example I see that for
> an arbitrary block device eg.
>
> /org/freedesktop/UDisks2/block_devices/dm_2d0
>
> I get one interface: org.freedesktop.UDisks2.Block from GetManagedObjects
>
> However, this object actually implements the following interfaces
> according to the introspection data:
>
> org.freedesktop.UDisks2.Block
> org.freedesktop.DBus.Properties
> org.freedesktop.DBus.Peer
> org.freedesktop.DBus.Introspectable
>
>
> Why doesn't the return data from GetManagedObjects include the
> interfaces: Properties, Peer and Introspectable with an empty dict?
>

Because those are standard interfaces that any object should implement (the
ones you use ObjectManager for, anyway) and including them would take up
precious space in the GetManagedObjects() reply message (and neither of
them have any properties anyway). I guess we should amend the spec to say
that implementations need not include these standard interfaces.

    David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20150331/42ff5013/attachment.html>


More information about the dbus mailing list