[Telepathy-commits] [telepathy-qt4/master] Extend channelspecific example to support contacts interface.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Fri Feb 6 13:04:13 PST 2009


---
 tests/lib/csh/Makefile.am |    3 ++-
 tests/lib/csh/conn.c      |    7 ++++++-
 tests/lib/csh/conn.h      |    5 +++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/tests/lib/csh/Makefile.am b/tests/lib/csh/Makefile.am
index 64b6cff..1d5b498 100644
--- a/tests/lib/csh/Makefile.am
+++ b/tests/lib/csh/Makefile.am
@@ -17,6 +17,7 @@ libtp_glib_csh_tests_la_SOURCES = \
     room-manager.h
 
 libtp_glib_csh_tests_la_LIBADD = \
-    $(TP_GLIB_LIBS)
+    $(TP_GLIB_LIBS) \
+    $(top_builddir)/tests/lib/libtp-glib-tests.la
 
 endif
diff --git a/tests/lib/csh/conn.c b/tests/lib/csh/conn.c
index aab088f..fa6fcba 100644
--- a/tests/lib/csh/conn.c
+++ b/tests/lib/csh/conn.c
@@ -24,7 +24,7 @@
 
 G_DEFINE_TYPE (ExampleCSHConnection,
     example_csh_connection,
-    TP_TYPE_BASE_CONNECTION)
+    CONTACTS_TYPE_CONNECTION)
 
 /* type definition stuff */
 
@@ -247,6 +247,11 @@ example_csh_connection_class_init (ExampleCSHConnectionClass *klass)
 {
   static const gchar *interfaces_always_present[] = {
       TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
+      TP_IFACE_CONNECTION_INTERFACE_ALIASING,
+      TP_IFACE_CONNECTION_INTERFACE_AVATARS,
+      TP_IFACE_CONNECTION_INTERFACE_CONTACTS,
+      TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
+      TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
       NULL };
   TpBaseConnectionClass *base_class =
       (TpBaseConnectionClass *) klass;
diff --git a/tests/lib/csh/conn.h b/tests/lib/csh/conn.h
index 00b44bf..a19feb5 100644
--- a/tests/lib/csh/conn.h
+++ b/tests/lib/csh/conn.h
@@ -14,6 +14,7 @@
 
 #include <glib-object.h>
 #include <telepathy-glib/base-connection.h>
+#include <tests/lib/contacts-conn.h>
 
 G_BEGIN_DECLS
 
@@ -22,11 +23,11 @@ typedef struct _ExampleCSHConnectionClass ExampleCSHConnectionClass;
 typedef struct _ExampleCSHConnectionPrivate ExampleCSHConnectionPrivate;
 
 struct _ExampleCSHConnectionClass {
-    TpBaseConnectionClass parent_class;
+    ContactsConnectionClass parent_class;
 };
 
 struct _ExampleCSHConnection {
-    TpBaseConnection parent;
+    ContactsConnection parent;
 
     ExampleCSHConnectionPrivate *priv;
 };
-- 
1.5.6.5




More information about the telepathy-commits mailing list