diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-09-23 14:28:54 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-09-23 15:23:53 +0100 |
commit | ab3f0fcf0f700b3ad5c5d905188a3bb8c27994e0 (patch) | |
tree | b3f2be45aadc718f623f7bc86eaeb7f44ef301b5 | |
parent | 4bb6ce89cbc9a0dcb429a2bd42ee2c42d0a5c368 (diff) |
mc-tool: set AutomaticPresence using tp-glib method
-rw-r--r-- | util/mc-tool.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/util/mc-tool.c b/util/mc-tool.c index e50aa082..50c93419 100644 --- a/util/mc-tool.c +++ b/util/mc-tool.c @@ -855,22 +855,12 @@ command_update (TpAccount *account) static gboolean command_auto_presence (TpAccount *account) { - GValue value = { 0, }; - GValueArray *va = tp_value_array_build (3, - G_TYPE_UINT, command.presence.type, - G_TYPE_STRING, command.presence.status, - G_TYPE_STRING, command.presence.message, - G_TYPE_INVALID); - - g_value_init (&value, TP_STRUCT_TYPE_SIMPLE_PRESENCE); - g_value_take_boxed (&value, va); - - tp_cli_dbus_properties_call_set (account, 25000, - TP_IFACE_ACCOUNT, "AutomaticPresence", &value, - (tp_cli_dbus_properties_callback_for_set) callback_for_void, - NULL, NULL, NULL); - - g_value_unset (&value); + tp_account_set_automatic_presence_async (account, + command.presence.type, + command.presence.status, + command.presence.message, + callback_for_async, + tp_account_request_presence_finish); return TRUE; } |