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-tp-file.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-tp-file.c')
-rw-r--r-- | libempathy/empathy-tp-file.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c index bcd35a257..913c27bbf 100644 --- a/libempathy/empathy-tp-file.c +++ b/libempathy/empathy-tp-file.c @@ -508,13 +508,21 @@ tp_file_check_if_ready (EmpathyTpFile *tp_file) static void tp_file_got_contact_cb (EmpathyTpContactFactory *factory, - GList *contacts, + EmpathyContact *contact, + const GError *error, gpointer user_data, GObject *weak_object) { EmpathyTpFile *tp_file = EMPATHY_TP_FILE (weak_object); - tp_file->priv->contact = g_object_ref (contacts->data); + if (error) + { + DEBUG ("Error: %s", error->message); + empathy_tp_file_close (tp_file); + return; + } + + tp_file->priv->contact = g_object_ref (contact); tp_file_check_if_ready (tp_file); } @@ -633,8 +641,8 @@ tp_file_constructor (GType type, tp_file_get_all_cb, NULL, NULL, file_obj); handle = tp_channel_get_handle (tp_file->priv->channel, NULL); - empathy_tp_contact_factory_get_from_handles (tp_file->priv->factory, - 1, &handle, tp_file_got_contact_cb, NULL, NULL, file_obj); + empathy_tp_contact_factory_get_from_handle (tp_file->priv->factory, + handle, tp_file_got_contact_cb, NULL, NULL, file_obj); return file_obj; } |