Glib DBUS Problems

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.

One response to “Glib DBUS Problems”

  1. Anonymous

    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

Bad Behavior has blocked 2769 access attempts in the last 7 days.