aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-10 22:30:04 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-31 16:30:27 +0800
commit86a7a528d7b54abf6335a023b3afc5099b3eea4f (patch)
tree6c8f171f00e2e294c7440ffd8dcad8d524f51b6f
parent5d6902cc05f95832e06afd88b6d581be68c1a79f (diff)
downloadgsoc2013-empathy-86a7a528d7b54abf6335a023b3afc5099b3eea4f.tar
gsoc2013-empathy-86a7a528d7b54abf6335a023b3afc5099b3eea4f.tar.gz
gsoc2013-empathy-86a7a528d7b54abf6335a023b3afc5099b3eea4f.tar.bz2
gsoc2013-empathy-86a7a528d7b54abf6335a023b3afc5099b3eea4f.tar.lz
gsoc2013-empathy-86a7a528d7b54abf6335a023b3afc5099b3eea4f.tar.xz
gsoc2013-empathy-86a7a528d7b54abf6335a023b3afc5099b3eea4f.tar.zst
gsoc2013-empathy-86a7a528d7b54abf6335a023b3afc5099b3eea4f.zip
tp-contact-list: Improve hash table descriptions
-rw-r--r--libempathy/empathy-contact-manager.c2
-rw-r--r--libempathy/empathy-tp-contact-list.c21
2 files changed, 19 insertions, 4 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 61c6ad316..95f5623b9 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -40,6 +40,8 @@
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyContactManager)
typedef struct {
+ /* Owned (TpConnection *) => Owned (TpContactList *)
+ The contact list associated with each connected connection */
GHashTable *lists;
TpAccountManager *account_manager;
EmpathyContactMonitor *contact_monitor;
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index 95ec3bea2..d595745c7 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -47,10 +47,23 @@ typedef struct {
TpChannel *publish;
TpChannel *subscribe;
TpChannel *stored;
- GHashTable *members; /* handle -> EmpathyContact */
- GHashTable *pendings; /* handle -> EmpathyContact */
- GHashTable *groups; /* group name -> TpChannel */
- GHashTable *add_to_group; /* group name -> GArray of handles */
+ /* contact handle (TpHandle) => reffed (EmpathyContact *)
+ *
+ * Contacts which are members or remote-pending in the subscribe channel:
+ * we are receiving their presence or we asked to receive it. */
+ GHashTable *members;
+ /* contact handle (TpHandle) => reffed (EmpathyContact *)
+ *
+ * Contacts which are local-pending in the publish channel but are NOT in
+ * the members hash table: they asked to receive our presence and we don't
+ * receive theirs or asked to.
+ * That's basically the contacts which asked to add us to their contact
+ * list and we didn't answer it. */
+ GHashTable *pendings;
+ /* group name: borrowed (const gchar *) => reffed (TpChannel *) */
+ GHashTable *groups;
+ /* group name: owned (gchar *) => owned GArray of TpHandle */
+ GHashTable *add_to_group;
EmpathyContactListFlags flags;