[folks/next] sync tests/lib/telepathy with tp-glib next



commit 4652b6ab5b5ffa0fe95cb1998db390ba1e44e798
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Oct 28 10:59:37 2013 +0100

    sync tests/lib/telepathy with tp-glib next
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710996

 .../contactlist/broken-client-types-conn.c         |    9 +-
 tests/lib/telepathy/contactlist/contacts-conn.c    |  118 ++++++++++----------
 tests/lib/telepathy/contactlist/dbus-tube-chan.c   |   32 +++---
 tests/lib/telepathy/contactlist/echo-chan.c        |   12 +-
 .../lib/telepathy/contactlist/file-transfer-chan.c |   42 ++++----
 tests/lib/telepathy/contactlist/room-list-chan.c   |   24 ++--
 tests/lib/telepathy/contactlist/simple-account.c   |   47 ++++++--
 .../telepathy/contactlist/simple-channel-request.c |    4 +-
 tests/lib/telepathy/contactlist/stream-tube-chan.c |   38 +++---
 tests/lib/telepathy/contactlist/textchan-group.c   |   24 ++--
 tests/lib/telepathy/contactlist/util.c             |   62 ++++++++++-
 tests/lib/telepathy/contactlist/util.h             |    2 +
 12 files changed, 253 insertions(+), 161 deletions(-)
---
diff --git a/tests/lib/telepathy/contactlist/broken-client-types-conn.c 
b/tests/lib/telepathy/contactlist/broken-client-types-conn.c
index 0ffd992..1829869 100644
--- a/tests/lib/telepathy/contactlist/broken-client-types-conn.c
+++ b/tests/lib/telepathy/contactlist/broken-client-types-conn.c
@@ -19,7 +19,7 @@
 G_DEFINE_TYPE_WITH_CODE (TpTestsBrokenClientTypesConnection,
     tp_tests_broken_client_types_connection,
     TP_TESTS_TYPE_CONTACTS_CONNECTION,
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CLIENT_TYPES,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CLIENT_TYPES1,
         NULL);
     );
 
@@ -36,6 +36,9 @@ broken_fill_client_types (
     GHashTable *attributes)
 {
   guint i;
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType type = G_TYPE_VALUE_ARRAY;
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   for (i = 0; i < contacts->len; i++)
     {
@@ -49,8 +52,8 @@ broken_fill_client_types (
 
       tp_contacts_mixin_set_contact_attribute (attributes,
           handle,
-          TP_TOKEN_CONNECTION_INTERFACE_PRESENCE_PRESENCE,
-          tp_g_value_slice_new_take_boxed (G_TYPE_VALUE_ARRAY, presence));
+          TP_TOKEN_CONNECTION_INTERFACE_PRESENCE1_PRESENCE,
+          tp_g_value_slice_new_take_boxed (type, presence));
     }
 }
 
diff --git a/tests/lib/telepathy/contactlist/contacts-conn.c b/tests/lib/telepathy/contactlist/contacts-conn.c
index 3ba50a2..5ebc35f 100644
--- a/tests/lib/telepathy/contactlist/contacts-conn.c
+++ b/tests/lib/telepathy/contactlist/contacts-conn.c
@@ -29,24 +29,24 @@ static void conn_avatars_properties_getter (GObject *object, GQuark interface,
 G_DEFINE_TYPE_WITH_CODE (TpTestsContactsConnection,
     tp_tests_contacts_connection,
     TP_TESTS_TYPE_SIMPLE_CONNECTION,
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING1,
       init_aliasing);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_AVATARS,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_AVATARS1,
       init_avatars);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE1,
       tp_presence_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_LOCATION, NULL)
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_LOCATION1, NULL)
     G_IMPLEMENT_INTERFACE (
-      TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_CAPABILITIES, NULL)
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_INFO,
+      TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1, NULL)
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_INFO1,
       init_contact_info)
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS,
       tp_contacts_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_LIST,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_LIST1,
       tp_base_contact_list_mixin_list_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_GROUPS,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_GROUPS1,
       tp_base_contact_list_mixin_groups_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CLIENT_TYPES,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CLIENT_TYPES1,
       NULL);
     );
 
@@ -199,7 +199,7 @@ aliasing_fill_contact_attributes (GObject *object,
         }
 
       tp_contacts_mixin_set_contact_attribute (attributes, handle,
-          TP_IFACE_CONNECTION_INTERFACE_ALIASING "/alias",
+          TP_IFACE_CONNECTION_INTERFACE_ALIASING1 "/alias",
           tp_g_value_slice_new_string (alias));
     }
 }
@@ -221,7 +221,7 @@ avatars_fill_contact_attributes (GObject *object,
       if (a != NULL && a->token != NULL)
         {
           tp_contacts_mixin_set_contact_attribute (attributes, handle,
-              TP_IFACE_CONNECTION_INTERFACE_AVATARS "/token",
+              TP_IFACE_CONNECTION_INTERFACE_AVATARS1 "/token",
               tp_g_value_slice_new_string (a->token));
         }
     }
@@ -244,7 +244,7 @@ location_fill_contact_attributes (GObject *object,
       if (location != NULL)
         {
           tp_contacts_mixin_set_contact_attribute (attributes, handle,
-              TP_IFACE_CONNECTION_INTERFACE_LOCATION "/location",
+              TP_IFACE_CONNECTION_INTERFACE_LOCATION1 "/location",
               tp_g_value_slice_new_boxed (TP_HASH_TYPE_LOCATION, location));
         }
     }
