# HG changeset patch # User Gary Kramlich # Date 1225617916 0 # Node ID b48f6d0ecdf7e82ca892d7c91cb31cad8689eb25 # Parent 53c27ca1bb71e7421c89323c12c6272f93152124 Hide PurpleBlist Added purple_blist_get_buddies function diff -r 53c27ca1bb71 -r b48f6d0ecdf7 ChangeLog.API --- 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 diff -r 53c27ca1bb71 -r b48f6d0ecdf7 libpurple/blist.c --- 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(); diff -r 53c27ca1bb71 -r b48f6d0ecdf7 libpurple/blist.h --- 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. *