Clarification on ObjectManager GetManagedObjects & InterfacesRemoved

Tony Asleson tasleson at redhat.com
Mon Mar 30 16:29:31 PDT 2015


>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?

Additionally, if this object hypothetically did a signal for:
InterfacesRemoved and the object went totally away, which one would be
correct:

1. /org/freedesktop/UDisks2/block_devices/dm_2d0,
[org.freedesktop.UDisks2.Block]

2. /org/freedesktop/UDisks2/block_devices/dm_2d0,
[org.freedesktop.UDisks2.Block, org.freedesktop.DBus.Properties,
org.freedesktop.DBus.Peer, org.freedesktop.DBus.Introspectable]

Thanks,
Tony


[1]http://dbus.freedesktop.org/doc/dbus-specification.html


More information about the dbus mailing list