[empathy] tp-contact-list: Improve hash table descriptions



commit 86a7a528d7b54abf6335a023b3afc5099b3eea4f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Dec 10 14:30:04 2009 +0000

    tp-contact-list: Improve hash table descriptions

 libempathy/empathy-contact-manager.c |    2 ++
 libempathy/empathy-tp-contact-list.c |   21 +++++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 61c6ad3..95f5623 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 95ec3be..d595745 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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]