Re: [Vala] Dbus properies notifications



Hello,

On Wed, Sep 22, 2010 at 12:00:40 +0200, tetete wrote:
Hello
Is there a possibility to get notifications of changed dbus server
properties on the client? 
I guess there is some "on board" vala way of doing this.
serverobject.notify.connect( (s,p)=>{print("%s\n",p.name);});
is not working.
The client can read the properties, but without change notifications,
they are far less useful.
I'm using GDBus and vala-0.10.0

The DBus specification says that
org.freedesktop.DBus.Properties.PropertiesChanged signal was added in 0.14,
but may not be supported by particular implementations. Either because they
were not yet updated to 0.14 or because they for some reason don't want to.
See http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties

I can't find when that specification version was released, but believe it's
not more than a year.

So try connecting to the PropertiesChanged signal. If that does not work, try
using the methods of DBus.Proxy directly instead of relying on the laguage
support. It still may not work if your server does not emit it, though.

-- 
                                                 Jan 'Bulb' Hudec <bulb ucw cz>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]