[telepathy-mission-control/master] _mcd_client_proxy_handle_channels: take the channels as a GList

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Nov 2 07:18:15 PST 2009


---
 src/mcd-client-priv.h        |    2 +-
 src/mcd-client.c             |    9 ++++++++-
 src/mcd-dispatch-operation.c |    6 ++----
 src/mcd-dispatcher.c         |    6 +-----
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/mcd-client-priv.h b/src/mcd-client-priv.h
index 71e57f9..d1acf22 100644
--- a/src/mcd-client-priv.h
+++ b/src/mcd-client-priv.h
@@ -115,7 +115,7 @@ G_GNUC_INTERNAL guint _mcd_client_match_filters (
 
 G_GNUC_INTERNAL void _mcd_client_proxy_handle_channels (McdClientProxy *self,
     gint timeout_ms, const gchar *account_path, const gchar *connection_path,
-    const GPtrArray *channel_details, const GPtrArray *requests_satisfied,
+    const GList *channels, const GPtrArray *requests_satisfied,
     guint64 user_action_time, GHashTable *handler_info,
     tp_cli_client_handler_callback_for_handle_channels callback,
     gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
diff --git a/src/mcd-client.c b/src/mcd-client.c
index 31fc25a..3b65b99 100644
--- a/src/mcd-client.c
+++ b/src/mcd-client.c
@@ -36,6 +36,7 @@
 #include <telepathy-glib/proxy-subclass.h>
 #include <telepathy-glib/util.h>
 
+#include "mcd-channel-priv.h"
 #include "mcd-debug.h"
 
 G_DEFINE_TYPE (McdClientProxy, _mcd_client_proxy, TP_TYPE_CLIENT);
@@ -1542,7 +1543,7 @@ _mcd_client_proxy_handle_channels (McdClientProxy *self,
     gint timeout_ms,
     const gchar *account_path,
     const gchar *connection_path,
-    const GPtrArray *channel_details,
+    const GList *channels,
     const GPtrArray *requests_satisfied,
     guint64 user_action_time,
     GHashTable *handler_info,
@@ -1551,10 +1552,16 @@ _mcd_client_proxy_handle_channels (McdClientProxy *self,
     GDestroyNotify destroy,
     GObject *weak_object)
 {
+    GPtrArray *channel_details;
+
     g_return_if_fail (MCD_IS_CLIENT_PROXY (self));
 
+    channel_details = _mcd_channel_details_build_from_list (channels);
+
     tp_cli_client_handler_call_handle_channels ((TpClient *) self,
         timeout_ms, account_path, connection_path, channel_details,
         requests_satisfied, user_action_time, handler_info,
         callback, user_data, destroy, weak_object);
+
+    _mcd_channel_details_free (channel_details);
 }
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 4cba9fe..b8198ee 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -1689,13 +1689,12 @@ mcd_dispatch_operation_handle_channels (McdDispatchOperation *self,
 {
     guint64 user_action_time;
     const gchar *account_path, *connection_path;
-    GPtrArray *channels_array, *satisfied_requests;
+    GPtrArray *satisfied_requests;
     GHashTable *handler_info;
     const GList *cl;
 
     connection_path = _mcd_dispatch_operation_get_connection_path (self);
     account_path = _mcd_dispatch_operation_get_account_path (self);
-    channels_array = _mcd_dispatch_operation_dup_channel_details (self);
 
     user_action_time = 0; /* TODO: if we have a CDO, get it from there */
     satisfied_requests = g_ptr_array_new ();
@@ -1728,12 +1727,11 @@ mcd_dispatch_operation_handle_channels (McdDispatchOperation *self,
            tp_proxy_get_bus_name (handler), self);
     _mcd_client_proxy_handle_channels (handler,
         -1, account_path, connection_path,
-        channels_array, satisfied_requests, user_action_time,
+        self->priv->channels, satisfied_requests, user_action_time,
         handler_info, _mcd_dispatch_operation_handle_channels_cb,
         g_object_ref (self), g_object_unref, NULL);
 
     g_ptr_array_free (satisfied_requests, TRUE);
-    _mcd_channel_details_free (channels_array);
     g_hash_table_unref (handler_info);
 }
 
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 76d0d8d..862426d 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1775,7 +1775,6 @@ _mcd_dispatcher_reinvoke_handler (McdDispatcher *dispatcher,
     GList *request_as_list;
     const gchar *handler_unique;
     GStrv possible_handlers;
-    GPtrArray *details;
     GPtrArray *satisfied_requests;
     GHashTable *handler_info;
     const gchar *connection_path;
@@ -1838,8 +1837,6 @@ _mcd_dispatcher_reinvoke_handler (McdDispatcher *dispatcher,
 
     connection_path = mcd_dispatcher_borrow_channel_connection_path (request);
 
-    details = _mcd_channel_details_build_from_list (request_as_list);
-
     satisfied_requests = g_ptr_array_new ();
 
     for (requests = _mcd_channel_get_satisfied_requests (request);
@@ -1855,12 +1852,11 @@ _mcd_dispatcher_reinvoke_handler (McdDispatcher *dispatcher,
     _mcd_channel_set_status (request, MCD_CHANNEL_STATUS_HANDLER_INVOKED);
 
     _mcd_client_proxy_handle_channels (handler,
-        -1, account_path, connection_path, details,
+        -1, account_path, connection_path, request_as_list,
         satisfied_requests, user_action_time, handler_info,
         reinvoke_handle_channels_cb, NULL, NULL, (GObject *) request);
 
     g_ptr_array_free (satisfied_requests, TRUE);
-    _mcd_channel_details_free (details);
     g_hash_table_unref (handler_info);
 
 finally:
-- 
1.5.6.5




More information about the telepathy-commits mailing list