aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:12:20 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:12:20 +0800
commit195b8e4938c331486beba6f14c44ad738a814565 (patch)
tree83787adfaa7c2ce3a2cb1d8cc2783b84df923067 /libempathy
parentbd22bdcc0c16b51e460650ce70bac49065de9c29 (diff)
downloadgsoc2013-empathy-195b8e4938c331486beba6f14c44ad738a814565.tar
gsoc2013-empathy-195b8e4938c331486beba6f14c44ad738a814565.tar.gz
gsoc2013-empathy-195b8e4938c331486beba6f14c44ad738a814565.tar.bz2
gsoc2013-empathy-195b8e4938c331486beba6f14c44ad738a814565.tar.lz
gsoc2013-empathy-195b8e4938c331486beba6f14c44ad738a814565.tar.xz
gsoc2013-empathy-195b8e4938c331486beba6f14c44ad738a814565.tar.zst
gsoc2013-empathy-195b8e4938c331486beba6f14c44ad738a814565.zip
Add an optional properties hash to the RequestData struct
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2133
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-dispatcher.c13
1 files changed, 9 insertions, 4 deletions
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);