diff options
author | David Zeuthen <davidz@redhat.com> | 2010-05-07 12:50:47 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-05-12 12:28:19 -0400 |
commit | 2541e86615ec384f12a20183fe4dfaa53d707869 (patch) | |
tree | 59ed6ba6d201522ec49009f74aede373219b0c46 /doc | |
parent | 1af558a6206152722a8851b11661d2015aac38b5 (diff) |
Add an optional PropertiesChanged() signal
Some notes about this new signal
- The PropertiesChanged() signal is optional. An application can
convey support for this signal by either including or excluding it
from the returned introspection data much like apps not supporting
(or predating) the GetAll() method does not include GetAll() in the
introspection data.
- An object can use PropertiesChanged() but opt out of using it for
one or more properties by using the
org.freedesktop.DBus.Properties.EmitsChangedSignal
annotation on the properties in question
- Applications can start using this new signal without breaking
compatibility with clients relying on existing D-Bus API.
The intent of the patch is simply to standardize existing behavior
- EggDBus has a very similar signal called EggDBusPropertiesChanged()
(also on the org.freedesktop.DBus.Properties interface)
- NetworkManager has a PropertiesChanged() signal on each different
interface (e.g. not org.fd.D.P) that it implements
- GDBus, an implementation of the D-Bus protocol in GLib, already
implements this signal
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/dbus-specification.xml | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 250f6b84..75a302ab 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -7,8 +7,8 @@ <article id="index"> <articleinfo> <title>D-Bus Specification</title> - <releaseinfo>Version 0.13</releaseinfo> - <date>23 Dezember 2009</date> + <releaseinfo>Version 0.14</releaseinfo> + <date>May 12, 2010</date> <authorgroup> <author> <firstname>Havoc</firstname> @@ -2757,6 +2757,31 @@ deterministic rule, or returning an error, are the reasonable possibilities). </para> + <para> + If one or more properties change on an object, the + <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal> + signal may be emitted (this signal was added in 0.14): + </para> + <para> + <programlisting> + org.freedesktop.DBus.Properties.PropertiesChanged (STRING interface_name, + DICT<STRING,VARIANT> changed_properties); + </programlisting> + </para> + <para> + where <literal>changed_properties</literal> is a dictionary + containing the changed properties and the new values. + </para> + <para> + Whether the <literal>PropertiesChanged</literal> signal is + supported can be determined by calling + <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>. If + the signal is supported for an object but not used for one or + more properties (for e.g. performance reasons), each such + property must be annotated with the + <literal>org.freedesktop.DBus.Properties.EmitsChangedSignal</literal> + annotation. + </para> </sect2> </sect1> @@ -2887,6 +2912,11 @@ <entry>true,false</entry> <entry>If set, don't expect a reply to the method call; defaults to false.</entry> </row> + <row> + <entry>org.freedesktop.DBus.Properties.EmitsChangedSignal</entry> + <entry>true,true_no_value,false</entry> + <entry>If set to false, the <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal> signal, see <xref linkend="standard-interfaces-properties"/>, is not emitted if the property changes. If set to true_no_value the signal is emitted but the value is no included in the signal. Defaults to true.</entry> + </row> </tbody> </tgroup> </informaltable> |