[folks] Expose the TpTestContactListConnection's manager.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Expose the TpTestContactListConnection's manager.
- Date: Wed, 6 Oct 2010 18:12:44 +0000 (UTC)
commit a060bfb8f8e6e342d1f7ed15ac9940b00ccee379
Author: Travis Reitter <travis reitter collabora co uk>
Date: Tue Oct 5 10:59:06 2010 -0700
Expose the TpTestContactListConnection's manager.
tests/lib/telepathy/contactlist/conn.c | 19 +++++++++++++++++++
tests/lib/telepathy/contactlist/conn.h | 5 +++++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/tests/lib/telepathy/contactlist/conn.c b/tests/lib/telepathy/contactlist/conn.c
index 2e0677a..b078817 100644
--- a/tests/lib/telepathy/contactlist/conn.c
+++ b/tests/lib/telepathy/contactlist/conn.c
@@ -39,6 +39,7 @@ enum
{
PROP_ACCOUNT = 1,
PROP_SIMULATION_DELAY,
+ PROP_MANAGER,
N_PROPS
};
@@ -73,6 +74,10 @@ get_property (GObject *object,
g_value_set_string (value, self->priv->account);
break;
+ case PROP_MANAGER:
+ g_value_set_object (value, self->priv->list_manager);
+ break;
+
case PROP_SIMULATION_DELAY:
g_value_set_uint (value, self->priv->simulation_delay);
break;
@@ -120,6 +125,14 @@ finalize (GObject *object)
object);
}
+TpTestContactListManager *
+tp_test_contact_list_connection_get_manager (TpTestContactListConnection *self)
+{
+ g_return_val_if_fail (TP_TEST_IS_CONTACT_LIST_CONNECTION (self), NULL);
+
+ return self->priv->list_manager;
+}
+
static gchar *
get_unique_connection_name (TpBaseConnection *conn)
{
@@ -442,6 +455,12 @@ tp_test_contact_list_connection_class_init (
G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
g_object_class_install_property (object_class, PROP_ACCOUNT, param_spec);
+ param_spec = g_param_spec_object ("manager", "TpTestContactListManager",
+ "TpTestContactListManager object that owns this channel",
+ TP_TEST_TYPE_CONTACT_LIST_MANAGER,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_MANAGER, param_spec);
+
param_spec = g_param_spec_uint ("simulation-delay", "Simulation delay",
"Delay between simulated network events",
0, G_MAXUINT32, 1000,
diff --git a/tests/lib/telepathy/contactlist/conn.h b/tests/lib/telepathy/contactlist/conn.h
index 0d46d67..bc03dee 100644
--- a/tests/lib/telepathy/contactlist/conn.h
+++ b/tests/lib/telepathy/contactlist/conn.h
@@ -17,6 +17,8 @@
#include <telepathy-glib/contacts-mixin.h>
#include <telepathy-glib/presence-mixin.h>
+#include "contact-list-manager.h"
+
G_BEGIN_DECLS
typedef struct _TpTestContactListConnection TpTestContactListConnection;
@@ -57,6 +59,9 @@ GType tp_test_contact_list_connection_get_type (void);
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TEST_TYPE_CONTACT_LIST_CONNECTION, \
TpTestContactListConnectionClass))
+TpTestContactListManager *tp_test_contact_list_connection_get_manager (
+ TpTestContactListConnection *self);
+
gchar *tp_test_contact_list_normalize_contact (TpHandleRepoIface *repo,
const gchar *id, gpointer context, GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]