Maybe because it's been a long week, or maybe because I'm being a moron, I can't see to get a specific dbus annotation to work. The problem I'm having is with the signature “a(ii)” i.e. an array of a structures made up of two integers.
There's no example in the tutorial or the test/glib/test-service-glib.xml file, so I'm somewhat lost. I'm guessing the prototype would contain 'GList **list', but when I try appending a GValueArray of two G_TYPE_INT's then I don't get any data returned.
So anybody really using the glib bindings for dbus to unwrap an array of structures? Pointers to code or documentation welcome. Thanks.
Published by
hughsie
Richard has over 10 years of experience developing open source software. He is the maintainer of GNOME Software, PackageKit, GNOME Packagekit, GNOME Power Manager, GNOME Color Manager, colord, and UPower and also contributes to many other projects and opensource standards. Richard has three main areas of interest on the free desktop, color management, package management, and power management.
Richard graduated a few years ago from the University of Surrey with a Masters in Electronics Engineering. He now works for Red Hat in the desktop group, and also manages a company selling open source calibration equipment. Richard's outside interests include taking photos and eating good food.
View all posts by hughsie
As I've said on the mailinglist recently, its kinda my fault that the tutorial isn't yet updated – I wrote the functionality a while back :/ I should at least add a test case in test-service (its tested in dbus/dbus-gvalue-utils.c) I'd recommended looking at gabble_media_channel_list_streams in http://projects.collabora.co.uk/trac/telepathy/browser/src/gabble-media-channel.c for an example of how to do this. dbus_g_type_struct_set and friends are all documented in the doxygen output (gtk-doc if you're using bleeding-edge git) In the future you will be able to use actual c structs (apart from helpers to define the GType, we also need to make the service side methods and client side signals allow you to specify what GTypes you want your dbus messages marshalled into..) Thanks, Rob Taylor