我是GDBus的新手,所以请原谅我。我想出了如何使用在线示例创建字典GVariant *对象:
GVariantBuilder *b;
GVariant *dict;
b = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (b, "{sv}", "name", g_variant_new_string ("foo"));
g_variant_builder_add (b, "{sv}", "timeout", g_variant_new_int32 (10));
dict = g_variant_builder_end (b);
这很简单。但是现在我想接受这个字典并将其以key:value格式嵌入到另一个GVariant *包装器对象中。这可能吗?