DBUS getall method

Thiago Macieira thiago at kde.org
Fri Apr 6 15:35:20 PDT 2012


On sexta-feira, 6 de abril de 2012 19.32.31, Shah, Nirav J2 wrote:
> Hello,
> 
> I have a dbus implementation which is implementing multiple Interfaces
> inside a single object beside the standard dbus interfaces.  I have 2
> questions.
> 
> 1) The get_all() function takes the interface_name as an input. But this
> input seems to be optional (at-least according to the qdbusviewer). 
> According to the specification is it in fact true (for multiple interface
> usecase).
> 
> 2) If the input is infact optional and If some of the properties are not
> always valid. In the situation can the get_all() just skip those
> properties? I tried this and maybe it's just my implementation but it
> crashed. Has anyone done something similar? I couldn't find any examples of
> multiple interface in a single object at all.

I'd say this situation is not valid. All readable properties are readable all 
the time and produce a value. The interpretation of said value is something 
the interface decides, though.

> Example to clarify the doubt.
> //standard Interface each needs to implement
> Object 1-> Object1.Dbus.Introspectable
> Object 1-> Object1.Dbus.Properties
> //implementation specific interfaces.
> Object 1 -> Object1.Interface.A
> Object 1-> Object1.Interface.B
> Object 1 -> Object1.Interface.C
> 
> During introspection I am passing a structure with all the properties
> belonging to all the interfaces.
> 
> Each interface has a set of properties which are not always valid for the
> object. So in the above example for a particular run time scenario
> properties of Interface.B may not valid.  What is the get all supposed to
> do then.

Return them anyway, since they *are* valid.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20120406/87198053/attachment.pgp>


More information about the dbus mailing list