PropertiesChanged signal, take 2
zeuthen at gmail.com
Thu May 13 07:34:56 PDT 2010
I talked to Lennart and we agreed the best way to solve this problem
is by adding an extra parameter to convey the name of the property
that changed (but not it's value). The attached patch does this and
I'm planning to commit it shortly.
The language for PropertiesChanged is now this
--- In the org.fd.DBus.Properties section we have this:
If one or more properties change on an object, the
org.freedesktop.DBus.Properties.PropertiesChanged signal may be
emitted (this signal was added in 0.14):
where changed_properties is a dictionary containing the changed
properties with the new values and invalidated_properties is an array
of properties that changed but the value is not conveyed.
Whether the PropertiesChanged signal is supported can be determined by
calling org.freedesktop.DBus.Introspectable.Introspect. Note that the
signal may be supported for an object but it may differ how whether
and how it is used on a per-property basis (for e.g. performance or
security reasons). Each property (or the parent interface) must be
annotated with the org.freedesktop.DBus.Property.EmitsChangedSignal
annotation to convey this (usually the default value true is
sufficient meaning that the annotation does not need to be used). See
the section called “Introspection Data Format” for details on this
--- The description of the
org.freedesktop.DBus.Property.EmitsChangedSignal is now:
If set to false, the org.freedesktop.DBus.Properties.PropertiesChanged
signal, see the section called “org.freedesktop.DBus.Properties” is
not guaranteed to be emitted if the property changes.
If set to invalidates the signal is emitted but the value is not
included in the signal.
If set to true the signal is emitted with the value included.
The value for the annotation defaults to true if the enclosing
interface element does not specify the annotation. Otherwise it
defaults to the value specified in the enclosing interface element.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5266 bytes
Desc: not available
More information about the dbus