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-call.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-call.c')
-rw-r--r-- | libempathy/empathy-tp-call.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index 2cad31c25..a5c0003c5 100644 --- a/libempathy/empathy-tp-call.c +++ b/libempathy/empathy-tp-call.c @@ -255,13 +255,20 @@ tp_call_request_streams_for_capabilities (EmpathyTpCall *call, static void tp_call_got_contact_cb (EmpathyTpContactFactory *factory, - GList *contacts, - gpointer user_data, - GObject *call) + EmpathyContact *contact, + const GError *error, + gpointer user_data, + GObject *call) { EmpathyTpCallPriv *priv = GET_PRIV (call); - priv->contact = g_object_ref (contacts->data); + if (error) + { + DEBUG ("Error: %s", error->message); + return; + } + + priv->contact = g_object_ref (contact); priv->is_incoming = TRUE; priv->status = EMPATHY_TP_CALL_STATUS_PENDING; g_object_notify (G_OBJECT (call), "is-incoming"); @@ -292,9 +299,8 @@ tp_call_update_status (EmpathyTpCall *call) /* We found the remote contact */ connection = tp_channel_borrow_connection (priv->channel); factory = empathy_tp_contact_factory_dup_singleton (connection); - empathy_tp_contact_factory_get_from_handles (factory, 1, - &iter.element, tp_call_got_contact_cb, NULL, NULL, - G_OBJECT (call)); + empathy_tp_contact_factory_get_from_handle (factory, iter.element, + tp_call_got_contact_cb, NULL, NULL, G_OBJECT (call)); g_object_unref (factory); } |