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-contact-list.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-contact-list.c')
-rw-r--r-- | libempathy/empathy-tp-contact-list.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 636f2ed3f..a0b40b026 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -334,15 +334,24 @@ tp_contact_list_group_add (EmpathyTpContactList *list, static void tp_contact_list_got_added_members_cb (EmpathyTpContactFactory *factory, - GList *contacts, + guint n_contacts, + EmpathyContact * const * contacts, + guint n_failed, + const TpHandle *failed, + const GError *error, gpointer user_data, GObject *list) { EmpathyTpContactListPriv *priv = GET_PRIV (list); - GList *l; + guint i; - for (l = contacts; l; l = l->next) { - EmpathyContact *contact = l->data; + if (error) { + DEBUG ("Error: %s", error->message); + return; + } + + for (i = 0; i < n_contacts; i++) { + EmpathyContact *contact = contacts[i]; TpHandle handle; handle = empathy_contact_get_handle (contact); @@ -367,15 +376,24 @@ tp_contact_list_got_added_members_cb (EmpathyTpContactFactory *factory, static void tp_contact_list_got_local_pending_cb (EmpathyTpContactFactory *factory, - GList *contacts, - gpointer info, + guint n_contacts, + EmpathyContact * const * contacts, + guint n_failed, + const TpHandle *failed, + const GError *error, + gpointer user_data, GObject *list) { EmpathyTpContactListPriv *priv = GET_PRIV (list); - GList *l; + guint i; + + if (error) { + DEBUG ("Error: %s", error->message); + return; + } - for (l = contacts; l; l = l->next) { - EmpathyContact *contact = l->data; + for (i = 0; i < n_contacts; i++) { + EmpathyContact *contact = contacts[i]; TpHandle handle; const gchar *message; TpChannelGroupChangeReason reason; |