Marshaling structures

Michael Meeks
Mon, 19 Jan 2004 19:59:25 +0000

On Mon, 2004-01-19 at 09:14, Kiran Kumar Immidi wrote:
>   D-BUS currently does not seem to provide for marshaling and
> demarshaling of structured types. Doing this manually is quite tedious.
> Something like an IDL compiler would be ideal. Is such a thing
> available/in the process of becoming available? What then is the best
> way in order to pass large structured data types?

	I too am rather interested in this; is the only way to marshal an array
of a structure to send an array of dicts - each containing a dict
containing a single member of a new type (with a single bogus named
field) containing the value ? ie.

	struct Foo {
		int a;
		double b;
		string c;

	typedef sequence<Foo> Baa;



	Where we might have:

		Dict<Dict> (
			"a" -> Dict<int> ( "" -> <valueof a> )
			"b" -> Dict<double> ( "" -> <valueof b> )
			"c" -> Dict<string> ( "" -> <valueof c> )

	[ of course - this being highly notationally confused ;-].

	Of course - if you're not writing something extremely simple - perhaps
you should consider using a more meaty IPC system such as DCE, DCOM,
CORBA or somesuch ?



--  <><, Pseudo Engineer, itinerant idiot