# HG changeset patch # User Ethan Blanton # Date 1141957256 0 # Node ID 51c6405049a3aa6a582be9ef82332846667e9795 # Parent bd77abf05a12d29d00fc3af718529ca4a0e31510 [gaim-migrate @ 15860] This provides a way to get the root node of the buddy list, as previously the only way was to grab gaimbuddylist->root directly; this is a problem if you want to traverse the buddy list via, e.g., D-bus. committer: Tailor Script diff -r bd77abf05a12 -r 51c6405049a3 src/blist.c --- a/src/blist.c Thu Mar 09 21:03:13 2006 +0000 +++ b/src/blist.c Fri Mar 10 02:20:56 2006 +0000 @@ -682,6 +682,12 @@ return gaimbuddylist; } +GaimBlistNode * +gaim_blist_get_root() +{ + return gaimbuddylist ? gaimbuddylist->root : NULL; +} + void gaim_blist_show() { GaimBlistUiOps *ops = gaimbuddylist->ui_ops; diff -r bd77abf05a12 -r 51c6405049a3 src/blist.h --- a/src/blist.h Thu Mar 09 21:03:13 2006 +0000 +++ b/src/blist.h Fri Mar 10 02:20:56 2006 +0000 @@ -213,6 +213,13 @@ GaimBuddyList *gaim_get_blist(void); /** + * Returns the root node of the main buddy list. + * + * @return The root node. + */ +GaimBlistNode *gaim_blist_get_root(void); + +/** * Returns the next node of a given node. This function is to be used to iterate * over the tree returned by gaim_get_blist. *