PropertiesChanged signal, take 2
zeuthen at gmail.com
Wed May 12 13:09:58 PDT 2010
On Wed, May 12, 2010 at 3:49 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> Hmm, Could we extend this a little so that we can set the annotation on
> the class interface itself too, to set a default for the interface that
> is then overridable per-property? In systemd I have a metric truckload
> of properties on each service, which means that the introspection data
> is already kinda big, and instead of annotating every single property as
> EmitsChangedSignal=true_no_value I'd prefer having to annotate that only
> once for the interface. Makes the introspection XML blurb smaller and
> more readable.
Now I'm curious: why do you want to use true_no_value for _all of
these_ properties? Are each of them really that big? (If so, some
design input from me, if you wanted to know, would be to reconsider if
they really should be properties at all).
Please remember that the point of the PropertiesChanged() signal _in
the first place_ is to make it easy to write D-Bus clients. Meaning
that you don't need to do all kinds of things like connecting to
signals or do async or blocking calls to read a property. You simply
connect the signal, call GetAll() and then you are done (updating the
local cached value as you go). Which can only be achieved if the
service actually uses the PropertiesChanged() signal as designed.
More information about the dbus