@@ -267,7 +267,7 @@ contact_caps_fill_contact_attributes (GObject *object,
       if (caps != NULL)
         {
           tp_contacts_mixin_set_contact_attribute (attributes, handle,
-              TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES "/capabilities",
+              TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1 "/capabilities",
               tp_g_value_slice_new_boxed (
                 TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST, caps));
         }
@@ -291,7 +291,7 @@ contact_info_fill_contact_attributes (GObject *object,
       if (info != NULL)
         {
           tp_contacts_mixin_set_contact_attribute (attributes, handle,
-              TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO "/info",
+              TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1 "/info",
               tp_g_value_slice_new_boxed (TP_ARRAY_TYPE_CONTACT_INFO_FIELD_LIST,
                   info));
         }
@@ -404,22 +404,22 @@ constructed (GObject *object)
           TP_BASE_CONTACT_LIST (self->priv->list_manager), base);
     }
   tp_contacts_mixin_add_contact_attributes_iface (object,
-      TP_IFACE_CONNECTION_INTERFACE_ALIASING,
+      TP_IFACE_CONNECTION_INTERFACE_ALIASING1,
       aliasing_fill_contact_attributes);
   tp_contacts_mixin_add_contact_attributes_iface (object,
-      TP_IFACE_CONNECTION_INTERFACE_AVATARS,
+      TP_IFACE_CONNECTION_INTERFACE_AVATARS1,
       avatars_fill_contact_attributes);
   tp_contacts_mixin_add_contact_attributes_iface (object,
-      TP_IFACE_CONNECTION_INTERFACE_LOCATION,
+      TP_IFACE_CONNECTION_INTERFACE_LOCATION1,
       location_fill_contact_attributes);
   tp_contacts_mixin_add_contact_attributes_iface (object,
-      TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
+      TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1,
       contact_caps_fill_contact_attributes);
   tp_contacts_mixin_add_contact_attributes_iface (object,
-      TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO,
+      TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1,
       contact_info_fill_contact_attributes);
   tp_contacts_mixin_add_contact_attributes_iface (object,
-      TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES,
+      TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES1,
       client_types_fill_contact_attributes);
 
   tp_presence_mixin_init (object,
@@ -532,16 +532,16 @@ tp_tests_contacts_get_interfaces_always_present (TpBaseConnection *base)
 {
   GPtrArray *interfaces;
   static const gchar *interfaces_always_present[] = {
-      TP_IFACE_CONNECTION_INTERFACE_ALIASING,
-      TP_IFACE_CONNECTION_INTERFACE_AVATARS,
+      TP_IFACE_CONNECTION_INTERFACE_ALIASING1,
+      TP_IFACE_CONNECTION_INTERFACE_AVATARS1,
       TP_IFACE_CONNECTION_INTERFACE_CONTACTS,
-      TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST,
-      TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS,
-      TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
-      TP_IFACE_CONNECTION_INTERFACE_LOCATION,
-      TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES,
-      TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
-      TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO,
+      TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST1,
+      TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS1,
+      TP_IFACE_CONNECTION_INTERFACE_PRESENCE1,
+      TP_IFACE_CONNECTION_INTERFACE_LOCATION1,
+      TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES1,
+      TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1,
+      TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1,
       NULL };
   guint i;
 
@@ -589,17 +589,17 @@ tp_tests_contacts_connection_class_init (TpTestsContactsConnectionClass *klass)
     { NULL }
   };
   static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-        { TP_IFACE_CONNECTION_INTERFACE_AVATARS,
+        { TP_IFACE_CONNECTION_INTERFACE_AVATARS1,
           conn_avatars_properties_getter,
           NULL,
           conn_avatars_properties,
         },
-        { TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO,
+        { TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1,
           conn_contact_info_properties_getter,
           NULL,
           conn_contact_info_properties,
         },
-        { TP_IFACE_CONNECTION_INTERFACE_ALIASING,
+        { TP_IFACE_CONNECTION_INTERFACE_ALIASING1,
           aliasing_get_dbus_property,
           NULL,
           aliasing_props,
@@ -669,7 +669,7 @@ tp_tests_contacts_connection_change_aliases (TpTestsContactsConnection *self,
           GUINT_TO_POINTER (handles[i]), (gchar *) aliases[i]);
     }
 
-  tp_svc_connection_interface_aliasing_emit_aliases_changed (self, changes);
+  tp_svc_connection_interface_aliasing1_emit_aliases_changed (self, changes);
 
   g_hash_table_unref (changes);
 }
@@ -729,7 +729,7 @@ tp_tests_contacts_connection_change_avatar_tokens (TpTestsContactsConnection *se
       DEBUG ("contact#%u -> %s", handles[i], tokens[i]);
       g_hash_table_insert (self->priv->avatars,
           GUINT_TO_POINTER (handles[i]), avatar_data_new (NULL, NULL, tokens[i]));
-      tp_svc_connection_interface_avatars_emit_avatar_updated (self,
+      tp_svc_connection_interface_avatars1_emit_avatar_updated (self,
           handles[i], tokens[i]);
     }
 }
@@ -745,7 +745,7 @@ tp_tests_contacts_connection_change_avatar_data (
   g_hash_table_insert (self->priv->avatars,
       GUINT_TO_POINTER (handle), avatar_data_new (data, mime_type, token));
 
-  tp_svc_connection_interface_avatars_emit_avatar_updated (self,
+  tp_svc_connection_interface_avatars1_emit_avatar_updated (self,
       handle, token);
 }
 
@@ -764,7 +764,7 @@ tp_tests_contacts_connection_change_locations (TpTestsContactsConnection *self,
       g_hash_table_insert (self->priv->locations,
           GUINT_TO_POINTER (handles[i]), g_hash_table_ref (locations[i]));
 
-      tp_svc_connection_interface_location_emit_location_updated (self,
+      tp_svc_connection_interface_location1_emit_location_updated (self,
           handles[i], locations[i]);
     }
 }
@@ -786,7 +786,7 @@ tp_tests_contacts_connection_change_capabilities (
             caps));
     }
 
-  tp_svc_connection_interface_contact_capabilities_emit_contact_capabilities_changed (
+  tp_svc_connection_interface_contact_capabilities1_emit_contact_capabilities_changed (
       self, capabilities);
 }
 
@@ -799,7 +799,7 @@ tp_tests_contacts_connection_change_contact_info (
   g_hash_table_insert (self->priv->contact_info, GUINT_TO_POINTER (handle),
       g_ptr_array_ref (info));
 
-  tp_svc_connection_interface_contact_info_emit_contact_info_changed (self,
+  tp_svc_connection_interface_contact_info1_emit_contact_info_changed (self,
       handle, info);
 }
 
@@ -814,7 +814,7 @@ tp_tests_contacts_connection_set_default_contact_info (
 }
 
 static void
-my_request_aliases (TpSvcConnectionInterfaceAliasing *aliasing,
+my_request_aliases (TpSvcConnectionInterfaceAliasing1 *aliasing,
                     const GArray *contacts,
                     DBusGMethodInvocation *context)
 {
@@ -853,13 +853,13 @@ my_request_aliases (TpSvcConnectionInterfaceAliasing *aliasing,
 
   g_ptr_array_add (result, NULL);
   strings = (gchar **) g_ptr_array_free (result, FALSE);
-  tp_svc_connection_interface_aliasing_return_from_request_aliases (context,
+  tp_svc_connection_interface_aliasing1_return_from_request_aliases (context,
       (const gchar **) strings);
   g_free (strings);
 }
 
 static void
-my_set_aliases (TpSvcConnectionInterfaceAliasing *aliasing,
+my_set_aliases (TpSvcConnectionInterfaceAliasing1 *aliasing,
     GHashTable *table,
     DBusGMethodInvocation *context)
 {
@@ -902,7 +902,7 @@ my_set_aliases (TpSvcConnectionInterfaceAliasing *aliasing,
       (const TpHandle *) handles->data,
       (const gchar * const *) aliases->pdata);
 
-  tp_svc_connection_interface_aliasing_return_from_set_aliases (context);
+  tp_svc_connection_interface_aliasing1_return_from_set_aliases (context);
 
 out:
   g_array_unref (handles);
@@ -913,9 +913,9 @@ static void
 init_aliasing (gpointer g_iface,
                gpointer iface_data)
 {
-  TpSvcConnectionInterfaceAliasingClass *klass = g_iface;
+  TpSvcConnectionInterfaceAliasing1Class *klass = g_iface;
 
-#define IMPLEMENT(x) tp_svc_connection_interface_aliasing_implement_##x (\
+#define IMPLEMENT(x) tp_svc_connection_interface_aliasing1_implement_##x (\
     klass, my_##x)
   IMPLEMENT(request_aliases);
   IMPLEMENT(set_aliases);
@@ -923,7 +923,7 @@ init_aliasing (gpointer g_iface,
 }
 
 static void
-my_request_avatars (TpSvcConnectionInterfaceAvatars *avatars,
+my_request_avatars (TpSvcConnectionInterfaceAvatars1 *avatars,
     const GArray *contacts,
     DBusGMethodInvocation *context)
 {
@@ -950,11 +950,11 @@ my_request_avatars (TpSvcConnectionInterfaceAvatars *avatars,
           GUINT_TO_POINTER (handle));
 
       if (a != NULL)
-        tp_svc_connection_interface_avatars_emit_avatar_retrieved (self, handle,
+        tp_svc_connection_interface_avatars1_emit_avatar_retrieved (self, handle,
             a->token, a->data, a->mime_type);
     }
 
-  tp_svc_connection_interface_avatars_return_from_request_avatars (context);
+  tp_svc_connection_interface_avatars1_return_from_request_avatars (context);
 }
 
 static void
@@ -981,9 +981,9 @@ static void
 init_avatars (gpointer g_iface,
               gpointer iface_data)
 {
-  TpSvcConnectionInterfaceAvatarsClass *klass = g_iface;
+  TpSvcConnectionInterfaceAvatars1Class *klass = g_iface;
 
-#define IMPLEMENT(x) tp_svc_connection_interface_avatars_implement_##x (\
+#define IMPLEMENT(x) tp_svc_connection_interface_avatars1_implement_##x (\
     klass, my_##x)
   /* IMPLEMENT(get_avatar_requirements); */
   /* IMPLEMENT(request_avatar); */
@@ -1014,7 +1014,7 @@ lookup_contact_info (TpTestsContactsConnection *self,
 }
 
 static void
-my_refresh_contact_info (TpSvcConnectionInterfaceContactInfo *obj,
+my_refresh_contact_info (TpSvcConnectionInterfaceContactInfo1 *obj,
     const GArray *contacts,
     DBusGMethodInvocation *context)
 {
@@ -1039,17 +1039,17 @@ my_refresh_contact_info (TpSvcConnectionInterfaceContactInfo *obj,
       TpHandle handle = g_array_index (contacts, guint, i);
       GPtrArray *arr = lookup_contact_info (self, handle);
 
-      tp_svc_connection_interface_contact_info_emit_contact_info_changed (self,
+      tp_svc_connection_interface_contact_info1_emit_contact_info_changed (self,
           handle, arr);
       g_ptr_array_unref (arr);
     }
 
-  tp_svc_connection_interface_contact_info_return_from_refresh_contact_info (
+  tp_svc_connection_interface_contact_info1_return_from_refresh_contact_info (
       context);
 }
 
 static void
-my_request_contact_info (TpSvcConnectionInterfaceContactInfo *obj,
+my_request_contact_info (TpSvcConnectionInterfaceContactInfo1 *obj,
     guint handle,
     DBusGMethodInvocation *context)
 {
@@ -1071,14 +1071,14 @@ my_request_contact_info (TpSvcConnectionInterfaceContactInfo *obj,
 
   ret = lookup_contact_info (self, handle);
 
-  tp_svc_connection_interface_contact_info_return_from_request_contact_info (
+  tp_svc_connection_interface_contact_info1_return_from_request_contact_info (
       context, ret);
 
   g_ptr_array_unref (ret);
 }
 
 static void
-my_set_contact_info (TpSvcConnectionInterfaceContactInfo *obj,
+my_set_contact_info (TpSvcConnectionInterfaceContactInfo1 *obj,
     const GPtrArray *info,
     DBusGMethodInvocation *context)
 {
@@ -1091,15 +1091,17 @@ my_set_contact_info (TpSvcConnectionInterfaceContactInfo *obj,
   TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
 
   /* Deep copy info */
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   copy = g_ptr_array_new_with_free_func ((GDestroyNotify) g_value_array_free);
   for (i = 0; i < info->len; i++)
     g_ptr_array_add (copy, g_value_array_copy (g_ptr_array_index (info, i)));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   self_handle = tp_base_connection_get_self_handle (base);
   tp_tests_contacts_connection_change_contact_info (self, self_handle, copy);
   g_ptr_array_unref (copy);
 
-  tp_svc_connection_interface_contact_info_return_from_set_contact_info (
+  tp_svc_connection_interface_contact_info1_return_from_set_contact_info (
       context);
 }
 
@@ -1107,9 +1109,9 @@ static void
 init_contact_info (gpointer g_iface,
     gpointer iface_data)
 {
-  TpSvcConnectionInterfaceContactInfoClass *klass = g_iface;
+  TpSvcConnectionInterfaceContactInfo1Class *klass = g_iface;
 
-#define IMPLEMENT(x) tp_svc_connection_interface_contact_info_implement_##x (\
+#define IMPLEMENT(x) tp_svc_connection_interface_contact_info1_implement_##x (\
     klass, my_##x)
   IMPLEMENT (refresh_contact_info);
   IMPLEMENT (request_contact_info);
diff --git a/tests/lib/telepathy/contactlist/dbus-tube-chan.c 
b/tests/lib/telepathy/contactlist/dbus-tube-chan.c
index 28e34b5..3a67b0f 100644
--- a/tests/lib/telepathy/contactlist/dbus-tube-chan.c
+++ b/tests/lib/telepathy/contactlist/dbus-tube-chan.c
@@ -107,9 +107,9 @@ static void dbus_tube_iface_init (gpointer iface, gpointer data);
 G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TpTestsDBusTubeChannel,
     tp_tests_dbus_tube_channel,
     TP_TYPE_BASE_CHANNEL,
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_DBUS_TUBE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_DBUS_TUBE1,
       dbus_tube_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE1,
       NULL);
     )
 
@@ -123,7 +123,7 @@ tp_tests_dbus_tube_channel_get_interfaces (TpBaseChannel *self)
   interfaces = TP_BASE_CHANNEL_CLASS (
       tp_tests_dbus_tube_channel_parent_class)->get_interfaces (self);
 
-  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE);
+  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE1);
   return interfaces;
 };
 
@@ -200,8 +200,8 @@ fill_immutable_properties (TpBaseChannel *chan,
 
   tp_dbus_properties_mixin_fill_properties_hash (
       G_OBJECT (chan), properties,
-      TP_IFACE_CHANNEL_TYPE_DBUS_TUBE, "ServiceName",
-      TP_IFACE_CHANNEL_TYPE_DBUS_TUBE, "SupportedAccessControls",
+      TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1, "ServiceName",
+      TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1, "SupportedAccessControls",
       NULL);
 
   if (!tp_base_channel_is_requested (chan))
@@ -209,7 +209,7 @@ fill_immutable_properties (TpBaseChannel *chan,
       /* Parameters is immutable only for incoming tubes */
       tp_dbus_properties_mixin_fill_properties_hash (
           G_OBJECT (chan), properties,
-          TP_IFACE_CHANNEL_INTERFACE_TUBE, "Parameters",
+          TP_IFACE_CHANNEL_INTERFACE_TUBE1, "Parameters",
           NULL);
     }
 }
@@ -236,7 +236,7 @@ tp_tests_dbus_tube_channel_class_init (TpTestsDBusTubeChannelClass *klass)
   object_class->get_property = tp_tests_dbus_tube_channel_get_property;
   object_class->dispose = dispose;
 
-  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_DBUS_TUBE;
+  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1;
   base_class->get_interfaces = tp_tests_dbus_tube_channel_get_interfaces;
   base_class->close = channel_close;
   base_class->fill_immutable_properties = fill_immutable_properties;
@@ -289,12 +289,12 @@ tp_tests_dbus_tube_channel_class_init (TpTestsDBusTubeChannelClass *klass)
       1, G_TYPE_DBUS_CONNECTION);
 
   tp_dbus_properties_mixin_implement_interface (object_class,
-      TP_IFACE_QUARK_CHANNEL_TYPE_DBUS_TUBE,
+      TP_IFACE_QUARK_CHANNEL_TYPE_DBUS_TUBE1,
       tp_dbus_properties_mixin_getter_gobject_properties, NULL,
       dbus_tube_props);
 
   tp_dbus_properties_mixin_implement_interface (object_class,
-      TP_IFACE_QUARK_CHANNEL_INTERFACE_TUBE,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_TUBE1,
       tp_dbus_properties_mixin_getter_gobject_properties, NULL,
       tube_props);
 
@@ -308,7 +308,7 @@ change_state (TpTestsDBusTubeChannel *self,
 {
   self->priv->state = state;
 
-  tp_svc_channel_interface_tube_emit_tube_channel_state_changed (self, state);
+  tp_svc_channel_interface_tube1_emit_tube_channel_state_changed (self, state);
 }
 
 static gboolean
@@ -350,7 +350,7 @@ really_open_tube (TpTestsDBusTubeChannel *self)
 }
 
 static void
-dbus_tube_offer (TpSvcChannelTypeDBusTube *chan,
+dbus_tube_offer (TpSvcChannelTypeDBusTube1 *chan,
     GHashTable *parameters,
     guint access_control,
     DBusGMethodInvocation *context)
@@ -362,7 +362,7 @@ dbus_tube_offer (TpSvcChannelTypeDBusTube *chan,
   if (self->priv->open_mode == TP_TESTS_DBUS_TUBE_CHANNEL_OPEN_FIRST)
     really_open_tube (self);
 
-  tp_svc_channel_type_dbus_tube_return_from_offer (context,
+  tp_svc_channel_type_dbus_tube1_return_from_offer (context,
       g_dbus_server_get_client_address (self->priv->dbus_server));
 
   if (self->priv->open_mode == TP_TESTS_DBUS_TUBE_CHANNEL_OPEN_SECOND)
@@ -372,7 +372,7 @@ dbus_tube_offer (TpSvcChannelTypeDBusTube *chan,
 }
 
 static void
-dbus_tube_accept (TpSvcChannelTypeDBusTube *chan,
+dbus_tube_accept (TpSvcChannelTypeDBusTube1 *chan,
     guint access_control,
     DBusGMethodInvocation *context)
 {
@@ -383,7 +383,7 @@ dbus_tube_accept (TpSvcChannelTypeDBusTube *chan,
   if (self->priv->open_mode == TP_TESTS_DBUS_TUBE_CHANNEL_OPEN_FIRST)
     really_open_tube (self);
 
-  tp_svc_channel_type_dbus_tube_return_from_accept (context,
+  tp_svc_channel_type_dbus_tube1_return_from_accept (context,
       g_dbus_server_get_client_address (self->priv->dbus_server));
 
   if (self->priv->open_mode == TP_TESTS_DBUS_TUBE_CHANNEL_OPEN_SECOND)
@@ -404,9 +404,9 @@ static void
 dbus_tube_iface_init (gpointer iface,
     gpointer data)
 {
-  TpSvcChannelTypeDBusTubeClass *klass = iface;
+  TpSvcChannelTypeDBusTube1Class *klass = iface;
 
-#define IMPLEMENT(x) tp_svc_channel_type_dbus_tube_implement_##x (klass, dbus_tube_##x)
+#define IMPLEMENT(x) tp_svc_channel_type_dbus_tube1_implement_##x (klass, dbus_tube_##x)
   IMPLEMENT (offer);
   IMPLEMENT (accept);
 #undef IMPLEMENT
diff --git a/tests/lib/telepathy/contactlist/echo-chan.c b/tests/lib/telepathy/contactlist/echo-chan.c
index 868fbcf..9234a6a 100644
--- a/tests/lib/telepathy/contactlist/echo-chan.c
+++ b/tests/lib/telepathy/contactlist/echo-chan.c
@@ -25,7 +25,7 @@ G_DEFINE_TYPE_WITH_CODE (TpTestsEchoChannel,
     TP_TYPE_BASE_CHANNEL,
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
       tp_message_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE1,
       destroyable_iface_init);
     )
 
@@ -39,7 +39,7 @@ tp_tests_echo_channel_get_interfaces (TpBaseChannel *self)
   interfaces = TP_BASE_CHANNEL_CLASS (tp_tests_echo_channel_parent_class)->
     get_interfaces (self);
 
-  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE);
+  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE1);
   return interfaces;
 };
 
@@ -199,7 +199,7 @@ text_send (GObject *object,
 }
 
 static void
-destroyable_destroy (TpSvcChannelInterfaceDestroyable *iface,
+destroyable_destroy (TpSvcChannelInterfaceDestroyable1 *iface,
                      DBusGMethodInvocation *context)
 {
   TpTestsEchoChannel *self = TP_TESTS_ECHO_CHANNEL (iface);
@@ -207,17 +207,17 @@ destroyable_destroy (TpSvcChannelInterfaceDestroyable *iface,
   tp_message_mixin_clear ((GObject *) self);
   tp_base_channel_destroyed (TP_BASE_CHANNEL (self));
 
-  tp_svc_channel_interface_destroyable_return_from_destroy (context);
+  tp_svc_channel_interface_destroyable1_return_from_destroy (context);
 }
 
 static void
 destroyable_iface_init (gpointer iface,
                         gpointer data)
 {
-  TpSvcChannelInterfaceDestroyableClass *klass = iface;
+  TpSvcChannelInterfaceDestroyable1Class *klass = iface;
 
 #define IMPLEMENT(x) \
-  tp_svc_channel_interface_destroyable_implement_##x (klass, destroyable_##x)
+  tp_svc_channel_interface_destroyable1_implement_##x (klass, destroyable_##x)
   IMPLEMENT (destroy);
 #undef IMPLEMENT
 }
diff --git a/tests/lib/telepathy/contactlist/file-transfer-chan.c 
b/tests/lib/telepathy/contactlist/file-transfer-chan.c
index 92520f4..3bc8d89 100644
--- a/tests/lib/telepathy/contactlist/file-transfer-chan.c
+++ b/tests/lib/telepathy/contactlist/file-transfer-chan.c
@@ -25,9 +25,9 @@ static void file_transfer_iface_init (gpointer iface, gpointer data);
 G_DEFINE_TYPE_WITH_CODE (TpTestsFileTransferChannel,
     tp_tests_file_transfer_channel,
     TP_TYPE_BASE_CHANNEL,
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_FILE_TRANSFER,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_FILE_TRANSFER1,
       file_transfer_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1,
       NULL);
     )
 
@@ -328,14 +328,14 @@ fill_immutable_properties (TpBaseChannel *self,
 
   tp_dbus_properties_mixin_fill_properties_hash (
       G_OBJECT (self), properties,
-      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "AvailableSocketTypes",
-      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "ContentType",
-      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Filename",
-      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Size",
-      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Description",
-      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Date",
-      TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, "ServiceName",
-      TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, "Metadata",
+      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "AvailableSocketTypes",
+      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "ContentType",
+      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Filename",
+      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Size",
+      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Description",
+      TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Date",
+      TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1, "ServiceName",
+      TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1, "Metadata",
       NULL);
 
   /* URI is immutable only for outgoing transfers */
@@ -343,7 +343,7 @@ fill_immutable_properties (TpBaseChannel *self,
     {
       tp_dbus_properties_mixin_fill_properties_hash (G_OBJECT (self),
           properties,
-          TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "URI", NULL);
+          TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "URI", NULL);
     }
 }
 
@@ -354,7 +354,7 @@ change_state (TpTestsFileTransferChannel *self,
 {
   self->priv->state = state;
 
-  tp_svc_channel_type_file_transfer_emit_file_transfer_state_changed (self,
+  tp_svc_channel_type_file_transfer1_emit_file_transfer_state_changed (self,
       state, reason);
 }
 
@@ -444,7 +444,7 @@ service_incoming_cb (GSocketService *service,
 }
 
 static void
-file_transfer_provide_file (TpSvcChannelTypeFileTransfer *iface,
+file_transfer_provide_file (TpSvcChannelTypeFileTransfer1 *iface,
     TpSocketAddressType address_type,
     TpSocketAccessControl access_control,
     const GValue *access_control_param,
@@ -506,7 +506,7 @@ file_transfer_provide_file (TpSvcChannelTypeFileTransfer *iface,
   // then close the socket
   // g_output_stream_write_async
 
-  tp_svc_channel_type_file_transfer_return_from_provide_file (context,
+  tp_svc_channel_type_file_transfer1_return_from_provide_file (context,
       self->priv->address);
 
   return;
@@ -517,7 +517,7 @@ fail:
 }
 
 static void
-file_transfer_accept_file (TpSvcChannelTypeFileTransfer *iface,
+file_transfer_accept_file (TpSvcChannelTypeFileTransfer1 *iface,
     TpSocketAddressType address_type,
     TpSocketAccessControl access_control,
     const GValue *access_control_param,
@@ -569,7 +569,7 @@ file_transfer_accept_file (TpSvcChannelTypeFileTransfer *iface,
   DEBUG ("Waiting 500ms and setting state to OPEN");
   self->priv->timer_id = g_timeout_add (500, start_file_transfer, self);
 
-  tp_svc_channel_type_file_transfer_return_from_accept_file (context,
+  tp_svc_channel_type_file_transfer1_return_from_accept_file (context,
       address);
 
   tp_clear_pointer (&address, tp_g_value_slice_free);
@@ -613,7 +613,7 @@ tp_tests_file_transfer_channel_class_init (
   object_class->set_property = set_property;
   object_class->dispose = dispose;
 
-  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER;
+  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1;
   base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT;
 
   base_class->close = channel_close;
@@ -716,12 +716,12 @@ tp_tests_file_transfer_channel_class_init (
       param_spec);
 
   tp_dbus_properties_mixin_implement_interface (object_class,
-      TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER,
+      TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER1,
       tp_dbus_properties_mixin_getter_gobject_properties, NULL,
       file_transfer_props);
 
   tp_dbus_properties_mixin_implement_interface (object_class,
-      TP_IFACE_QUARK_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1,
       tp_dbus_properties_mixin_getter_gobject_properties, NULL,
       metadata_props);
 
@@ -732,9 +732,9 @@ tp_tests_file_transfer_channel_class_init (
 static void
 file_transfer_iface_init (gpointer iface, gpointer data)
 {
-  TpSvcChannelTypeFileTransferClass *klass = iface;
+  TpSvcChannelTypeFileTransfer1Class *klass = iface;
 
-#define IMPLEMENT(x) tp_svc_channel_type_file_transfer_implement_##x (klass, \
+#define IMPLEMENT(x) tp_svc_channel_type_file_transfer1_implement_##x (klass, \
     file_transfer_##x)
   IMPLEMENT(accept_file);
   IMPLEMENT(provide_file);
diff --git a/tests/lib/telepathy/contactlist/room-list-chan.c 
b/tests/lib/telepathy/contactlist/room-list-chan.c
index f4db067..a3a7a8c 100644
--- a/tests/lib/telepathy/contactlist/room-list-chan.c
+++ b/tests/lib/telepathy/contactlist/room-list-chan.c
@@ -10,7 +10,7 @@ static void room_list_iface_init (gpointer iface,
     gpointer data);
 
 G_DEFINE_TYPE_WITH_CODE (TpTestsRoomListChan, tp_tests_room_list_chan, TP_TYPE_BASE_CHANNEL,
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_ROOM_LIST, room_list_iface_init))
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_ROOM_LIST1, room_list_iface_init))
 
 enum {
   PROP_SERVER = 1,
@@ -106,7 +106,7 @@ fill_immutable_properties (TpBaseChannel *chan,
 
   tp_dbus_properties_mixin_fill_properties_hash (
       G_OBJECT (chan), properties,
-      TP_IFACE_CHANNEL_TYPE_ROOM_LIST, "Server",
+      TP_IFACE_CHANNEL_TYPE_ROOM_LIST1, "Server",
       NULL);
 }
 
@@ -133,7 +133,7 @@ tp_tests_room_list_chan_class_init (
   oclass->constructed = tp_tests_room_list_chan_constructed;
   oclass->finalize = tp_tests_room_list_chan_finalize;
 
-  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_ROOM_LIST;
+  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_ROOM_LIST1;
   base_class->target_handle_type = TP_HANDLE_TYPE_NONE;
   base_class->fill_immutable_properties = fill_immutable_properties;
   base_class->close = room_list_chan_close;
@@ -145,7 +145,7 @@ tp_tests_room_list_chan_class_init (
   g_object_class_install_property (oclass, PROP_SERVER, spec);
 
   tp_dbus_properties_mixin_implement_interface (oclass,
-      TP_IFACE_QUARK_CHANNEL_TYPE_ROOM_LIST,
+      TP_IFACE_QUARK_CHANNEL_TYPE_ROOM_LIST1,
       tp_dbus_properties_mixin_getter_gobject_properties, NULL,
       room_list_props);
 
@@ -191,24 +191,24 @@ find_rooms (gpointer data)
   TpTestsRoomListChan *self = TP_TESTS_ROOM_LIST_CHAN (data);
   GPtrArray *rooms;
 
-  rooms = g_ptr_array_new_with_free_func ((GDestroyNotify) g_value_array_free);
+  rooms = g_ptr_array_new_with_free_func ((GDestroyNotify) tp_value_array_free);
 
   /* Find 2 rooms */
   add_room (rooms);
   add_room (rooms);
-  tp_svc_channel_type_room_list_emit_got_rooms (self, rooms);
+  tp_svc_channel_type_room_list1_emit_got_rooms (self, rooms);
   g_ptr_array_set_size (rooms, 0);
 
   /* Find 1 room */
   add_room (rooms);
-  tp_svc_channel_type_room_list_emit_got_rooms (self, rooms);
+  tp_svc_channel_type_room_list1_emit_got_rooms (self, rooms);
   g_ptr_array_unref (rooms);
 
   return FALSE;
 }
 
 static void
-room_list_list_rooms (TpSvcChannelTypeRoomList *chan,
+room_list_list_rooms (TpSvcChannelTypeRoomList1 *chan,
     DBusGMethodInvocation *context)
 {
   TpTestsRoomListChan *self = TP_TESTS_ROOM_LIST_CHAN (chan);
@@ -232,21 +232,21 @@ room_list_list_rooms (TpSvcChannelTypeRoomList *chan,
     }
 
   self->priv->listing = TRUE;
-  tp_svc_channel_type_room_list_emit_listing_rooms (self, TRUE);
+  tp_svc_channel_type_room_list1_emit_listing_rooms (self, TRUE);
 
   g_idle_add (find_rooms, self);
 
-  tp_svc_channel_type_room_list_return_from_list_rooms (context);
+  tp_svc_channel_type_room_list1_return_from_list_rooms (context);
 }
 
 static void
 room_list_iface_init (gpointer iface,
     gpointer data)
 {
-  TpSvcChannelTypeRoomListClass *klass = iface;
+  TpSvcChannelTypeRoomList1Class *klass = iface;
 
 #define IMPLEMENT(x) \
-  tp_svc_channel_type_room_list_implement_##x (klass, room_list_##x)
+  tp_svc_channel_type_room_list1_implement_##x (klass, room_list_##x)
   IMPLEMENT(list_rooms);
 #undef IMPLEMENT
 }
diff --git a/tests/lib/telepathy/contactlist/simple-account.c 
b/tests/lib/telepathy/contactlist/simple-account.c
index 8b13268..2c6131b 100644
--- a/tests/lib/telepathy/contactlist/simple-account.c
+++ b/tests/lib/telepathy/contactlist/simple-account.c
@@ -22,11 +22,11 @@ G_DEFINE_TYPE_WITH_CODE (TpTestsSimpleAccount,
     G_TYPE_OBJECT,
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT,
         account_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_INTERFACE_AVATAR,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_INTERFACE_AVATAR1,
         NULL);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_INTERFACE_ADDRESSING,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_INTERFACE_ADDRESSING1,
         NULL);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_INTERFACE_STORAGE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_ACCOUNT_INTERFACE_STORAGE1,
         NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
         tp_dbus_properties_mixin_iface_init)
@@ -34,8 +34,8 @@ G_DEFINE_TYPE_WITH_CODE (TpTestsSimpleAccount,
 
 /* TP_IFACE_ACCOUNT is implied */
 static const char *ACCOUNT_INTERFACES[] = {
-    TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING,
-    TP_IFACE_ACCOUNT_INTERFACE_STORAGE,
+    TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING1,
+    TP_IFACE_ACCOUNT_INTERFACE_STORAGE1,
     NULL };
 
 enum
@@ -75,6 +75,7 @@ struct _TpTestsSimpleAccountPrivate
   gchar *connection_path;
   gboolean enabled;
   GPtrArray *uri_schemes;
+  GHashTable *parameters;
 };
 
 static void
@@ -137,6 +138,8 @@ tp_tests_simple_account_init (TpTestsSimpleAccount *self)
   self->priv->uri_schemes = g_ptr_array_new_with_free_func (g_free);
   for (i = 0; uri_schemes[i] != NULL; i++)
     g_ptr_array_add (self->priv->uri_schemes, g_strdup (uri_schemes[i]));
+
+  self->priv->parameters = g_hash_table_new (NULL, NULL);
 }
 
 static void
@@ -171,7 +174,7 @@ tp_tests_simple_account_get_property (GObject *object,
       g_value_set_string (value, "badger");
       break;
     case PROP_PARAMETERS:
-      g_value_take_boxed (value, g_hash_table_new (NULL, NULL));
+      g_value_set_boxed (value, self->priv->parameters);
       break;
     case PROP_AUTOMATIC_PRESENCE:
       g_value_take_boxed (value, tp_value_array_build (3,
@@ -278,6 +281,26 @@ tp_tests_simple_account_get_property (GObject *object,
 }
 
 static void
+tp_tests_simple_account_set_property (GObject *object,
+    guint property_id,
+    const GValue *value,
+    GParamSpec *spec)
+{
+  TpTestsSimpleAccount *self = TP_TESTS_SIMPLE_ACCOUNT (object);
+
+  switch (property_id)
+    {
+      case PROP_PARAMETERS:
+        self->priv->parameters = g_value_dup_boxed (value);
+        /* In principle we should be emitting AccountPropertyChanged here */
+        break;
+      default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
+        break;
+    }
+}
+
+static void
 tp_tests_simple_account_finalize (GObject *object)
 {
   TpTestsSimpleAccount *self = TP_TESTS_SIMPLE_ACCOUNT (object);
@@ -287,6 +310,7 @@ tp_tests_simple_account_finalize (GObject *object)
   g_free (self->priv->connection_path);
 
   g_ptr_array_unref (self->priv->uri_schemes);
+  g_hash_table_unref (self->priv->parameters);
 
   G_OBJECT_CLASS (tp_tests_simple_account_parent_class)->finalize (object);
 }
@@ -348,18 +372,18 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
           a_props
         },
         {
-          TP_IFACE_ACCOUNT_INTERFACE_STORAGE,
+          TP_IFACE_ACCOUNT_INTERFACE_STORAGE1,
           tp_dbus_properties_mixin_getter_gobject_properties,
           NULL,
           ais_props
         },
         {
-          TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING,
+          TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING1,
           tp_dbus_properties_mixin_getter_gobject_properties,
           NULL,
           aia_props
         },
-        { TP_IFACE_ACCOUNT_INTERFACE_AVATAR,
+        { TP_IFACE_ACCOUNT_INTERFACE_AVATAR1,
           tp_dbus_properties_mixin_getter_gobject_properties,
           NULL,
           avatar_props
@@ -369,6 +393,7 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
 
   g_type_class_add_private (klass, sizeof (TpTestsSimpleAccountPrivate));
   object_class->get_property = tp_tests_simple_account_get_property;
+  object_class->set_property = tp_tests_simple_account_set_property;
   object_class->finalize = tp_tests_simple_account_finalize;
 
   param_spec = g_param_spec_boxed ("interfaces", "Extra D-Bus interfaces",
@@ -410,7 +435,7 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
   param_spec = g_param_spec_boxed ("parameters", "parameters",
       "Parameters property",
       TP_HASH_TYPE_STRING_VARIANT_MAP,
-      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+      G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
   g_object_class_install_property (object_class, PROP_PARAMETERS, param_spec);
 
   param_spec = g_param_spec_boxed ("automatic-presence", "automatic presence",
@@ -609,7 +634,7 @@ tp_tests_simple_account_add_uri_scheme (TpTestsSimpleAccount *self,
       NULL);
 
   tp_svc_dbus_properties_emit_properties_changed (self,
-      TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING, changed, NULL);
+      TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING1, changed, NULL);
 
   g_strfreev (schemes);
   g_hash_table_unref (changed);
diff --git a/tests/lib/telepathy/contactlist/simple-channel-request.c 
b/tests/lib/telepathy/contactlist/simple-channel-request.c
index 4884cb0..895e302 100644
--- a/tests/lib/telepathy/contactlist/simple-channel-request.c
+++ b/tests/lib/telepathy/contactlist/simple-channel-request.c
@@ -107,11 +107,11 @@ add_channel (TpTestsSimpleChannelRequest *self,
       chan_path = tp_tests_simple_connection_ensure_text_chan (self->priv->conn,
           target_id, &props);
     }
-  else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_ROOM_LIST))
+  else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_ROOM_LIST1))
     {
       chan_path = tp_tests_simple_connection_ensure_room_list_chan (
           self->priv->conn, tp_asv_get_string (request,
-            TP_PROP_CHANNEL_TYPE_ROOM_LIST_SERVER), &props);
+            TP_PROP_CHANNEL_TYPE_ROOM_LIST1_SERVER), &props);
     }
   else
     {
diff --git a/tests/lib/telepathy/contactlist/stream-tube-chan.c 
b/tests/lib/telepathy/contactlist/stream-tube-chan.c
index e1184af..a85f3b5 100644
--- a/tests/lib/telepathy/contactlist/stream-tube-chan.c
+++ b/tests/lib/telepathy/contactlist/stream-tube-chan.c
@@ -140,9 +140,9 @@ static void stream_tube_iface_init (gpointer iface, gpointer data);
 G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TpTestsStreamTubeChannel,
     tp_tests_stream_tube_channel,
     TP_TYPE_BASE_CHANNEL,
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_STREAM_TUBE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_STREAM_TUBE1,
       stream_tube_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE1,
       NULL);
     )
 
@@ -156,7 +156,7 @@ tp_tests_stream_tube_channel_get_interfaces (TpBaseChannel *self)
   interfaces = TP_BASE_CHANNEL_CLASS (
       tp_tests_stream_tube_channel_parent_class)->get_interfaces (self);
 
-  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE);
+  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE1);
   return interfaces;
 };
 
@@ -236,8 +236,8 @@ fill_immutable_properties (TpBaseChannel *chan,
 
   tp_dbus_properties_mixin_fill_properties_hash (
       G_OBJECT (chan), properties,
-      TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, "Service",
-      TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, "SupportedSocketTypes",
+      TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1, "Service",
+      TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1, "SupportedSocketTypes",
       NULL);
 
   if (!tp_base_channel_is_requested (chan))
@@ -245,7 +245,7 @@ fill_immutable_properties (TpBaseChannel *chan,
       /* Parameters is immutable only for incoming tubes */
       tp_dbus_properties_mixin_fill_properties_hash (
           G_OBJECT (chan), properties,
-          TP_IFACE_CHANNEL_INTERFACE_TUBE, "Parameters",
+          TP_IFACE_CHANNEL_INTERFACE_TUBE1, "Parameters",
           NULL);
     }
 }
@@ -272,7 +272,7 @@ tp_tests_stream_tube_channel_class_init (TpTestsStreamTubeChannelClass *klass)
   object_class->set_property = tp_tests_stream_tube_channel_set_property;
   object_class->dispose = dispose;
 
-  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_STREAM_TUBE;
+  base_class->channel_type = TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1;
   base_class->get_interfaces = tp_tests_stream_tube_channel_get_interfaces;
   base_class->close = channel_close;
   base_class->fill_immutable_properties = fill_immutable_properties;
@@ -317,12 +317,12 @@ tp_tests_stream_tube_channel_class_init (TpTestsStreamTubeChannelClass *klass)
       1, G_TYPE_IO_STREAM);
 
   tp_dbus_properties_mixin_implement_interface (object_class,
-      TP_IFACE_QUARK_CHANNEL_TYPE_STREAM_TUBE,
+      TP_IFACE_QUARK_CHANNEL_TYPE_STREAM_TUBE1,
       tp_dbus_properties_mixin_getter_gobject_properties, NULL,
       stream_tube_props);
 
   tp_dbus_properties_mixin_implement_interface (object_class,
-      TP_IFACE_QUARK_CHANNEL_INTERFACE_TUBE,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_TUBE1,
       tp_dbus_properties_mixin_getter_gobject_properties, NULL,
       tube_props);
 
@@ -336,7 +336,7 @@ change_state (TpTestsStreamTubeChannel *self,
 {
   self->priv->state = state;
 
-  tp_svc_channel_interface_tube_emit_tube_channel_state_changed (self, state);
+  tp_svc_channel_interface_tube1_emit_tube_channel_state_changed (self, state);
 }
 
 /* Return the address of the socket which has been shared over the tube */
@@ -370,7 +370,7 @@ check_address_type (TpTestsStreamTubeChannel *self,
 }
 
 static void
-stream_tube_offer (TpSvcChannelTypeStreamTube *iface,
+stream_tube_offer (TpSvcChannelTypeStreamTube1 *iface,
     guint address_type,
     const GValue *address,
     guint access_control,
@@ -400,7 +400,7 @@ stream_tube_offer (TpSvcChannelTypeStreamTube *iface,
 
   change_state (self, TP_TUBE_CHANNEL_STATE_REMOTE_PENDING);
 
-  tp_svc_channel_type_stream_tube_return_from_offer (context);
+  tp_svc_channel_type_stream_tube1_return_from_offer (context);
   return;
 
 fail:
@@ -452,7 +452,7 @@ service_incoming_cb (GSocketService *service,
       g_object_unref (addr);
     }
 
-  tp_svc_channel_type_stream_tube_emit_new_local_connection (self,
+  tp_svc_channel_type_stream_tube1_emit_new_local_connection (self,
       self->priv->connection_id);
 
   self->priv->connection_id++;
@@ -461,7 +461,7 @@ service_incoming_cb (GSocketService *service,
 }
 
 static void
-stream_tube_accept (TpSvcChannelTypeStreamTube *iface,
+stream_tube_accept (TpSvcChannelTypeStreamTube1 *iface,
     TpSocketAddressType address_type,
     TpSocketAccessControl access_control,
     const GValue *access_control_param,
@@ -497,7 +497,7 @@ stream_tube_accept (TpSvcChannelTypeStreamTube *iface,
 
   change_state (self, TP_TUBE_CHANNEL_STATE_OPEN);
 
-  tp_svc_channel_type_stream_tube_return_from_accept (context, address);
+  tp_svc_channel_type_stream_tube1_return_from_accept (context, address);
 
   tp_g_value_slice_free (address);
   return;
@@ -511,9 +511,9 @@ static void
 stream_tube_iface_init (gpointer iface,
     gpointer data)
 {
-  TpSvcChannelTypeStreamTubeClass *klass = iface;
+  TpSvcChannelTypeStreamTube1Class *klass = iface;
 
-#define IMPLEMENT(x) tp_svc_channel_type_stream_tube_implement_##x (klass, stream_tube_##x)
+#define IMPLEMENT(x) tp_svc_channel_type_stream_tube1_implement_##x (klass, stream_tube_##x)
   IMPLEMENT(offer);
   IMPLEMENT(accept);
 #undef IMPLEMENT
@@ -589,7 +589,7 @@ tp_tests_stream_tube_channel_peer_connected (TpTestsStreamTubeChannel *self,
         g_assert_not_reached ();
     }
 
-  tp_svc_channel_type_stream_tube_emit_new_remote_connection (self, handle,
+  tp_svc_channel_type_stream_tube1_emit_new_remote_connection (self, handle,
       tp_handle_inspect (contact_repo, handle), connection_param,
       self->priv->connection_id);
 
@@ -603,7 +603,7 @@ tp_tests_stream_tube_channel_last_connection_disconnected (
     TpTestsStreamTubeChannel *self,
     const gchar *error)
 {
-  tp_svc_channel_type_stream_tube_emit_connection_closed (self,
+  tp_svc_channel_type_stream_tube1_emit_connection_closed (self,
       self->priv->connection_id - 1, error, "kaboum");
 }
 
diff --git a/tests/lib/telepathy/contactlist/textchan-group.c 
b/tests/lib/telepathy/contactlist/textchan-group.c
index 3b9b179..b305876 100644
--- a/tests/lib/telepathy/contactlist/textchan-group.c
+++ b/tests/lib/telepathy/contactlist/textchan-group.c
@@ -22,9 +22,9 @@ G_DEFINE_TYPE_WITH_CODE (TpTestsTextChannelGroup,
     tp_tests_text_channel_group, TP_TYPE_BASE_CHANNEL,
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
         tp_message_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP1,
       tp_group_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_PASSWORD,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_PASSWORD1,
       password_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
       tp_dbus_properties_mixin_iface_init))
@@ -37,8 +37,8 @@ text_channel_group_get_interfaces (TpBaseChannel *self)
   interfaces = TP_BASE_CHANNEL_CLASS (
       tp_tests_text_channel_group_parent_class)->get_interfaces (self);
 
-  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP);
-  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_PASSWORD);
+  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP1);
+  g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_PASSWORD1);
   return interfaces;
 };
 
@@ -285,15 +285,15 @@ tp_tests_text_channel_set_password (TpTestsTextChannelGroup *self,
     return;
 
   if (pass_needed)
-    tp_svc_channel_interface_password_emit_password_flags_changed (self,
+    tp_svc_channel_interface_password1_emit_password_flags_changed (self,
         TP_CHANNEL_PASSWORD_FLAG_PROVIDE, 0);
   else
-    tp_svc_channel_interface_password_emit_password_flags_changed (self,
+    tp_svc_channel_interface_password1_emit_password_flags_changed (self,
         0, TP_CHANNEL_PASSWORD_FLAG_PROVIDE);
 }
 
 static void
-password_get_password_flags (TpSvcChannelInterfacePassword *chan,
+password_get_password_flags (TpSvcChannelInterfacePassword1 *chan,
     DBusGMethodInvocation *context)
 {
   TpTestsTextChannelGroup *self = (TpTestsTextChannelGroup *) chan;
@@ -302,27 +302,27 @@ password_get_password_flags (TpSvcChannelInterfacePassword *chan,
   if (self->priv->password != NULL)
     flags |= TP_CHANNEL_PASSWORD_FLAG_PROVIDE;
 
-  tp_svc_channel_interface_password_return_from_get_password_flags (context,
+  tp_svc_channel_interface_password1_return_from_get_password_flags (context,
       flags);
 }
 
 static void
-password_provide_password (TpSvcChannelInterfacePassword *chan,
+password_provide_password (TpSvcChannelInterfacePassword1 *chan,
     const gchar *password,
     DBusGMethodInvocation *context)
 {
   TpTestsTextChannelGroup *self = (TpTestsTextChannelGroup *) chan;
 
-  tp_svc_channel_interface_password_return_from_provide_password (context,
+  tp_svc_channel_interface_password1_return_from_provide_password (context,
       !tp_strdiff (password, self->priv->password));
 }
 
 static void
 password_iface_init (gpointer iface, gpointer data)
 {
-  TpSvcChannelInterfacePasswordClass *klass = iface;
+  TpSvcChannelInterfacePassword1Class *klass = iface;
 
-#define IMPLEMENT(x) tp_svc_channel_interface_password_implement_##x (klass, password_##x)
+#define IMPLEMENT(x) tp_svc_channel_interface_password1_implement_##x (klass, password_##x)
   IMPLEMENT (get_password_flags);
   IMPLEMENT (provide_password);
 #undef IMPLEMENT
diff --git a/tests/lib/telepathy/contactlist/util.c b/tests/lib/telepathy/contactlist/util.c
index 792afb9..67af4e0 100644
--- a/tests/lib/telepathy/contactlist/util.c
+++ b/tests/lib/telepathy/contactlist/util.c
@@ -78,10 +78,70 @@ tp_tests_proxy_run_until_prepared_or_failed (gpointer proxy,
   return r;
 }
 
+static GTestDBus *test_dbus = NULL;
+
+static void
+start_dbus_session (void)
+{
+  g_assert (test_dbus == NULL);
+
+  g_type_init ();
+
+  /* Make sure we won't be using user's bus. This unsets more than
+   * g_test_dbus_unset() currently does (glib 2.36) */
+  g_unsetenv ("DISPLAY");
+  g_unsetenv ("DBUS_STARTER_ADDRESS");
+  g_unsetenv ("DBUS_STARTER_BUS_TYPE");
+  g_unsetenv ("DBUS_SESSION_BUS_ADDRESS");
+
+  test_dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
+  g_test_dbus_add_service_dir (test_dbus, g_getenv ("TP_TESTS_SERVICES_DIR"));
+  g_test_dbus_up (test_dbus);
+}
+
+static void
+stop_dbus_session (void)
+{
+  g_assert (test_dbus != NULL);
+  g_test_dbus_down (test_dbus);
+  g_clear_object (&test_dbus);
+}
+
+gint
+tp_tests_run_with_bus (void)
+{
+  gint ret;
+
+  if (test_dbus != NULL)
+    return g_test_run ();
+
+  start_dbus_session ();
+  ret = g_test_run ();
+  stop_dbus_session ();
+
+  return ret;
+}
+
 TpDBusDaemon *
 tp_tests_dbus_daemon_dup_or_die (void)
 {
-  TpDBusDaemon *d = tp_dbus_daemon_dup (NULL);
+  TpDBusDaemon *d;
+
+  if (test_dbus == NULL)
+    {
+      /* HACK: Some tests are not yet ported to GTest and thus are not using
+       * tp_tests_run_with_bus(). In that case we make sure to start the dbus
+       * session before aquiring the TpDBusDaemon and we stop the session when
+       * the daemon is disposed. In a perfect world this should not be needed.
+       */
+      start_dbus_session ();
+      d = tp_dbus_daemon_dup (NULL);
+      g_object_weak_ref ((GObject *) d, (GWeakNotify) stop_dbus_session, NULL);
+    }
+  else
+    {
+       d = tp_dbus_daemon_dup (NULL);
+    }
 
   /* In a shared library, this would be very bad (see fd.o #18832), but in a
    * regression test that's going to be run under a temporary session bus,
diff --git a/tests/lib/telepathy/contactlist/util.h b/tests/lib/telepathy/contactlist/util.h
index 3797f85..183e00f 100644
--- a/tests/lib/telepathy/contactlist/util.h
+++ b/tests/lib/telepathy/contactlist/util.h
@@ -13,6 +13,8 @@
 
 #include <telepathy-glib/telepathy-glib.h>
 
+gint tp_tests_run_with_bus (void);
+
 TpDBusDaemon *tp_tests_dbus_daemon_dup_or_die (void);
 
 void tp_tests_proxy_run_until_dbus_queue_processed (gpointer proxy);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]