telepathy-mission-control: mcd_dispatcher_context_get_channel_by_type: remove, unused

Simon McVittie smcv at kemper.freedesktop.org
Thu May 10 08:15:17 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: c76a8013952a1fa0c85aa80777d765f51fe3f23b
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=c76a8013952a1fa0c85aa80777d765f51fe3f23b

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue May  8 13:56:47 2012 +0100

mcd_dispatcher_context_get_channel_by_type: remove, unused

This also means we can drop mcd_channel_get_channel_type_quark.

---

 src/mcd-channel.c            |   22 ----------------------
 src/mcd-channel.h            |    1 -
 src/mcd-dispatcher-context.h |    2 --
 src/mcd-dispatcher.c         |   26 --------------------------
 4 files changed, 0 insertions(+), 51 deletions(-)

diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index 29ebd86..e5e895d 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -748,28 +748,6 @@ mcd_channel_get_status (McdChannel *channel)
     return MCD_CHANNEL_PRIV (channel)->status;
 }
 
-GQuark
-mcd_channel_get_channel_type_quark (McdChannel *channel)
-{
-    McdChannelPrivate *priv;
-
-    g_return_val_if_fail (MCD_IS_CHANNEL (channel), 0);
-    priv = channel->priv;
-    if (priv->tp_chan)
-        return tp_channel_get_channel_type_id (priv->tp_chan);
-
-    if (G_LIKELY (priv->request != NULL))
-    {
-        GHashTable *properties = _mcd_request_get_properties (priv->request);
-        const gchar *type = tp_asv_get_string (properties,
-            TP_IFACE_CHANNEL ".ChannelType");
-
-        return g_quark_from_string (type);
-    }
-
-    return 0;
-}
-
 const gchar *
 mcd_channel_get_object_path (McdChannel *channel)
 {
diff --git a/src/mcd-channel.h b/src/mcd-channel.h
index 2ce9278..e56f3f6 100644
--- a/src/mcd-channel.h
+++ b/src/mcd-channel.h
@@ -101,7 +101,6 @@ McdChannel *mcd_channel_new_from_path (TpConnection *connection,
                                        TpHandleType handle_type);
 
 McdChannelStatus mcd_channel_get_status (McdChannel * channel);
-GQuark mcd_channel_get_channel_type_quark (McdChannel *channel);
 const gchar* mcd_channel_get_object_path (McdChannel *channel);
 gboolean mcd_channel_is_requested (McdChannel *channel);
 McdAccount *mcd_channel_get_account (McdChannel *channel);
diff --git a/src/mcd-dispatcher-context.h b/src/mcd-dispatcher-context.h
index 3f1a611..e0a5790 100644
--- a/src/mcd-dispatcher-context.h
+++ b/src/mcd-dispatcher-context.h
@@ -83,8 +83,6 @@ TpConnection *mcd_dispatcher_context_get_connection_object (McdDispatcherContext
 McdChannel * mcd_dispatcher_context_get_channel (McdDispatcherContext * ctx);
 const GList *mcd_dispatcher_context_get_channels
     (McdDispatcherContext *context);
-McdChannel *mcd_dispatcher_context_get_channel_by_type
-    (McdDispatcherContext *context, GQuark type);
 
 McdConnection *mcd_dispatcher_context_get_connection
     (McdDispatcherContext *context);
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index f558ae7..4bb8fcd 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1141,32 +1141,6 @@ mcd_dispatcher_context_get_channels (McdDispatcherContext *context)
     return _mcd_dispatch_operation_peek_channels (context->operation);
 }
 
-/**
- * mcd_dispatcher_context_get_channel_by_type:
- * @context: the #McdDispatcherContext.
- * @type: the #GQuark representing the channel type.
- *
- * Returns: the first #McdChannel of the requested type, or %NULL.
- */
-McdChannel *
-mcd_dispatcher_context_get_channel_by_type (McdDispatcherContext *context,
-                                            GQuark type)
-{
-    const GList *list;
-
-    g_return_val_if_fail (context != NULL, NULL);
-    for (list = mcd_dispatcher_context_get_channels (context);
-         list != NULL;
-         list = list->next)
-    {
-        McdChannel *channel = MCD_CHANNEL (list->data);
-
-        if (mcd_channel_get_channel_type_quark (channel) == type)
-            return channel;
-    }
-    return NULL;
-}
-
 /*
  * _mcd_dispatcher_take_channels:
  * @dispatcher: the #McdDispatcher.



More information about the telepathy-commits mailing list