ANNOUNCE: D-Bus 0.50 - "You run and you run to catch up with the sun, but it's sinking" is released

Jamie McCracken jamiemcc at blueyonder.co.uk
Wed Sep 7 10:04:29 PDT 2005


 >Colin Walters wrote:
>> On Wed, 2005-09-07 at 10:45 +0100, Jamie McCracken wrote:

>>(this is particularily a problem 
>>in cases where the struct could contain anything) and also when passing 
>>a G_BOXED_TYPE as an input variant parameter (how can the variant derive 
>>the correct signature from a Gvalue holding a struct?).
> 
> 
> You can't pass G_TYPE_BOXED to the GLib bindings directly; you need to
> pass a derived type.

so the following should work then:

void
save_value (GValueArray *values) {
   GValue val = {0, };

   g_value_init (&val, G_TYPE_VALUE_ARRAY);
   g_value_set_boxed (&val, values);

   error = NULL;
   if (!dbus_g_proxy_call (proxy, "SetValue", &error,
                           G_TYPE_VALUE, &val, G_TYPE_INVALID,
			  G_TYPE_INVALID))
     {
       g_warning ("error");
     }

   g_value_unset (&val);
}

> 
> 
>>2) I need support for DBUS DICTs of signature a{sv} which need to map to 
>>a GHashTable containing (string, GValueArray)
> 
> 
> The GLib bindings already support a{sv}; there is some example usage in
> the test suite.
>

Cool - Great work!


-- 
Mr Jamie McCracken
http://www.advogato.org/person/jamiemcc/


More information about the dbus mailing list