diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-03-04 18:41:28 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-04-22 18:21:13 +0800 |
commit | 9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5 (patch) | |
tree | 78925c31878880bc82163cb02e9e38e7fe0679cf /libempathy/empathy-dispatcher.c | |
parent | dcd115814f40de200c3cf4da6693de84489592ac (diff) | |
download | gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.gz gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.bz2 gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.lz gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.xz gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.zst gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.zip |
Change EmpathyTpContactFactory API to look more like TpConnection. Add function to get only one contact from
id/handle.
Diffstat (limited to 'libempathy/empathy-dispatcher.c')
-rw-r--r-- | libempathy/empathy-dispatcher.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 8ce7630f2..5245bd289 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -1146,13 +1146,23 @@ typedef struct static void dispatcher_chat_with_contact_id_cb (EmpathyTpContactFactory *factory, - GList *contacts, + EmpathyContact *contact, + const GError *error, gpointer user_data, GObject *weak_object) { ChatWithContactIdData *data = user_data; - empathy_dispatcher_chat_with_contact (contacts->data, data->callback, data->user_data); + if (error) + { + /* FIXME: Should call data->callback with the error */ + DEBUG ("Error: %s", error->message); + } + else + { + empathy_dispatcher_chat_with_contact (contact, data->callback, data->user_data); + } + g_object_unref (data->dispatcher); g_slice_free (ChatWithContactIdData, data); } @@ -1176,7 +1186,7 @@ empathy_dispatcher_chat_with_contact_id (TpConnection *connection, data->dispatcher = dispatcher; data->callback = callback; data->user_data = user_data; - empathy_tp_contact_factory_get_from_ids (factory, 1, &contact_id, + empathy_tp_contact_factory_get_from_id (factory, contact_id, dispatcher_chat_with_contact_id_cb, data, NULL, NULL); g_object_unref (factory); |