[Telepathy-commits] [telepathy-gabble/master] Use TpExportableChannel; remove GabbleExportableChannel

Will Thompson will.thompson at collabora.co.uk
Tue Sep 23 03:13:41 PDT 2008


---
 src/Makefile.am             |    2 -
 src/channel-manager.c       |   28 ++++----
 src/channel-manager.h       |   12 ++--
 src/conn-olpc.c             |    2 +-
 src/conn-requests.c         |   22 +++---
 src/connection.c            |    2 +-
 src/exportable-channel.c    |  150 -------------------------------------------
 src/exportable-channel.h    |   61 -----------------
 src/im-channel.c            |    6 +-
 src/im-factory.c            |   14 ++--
 src/media-channel.c         |    6 +-
 src/media-factory.c         |   10 ++--
 src/muc-channel.c           |    6 +-
 src/muc-factory.c           |   28 ++++----
 src/private-tubes-factory.c |   12 ++--
 src/roomlist-channel.c      |    6 +-
 src/roomlist-manager.c      |   10 ++--
 src/roster-channel.c        |    6 +-
 src/roster.c                |   14 ++--
 src/tubes-channel.c         |    6 +-
 20 files changed, 95 insertions(+), 308 deletions(-)
 delete mode 100644 src/exportable-channel.c
 delete mode 100644 src/exportable-channel.h

diff --git a/src/Makefile.am b/src/Makefile.am
index da0b4bd..bd94c8c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,8 +55,6 @@ libgabble_convenience_la_our_sources = \
     disco.c \
     error.c \
     error.h \
-    exportable-channel.c \
-    exportable-channel.h \
     gabble.c \
     gabble.h \
     im-channel.h \
diff --git a/src/channel-manager.c b/src/channel-manager.c
index 230162f..42dea77 100644
--- a/src/channel-manager.c
+++ b/src/channel-manager.c
@@ -24,8 +24,8 @@
 #include "channel-manager.h"
 
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/exportable-channel.h>
 
