double tmp_double, dlow, dhigh;
uint64_t tmp_u64, p, q, low, high;
GVariant *rational[2], *range[2];
+ GVariantBuilder *vbl;
gboolean tmp_bool;
+ gchar **keyval;
int ret;
if (!(srci = sr_config_info_name_get(key))) {
src->data = g_variant_new_tuple(range, 2);
}
break;
+ case SR_T_KEYVALUE:
+ /* Expects the argument to be in the form of key=value. */
+ keyval = g_strsplit(value, "=", 2);
+ if (!keyval[0] || !keyval[1]) {
+ g_strfreev(keyval);
+ ret = -1;
+ break;
+ } else {
+ vbl = g_variant_builder_new(G_VARIANT_TYPE_DICTIONARY);
+ g_variant_builder_add(vbl, "{ss}",
+ keyval[0], keyval[1]);
+ src->data = g_variant_builder_end(vbl);
+ g_strfreev(keyval);
+ }
+ break;
default:
g_critical("Unknown data type specified for option '%s' "
"(driver implementation bug?).", key);