telepathy-glib: simple-account-manager: save CreateAccount parameters
Jonny Lamb
jonny at kemper.freedesktop.org
Thu May 10 07:41:17 PDT 2012
Module: telepathy-glib
Branch: master
Commit: 6f387259e167080e30788934c2c05ab4f10437cb
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=6f387259e167080e30788934c2c05ab4f10437cb
Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date: Thu Apr 26 15:15:26 2012 +0100
simple-account-manager: save CreateAccount parameters
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
tests/lib/simple-account-manager.c | 20 +++++++++++++++++---
tests/lib/simple-account-manager.h | 6 ++++++
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/tests/lib/simple-account-manager.c b/tests/lib/simple-account-manager.c
index 8df364a..9caf86f 100644
--- a/tests/lib/simple-account-manager.c
+++ b/tests/lib/simple-account-manager.c
@@ -13,6 +13,7 @@
#include "simple-account-manager.h"
+#include <telepathy-glib/account.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/svc-generic.h>
@@ -49,7 +50,7 @@ struct _TpTestsSimpleAccountManagerPrivate
};
static void
-tp_tests_simple_account_manager_create_account (TpSvcAccountManager *self,
+tp_tests_simple_account_manager_create_account (TpSvcAccountManager *svc,
const gchar *in_Connection_Manager,
const gchar *in_Protocol,
const gchar *in_Display_Name,
@@ -57,9 +58,16 @@ tp_tests_simple_account_manager_create_account (TpSvcAccountManager *self,
GHashTable *in_Properties,
DBusGMethodInvocation *context)
{
- const gchar *out_Account = "/some/fake/account/i/think";
+ TpTestsSimpleAccountManager *self = (TpTestsSimpleAccountManager *) svc;
+ const gchar *out = TP_ACCOUNT_OBJECT_PATH_BASE "gabble/jabber/lospolloshermanos";
- tp_svc_account_manager_return_from_create_account (context, out_Account);
+ self->create_cm = g_strdup (in_Connection_Manager);
+ self->create_protocol = g_strdup (in_Protocol);
+ self->create_display_name = g_strdup (in_Display_Name);
+ self->create_parameters = g_hash_table_ref (in_Parameters);
+ self->create_properties = g_hash_table_ref (in_Properties);
+
+ tp_svc_account_manager_return_from_create_account (context, out);
}
static void
@@ -118,6 +126,12 @@ tp_tests_simple_account_manager_finalize (GObject *object)
g_ptr_array_unref (self->priv->valid_accounts);
g_ptr_array_unref (self->priv->invalid_accounts);
+ tp_clear_pointer (&self->create_cm, g_free);
+ tp_clear_pointer (&self->create_protocol, g_free);
+ tp_clear_pointer (&self->create_display_name, g_free);
+ tp_clear_pointer (&self->create_parameters, g_hash_table_unref);
+ tp_clear_pointer (&self->create_properties, g_hash_table_unref);
+
G_OBJECT_CLASS (tp_tests_simple_account_manager_parent_class)->finalize (
object);
}
diff --git a/tests/lib/simple-account-manager.h b/tests/lib/simple-account-manager.h
index c34a6bf..d1608d5 100644
--- a/tests/lib/simple-account-manager.h
+++ b/tests/lib/simple-account-manager.h
@@ -30,6 +30,12 @@ struct _TpTestsSimpleAccountManagerClass {
struct _TpTestsSimpleAccountManager {
GObject parent;
+ gchar *create_cm;
+ gchar *create_protocol;
+ gchar *create_display_name;
+ GHashTable *create_parameters;
+ GHashTable *create_properties;
+
TpTestsSimpleAccountManagerPrivate *priv;
};
More information about the telepathy-commits
mailing list