summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-12 12:21:14 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-12 14:30:59 +0100
commit06cb1df43b9113eb0f202b4ae9d95adc032b5d67 (patch)
tree1d0e0631f1a7e5c14099b78956370b8402d81d51 /util
parent287f7425b9069fae816f1e2872b5992dffb17074 (diff)
mc-tool: add getter for AutomaticPresence
Diffstat (limited to 'util')
-rw-r--r--util/mc-tool.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/util/mc-tool.c b/util/mc-tool.c
index 3e5445fd..fb60f09e 100644
--- a/util/mc-tool.c
+++ b/util/mc-tool.c
@@ -424,6 +424,7 @@ typedef enum {
GET_PARAM,
GET_STRING,
GET_BOOLEAN,
+ GET_PRESENCE,
GET_PRESENCE_TYPE,
GET_PRESENCE_STATUS,
GET_PRESENCE_MESSAGE
@@ -473,6 +474,8 @@ getter_list_init(void)
tp_account_get_connect_automatically);
getter_list_add("NormalizedName", GET_STRING, tp_account_get_normalized_name);
+ getter_list_add("AutomaticPresence",
+ GET_PRESENCE, tp_account_get_automatic_presence);
getter_list_add("AutomaticPresenceType",
GET_PRESENCE_TYPE, tp_account_get_automatic_presence);
getter_list_add("AutomaticPresenceStatus",
@@ -893,6 +896,16 @@ command_get (TpAccount *account)
else if (getter->type == GET_BOOLEAN) {
puts(getboolean(account) ? "true" : "false");
}
+ else if (getter->type == GET_PRESENCE)
+ {
+ struct presence presence;
+
+ presence.type = getpresence(account, &presence.status,
+ &presence.message);
+ printf ("(%u, \"%s\", \"%s\")\n", presence.type,
+ presence.status, presence.message);
+ free_presence (&presence);
+ }
else if (getter->type == GET_PRESENCE_TYPE ||
getter->type == GET_PRESENCE_STATUS ||
getter->type == GET_PRESENCE_MESSAGE) {