From: David Zeuthen Date: Fri, 7 May 2010 16:50:47 +0000 (-0400) Subject: Add an optional PropertiesChanged() signal X-Git-Tag: dbus-1.3.1~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2541e86615ec384f12a20183fe4dfaa53d707869;p=platform%2Fupstream%2Fdbus.git 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 --- diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 250f6b8..75a302a 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -7,8 +7,8 @@
D-Bus Specification - Version 0.13 - 23 Dezember 2009 + Version 0.14 + May 12, 2010 Havoc @@ -2757,6 +2757,31 @@ deterministic rule, or returning an error, are the reasonable possibilities). + + 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): + + + + org.freedesktop.DBus.Properties.PropertiesChanged (STRING interface_name, + DICT<STRING,VARIANT> changed_properties); + + + + where changed_properties is a dictionary + containing the changed properties and the new values. + + + Whether the PropertiesChanged signal is + supported can be determined by calling + org.freedesktop.DBus.Introspectable.Introspect. 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 + org.freedesktop.DBus.Properties.EmitsChangedSignal + annotation. + @@ -2887,6 +2912,11 @@ true,false If set, don't expect a reply to the method call; defaults to false. + + org.freedesktop.DBus.Properties.EmitsChangedSignal + true,true_no_value,false + If set to false, the org.freedesktop.DBus.Properties.PropertiesChanged signal, see , 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. +