summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-08-03 18:09:42 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-10-07 16:31:35 +0100
commit144d6e15d9cd5bd8a8c17ffc50a0ba5078319d98 (patch)
treeb25a2e7e3c51d3f938a3596ad1fdbabdf54a5ea4
parentfcc72fea419a1eb5abb4fcb173a0a57dbaeee87e (diff)
downloadtelepathy-mission-control-144d6e15d9cd5bd8a8c17ffc50a0ba5078319d98.tar.gz
mc-tool: support object path parameters
-rw-r--r--util/mc-tool.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/util/mc-tool.c b/util/mc-tool.c
index 393be4fd..4073649c 100644
--- a/util/mc-tool.c
+++ b/util/mc-tool.c
@@ -60,7 +60,7 @@ show_help (gchar * err)
" %1$s request <account name> <presence status> [<message>]\n"
" %1$s auto-connect <account name> [(on|off)]\n"
" %1$s remove <account name>\n"
- " where <param> matches (int|uint|bool|string):<key>=<value>\n",
+ " where <param> matches (int|uint|bool|string|path):<key>=<value>\n",
app_name);
if (err)
@@ -234,6 +234,12 @@ set_param (GHashTable *parameters,
g_value_set_string (gvalue, value);
ret = TRUE;
}
+ else if (strcmp (type, "path") == 0)
+ {
+ g_value_init (gvalue, DBUS_TYPE_G_OBJECT_PATH);
+ g_value_set_boxed (gvalue, value);
+ ret = TRUE;
+ }
if (ret)
g_hash_table_replace (parameters, g_strdup (key), gvalue);
@@ -269,6 +275,10 @@ show_param (gchar const *key, GValue *value)
type = "bool";
decoded = g_strdup (g_value_get_boolean (value) ? "true" : "false");
}
+ else if (G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH)) {
+ type = "path";
+ decoded = g_value_dup_boxed (value);
+ }
else {
type = G_VALUE_TYPE_NAME (value);
decoded = g_strdup_value_contents (value);