[empathy: 4/16] add timestamp arg to empathy_dispatcher_create_channel



commit 221c1186f4b34b585767ae5b6f8e705410bf60dc
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Sat Apr 24 17:23:02 2010 +0100

    add timestamp arg to empathy_dispatcher_create_channel

 libempathy/empathy-call-handler.c |    5 +++--
 libempathy/empathy-call-handler.h |    3 ++-
 libempathy/empathy-dispatcher.c   |    5 +++--
 libempathy/empathy-dispatcher.h   |    7 +++++--
 libempathy/empathy-ft-handler.c   |    3 ++-
 libempathy/empathy-tp-chat.c      |    2 +-
 src/empathy-call-window.c         |    3 ++-
 7 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index a49baed..ec8b055 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -487,7 +487,8 @@ empathy_call_handler_request_cb (EmpathyDispatchOperation *operation,
 }
 
 void
-empathy_call_handler_start_call (EmpathyCallHandler *handler)
+empathy_call_handler_start_call (EmpathyCallHandler *handler,
+    gint64 timestamp)
 {
 
   EmpathyCallHandlerPriv *priv = GET_PRIV (handler);
@@ -536,7 +537,7 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler)
   g_hash_table_insert (request, TP_IFACE_CHANNEL ".TargetHandle", value);
 
   empathy_dispatcher_create_channel (dispatcher, connection,
-    request, empathy_call_handler_request_cb, handler);
+    request, timestamp, empathy_call_handler_request_cb, handler);
 
   g_object_unref (dispatcher);
 }
diff --git a/libempathy/empathy-call-handler.h b/libempathy/empathy-call-handler.h
index 1f67fe5..f0be11b 100644
--- a/libempathy/empathy-call-handler.h
+++ b/libempathy/empathy-call-handler.h
@@ -70,7 +70,8 @@ EmpathyCallHandler * empathy_call_handler_new_for_contact_with_streams (
 EmpathyCallHandler * empathy_call_handler_new_for_channel (
   EmpathyTpCall *call);
 
-void empathy_call_handler_start_call (EmpathyCallHandler *handler);
+void empathy_call_handler_start_call (EmpathyCallHandler *handler,
+    gint64 timestamp);
 void empathy_call_handler_stop_call (EmpathyCallHandler *handler);
 
 gboolean empathy_call_handler_has_initial_video (EmpathyCallHandler *handler);
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index a8bc258..70c56b6 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -1662,6 +1662,7 @@ void
 empathy_dispatcher_create_channel (EmpathyDispatcher *self,
                                    TpConnection *connection,
                                    GHashTable *request,
+                                   gint64 timestamp,
                                    EmpathyDispatcherRequestCb *callback,
                                    gpointer user_data)
 {
@@ -1690,8 +1691,8 @@ empathy_dispatcher_create_channel (EmpathyDispatcher *self,
   handle = tp_asv_get_uint32 (request, TP_IFACE_CHANNEL ".TargetHandle", NULL);
 
   request_data  = new_dispatcher_request_data (self, connection,
-    channel_type, handle_type, handle, request,
-    EMPATHY_DISPATCHER_NON_USER_ACTION, NULL, callback, user_data);
+    channel_type, handle_type, handle, request, timestamp,
+    NULL, callback, user_data);
 
   connection_data->outstanding_requests = g_list_prepend
     (connection_data->outstanding_requests, request_data);
diff --git a/libempathy/empathy-dispatcher.h b/libempathy/empathy-dispatcher.h
index 846fdef..3173072 100644
--- a/libempathy/empathy-dispatcher.h
+++ b/libempathy/empathy-dispatcher.h
@@ -67,8 +67,11 @@ typedef void (EmpathyDispatcherFindChannelClassCb) (
 GType empathy_dispatcher_get_type (void) G_GNUC_CONST;
 
 void empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher,
-  TpConnection *connection, GHashTable *request,
-  EmpathyDispatcherRequestCb *callback, gpointer user_data);
+  TpConnection *connection,
+  GHashTable *request,
+  gint64 timestamp,
+  EmpathyDispatcherRequestCb *callback,
+  gpointer user_data);
 
 /* Requesting 1 to 1 text channels */
 void empathy_dispatcher_chat_with_contact_id (TpConnection *connection,
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index ff3f932..bbc99f6 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -757,7 +757,8 @@ ft_handler_push_to_dispatcher (EmpathyFTHandler *handler)
 
   /* I want to own a reference to the request, and destroy it later */
   empathy_dispatcher_create_channel (priv->dispatcher, connection,
-      g_hash_table_ref (priv->request), ft_handler_create_channel_cb, handler);
+      g_hash_table_ref (priv->request), EMPATHY_DISPATCHER_NON_USER_ACTION,
+      ft_handler_create_channel_cb, handler);
 }
 
 static void
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 8358274..cad014d 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -160,7 +160,7 @@ tp_chat_add (EmpathyContactList *list,
 		 * valid.
 		 * props now belongs to EmpathyDispatcher, don't free it */
 		empathy_dispatcher_create_channel (dispatcher, connection,
-				props, NULL, NULL);
+				props, EMPATHY_DISPATCHER_NON_USER_ACTION, NULL, NULL);
 
 		g_object_unref (dispatcher);
 	} else {
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 943e2cd..153da46 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2387,7 +2387,8 @@ start_call (EmpathyCallWindow *self)
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
 
   priv->call_started = TRUE;
-  empathy_call_handler_start_call (priv->handler);
+  empathy_call_handler_start_call (priv->handler,
+      gtk_get_current_event_time ());
 
   if (empathy_call_handler_has_initial_video (priv->handler))
     {



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