Re: changed property value in signal

Simon McVittie <simon.mcvittie-ZGY8ohtN/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Organization Collabora Ltd.
Message-ID <[email protected]>
On 03/07/15 10:41, Pradeepa Kumar wrote:
> The propertieschanged message contains a dictionary and invalidated
>  list of properties.
> But the dictionary is empty(which is supposed to contain new value of
> changed properties), so i am left with querying new values of the
> changed property from list of invalidated properties list.
> - please let me know how do i get new values in the signal msg itself

If the service (in your case systemd) has chosen to use the Invalidated
list, then the only thing you can do to get the new values is to fetch
them with a subsequent method call.

Services are not required to emit new values for properties. There are
two equally valid encodings for a property named Things changing its value:

  PropertiesChanged("com.example.Interface", {"Things": newvalue}, [])
    -> Things has changed to newvalue

  PropertiesChanged("com.example.Interface", {}, ["Things"])
    -> Things has changed to an unspecified value, call Get or GetAll
       if you need to find out what that value is

The fact that systemd has chosen to use the second is likely to be a
deliberate design decision. The "invalidated" list is designed for
situations where the properties' values are large or "expensive" to
compute, so the service does not re-compute them until specifically
asked for them.

> - i upgraded to dbus 1.8.18

Upgrading the communications infrastructure (dbus) will not result in
the service with which you are communicating (systemd) giving you more
information.

-- 
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>

_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.