Request for pointers/hints for processing container arguments ...
rony
rony at wu.ac.at
Tue Jun 21 10:15:11 PDT 2011
Hi there,
my name is Rony and I have started to write a language binding for a
scripting language named ooRexx (http://www.ooRexx.org). Hence, despite
all well-meant warnings, I have to delve into the C bindings in order to
successfully create the binding (starting out for Linux, but aiming also
on porting later to MacOSX and Windows).
In the process of doing so I have studied the specs, tutorials and
Matthew Johnsons's *great tutorail* (however, the link on
<http://www.freedesktop.org/wiki/Software/dbus> to his tutorial at
<http://dbus.freedesktop.org/doc/dbus/libdbus-tutorial.html> is dead,
but I managed to get a version on his web site), which has helped me a lot.
Currently I am involved in writng the code for processing the ooRexx
arguments for DBus which now work for all simple types (using
dbus_message_iter_append_basic(...)).
The next step is to deal with the container types variant, arrays,
structs and dicts. While studying the specification and the methods in
DBusMessage (like dbus_message_iter_get_array_len(*iter) or
dbus_message_iter_get_fixed_array(*iter, void *value, int *n_elements),
but also dbus_message_iter_append_fixed_array(*iter, int element_type,
const void *value, int n_elements) etc.) it is the case that I still am
not able to understand how exactly these types have to be processed.
Any little program/snippet or pseudo code would help me a lot and hence
turning to this list of experts to ask for help!
If you have pointers to any plain C code (glib's binding won't help me
unfortunately) or would be kind enough to simply sketch in scarce
pseudocode how to create those container values for message arguments, I
would *really* appreciate it a lot!
TIA,
---rony
P.S.: If anyone has anything comparable to Matthew Johnson's tutorial,
but demoing how to process container values, that would be a boon!
More information about the dbus
mailing list