telepathy-mission-control: mc-tool: have a TpSimpleClientFactory to manufacture accounts
Simon McVittie
smcv at kemper.freedesktop.org
Mon Oct 8 08:20:50 PDT 2012
Module: telepathy-mission-control
Branch: master
Commit: 552dcac1ea50fbe0d64e4ec122b40d3d8fb5b391
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=552dcac1ea50fbe0d64e4ec122b40d3d8fb5b391
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon Oct 8 15:30:47 2012 +0100
mc-tool: have a TpSimpleClientFactory to manufacture accounts
Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>
---
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 9cf13d5..1bd4c06 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);
More information about the telepathy-commits
mailing list