empathy r2164 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2164 - trunk/libempathy
- Date: Fri, 9 Jan 2009 16:14:08 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 9 16:14:07 2009
New Revision: 2164
URL: http://svn.gnome.org/viewvc/empathy?rev=2164&view=rev
Log:
Add code to request a streamed media channel
Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>
Modified:
trunk/libempathy/empathy-dispatcher.c
trunk/libempathy/empathy-dispatcher.h
Modified: trunk/libempathy/empathy-dispatcher.c
==============================================================================
--- trunk/libempathy/empathy-dispatcher.c (original)
+++ trunk/libempathy/empathy-dispatcher.c Fri Jan 9 16:14:07 2009
@@ -89,6 +89,7 @@
guint handle_type;
guint handle;
EmpathyContact *contact;
+
/* Properties to pass to the channel when requesting it */
GHashTable *request;
EmpathyDispatcherRequestCb *cb;
@@ -1417,21 +1418,6 @@
request_data, object_path, NULL, error);
}
-void
-empathy_dispatcher_call_with_contact ( EmpathyContact *contact,
- EmpathyDispatcherRequestCb *callback, gpointer user_data)
-{
- g_assert_not_reached ();
-}
-
-void
-empathy_dispatcher_call_with_contact_id (McAccount *account,
- const gchar *contact_id, EmpathyDispatcherRequestCb *callback,
- gpointer user_data)
-{
- g_assert_not_reached ();
-}
-
static void
dispatcher_request_channel (DispatcherRequestData *request_data)
{
@@ -1443,6 +1429,35 @@
request_data, NULL, G_OBJECT (request_data->dispatcher));
}
+void
+empathy_dispatcher_call_with_contact ( EmpathyContact *contact,
+ EmpathyDispatcherRequestCb *callback, gpointer user_data)
+{
+ EmpathyDispatcher *dispatcher = empathy_get_dispatcher();
+ EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher);
+ McAccount *account;
+ TpConnection *connection;
+ ConnectionData *cd;
+ DispatcherRequestData *request_data;
+
+ account = empathy_contact_get_account (contact);
+ connection = g_hash_table_lookup (priv->accounts, account);
+
+ g_assert (connection != NULL);
+ cd = g_hash_table_lookup (priv->connections, connection);
+ request_data = new_dispatcher_request_data (dispatcher, connection,
+ TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA, TP_HANDLE_TYPE_NONE, 0, NULL,
+ contact, callback, user_data);
+
+ cd->outstanding_requests = g_list_prepend
+ (cd->outstanding_requests, request_data);
+
+ dispatcher_request_channel (request_data);
+
+ g_object_unref (dispatcher);
+}
+
+
static void
dispatcher_chat_with_contact_cb (EmpathyContact *contact, gpointer user_data)
{
Modified: trunk/libempathy/empathy-dispatcher.h
==============================================================================
--- trunk/libempathy/empathy-dispatcher.h (original)
+++ trunk/libempathy/empathy-dispatcher.h Fri Jan 9 16:14:07 2009
@@ -71,9 +71,6 @@
/* Requesting 1 to 1 stream media channels */
void empathy_dispatcher_call_with_contact (EmpathyContact *contact,
EmpathyDispatcherRequestCb *callback, gpointer user_data);
-void empathy_dispatcher_call_with_contact_id (McAccount *account,
- const gchar *contact_id, EmpathyDispatcherRequestCb *callback,
- gpointer user_data);
/* Requesting 1 to 1 text channels */
void empathy_dispatcher_chat_with_contact_id (McAccount *account,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]