dbus Digest, Vol 81, Issue 3
Shah, Nirav J2
nirav.j2.shah at intel.com
Mon Apr 9 10:04:00 PDT 2012
Hello,
Thanks for your reply Thiago. Although you are right that a readable property has to be valid always. I am in situation where it's not. Working with legacy code here with minimal redesign allowed.
In my case it's an object-path type. On initialization it's not valid. I am thinking of returning a specific value (indicating invalid property) to make getall work. I have thought of 3 possible things. I just wanted to know if any one of this can be appropriate "standard wise"?
1) Changing the type of the property to a container type like array of object-path (ao). I think from observation this can be NULL.
2) Using an invalid object path like "/"
3) Return an object initialized with an empty string. I think I tried this and it blew up because there is a valid type check somewhere in dbus library
I would really appreciate your feedback.
-----Original Message-----
From: dbus-bounces+nirav.j2.shah=intel.com at lists.freedesktop.org [mailto:dbus-bounces+nirav.j2.shah=intel.com at lists.freedesktop.org] On Behalf Of dbus-request at lists.freedesktop.org
Sent: Saturday, April 07, 2012 12:00 PM
To: dbus at lists.freedesktop.org
Subject: dbus Digest, Vol 81, Issue 3
Send dbus mailing list submissions to
dbus at lists.freedesktop.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freedesktop.org/mailman/listinfo/dbus
or, via email, send a message with subject or body 'help' to
dbus-request at lists.freedesktop.org
You can reach the person managing the list at
dbus-owner at lists.freedesktop.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of dbus digest..."
Today's Topics:
1. DBUS getall method (Shah, Nirav J2)
2. Re: DBUS getall method (Thiago Macieira)
----------------------------------------------------------------------
Message: 1
Date: Fri, 6 Apr 2012 19:32:31 +0000
From: "Shah, Nirav J2" <nirav.j2.shah at intel.com>
Subject: DBUS getall method
To: "dbus at lists.freedesktop.org" <dbus at lists.freedesktop.org>
Message-ID:
<5A7EE8205ACF264A834A5C987038F7B81A178150 at FMSMSX103.amr.corp.intel.com>
Content-Type: text/plain; charset="us-ascii"
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.
PS: By valid I mean it is not always relevant.
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.
Thanks,
Nirav.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20120406/d49d747b/attachment.htm>
------------------------------
Message: 2
Date: Fri, 06 Apr 2012 19:35:20 -0300
From: Thiago Macieira <thiago at kde.org>
Subject: Re: DBUS getall method
To: dbus at lists.freedesktop.org
Message-ID: <1515604.v0EWz8MDy5 at tjmaciei-mobl2>
Content-Type: text/plain; charset="us-ascii"
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-0001.pgp>
------------------------------
_______________________________________________
dbus mailing list
dbus at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus
End of dbus Digest, Vol 81, Issue 3
***********************************
More information about the dbus
mailing list