aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 21:08:39 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 21:08:39 +0800
commitfabcd2ec298f6773112c6fad57238c6f7bc2d77e (patch)
tree0e4e55a3727f983f238f824c139b5548e3088d80 /libempathy
parent17624f70285d74ed77f27d62f452095589512310 (diff)
downloadgsoc2013-empathy-fabcd2ec298f6773112c6fad57238c6f7bc2d77e.tar
gsoc2013-empathy-fabcd2ec298f6773112c6fad57238c6f7bc2d77e.tar.gz
gsoc2013-empathy-fabcd2ec298f6773112c6fad57238c6f7bc2d77e.tar.bz2
gsoc2013-empathy-fabcd2ec298f6773112c6fad57238c6f7bc2d77e.tar.lz
gsoc2013-empathy-fabcd2ec298f6773112c6fad57238c6f7bc2d77e.tar.xz
gsoc2013-empathy-fabcd2ec298f6773112c6fad57238c6f7bc2d77e.tar.zst
gsoc2013-empathy-fabcd2ec298f6773112c6fad57238c6f7bc2d77e.zip
re-implement empathy_dispatcher_chat_with_contact using empathy_dispatcher_chat_with_contact_id
We don't use the callback arg anyway.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-dispatcher.c46
-rw-r--r--libempathy/empathy-dispatcher.h4
2 files changed, 5 insertions, 45 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index ae8cdb119..e5abfde8b 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -1225,49 +1225,11 @@ dispatcher_request_channel (DispatcherRequestData *request_data)
void
empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
- gint64 timestamp,
- EmpathyDispatcherRequestCb *callback,
- gpointer user_data)
+ gint64 timestamp)
{
- EmpathyDispatcher *self;
- EmpathyDispatcherPriv *priv;
- TpConnection *connection;
- ConnectionData *connection_data;
- DispatcherRequestData *request_data;
-
- g_return_if_fail (EMPATHY_IS_CONTACT (contact));
-
- self = empathy_dispatcher_dup_singleton ();
- priv = GET_PRIV (self);
-
- connection = empathy_contact_get_connection (contact);
- connection_data = g_hash_table_lookup (priv->connections, connection);
- if (connection_data == NULL)
- {
- /* Connection has been invalidated */
- if (callback != NULL)
- {
- GError error = { TP_DBUS_ERRORS, TP_DBUS_ERROR_PROXY_UNREFERENCED,
- "Connection has been invalidated" };
- callback (NULL, &error, user_data);
- }
- goto out;
- }
-
- /* The contact handle might not be known yet */
- request_data = new_dispatcher_request_data (self, connection,
- TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_CONTACT,
- empathy_contact_get_handle (contact), NULL, timestamp, contact,
- callback, user_data);
- request_data->should_ensure = TRUE;
-
- connection_data->outstanding_requests = g_list_prepend
- (connection_data->outstanding_requests, request_data);
-
- dispatcher_request_channel (request_data);
-
-out:
- g_object_unref (self);
+ empathy_dispatcher_chat_with_contact_id (
+ empathy_contact_get_account (contact), empathy_contact_get_id (contact),
+ timestamp);
}
static void
diff --git a/libempathy/empathy-dispatcher.h b/libempathy/empathy-dispatcher.h
index 1fa6387f7..918a4286a 100644
--- a/libempathy/empathy-dispatcher.h
+++ b/libempathy/empathy-dispatcher.h
@@ -80,9 +80,7 @@ void empathy_dispatcher_chat_with_contact_id (TpAccount *account,
gint64 timestamp);
void empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
- gint64 timestamp,
- EmpathyDispatcherRequestCb *callback,
- gpointer user_data);
+ gint64 timestamp);
/* Request a muc channel */
void empathy_dispatcher_join_muc (TpConnection *connection,