empathy r2133 - trunk/libempathy



Author: xclaesse
Date: Fri Jan  9 16:12:20 2009
New Revision: 2133
URL: http://svn.gnome.org/viewvc/empathy?rev=2133&view=rev

Log:
Add an optional properties hash to the RequestData struct

Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>

Modified:
   trunk/libempathy/empathy-dispatcher.c

Modified: trunk/libempathy/empathy-dispatcher.c
==============================================================================
--- trunk/libempathy/empathy-dispatcher.c	(original)
+++ trunk/libempathy/empathy-dispatcher.c	Fri Jan  9 16:12:20 2009
@@ -90,6 +90,8 @@
   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 @@
 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 @@
   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 @@
 
   /* 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]