[Telepathy-commits] [telepathy-qt4/master] Extend echo2 test to support contacts interface.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Mon Feb 9 12:21:50 PST 2009
---
tests/lib/echo2/Makefile.am | 3 ++-
tests/lib/echo2/conn.c | 7 ++++++-
tests/lib/echo2/conn.h | 5 +++--
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/tests/lib/echo2/Makefile.am b/tests/lib/echo2/Makefile.am
index 87e352e..b4c28ce 100644
--- a/tests/lib/echo2/Makefile.am
+++ b/tests/lib/echo2/Makefile.am
@@ -17,6 +17,7 @@ libtp_glib_echo2_tests_la_SOURCES = \
im-manager.h
libtp_glib_echo2_tests_la_LIBADD = \
- $(TP_GLIB_LIBS)
+ $(TP_GLIB_LIBS) \
+ $(top_builddir)/tests/lib/libtp-glib-tests.la
endif
diff --git a/tests/lib/echo2/conn.c b/tests/lib/echo2/conn.c
index 410cb40..5f050e8 100644
--- a/tests/lib/echo2/conn.c
+++ b/tests/lib/echo2/conn.c
@@ -22,7 +22,7 @@
G_DEFINE_TYPE (ExampleEcho2Connection,
example_echo_2_connection,
- TP_TYPE_BASE_CONNECTION)
+ CONTACTS_TYPE_CONNECTION)
enum
{
@@ -167,6 +167,11 @@ example_echo_2_connection_class_init (ExampleEcho2ConnectionClass *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/echo2/conn.h b/tests/lib/echo2/conn.h
index 4813eae..f14bae8 100644
--- a/tests/lib/echo2/conn.h
+++ b/tests/lib/echo2/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 _ExampleEcho2ConnectionClass ExampleEcho2ConnectionClass;
typedef struct _ExampleEcho2ConnectionPrivate ExampleEcho2ConnectionPrivate;
struct _ExampleEcho2ConnectionClass {
- TpBaseConnectionClass parent_class;
+ ContactsConnectionClass parent_class;
};
struct _ExampleEcho2Connection {
- TpBaseConnection parent;
+ ContactsConnection parent;
ExampleEcho2ConnectionPrivate *priv;
};
--
1.5.6.5
More information about the telepathy-commits
mailing list