aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-06-21 23:19:49 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-06-21 23:19:49 +0800
commite0617b2fc06f59bfcfbd1f03a4364ba12294e718 (patch)
tree81603b1efcd16b7aa5e45b47a9c902804d2e439d /libempathy/empathy-contact-manager.c
parentb59ff7a94fab8dd50fae90d0fcc9c03b2de010ac (diff)
downloadgsoc2013-empathy-e0617b2fc06f59bfcfbd1f03a4364ba12294e718.tar
gsoc2013-empathy-e0617b2fc06f59bfcfbd1f03a4364ba12294e718.tar.gz
gsoc2013-empathy-e0617b2fc06f59bfcfbd1f03a4364ba12294e718.tar.bz2
gsoc2013-empathy-e0617b2fc06f59bfcfbd1f03a4364ba12294e718.tar.lz
gsoc2013-empathy-e0617b2fc06f59bfcfbd1f03a4364ba12294e718.tar.xz
gsoc2013-empathy-e0617b2fc06f59bfcfbd1f03a4364ba12294e718.tar.zst
gsoc2013-empathy-e0617b2fc06f59bfcfbd1f03a4364ba12294e718.zip
We show in our roster all contacts members and remote-pending of subscribe
2007-06-21 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-contact-dialogs.c: * libempathy-gtk/gossip-contact-list-store.c: * libempathy-gtk/gossip-contact-list-view.c: * libempathy/empathy-contact-manager.c: * libempathy/empathy-tp-contact-list.c: * libempathy/empathy-contact-list.c: * libempathy/empathy-contact-list.h: * libempathy/gossip-contact.c: We show in our roster all contacts members and remote-pending of subscribe list. Adding/Removing a contact only add/remove from subscribe list. Accept/Reject a contact in local-pending of publish list is done using _process_pending(). svn path=/trunk/; revision=164
Diffstat (limited to 'libempathy/empathy-contact-manager.c')
-rw-r--r--libempathy/empathy-contact-manager.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 5e5f09a43..7f8cdfed5 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -67,6 +67,9 @@ static void contact_manager_remove (EmpathyContactList
const gchar *message);
static GList * contact_manager_get_members (EmpathyContactList *manager);
static GList * contact_manager_get_local_pending (EmpathyContactList *manager);
+static void contact_manager_process_pending (EmpathyContactList *manager,
+ GossipContact *contact,
+ gboolean accept);
static void contact_manager_setup_foreach (McAccount *account,
EmpathyTpContactList *list,
EmpathyContactManager *manager);
@@ -129,6 +132,7 @@ contact_manager_iface_init (EmpathyContactListIface *iface)
iface->remove = contact_manager_remove;
iface->get_members = contact_manager_get_members;
iface->get_local_pending = contact_manager_get_local_pending;
+ iface->process_pending = contact_manager_process_pending;
}
static void
@@ -311,6 +315,28 @@ contact_manager_get_local_pending (EmpathyContactList *manager)
return pending;
}
+static void
+contact_manager_process_pending (EmpathyContactList *manager,
+ GossipContact *contact,
+ gboolean accept)
+{
+ EmpathyContactManagerPriv *priv;
+ EmpathyContactList *list;
+ McAccount *account;
+
+ g_return_if_fail (EMPATHY_IS_CONTACT_MANAGER (manager));
+ g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+
+ priv = GET_PRIV (manager);
+
+ account = gossip_contact_get_account (contact);
+ list = g_hash_table_lookup (priv->lists, account);
+
+ if (list) {
+ empathy_contact_list_process_pending (list, contact, accept);
+ }
+}
+
EmpathyTpContactList *
empathy_contact_manager_get_list (EmpathyContactManager *manager,
McAccount *account)