[telepathy-mission-control/master] _mcd_client_proxy_handle_channels: trivial wrapper for tp_cli call

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


Common code from the two places that call HandleChannels can gradually
move into this function.
---
 src/mcd-client-priv.h        |    7 +++++++
 src/mcd-client.c             |   22 ++++++++++++++++++++++
 src/mcd-dispatch-operation.c |    2 +-
 src/mcd-dispatcher.c         |    2 +-
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/src/mcd-client-priv.h b/src/mcd-client-priv.h
index 5af1c04..71e57f9 100644
--- a/src/mcd-client-priv.h
+++ b/src/mcd-client-priv.h
@@ -113,6 +113,13 @@ G_GNUC_INTERNAL guint _mcd_client_match_filters (
     GHashTable *channel_properties, const GList *filters,
     gboolean assume_requested);
 
+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,
+    guint64 user_action_time, GHashTable *handler_info,
+    tp_cli_client_handler_callback_for_handle_channels callback,
+    gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
+
 G_END_DECLS
 
 #endif
diff --git a/src/mcd-client.c b/src/mcd-client.c
index a0cc1b9..31fc25a 100644
--- a/src/mcd-client.c
+++ b/src/mcd-client.c
@@ -1536,3 +1536,25 @@ _mcd_client_match_filters (GHashTable *channel_properties,
 
     return best_quality;
 }
+
+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,
+    guint64 user_action_time,
+    GHashTable *handler_info,
+    tp_cli_client_handler_callback_for_handle_channels callback,
+    gpointer user_data,
+    GDestroyNotify destroy,
+    GObject *weak_object)
+{
+    g_return_if_fail (MCD_IS_CLIENT_PROXY (self));
+
+    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);
+}
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 4e2d05c..4cba9fe 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -1726,7 +1726,7 @@ mcd_dispatch_operation_handle_channels (McdDispatchOperation *self,
 
     DEBUG ("calling HandleChannels on %s for op %p",
            tp_proxy_get_bus_name (handler), self);
-    tp_cli_client_handler_call_handle_channels ((TpClient *) handler,
+    _mcd_client_proxy_handle_channels (handler,
         -1, account_path, connection_path,
         channels_array, satisfied_requests, user_action_time,
         handler_info, _mcd_dispatch_operation_handle_channels_cb,
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 191b3bb..76d0d8d 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1854,7 +1854,7 @@ _mcd_dispatcher_reinvoke_handler (McdDispatcher *dispatcher,
 
     _mcd_channel_set_status (request, MCD_CHANNEL_STATUS_HANDLER_INVOKED);
 
-    tp_cli_client_handler_call_handle_channels ((TpClient *) handler,
+    _mcd_client_proxy_handle_channels (handler,
         -1, account_path, connection_path, details,
         satisfied_requests, user_action_time, handler_info,
         reinvoke_handle_channels_cb, NULL, NULL, (GObject *) request);
-- 
1.5.6.5




More information about the telepathy-commits mailing list