diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-10-08 15:30:47 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-10-08 16:17:59 +0100 |
commit | 552dcac1ea50fbe0d64e4ec122b40d3d8fb5b391 (patch) | |
tree | 3ca33e3f14111e521526db264a1011c012e6a36b /util | |
parent | 7f8f814ffc232cbfe903b66a418c52d2ce964f5d (diff) |
mc-tool: have a TpSimpleClientFactory to manufacture accounts
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'util')
-rw-r--r-- | util/mc-tool.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/mc-tool.c b/util/mc-tool.c index 9cf13d51..1bd4c067 100644 --- a/util/mc-tool.c +++ b/util/mc-tool.c @@ -1410,6 +1410,7 @@ main (int argc, char **argv) TpAccountManager *am = NULL; TpAccount *a = NULL; TpDBusDaemon *dbus = NULL; + TpSimpleClientFactory *client_factory = NULL; GError *error = NULL; const GQuark features[] = { TP_ACCOUNT_FEATURE_CORE, TP_ACCOUNT_FEATURE_ADDRESSING, TP_ACCOUNT_FEATURE_STORAGE, 0 }; @@ -1428,6 +1429,7 @@ main (int argc, char **argv) app_name, command.common.name, error->message); goto out; } + client_factory = tp_simple_client_factory_new (dbus); if (command.common.account == NULL) { TpSimpleClientFactory *factory; @@ -1442,7 +1444,8 @@ main (int argc, char **argv) else { command.common.account = ensure_prefix (command.common.account); - a = tp_account_new (dbus, command.common.account, &error); + a = tp_simple_client_factory_ensure_account (client_factory, + command.common.account, NULL, &error); if (error != NULL) { @@ -1460,6 +1463,7 @@ main (int argc, char **argv) out: g_clear_error (&error); + tp_clear_object (&client_factory); tp_clear_object (&dbus); tp_clear_object (&am); tp_clear_object (&a); |