[telepathy-mission-control/master] Rename _mcd_dispatcher_send_channels to _mcd_dispatcher_take_channels
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Apr 7 06:58:08 PDT 2009
This makes it more obvious that ownership of the list is stolen.
---
src/mcd-connection.c | 12 ++++++------
src/mcd-dispatcher.c | 6 +++---
src/mcd-dispatcher.h | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 33a78de..875121d 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -485,7 +485,7 @@ on_new_channel (TpConnection *proxy, const gchar *chan_obj_path,
mcd_operation_take_mission (MCD_OPERATION (connection),
MCD_MISSION (channel));
/* Dispatch the incoming channel */
- _mcd_dispatcher_send_channels (priv->dispatcher,
+ _mcd_dispatcher_take_channels (priv->dispatcher,
g_list_prepend (NULL, channel),
FALSE);
}
@@ -1226,7 +1226,7 @@ dispatch_undispatched_channels (McdConnection *connection)
g_object_set_data (G_OBJECT (channel), MCD_TMP_CHANNEL_DATA, NULL);
DEBUG ("Dispatching channel %p", channel);
/* dispatch the channel */
- _mcd_dispatcher_send_channels (priv->dispatcher,
+ _mcd_dispatcher_take_channels (priv->dispatcher,
g_list_prepend (NULL, channel),
FALSE);
}
@@ -1333,7 +1333,7 @@ on_new_channels (TpConnection *proxy, const GPtrArray *channels,
channel_list = g_list_prepend (channel_list, channel);
}
- _mcd_dispatcher_send_channels (priv->dispatcher, channel_list, requested);
+ _mcd_dispatcher_take_channels (priv->dispatcher, channel_list, requested);
}
static void
@@ -1430,7 +1430,7 @@ static void get_all_requests_cb (TpProxy *proxy, GHashTable *properties,
g_object_set_data (G_OBJECT (channel), MCD_TMP_CHANNEL_DATA,
NULL);
/* channel is ready for dispatching */
- _mcd_dispatcher_send_channels (priv->dispatcher,
+ _mcd_dispatcher_take_channels (priv->dispatcher,
g_list_prepend (NULL, channel),
FALSE);
found = TRUE;
@@ -2150,7 +2150,7 @@ request_channel_cb (TpConnection *proxy, const gchar *channel_path,
}
/* Dispatch the incoming channel */
- _mcd_dispatcher_send_channels (priv->dispatcher,
+ _mcd_dispatcher_take_channels (priv->dispatcher,
g_list_prepend (NULL, channel),
TRUE);
}
@@ -2222,7 +2222,7 @@ request_handles_cb (TpConnection *proxy, const GArray *handles,
/* we no longer need the new channel */
g_object_unref (channel);
/* notify the dispatcher again */
- _mcd_dispatcher_send_channels (priv->dispatcher,
+ _mcd_dispatcher_take_channels (priv->dispatcher,
g_list_prepend (NULL,
existing_channel),
TRUE);
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 01135e2..f6824df 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -3189,7 +3189,7 @@ _mcd_dispatcher_add_request (McdDispatcher *dispatcher, McdAccount *account,
}
/*
- * _mcd_dispatcher_send_channels:
+ * _mcd_dispatcher_take_channels:
* @dispatcher: the #McdDispatcher.
* @channels: a #GList of #McdChannel elements.
* @requested: whether the channels were requested by MC.
@@ -3198,7 +3198,7 @@ _mcd_dispatcher_add_request (McdDispatcher *dispatcher, McdAccount *account,
* function has been called.
*/
void
-_mcd_dispatcher_send_channels (McdDispatcher *dispatcher, GList *channels,
+_mcd_dispatcher_take_channels (McdDispatcher *dispatcher, GList *channels,
gboolean requested)
{
GList *list;
@@ -3432,7 +3432,7 @@ channel_recover_release_lock (McdChannelRecover *cr)
DEBUG ("channel %p is not handled, redispatching", cr->channel);
requested = mcd_channel_is_requested (cr->channel);
- _mcd_dispatcher_send_channels (cr->dispatcher,
+ _mcd_dispatcher_take_channels (cr->dispatcher,
g_list_prepend (NULL, cr->channel),
requested);
}
diff --git a/src/mcd-dispatcher.h b/src/mcd-dispatcher.h
index 3eb764c..d433fbe 100644
--- a/src/mcd-dispatcher.h
+++ b/src/mcd-dispatcher.h
@@ -105,8 +105,8 @@ GPtrArray *mcd_dispatcher_get_channel_enhanced_capabilities (
/* not exported */
void _mcd_dispatcher_add_request (McdDispatcher *dispatcher,
McdAccount *account, McdChannel *channel);
-void _mcd_dispatcher_send_channels (McdDispatcher *dispatcher,
- GList *channels, gboolean requested);
+G_GNUC_INTERNAL void _mcd_dispatcher_take_channels (
+ McdDispatcher *dispatcher, GList *channels, gboolean requested);
G_GNUC_INTERNAL
void _mcd_dispatcher_add_channel_request (McdDispatcher *dispatcher,
McdChannel *channel,
--
1.5.6.5
More information about the telepathy-commits
mailing list