Limitations in IDL files

Matthew Johnson dbus at matthew.ath.cx
Wed Mar 21 05:45:12 PDT 2007


On Wed, Mar 21, 2007 at 01:36:59PM +0100, jacques GUILLOU wrote:
>
> >The other alternative is to send structs over D-Bus, which is allowed.
> >Args of type (..)  { eg '(sii)' for a struct of a string and 2 ints }
> >are structs. The stub generators (as applicable in your language) should
> >turn them into appropriate definitions.
 
> I have tried this struc type but:
>     - The glib stub generator doesn't create any C struture definition for it.

I'm sure it should, but I'm not a glib person. What does it put as the
type for the parameter of the method?

>     - The Java generator does better : it generate a Class called Struct1.
> If there was a way to define the name of this struct in the IDL, it would be
> close to my proposal.

The name of the struct is something that's specific to the
implementation. Introspection data just provides a contract for the ABI,
it doesn't deal with anything else. It's not really designed to be an
IDL (although glib uses it as that and there are convenience functions
there in Java). You aren't meant to ever write the introspection data;
if your server is in Java you just write the interface files in Java
(this is simpler than writing the IDL, and doesn't require knowing XML).
 
> You cannot just leave things as null, however. D-Bus has no concept of
> >null, you must send a valid value.
> 
> Is it a limitation of DBus itself or the bindings ?

It's a limitation (an explicit design decision, infact) of D-Bus.

Matt
--
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070321/a74b5917/attachment.pgp


More information about the dbus mailing list