-#include "exportable-channel.h"
 #include "gabble-signals-marshal.h"
 
 enum {
@@ -53,7 +53,7 @@ channel_manager_base_init (gpointer klass)
        * GabbleChannelManager::new-channels:
        * @self: the channel manager
        * @channels: a #GHashTable where the keys are
-       *  #GabbleExportableChannel instances (hashed and compared
+       *  #TpExportableChannel instances (hashed and compared
        *  by g_direct_hash() and g_direct_equal()) and the values are
        *  linked lists (#GSList) of requests (opaque pointers) satisfied by
        *  these channels
@@ -76,7 +76,7 @@ channel_manager_base_init (gpointer klass)
        * @self: the channel manager
        * @request_token: opaque pointer supplied by the requester,
        *  representing a request
-       * @channel: the existing #GabbleExportableChannel that satisfies the
+       * @channel: the existing #TpExportableChannel that satisfies the
        *  request
        *
        * Emitted when a channel request is satisfied by an existing channel.
@@ -170,7 +170,7 @@ gabble_channel_manager_get_type (void)
  * gabble_channel_manager_emit_new_channels:
  * @instance: An object implementing #GabbleChannelManager
  * @channels: a #GHashTable where the keys are
- *  #GabbleExportableChannel instances (hashed and compared
+ *  #TpExportableChannel instances (hashed and compared
  *  by g_direct_hash() and g_direct_equal()) and the values are
  *  linked lists (#GSList) of requests (opaque pointers) satisfied by
  *  these channels
@@ -194,7 +194,7 @@ gabble_channel_manager_emit_new_channels (gpointer instance,
 /**
  * gabble_channel_manager_emit_new_channel:
  * @instance: An object implementing #GabbleChannelManager
- * @channel: A #GabbleExportableChannel
+ * @channel: A #TpExportableChannel
  *
  * Emit the #GabbleChannelManager::new-channels signal indicating that the
  * channel has been created. (This is a convenient shortcut for calling
@@ -202,13 +202,13 @@ gabble_channel_manager_emit_new_channels (gpointer instance,
  */
 void
 gabble_channel_manager_emit_new_channel (gpointer instance,
-                                         GabbleExportableChannel *channel,
+                                         TpExportableChannel *channel,
                                          GSList *requests)
 {
   GHashTable *channels;
 
   g_return_if_fail (GABBLE_IS_CHANNEL_MANAGER (instance));
-  g_return_if_fail (GABBLE_IS_EXPORTABLE_CHANNEL (channel));
+  g_return_if_fail (TP_IS_EXPORTABLE_CHANNEL (channel));
 
   channels = g_hash_table_new_full (g_direct_hash, g_direct_equal,
       NULL, NULL);
@@ -240,20 +240,20 @@ gabble_channel_manager_emit_channel_closed (gpointer instance,
 /**
  * gabble_channel_manager_emit_channel_closed_for_object:
  * @instance: An object implementing #GabbleChannelManager
- * @channel: A #GabbleExportableChannel
+ * @channel: A #TpExportableChannel
  *
  * Emit the #GabbleChannelManager::channel-closed signal indicating that
  * the given channel has been closed. (This is a convenient shortcut for
  * calling gabble_channel_manager_emit_channel_closed() with the
- * #GabbleExportableChannel:object-path property of @channel.)
+ * #TpExportableChannel:object-path property of @channel.)
  */
 void
 gabble_channel_manager_emit_channel_closed_for_object (gpointer instance,
-    GabbleExportableChannel *channel)
+    TpExportableChannel *channel)
 {
   gchar *path;
 
-  g_return_if_fail (GABBLE_IS_EXPORTABLE_CHANNEL (channel));
+  g_return_if_fail (TP_IS_EXPORTABLE_CHANNEL (channel));
   g_object_get (channel,
       "object-path", &path,
       NULL);
@@ -275,9 +275,9 @@ gabble_channel_manager_emit_channel_closed_for_object (gpointer instance,
 void
 gabble_channel_manager_emit_request_already_satisfied (gpointer instance,
     gpointer request_token,
-    GabbleExportableChannel *channel)
+    TpExportableChannel *channel)
 {
-  g_return_if_fail (GABBLE_IS_EXPORTABLE_CHANNEL (channel));
+  g_return_if_fail (TP_IS_EXPORTABLE_CHANNEL (channel));
   g_return_if_fail (GABBLE_IS_CHANNEL_MANAGER (instance));
 
   g_signal_emit (instance, signals[S_REQUEST_ALREADY_SATISFIED], 0,
@@ -349,7 +349,7 @@ gabble_channel_manager_emit_request_failed_printf (gpointer instance,
 
 void
 gabble_channel_manager_foreach_channel (GabbleChannelManager *manager,
-                                        GabbleExportableChannelFunc func,
+                                        TpExportableChannelFunc func,
                                         gpointer user_data)
 {
   GabbleChannelManagerIface *iface = GABBLE_CHANNEL_MANAGER_GET_INTERFACE (
diff --git a/src/channel-manager.h b/src/channel-manager.h
index 6e7e31e..30f059e 100644
--- a/src/channel-manager.h
+++ b/src/channel-manager.h
@@ -25,7 +25,7 @@
 
 #include <glib-object.h>
 
-#include "exportable-channel.h"
+#include <telepathy-glib/exportable-channel.h>
 
 G_BEGIN_DECLS
 
@@ -50,11 +50,11 @@ typedef struct _GabbleChannelManagerIface GabbleChannelManagerIface;
 /* virtual methods */
 
 typedef void (*GabbleChannelManagerForeachChannelFunc) (
-    GabbleChannelManager *manager, GabbleExportableChannelFunc func,
+    GabbleChannelManager *manager, TpExportableChannelFunc func,
     gpointer user_data);
 
 void gabble_channel_manager_foreach_channel (GabbleChannelManager *manager,
-    GabbleExportableChannelFunc func, gpointer user_data);
+    TpExportableChannelFunc func, gpointer user_data);
 
 
 typedef void (*GabbleChannelManagerChannelClassFunc) (
@@ -105,18 +105,18 @@ GType gabble_channel_manager_get_type (void);
 /* signal emission */
 
 void gabble_channel_manager_emit_new_channel (gpointer instance,
-    GabbleExportableChannel *channel, GSList *requests);
+    TpExportableChannel *channel, GSList *requests);
 void gabble_channel_manager_emit_new_channels (gpointer instance,
     GHashTable *channels);
 
 void gabble_channel_manager_emit_channel_closed (gpointer instance,
     const gchar *path);
 void gabble_channel_manager_emit_channel_closed_for_object (gpointer instance,
-    GabbleExportableChannel *channel);
+    TpExportableChannel *channel);
 
 void gabble_channel_manager_emit_request_already_satisfied (
     gpointer instance, gpointer request_token,
-    GabbleExportableChannel *channel);
+    TpExportableChannel *channel);
 
 void gabble_channel_manager_emit_request_failed (gpointer instance,
     gpointer request_token, GQuark domain, gint code, const gchar *message);
diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index 6f1f6d8..b19a98a 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -2501,7 +2501,7 @@ muc_factory_new_channel_cb (gpointer key,
                             gpointer data)
 {
   GabbleConnection *conn = GABBLE_CONNECTION (data);
-  GabbleExportableChannel *chan = GABBLE_EXPORTABLE_CHANNEL (key);
+  TpExportableChannel *chan = TP_EXPORTABLE_CHANNEL (key);
   ActivityInfo *info;
   TpHandle room_handle;
 
diff --git a/src/conn-requests.c b/src/conn-requests.c
index 50cb7ab..9406cc2 100644
--- a/src/conn-requests.c
+++ b/src/conn-requests.c
@@ -23,6 +23,7 @@
 
 #include <telepathy-glib/channel-factory-iface.h>
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/exportable-channel.h>
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/svc-connection.h>
@@ -33,7 +34,6 @@
 #define DEBUG_FLAG GABBLE_DEBUG_CONNECTION
 #include "channel-manager.h"
 #include "debug.h"
-#include "exportable-channel.h"
 
 
 static GValueArray *
@@ -54,9 +54,9 @@ get_channel_details (GObject *obj)
   g_value_take_boxed (value, object_path);
   object_path = NULL;
 
-  g_assert (GABBLE_IS_EXPORTABLE_CHANNEL (obj) || TP_IS_CHANNEL_IFACE (obj));
+  g_assert (TP_IS_EXPORTABLE_CHANNEL (obj) || TP_IS_CHANNEL_IFACE (obj));
 
-  if (GABBLE_IS_EXPORTABLE_CHANNEL (obj))
+  if (TP_IS_EXPORTABLE_CHANNEL (obj))
     {
       g_object_get (obj,
           "channel-properties", &table,
@@ -260,7 +260,7 @@ satisfy_request (GabbleConnection *self,
         {
           GHashTable *properties;
 
-          g_assert (GABBLE_IS_EXPORTABLE_CHANNEL (channel));
+          g_assert (TP_IS_EXPORTABLE_CHANNEL (channel));
           g_object_get (channel,
               "channel-properties", &properties,
               NULL);
@@ -642,7 +642,7 @@ list_channel_factory_foreach_one (TpChannelIface *chan,
 
 
 static void
-exportable_channel_get_old_info (GabbleExportableChannel *channel,
+exportable_channel_get_old_info (TpExportableChannel *channel,
                                  gchar **object_path_out,
                                  gchar **channel_type_out,
                                  guint *handle_type_out,
@@ -700,7 +700,7 @@ exportable_channel_get_old_info (GabbleExportableChannel *channel,
 
 
 static void
-list_channel_manager_foreach_one (GabbleExportableChannel *channel,
+list_channel_manager_foreach_one (TpExportableChannel *channel,
                                   gpointer data)
 {
   GPtrArray *values = (GPtrArray *) data;
@@ -709,7 +709,7 @@ list_channel_manager_foreach_one (GabbleExportableChannel *channel,
   GValue *entry = tp_dbus_specialized_value_slice_new
       (TP_STRUCT_TYPE_CHANNEL_INFO);
 
-  g_assert (GABBLE_IS_EXPORTABLE_CHANNEL (channel));
+  g_assert (TP_IS_EXPORTABLE_CHANNEL (channel));
 
   exportable_channel_get_old_info (channel, &path, &type, &handle_type,
       &handle);
@@ -794,7 +794,7 @@ factory_get_channel_details_foreach (TpChannelIface *chan,
 
 
 static void
-manager_get_channel_details_foreach (GabbleExportableChannel *chan,
+manager_get_channel_details_foreach (TpExportableChannel *chan,
                                      gpointer data)
 {
   GPtrArray *details = data;
@@ -1136,7 +1136,7 @@ manager_new_channel (gpointer key,
                      gpointer value,
                      gpointer data)
 {
-  GabbleExportableChannel *channel = GABBLE_EXPORTABLE_CHANNEL (key);
+  TpExportableChannel *channel = TP_EXPORTABLE_CHANNEL (key);
   GSList *request_tokens = value;
   GabbleConnection *self = GABBLE_CONNECTION (data);
   gchar *object_path, *channel_type;
@@ -1207,13 +1207,13 @@ manager_new_channels_cb (GabbleChannelManager *manager,
 static void
 manager_request_already_satisfied_cb (GabbleChannelManager *manager,
                                       gpointer request_token,
-                                      GabbleExportableChannel *channel,
+                                      TpExportableChannel *channel,
                                       GabbleConnection *self)
 {
   gchar *object_path;
 
   g_assert (GABBLE_IS_CHANNEL_MANAGER (manager));
-  g_assert (GABBLE_IS_EXPORTABLE_CHANNEL (channel));
+  g_assert (TP_IS_EXPORTABLE_CHANNEL (channel));
   g_assert (GABBLE_IS_CONNECTION (self));
 
   g_object_get (channel,
diff --git a/src/connection.c b/src/connection.c
index 01c9a8b..b24cb0a 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1343,7 +1343,7 @@ _gabble_connection_signal_own_presence (GabbleConnection *self, GError **error)
   /* broadcast presence to MUCs */
   gabble_channel_manager_foreach_channel (
       GABBLE_CHANNEL_MANAGER (self->muc_factory),
-      (GabbleExportableChannelFunc) gabble_muc_channel_send_presence, NULL);
+      (TpExportableChannelFunc) gabble_muc_channel_send_presence, NULL);
 
   return ret;
 }
diff --git a/src/exportable-channel.c b/src/exportable-channel.c
deleted file mode 100644
index ea7612b..0000000
--- a/src/exportable-channel.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * exportable-channel.c - A channel usable with the Channel Manager
- *
- * Copyright (C) 2008 Collabora Ltd.
- * Copyright (C) 2008 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "config.h"
-#include "exportable-channel.h"
-
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/svc-channel.h>
-#include <telepathy-glib/util.h>
-
-
-static void
-exportable_channel_base_init (gpointer klass)
-{
-  static gboolean initialized = FALSE;
-
-  if (!initialized)
-    {
-      GParamSpec *param_spec;
-
-      initialized = TRUE;
-
-      /**
-       * GabbleExportableChannel:object-path:
-       *
-       * The D-Bus object path used for this object on the bus. Read-only
-       * except during construction.
-       */
-      param_spec = g_param_spec_string ("object-path", "D-Bus object path",
-          "The D-Bus object path used for this object on the bus.", NULL,
-          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
-          G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK);
-      g_object_interface_install_property (klass, param_spec);
-
-      /**
-       * GabbleExportableChannel:channel-properties:
-       *
-       * The D-Bus properties to be announced in the NewChannels signal
-       * and in the Channels property, as a map from
-       * inter.face.name.propertyname to GValue.
-       *
-       * This can only change when the closed signal is emitted.
-       */
-      param_spec = g_param_spec_boxed ("channel-properties",
-          "Channel properties",
-          "The channel properties",
-          TP_HASH_TYPE_QUALIFIED_PROPERTY_VALUE_MAP,
-          G_PARAM_READABLE |
-          G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK);
-      g_object_interface_install_property (klass, param_spec);
-
-      /**
-       * GabbleExportableChannel:channel-destroyed:
-       *
-       * If true, the closed signal on the Channel interface indicates that
-       * the channel can go away.
-       *
-       * If false, the closed signal indicates that the channel should
-       * appear to go away and be re-created.
-       */
-      param_spec = g_param_spec_boolean ("channel-destroyed",
-          "Destroyed?",
-          "If true, the channel has *really* closed, rather than just "
-          "appearing to do so",
-          FALSE,
-          G_PARAM_READABLE |
-          G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK);
-      g_object_interface_install_property (klass, param_spec);
-    }
-}
-
-GType
-gabble_exportable_channel_get_type (void)
-{
-  static GType type = 0;
-
-  if (G_UNLIKELY (type == 0))
-    {
-      static const GTypeInfo info = {
-        sizeof (GabbleExportableChannelIface),
-        exportable_channel_base_init,   /* base_init */
-        NULL,   /* base_finalize */
-        NULL,   /* class_init */
-        NULL,   /* class_finalize */
-        NULL,   /* class_data */
-        0,
-        0,      /* n_preallocs */
-        NULL    /* instance_init */
-      };
-
-      type = g_type_register_static (G_TYPE_INTERFACE,
-          "GabbleExportableChannel", &info, 0);
-
-      g_type_interface_add_prerequisite (type, TP_TYPE_SVC_CHANNEL);
-    }
-
-  return type;
-}
-
-GHashTable *
-gabble_tp_dbus_properties_mixin_make_properties_hash (
-    GObject *object,
-    const gchar *first_interface,
-    const gchar *first_property,
-    ...)
-{
-  va_list ap;
-  GHashTable *table;
-  const gchar *interface, *property;
-
-  table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
-      (GDestroyNotify) tp_g_value_slice_free);
-
-  va_start (ap, first_property);
-
-  for (interface = first_interface, property = first_property;
-       interface != NULL;
-       interface = va_arg (ap, gchar *), property = va_arg (ap, gchar *))
-    {
-      GValue *value = g_slice_new0 (GValue);
-
-      tp_dbus_properties_mixin_get (object, interface, property,
-            value, NULL);
-      /* Fetching our immutable properties had better not fail... */
-      g_assert (G_IS_VALUE (value));
-
-      g_hash_table_insert (table,
-          g_strdup_printf ("%s.%s", interface, property), value);
-    }
-
-  return table;
-}
diff --git a/src/exportable-channel.h b/src/exportable-channel.h
deleted file mode 100644
index ed7e888..0000000
--- a/src/exportable-channel.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * exportable-channel.h - A channel usable with the Channel Manager
- *
- * Copyright (C) 2008 Collabora Ltd.
- * Copyright (C) 2008 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef GABBLE_EXPORTABLE_CHANNEL_H
-#define GABBLE_EXPORTABLE_CHANNEL_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define GABBLE_TYPE_EXPORTABLE_CHANNEL (gabble_exportable_channel_get_type ())
-
-#define GABBLE_EXPORTABLE_CHANNEL(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-  GABBLE_TYPE_EXPORTABLE_CHANNEL, GabbleExportableChannel))
-
-#define GABBLE_IS_EXPORTABLE_CHANNEL(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-  GABBLE_TYPE_EXPORTABLE_CHANNEL))
-
-#define GABBLE_EXPORTABLE_CHANNEL_GET_INTERFACE(obj) \
-  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
-  GABBLE_TYPE_EXPORTABLE_CHANNEL, GabbleExportableChannelIface))
-
-typedef struct _GabbleExportableChannel GabbleExportableChannel;
-typedef struct _GabbleExportableChannelIface GabbleExportableChannelIface;
-
-typedef void (*GabbleExportableChannelFunc) (GabbleExportableChannel *channel,
-    gpointer user_data);
-
-struct _GabbleExportableChannelIface {
-    GTypeInterface parent;
-};
-
-GType gabble_exportable_channel_get_type (void);
-
-GHashTable *gabble_tp_dbus_properties_mixin_make_properties_hash (
-    GObject *object, const gchar *first_interface,
-    const gchar *first_property, ...) G_GNUC_NULL_TERMINATED;
-
-G_END_DECLS
-
-#endif
diff --git a/src/im-channel.c b/src/im-channel.c
index 2695a3e..a158870 100644
--- a/src/im-channel.c
+++ b/src/im-channel.c
@@ -28,6 +28,7 @@
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/enums.h>
 #include <telepathy-glib/errors.h>
+#include <telepathy-glib/exportable-channel.h>
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/channel-iface.h>
 #include <telepathy-glib/svc-channel.h>
@@ -39,7 +40,6 @@
 #include "connection.h"
 #include "debug.h"
 #include "disco.h"
-#include "exportable-channel.h"
 #include "presence.h"
 #include "presence-cache.h"
 #include "roster.h"
@@ -55,7 +55,7 @@ G_DEFINE_TYPE_WITH_CODE (GabbleIMChannel, gabble_im_channel, G_TYPE_OBJECT,
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL, channel_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT, text_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL);
-    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_EXPORTABLE_CHANNEL, NULL);
+    G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_CHAT_STATE,
       chat_state_iface_init));
 
@@ -216,7 +216,7 @@ gabble_im_channel_get_property (GObject    *object,
       break;
     case PROP_CHANNEL_PROPERTIES:
       g_value_set_boxed (value,
-          gabble_tp_dbus_properties_mixin_make_properties_hash (object,
+          tp_dbus_properties_mixin_make_properties_hash (object,
               TP_IFACE_CHANNEL, "TargetHandle",
               TP_IFACE_CHANNEL, "TargetHandleType",
               TP_IFACE_CHANNEL, "ChannelType",
diff --git a/src/im-factory.c b/src/im-factory.c
index 1a58b00..f0aca7a 100644
--- a/src/im-factory.c
+++ b/src/im-factory.c
@@ -317,7 +317,7 @@ im_channel_closed_cb (GabbleIMChannel *chan, gpointer user_data)
       NULL);
 
   gabble_channel_manager_emit_channel_closed_for_object (self,
-      (GabbleExportableChannel *) chan);
+      (TpExportableChannel *) chan);
 
   if (priv->channels != NULL)
     {
@@ -338,7 +338,7 @@ im_channel_closed_cb (GabbleIMChannel *chan, gpointer user_data)
           DEBUG ("reopening channel with handle %u due to pending messages",
               contact_handle);
           gabble_channel_manager_emit_new_channel (self,
-              (GabbleExportableChannel *) chan, NULL);
+              (TpExportableChannel *) chan, NULL);
         }
     }
 }
@@ -389,7 +389,7 @@ new_im_channel (GabbleImFactory *fac,
     request_tokens = NULL;
 
   gabble_channel_manager_emit_new_channel (fac,
-      (GabbleExportableChannel *) chan, request_tokens);
+      (TpExportableChannel *) chan, request_tokens);
 
   g_slist_free (request_tokens);
 
@@ -454,7 +454,7 @@ connection_status_changed_cb (GabbleConnection *conn,
 
 struct _ForeachData
 {
-  GabbleExportableChannelFunc func;
+  TpExportableChannelFunc func;
   gpointer user_data;
 };
 
@@ -462,14 +462,14 @@ static void
 _foreach_slave (gpointer key, gpointer value, gpointer user_data)
 {
   struct _ForeachData *data = user_data;
-  GabbleExportableChannel *chan = GABBLE_EXPORTABLE_CHANNEL (value);
+  TpExportableChannel *chan = TP_EXPORTABLE_CHANNEL (value);
 
   data->func (chan, data->user_data);
 }
 
 static void
 gabble_im_factory_foreach_channel (GabbleChannelManager *manager,
-                                   GabbleExportableChannelFunc func,
+                                   TpExportableChannelFunc func,
                                    gpointer user_data)
 {
   GabbleImFactory *self = GABBLE_IM_FACTORY (manager);
@@ -524,7 +524,7 @@ gabble_im_factory_requestotron (GabbleImFactory *self,
       base_conn, TP_HANDLE_TYPE_CONTACT);
   TpHandle handle;
   GError *error = NULL;
-  GabbleExportableChannel *channel;
+  TpExportableChannel *channel;
 
   if (tp_strdiff (tp_asv_get_string (request_properties,
           TP_IFACE_CHANNEL ".ChannelType"), TP_IFACE_CHANNEL_TYPE_TEXT))
diff --git a/src/media-channel.c b/src/media-channel.c
index 43f50af..8285dff 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -26,6 +26,7 @@
 #include <dbus/dbus-glib.h>
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/errors.h>
+#include <telepathy-glib/exportable-channel.h>
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/channel-iface.h>
 #include <telepathy-glib/svc-channel.h>
@@ -37,7 +38,6 @@
 
 #include "connection.h"
 #include "debug.h"
-#include "exportable-channel.h"
 #include "media-factory.h"
 #include "media-session.h"
 #include "media-session.h"
@@ -69,7 +69,7 @@ G_DEFINE_TYPE_WITH_CODE (GabbleMediaChannel, gabble_media_channel,
       tp_properties_mixin_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
       tp_dbus_properties_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_EXPORTABLE_CHANNEL, NULL);
+    G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL));
 
 static const gchar *gabble_media_channel_interfaces[] = {
@@ -436,7 +436,7 @@ gabble_media_channel_get_property (GObject    *object,
       break;
     case PROP_CHANNEL_PROPERTIES:
       g_value_set_boxed (value,
-          gabble_tp_dbus_properties_mixin_make_properties_hash (object,
+          tp_dbus_properties_mixin_make_properties_hash (object,
               TP_IFACE_CHANNEL, "TargetHandle",
               TP_IFACE_CHANNEL, "TargetHandleType",
               TP_IFACE_CHANNEL, "ChannelType",
diff --git a/src/media-factory.c b/src/media-factory.c
index 9920a84..2701cfc 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -343,7 +343,7 @@ media_factory_jingle_cb (LmMessageHandler *handler,
       if (chan_is_new)
         {
           gabble_channel_manager_emit_new_channel (fac,
-              GABBLE_EXPORTABLE_CHANNEL (chan), NULL);
+              TP_EXPORTABLE_CHANNEL (chan), NULL);
         }
     }
   else
@@ -461,7 +461,7 @@ media_channel_closed_cb (GabbleMediaChannel *chan, gpointer user_data)
   GabbleMediaFactoryPrivate *priv = GABBLE_MEDIA_FACTORY_GET_PRIVATE (fac);
 
   gabble_channel_manager_emit_channel_closed_for_object (fac,
-      GABBLE_EXPORTABLE_CHANNEL (chan));
+      TP_EXPORTABLE_CHANNEL (chan));
 
   if (priv->channels != NULL)
     {
@@ -819,7 +819,7 @@ gabble_media_factory_constructed (GObject *object)
 
 static void
 gabble_media_factory_foreach_channel (GabbleChannelManager *manager,
-                                      GabbleExportableChannelFunc foreach,
+                                      TpExportableChannelFunc foreach,
                                       gpointer user_data)
 {
   GabbleMediaFactory *fac = GABBLE_MEDIA_FACTORY (manager);
@@ -828,7 +828,7 @@ gabble_media_factory_foreach_channel (GabbleChannelManager *manager,
 
   for (i = 0; i < priv->channels->len; i++)
     {
-      GabbleExportableChannel *channel = GABBLE_EXPORTABLE_CHANNEL (
+      TpExportableChannel *channel = TP_EXPORTABLE_CHANNEL (
           g_ptr_array_index (priv->channels, i));
 
       foreach (channel, user_data);
@@ -950,7 +950,7 @@ gabble_media_factory_request_channel (GabbleChannelManager *manager,
 
   request_tokens = g_slist_prepend (NULL, request_token);
   gabble_channel_manager_emit_new_channel (self,
-      GABBLE_EXPORTABLE_CHANNEL (channel), request_tokens);
+      TP_EXPORTABLE_CHANNEL (channel), request_tokens);
   g_slist_free (request_tokens);
 
   return TRUE;
diff --git a/src/muc-channel.c b/src/muc-channel.c
index c1e64d9..d74f550 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -29,6 +29,7 @@
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/debug-ansi.h>
 #include <telepathy-glib/errors.h>
+#include <telepathy-glib/exportable-channel.h>
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/channel-iface.h>
@@ -41,7 +42,6 @@
 #include "debug.h"
 #include "disco.h"
 #include "error.h"
-#include "exportable-channel.h"
 #include "namespaces.h"
 #include "presence.h"
 #include "util.h"
@@ -73,7 +73,7 @@ G_DEFINE_TYPE_WITH_CODE (GabbleMucChannel, gabble_muc_channel,
       password_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
       text_iface_init);
-    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_EXPORTABLE_CHANNEL, NULL);
+    G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_CHAT_STATE,
       chat_state_iface_init)
@@ -852,7 +852,7 @@ gabble_muc_channel_get_property (GObject    *object,
       break;
     case PROP_CHANNEL_PROPERTIES:
       g_value_set_boxed (value,
-          gabble_tp_dbus_properties_mixin_make_properties_hash (object,
+          tp_dbus_properties_mixin_make_properties_hash (object,
               TP_IFACE_CHANNEL, "TargetHandle",
               TP_IFACE_CHANNEL, "TargetHandleType",
               TP_IFACE_CHANNEL, "ChannelType",
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 00c62af..251024b 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -79,7 +79,7 @@ struct _GabbleMucFactoryPrivate
 
   /* Map from channels to the request-tokens of requests that they will satisfy
    * when they're ready.
-   * Borrowed GabbleExportableChannel => GSList of gpointer */
+   * Borrowed TpExportableChannel => GSList of gpointer */
   GHashTable *queued_requests;
 
   gboolean dispose_has_run;
@@ -235,7 +235,7 @@ muc_channel_closed_cb (GabbleMucChannel *chan, gpointer user_data)
   TpHandle room_handle;
 
   gabble_channel_manager_emit_channel_closed_for_object (fac,
-      GABBLE_EXPORTABLE_CHANNEL (chan));
+      TP_EXPORTABLE_CHANNEL (chan));
 
   if (priv->text_channels != NULL)
     {
@@ -272,7 +272,7 @@ tubes_channel_closed_cb (GabbleTubesChannel *chan, gpointer user_data)
   TpHandle room_handle;
 
   gabble_channel_manager_emit_channel_closed_for_object (fac,
-      GABBLE_EXPORTABLE_CHANNEL (chan));
+      TP_EXPORTABLE_CHANNEL (chan));
 
   if (priv->tubes_channels != NULL)
     {
@@ -288,7 +288,7 @@ tubes_channel_closed_cb (GabbleTubesChannel *chan, gpointer user_data)
 
 static void
 gabble_muc_factory_emit_new_channel (GabbleMucFactory *self,
-                                     GabbleExportableChannel *channel)
+                                     TpExportableChannel *channel)
 {
   GabbleMucFactoryPrivate *priv = GABBLE_MUC_FACTORY_GET_PRIVATE (self);
   GSList *requests_satisfied;
@@ -311,14 +311,14 @@ muc_ready_cb (GabbleMucChannel *chan,
 
   DEBUG ("chan=%p", chan);
 
-  gabble_muc_factory_emit_new_channel (fac, GABBLE_EXPORTABLE_CHANNEL (chan));
+  gabble_muc_factory_emit_new_channel (fac, TP_EXPORTABLE_CHANNEL (chan));
 
   tubes_chan = g_hash_table_lookup (priv->text_needed_for_tubes, chan);
   if (tubes_chan != NULL)
     {
       g_hash_table_remove (priv->text_needed_for_tubes, chan);
       gabble_muc_factory_emit_new_channel (fac,
-          GABBLE_EXPORTABLE_CHANNEL (tubes_chan));
+          TP_EXPORTABLE_CHANNEL (tubes_chan));
     }
 }
 
@@ -952,7 +952,7 @@ muc_factory_presence_cb (LmMessageHandler *handler,
           tubes_chan = new_tubes_channel (fac, room_handle, muc_chan,
               0);
           gabble_muc_factory_emit_new_channel (fac,
-              GABBLE_EXPORTABLE_CHANNEL (tubes_chan));
+              TP_EXPORTABLE_CHANNEL (tubes_chan));
         }
 
       handle = tp_handle_ensure (contact_repo, from,
@@ -981,7 +981,7 @@ gabble_muc_factory_associate_request (GabbleMucFactory *self,
   GabbleMucFactoryPrivate *priv = GABBLE_MUC_FACTORY_GET_PRIVATE (self);
   GSList *list = g_hash_table_lookup (priv->queued_requests, channel);
 
-  g_assert (GABBLE_IS_EXPORTABLE_CHANNEL (channel));
+  g_assert (TP_IS_EXPORTABLE_CHANNEL (channel));
 
   g_hash_table_steal (priv->queued_requests, channel);
   list = g_slist_prepend (list, request);
@@ -1127,7 +1127,7 @@ gabble_muc_factory_constructor (GType type, guint n_props,
 
 struct _ForeachData
 {
-  GabbleExportableChannelFunc foreach;
+  TpExportableChannelFunc foreach;
   gpointer user_data;
 };
 
@@ -1135,14 +1135,14 @@ static void
 _foreach_slave (gpointer key, gpointer value, gpointer user_data)
 {
   struct _ForeachData *data = (struct _ForeachData *) user_data;
-  GabbleExportableChannel *channel = GABBLE_EXPORTABLE_CHANNEL (value);
+  TpExportableChannel *channel = TP_EXPORTABLE_CHANNEL (value);
 
   data->foreach (channel, data->user_data);
 }
 
 static void
 gabble_muc_factory_foreach_channel (GabbleChannelManager *manager,
-                                    GabbleExportableChannelFunc foreach,
+                                    TpExportableChannelFunc foreach,
                                     gpointer user_data)
 {
   GabbleMucFactory *fac = GABBLE_MUC_FACTORY (manager);
@@ -1313,7 +1313,7 @@ gabble_muc_factory_request (GabbleMucFactory *self,
           else
             {
               gabble_channel_manager_emit_request_already_satisfied (self,
-                  request_token, GABBLE_EXPORTABLE_CHANNEL (text_chan));
+                  request_token, TP_EXPORTABLE_CHANNEL (text_chan));
             }
         }
       else
@@ -1340,7 +1340,7 @@ gabble_muc_factory_request (GabbleMucFactory *self,
           else
             {
               gabble_channel_manager_emit_request_already_satisfied (self,
-                  request_token, GABBLE_EXPORTABLE_CHANNEL (tubes_chan));
+                  request_token, TP_EXPORTABLE_CHANNEL (tubes_chan));
             }
         }
       else if (ensure_muc_channel (self, priv, handle, &text_chan))
@@ -1350,7 +1350,7 @@ gabble_muc_factory_request (GabbleMucFactory *self,
           gabble_muc_factory_associate_request (self, tubes_chan,
               request_token);
           gabble_muc_factory_emit_new_channel (self,
-              GABBLE_EXPORTABLE_CHANNEL (tubes_chan));
+              TP_EXPORTABLE_CHANNEL (tubes_chan));
         }
       else
         {
diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c
index 3de8f02..e71166b 100644
--- a/src/private-tubes-factory.c
+++ b/src/private-tubes-factory.c
@@ -262,7 +262,7 @@ tubes_channel_closed_cb (GabbleTubesChannel *chan,
   g_object_get (chan, "handle", &contact_handle, NULL);
 
   gabble_channel_manager_emit_channel_closed_for_object (self,
-      GABBLE_EXPORTABLE_CHANNEL (chan));
+      TP_EXPORTABLE_CHANNEL (chan));
 
   DEBUG ("removing tubes channel with handle %d", contact_handle);
 
@@ -321,7 +321,7 @@ new_tubes_channel (GabblePrivateTubesFactory *fac,
     request_tokens = NULL;
 
   gabble_channel_manager_emit_new_channel (fac,
-      GABBLE_EXPORTABLE_CHANNEL (chan), request_tokens);
+      TP_EXPORTABLE_CHANNEL (chan), request_tokens);
 
   g_slist_free (request_tokens);
 
@@ -362,7 +362,7 @@ gabble_private_tubes_factory_close_all (GabblePrivateTubesFactory *fac)
 
 struct _ForeachData
 {
-  GabbleExportableChannelFunc foreach;
+  TpExportableChannelFunc foreach;
   gpointer user_data;
 };
 
@@ -372,7 +372,7 @@ _foreach_slave (gpointer key,
                 gpointer user_data)
 {
   struct _ForeachData *data = (struct _ForeachData *) user_data;
-  GabbleExportableChannel *chan = GABBLE_EXPORTABLE_CHANNEL (value);
+  TpExportableChannel *chan = TP_EXPORTABLE_CHANNEL (value);
 
   g_assert (TP_IS_CHANNEL_IFACE (chan));
 
@@ -381,7 +381,7 @@ _foreach_slave (gpointer key,
 
 static void
 gabble_private_tubes_factory_foreach_channel (GabbleChannelManager *manager,
-    GabbleExportableChannelFunc foreach,
+    TpExportableChannelFunc foreach,
     gpointer user_data)
 {
   GabblePrivateTubesFactory *fac = GABBLE_PRIVATE_TUBES_FACTORY (manager);
@@ -597,7 +597,7 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self,
       base_conn, TP_HANDLE_TYPE_CONTACT);
   TpHandle handle;
   GError *error = NULL;
-  GabbleExportableChannel *channel;
+  TpExportableChannel *channel;
 
   if (tp_strdiff (tp_asv_get_string (request_properties,
           TP_IFACE_CHANNEL ".ChannelType"), TP_IFACE_CHANNEL_TYPE_TUBES))
diff --git a/src/roomlist-channel.c b/src/roomlist-channel.c
index 2bad4e7..9813bc8 100644
--- a/src/roomlist-channel.c
+++ b/src/roomlist-channel.c
@@ -26,6 +26,7 @@
 #include <dbus/dbus-glib.h>
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/enums.h>
+#include <telepathy-glib/exportable-channel.h>
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/channel-iface.h>
@@ -39,7 +40,6 @@
 #include "connection.h"
 #include "debug.h"
 #include "disco.h"
-#include "exportable-channel.h"
 #include "namespaces.h"
 #include "util.h"
 
@@ -54,7 +54,7 @@ G_DEFINE_TYPE_WITH_CODE (GabbleRoomlistChannel, gabble_roomlist_channel,
     G_IMPLEMENT_INTERFACE (GABBLE_TYPE_SVC_CHANNEL_FUTURE, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_ROOM_LIST,
       roomlist_iface_init);
-    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_EXPORTABLE_CHANNEL, NULL);
+    G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL)
     );
 
@@ -195,7 +195,7 @@ gabble_roomlist_channel_get_property (GObject    *object,
       break;
     case PROP_CHANNEL_PROPERTIES:
       g_value_set_boxed (value,
-          gabble_tp_dbus_properties_mixin_make_properties_hash (object,
+          tp_dbus_properties_mixin_make_properties_hash (object,
               TP_IFACE_CHANNEL, "TargetHandle",
               TP_IFACE_CHANNEL, "TargetHandleType",
               TP_IFACE_CHANNEL, "ChannelType",
diff --git a/src/roomlist-manager.c b/src/roomlist-manager.c
index dfef5a8..984dcad 100644
--- a/src/roomlist-manager.c
+++ b/src/roomlist-manager.c
@@ -238,7 +238,7 @@ gabble_roomlist_manager_class_init (GabbleRoomlistManagerClass *klass)
 
 static void
 gabble_roomlist_manager_foreach_channel (GabbleChannelManager *manager,
-                                         GabbleExportableChannelFunc foreach,
+                                         TpExportableChannelFunc foreach,
                                          gpointer user_data)
 {
   GabbleRoomlistManager *self = GABBLE_ROOMLIST_MANAGER (manager);
@@ -246,7 +246,7 @@ gabble_roomlist_manager_foreach_channel (GabbleChannelManager *manager,
 
   for (i = 0; i < self->priv->channels->len; i++)
     {
-      GabbleExportableChannel *channel = GABBLE_EXPORTABLE_CHANNEL (
+      TpExportableChannel *channel = TP_EXPORTABLE_CHANNEL (
           g_ptr_array_index (self->priv->channels, i));
 
       foreach (channel, user_data);
@@ -290,7 +290,7 @@ roomlist_channel_closed_cb (GabbleRoomlistChannel *channel,
   GabbleRoomlistManager *self = GABBLE_ROOMLIST_MANAGER (user_data);
 
   gabble_channel_manager_emit_channel_closed_for_object (self,
-      GABBLE_EXPORTABLE_CHANNEL (channel));
+      TP_EXPORTABLE_CHANNEL (channel));
 
   if (self->priv->channels != NULL)
     {
@@ -366,7 +366,7 @@ gabble_roomlist_manager_handle_request (GabbleChannelManager *manager,
           if (good)
             {
               gabble_channel_manager_emit_request_already_satisfied (self,
-                  request_token, GABBLE_EXPORTABLE_CHANNEL (channel));
+                  request_token, TP_EXPORTABLE_CHANNEL (channel));
               return TRUE;
             }
         }
@@ -388,7 +388,7 @@ gabble_roomlist_manager_handle_request (GabbleChannelManager *manager,
 
   request_tokens = g_slist_prepend (NULL, request_token);
   gabble_channel_manager_emit_new_channel (self,
-      GABBLE_EXPORTABLE_CHANNEL (channel), request_tokens);
+      TP_EXPORTABLE_CHANNEL (channel), request_tokens);
   g_slist_free (request_tokens);
 
   g_free (object_path);
diff --git a/src/roster-channel.c b/src/roster-channel.c
index 962e7a0..010dd7b 100644
--- a/src/roster-channel.c
+++ b/src/roster-channel.c
@@ -25,6 +25,7 @@
 #include <telepathy-glib/group-mixin.h>
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/errors.h>
+#include <telepathy-glib/exportable-channel.h>
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/channel-iface.h>
 #include <telepathy-glib/svc-generic.h>
@@ -36,7 +37,6 @@
 
 #include "connection.h"
 #include "debug.h"
-#include "exportable-channel.h"
 #include "roster.h"
 #include "util.h"
 
@@ -51,7 +51,7 @@ G_DEFINE_TYPE_WITH_CODE (GabbleRosterChannel, gabble_roster_channel,
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_CONTACT_LIST, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
       tp_dbus_properties_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_EXPORTABLE_CHANNEL, NULL);
+    G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL));
 
 static const gchar *gabble_roster_channel_interfaces[] = {
@@ -248,7 +248,7 @@ gabble_roster_channel_get_property (GObject    *object,
       break;
     case PROP_CHANNEL_PROPERTIES:
       g_value_set_boxed (value,
-          gabble_tp_dbus_properties_mixin_make_properties_hash (object,
+          tp_dbus_properties_mixin_make_properties_hash (object,
               TP_IFACE_CHANNEL, "TargetHandle",
               TP_IFACE_CHANNEL, "TargetHandleType",
               TP_IFACE_CHANNEL, "ChannelType",
diff --git a/src/roster.c b/src/roster.c
index d43fca2..da7571b 100644
--- a/src/roster.c
+++ b/src/roster.c
@@ -71,7 +71,7 @@ struct _GabbleRosterPrivate
   GHashTable *group_channels;
   GHashTable *items;
 
-  /* borrowed GabbleExportableChannel * => GSList of gpointer (request tokens)
+  /* borrowed TpExportableChannel * => GSList of gpointer (request tokens)
    * that will be satisfied when it's ready. The requests are in reverse
    * chronological order */
   GHashTable *queued_requests;
@@ -852,7 +852,7 @@ gabble_roster_emit_new_channel (GabbleRoster *self,
   g_hash_table_steal (priv->queued_requests, channel);
   requests_satisfied = g_slist_reverse (requests_satisfied);
   gabble_channel_manager_emit_new_channel (self,
-      GABBLE_EXPORTABLE_CHANNEL (channel), requests_satisfied);
+      TP_EXPORTABLE_CHANNEL (channel), requests_satisfied);
   g_slist_free (requests_satisfied);
 }
 
@@ -876,7 +876,7 @@ roster_channel_closed_cb (GabbleRosterChannel *channel,
             handle_type == TP_HANDLE_TYPE_GROUP);
 
   gabble_channel_manager_emit_channel_closed_for_object (self,
-      GABBLE_EXPORTABLE_CHANNEL (channel));
+      TP_EXPORTABLE_CHANNEL (channel));
 
   channels = (handle_type == TP_HANDLE_TYPE_LIST
                           ? self->priv->list_channels
@@ -1777,7 +1777,7 @@ gabble_roster_constructor (GType type, guint n_props,
 
 
 struct foreach_data {
-    GabbleExportableChannelFunc func;
+    TpExportableChannelFunc func;
     gpointer data;
 };
 
@@ -1786,7 +1786,7 @@ _gabble_roster_foreach_channel_helper (gpointer key,
                                        gpointer value,
                                        gpointer data)
 {
-  GabbleExportableChannel *chan = GABBLE_EXPORTABLE_CHANNEL (value);
+  TpExportableChannel *chan = TP_EXPORTABLE_CHANNEL (value);
   struct foreach_data *foreach = (struct foreach_data *) data;
 
   foreach->func (chan, foreach->data);
@@ -1794,7 +1794,7 @@ _gabble_roster_foreach_channel_helper (gpointer key,
 
 static void
 gabble_roster_foreach_channel (GabbleChannelManager *manager,
-                               GabbleExportableChannelFunc func,
+                               TpExportableChannelFunc func,
                                gpointer data)
 {
   GabbleRoster *roster = GABBLE_ROSTER (manager);
@@ -2569,7 +2569,7 @@ gabble_roster_request (GabbleRoster *self,
     {
       if (!created)
         gabble_channel_manager_emit_request_already_satisfied (self,
-            request_token, GABBLE_EXPORTABLE_CHANNEL (channel));
+            request_token, TP_EXPORTABLE_CHANNEL (channel));
     }
   else
     {
diff --git a/src/tubes-channel.c b/src/tubes-channel.c
index 52e4441..44a84d5 100644
--- a/src/tubes-channel.c
+++ b/src/tubes-channel.c
@@ -33,6 +33,7 @@
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/enums.h>
 #include <telepathy-glib/errors.h>
+#include <telepathy-glib/exportable-channel.h>
 #include <telepathy-glib/group-mixin.h>
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/interfaces.h>
@@ -46,7 +47,6 @@
 #include "bytestream-factory.h"
 #include "connection.h"
 #include "debug.h"
-#include "exportable-channel.h"
 #include "namespaces.h"
 #include "presence-cache.h"
 #include "presence.h"
@@ -70,7 +70,7 @@ G_DEFINE_TYPE_WITH_CODE (GabbleTubesChannel, gabble_tubes_channel,
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TUBES, tubes_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP,
         tp_external_group_mixin_iface_init);
-    G_IMPLEMENT_INTERFACE (GABBLE_TYPE_EXPORTABLE_CHANNEL, NULL);
+    G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL));
 
 static const gchar *gabble_tubes_channel_interfaces[] = {
@@ -271,7 +271,7 @@ gabble_tubes_channel_get_property (GObject *object,
         break;
       case PROP_CHANNEL_PROPERTIES:
         g_value_set_boxed (value,
-            gabble_tp_dbus_properties_mixin_make_properties_hash (object,
+            tp_dbus_properties_mixin_make_properties_hash (object,
                 TP_IFACE_CHANNEL, "TargetHandle",
                 TP_IFACE_CHANNEL, "TargetHandleType",
                 TP_IFACE_CHANNEL, "ChannelType",
-- 
1.5.6.5




More information about the Telepathy-commits mailing list