changeset 25806:b48f6d0ecdf7

Hide PurpleBlist Added purple_blist_get_buddies function
author Gary Kramlich <grim@reaperworld.com>
date Sun, 02 Nov 2008 09:25:16 +0000
parents 53c27ca1bb71
children e35115192593
files ChangeLog.API libpurple/blist.c libpurple/blist.h
diffstat 3 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Sat Nov 01 13:48:25 2008 +0000
+++ b/ChangeLog.API	Sun Nov 02 09:25:16 2008 +0000
@@ -8,6 +8,7 @@
 		* purple_connection_get_protocol_data
 		* purple_connection_set_protocol_data
 		* purple_buddy_get_local_buddy_alias
+		* purple_blist_get_buddies
 
 		Deprecated:
 		* purple_buddy_get_local_alias
--- a/libpurple/blist.c	Sat Nov 01 13:48:25 2008 +0000
+++ b/libpurple/blist.c	Sun Nov 02 09:25:16 2008 +0000
@@ -699,6 +699,12 @@
 	return purplebuddylist ? purplebuddylist->root : NULL;
 }
 
+GHashTable *
+purple_blist_get_buddies()
+{
+	return purplebuddylist ? purplebuddylist->buddies : NULL;
+}
+
 void purple_blist_show()
 {
 	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
--- a/libpurple/blist.h	Sat Nov 01 13:48:25 2008 +0000
+++ b/libpurple/blist.h	Sun Nov 02 09:25:16 2008 +0000
@@ -156,9 +156,6 @@
 	PurpleAccount *account; /**< The account this chat is attached to */
 };
 
-#endif /* PURPLE_HIDE_STRUCTS && PURPLE_BLIST_STRUCTS */
-
-
 /**
  * The Buddy List
  */
@@ -168,6 +165,8 @@
 	void *ui_data;                /**< UI-specific data. */
 };
 
+#endif /* PURPLE_HIDE_STRUCTS && PURPLE_BLIST_STRUCTS */
+
 /**
  * Buddy list UI operations.
  *
@@ -236,6 +235,14 @@
 PurpleBlistNode *purple_blist_get_root(void);
 
 /**
+ * Returns the hash table of every buddy in the list.
+ *
+ * @return The hash table of every buddy in the list.
+ * @since 2.6.0
+ */
+GHashTable *purple_blist_get_buddies(void);
+
+/**
  * Returns the next node of a given node. This function is to be used to iterate
  * over the tree returned by purple_get_blist.
  *