From 195b8e4938c331486beba6f14c44ad738a814565 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 9 Jan 2009 16:12:20 +0000 Subject: Add an optional properties hash to the RequestData struct Signed-off-by: Sjoerd Simons svn path=/trunk/; revision=2133 --- libempathy/empathy-dispatcher.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 441da69db..ffc677abe 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -90,6 +90,8 @@ typedef struct { guint handle_type; guint handle; EmpathyContact *contact; + /* Properties to pass to the channel when requesting it */ + GHashTable *properties; EmpathyDispatcherRequestCb *cb; gpointer user_data; gpointer *request_data; @@ -136,8 +138,8 @@ free_dispatch_data (DispatchData *data) static DispatcherRequestData * new_dispatcher_request_data (EmpathyDispatcher *dispatcher, TpConnection *connection, const gchar *channel_type, guint handle_type, - guint handle, EmpathyContact *contact, - EmpathyDispatcherRequestCb *cb, gpointer user_data) + guint handle, GHashTable *properties, + EmpathyContact *contact, EmpathyDispatcherRequestCb *cb, gpointer user_data) { DispatcherRequestData *result = g_slice_new0 (DispatcherRequestData); @@ -165,6 +167,9 @@ free_dispatcher_request_data (DispatcherRequestData *r) if (r->contact != NULL) g_object_unref (r->contact); + if (r->properties != NULL) + g_hash_table_unref (r->properties); + g_slice_free (DispatcherRequestData, r); } @@ -1435,8 +1440,8 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact, /* The contact handle might not be known yet */ request_data = new_dispatcher_request_data (dispatcher, connection, - TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_CONTACT, 0, contact, callback, - user_data); + TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_CONTACT, 0, NULL, + contact, callback, user_data); connection_data->outstanding_requests = g_list_prepend (connection_data->outstanding_requests, request_data); -- cgit v1.2.3