org.freedesktop.DBus.Properties.GetAll

David Zeuthen david at fubar.dk
Thu Apr 12 14:48:48 PDT 2007


On Thu, 2007-04-12 at 14:22 -0400, Havoc Pennington wrote:
> Hi,
> 
> The dbus spec defines a Properties interface with methods:
> 
>   VARIANT Get(STRING interfaceName, STRING propName)
>   void    Set(STRING interfaceName, STRING propName, VARIANT value);
> 
> I'd like to add to the spec:
> 
>   DICT<STRING,VARIANT> GetAll(STRING interfaceName)
> 
> Also somewhat missing here is change notification, but I can't think of 
> any reasonable way to do it since the efficiency tradeoffs are pretty 
> different in different situations.

We can be smart about this; the bus just needs to notify servers when
someone adds a match rule. So if there are no matches for the signal
org.fd.Properties.Changed() on /org/fd/SomeService/blah, the owner of
that object just avoids sending out a signal. The bus can notify servers
asynchronously and would also provide a ShouldSendOutchange() method for
bootstrapping.

You might want to use the signature "sbbv" for Changed() too so it looks
like this

 Changed(STRING propNAME, BOOL wasAdded, BOOL wasRemoved, VARIANT value)

This way I can easily write a client that maintains the property set
without ever having to call into the service.

     David




More information about the dbus mailing list