GNOME Bugzilla – Bug 645528
GDBus: Impossible to emit a a{sas} D-Bus signal easily
Last modified: 2011-03-22 20:41:09 UTC
Created attachment 184068 [details] test_signal.vala valac 0.11.7.7-6929 I cannot declare a variable of type HashTable<string,string[]?> because I get the error: error: `string[]?' is not a supported generic type argument, use `?' to box value types I tried without success several syntaxes: with or without the "?", with GStrv. According to juergbi, it is not supported in a native type. Emitting D-Bus signal are difficult because I have to build the variants manually and use: conn.emit_signal ("bus.name", "/path", "iface", "signalName", variant) Using [DBus (signature = "a{sas}")] does not work neither because I get an critical error: (process:32429): GLib-CRITICAL **: g_variant_builder_add_value: assertion `!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed The attached program illustrates the problem.
commit b3e19eba39e882ac42cbd69fb48b361186ea2636 Author: Jürg Billeter <j@bitron.ch> Date: Tue Mar 22 21:39:23 2011 +0100 D-Bus: Support DBus.signature attribute for struct fields Fixes bug 645528.