diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-02-13 14:36:42 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-02-13 14:36:42 +0000 |
commit | edd77d23975fabc9a33779cc4011dd84122c9b2e (patch) | |
tree | d10641c374d0967f3e1f1291ca26d8397a56b390 /util | |
parent | 75ce9cdd98c102643ff3eddedf4cf328d034d283 (diff) | |
parent | 0fda3bd4b8217460a3c755e8eae8c48ad6478958 (diff) | |
download | telepathy-mission-control-edd77d23975fabc9a33779cc4011dd84122c9b2e.tar.gz |
Merge branch 'altered-one-54780'
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54780
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
[deleted a stray line from a comment as per wjt's review -smcv]
Conflicts:
src/mcd-account.c
Diffstat (limited to 'util')
-rw-r--r-- | util/mc-tool.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/util/mc-tool.c b/util/mc-tool.c index 1bd4c067..59a1a919 100644 --- a/util/mc-tool.c +++ b/util/mc-tool.c @@ -425,6 +425,7 @@ typedef enum { GET_PARAM, GET_STRING, GET_BOOLEAN, + GET_PRESENCE, GET_PRESENCE_TYPE, GET_PRESENCE_STATUS, GET_PRESENCE_MESSAGE @@ -474,6 +475,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", @@ -894,6 +897,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) { |