gobjectification: 88410be6: Got the methods for BlistNodeClass, dele...

aluink at soc.pidgin.im aluink at soc.pidgin.im
Wed Jul 15 23:05:34 EDT 2009


-----------------------------------------------------------------
Revision: 88410be64b652329905cc1f5d103ff8ef8860f23
Ancestor: b0ea2094db080f0a23f16835b440058284b5bfcf
Author: aluink at soc.pidgin.im
Date: 2009-07-16T02:32:14
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/88410be64b652329905cc1f5d103ff8ef8860f23

Modified files:
        libpurple/account.c libpurple/blist-node.c
        libpurple/blist-node.h libpurple/blist.c
        libpurple/buddyicon.c libpurple/contact.c libpurple/group.c
        libpurple/log.c libpurple/plugins/autoaccept.c
        libpurple/protocols/bonjour/bonjour.c
        libpurple/protocols/jabber/jabber.c
        libpurple/protocols/novell/novell.c
        libpurple/protocols/qq/group_internal.c
        libpurple/protocols/zephyr/zephyr.c

ChangeLog: 

Got the methods for BlistNodeClass, delegators, and default fpointers

-------------- next part --------------
============================================================
--- libpurple/account.c	2e49ab500a8415b328d646121c936e088aa2c1ea
+++ libpurple/account.c	a1a901ffe8bb986e8dbb26d71703643ba4bd5ed3
@@ -2543,19 +2543,19 @@ purple_accounts_delete(PurpleAccount *ac
 	/* Remove this account's buddies */
 	for (gnode = purple_blist_get_root();
 	     gnode != NULL;
-		 gnode = purple_blist_node_get_sibling_next(gnode))
+		 gnode = purple_blist_node_next(gnode))
 	{
 		if (!PURPLE_IS_GROUP(gnode))
 			continue;
 
-		cnode = purple_blist_node_get_first_child(gnode);
+		cnode = purple_blist_node_first_child(gnode);
 		while (cnode) {
-			PurpleBlistNode *cnode_next = purple_blist_node_get_sibling_next(cnode);
+			PurpleBlistNode *cnode_next = purple_blist_node_next(cnode);
 
 			if(PURPLE_IS_CONTACT(cnode)) {
-				bnode = purple_blist_node_get_first_child(cnode);
+				bnode = purple_blist_node_first_child(cnode);
 				while (bnode) {
-					PurpleBlistNode *bnode_next = purple_blist_node_get_sibling_next(bnode);
+					PurpleBlistNode *bnode_next = purple_blist_node_next(bnode);
 
 					if (PURPLE_IS_BUDDY(bnode)) {
 						PurpleBuddy *b = (PurpleBuddy *)bnode;
============================================================
--- libpurple/blist-node.c	f114f0ebb7bbe47a97b4588e5e72cdf931362961
+++ libpurple/blist-node.c	3a576af25217e09b66210c057caf55fb3894db67
@@ -98,7 +98,7 @@ static PurpleBlistNode *get_next_node(Pu
 	return get_next_node(node->parent, FALSE);
 }
 
-PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline)
+PurpleBlistNode *purple_blist_node_next_online(PurpleBlistNode *node, gboolean offline)
 {
 	PurpleBlistNode *ret = node;
 
@@ -113,26 +113,6 @@ PurpleBlistNode *purple_blist_node_next(
 	return ret;
 }
 
-PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node)
-{
-	return node ? node->parent : NULL;
-}
-
-PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node)
-{
-	return node ? node->child : NULL;
-}
-
-PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node)
-{
-	return node? node->next : NULL;
-}
-
-PurpleBlistNode *purple_blist_node_get_sibling_prev(PurpleBlistNode *node)
-{
-	return node? node->prev : NULL;
-}
-
 void *
 purple_blist_node_get_ui_data(const PurpleBlistNode *node)
 {
@@ -435,18 +415,7 @@ purple_blist_node_contains(PurpleBlistNo
 {
 	return node->parent == parent;
 }
-void
-purple_blist_node_add_child(PurpleBlistNode *parent, PurpleBlistNode *child)
-{
-	PurpleBlistNodeClass *klass;
 
-	g_return_if_fail(PURPLE_IS_BLIST_NODE(parent));
-	g_return_if_fail(PURPLE_IS_BLIST_NODE(child));
-
-	klass = PURPLE_GET_BLIST_NODE_CLASS(parent);
-	if(klass && klass->add_child)
-		klass->add_sibling(parent, child);
-}
 static void
 purple_blist_node_real_add_child(PurpleBlistNode *parent, PurpleBlistNode *child)
 {
@@ -471,20 +440,7 @@ purple_blist_node_real_add_sibling(Purpl
 	location->next = child;
 }
 
-void
-purple_blist_node_add_sibling(PurpleBlistNode *child, PurpleBlistNode *location)
-{
-	PurpleBlistNodeClass *klass;
 
-	g_return_if_fail(PURPLE_IS_BLIST_NODE(child));
-	g_return_if_fail(PURPLE_IS_BLIST_NODE(location));
-	g_return_if_fail(PURPLE_IS_BLIST_NODE(location->parent));
-
-	klass = PURPLE_GET_BLIST_NODE_CLASS(location->parent);
-	if(klass && klass->add_sibling)
-		klass->add_sibling(child, location);
-}
-
 static void
 purple_blist_node_real_remove(PurpleBlistNode *child)
 {
@@ -500,7 +456,79 @@ purple_blist_node_real_remove(PurpleBlis
 	purple_blist_node_strip(child);
 }
 
+static PurpleBlistNode *
+purple_blist_node_real_first_child(PurpleBlistNode *parent)
+{
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(parent), NULL);
+	return parent->child;
+}
+
+static PurpleBlistNode *
+purple_blist_node_real_parent(PurpleBlistNode *child)
+{
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(child), NULL);
+	return child->parent;
+}
+
+static PurpleBlistNode *
+purple_blist_node_real_next(PurpleBlistNode *node)
+{
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(node), NULL);
+	return node->next;
+}
+
+static PurpleBlistNode *
+purple_blist_node_real_prev(PurpleBlistNode *node)
+{
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(node), NULL);
+	return node->prev;
+}
+
 void
+purple_blist_node_strip(PurpleBlistNode *node)
+{
+	g_return_if_fail(node);
+	node->parent = node->child = node->next = node->prev = NULL;
+}
+
+gboolean
+purple_blist_node_is_empty(PurpleBlistNode *node)
+{
+	return node->child != NULL;
+}
+
+/****************/
+/*  Delegators  */
+/****************/
+
+void
+purple_blist_node_add_child(PurpleBlistNode *parent, PurpleBlistNode *child)
+{
+	PurpleBlistNodeClass *klass;
+
+	g_return_if_fail(PURPLE_IS_BLIST_NODE(parent));
+	g_return_if_fail(PURPLE_IS_BLIST_NODE(child));
+
+	klass = PURPLE_GET_BLIST_NODE_CLASS(parent);
+	if(klass && klass->add_child)
+		klass->add_sibling(parent, child);
+}
+
+void
+purple_blist_node_add_sibling(PurpleBlistNode *child, PurpleBlistNode *location)
+{
+	PurpleBlistNodeClass *klass;
+
+	g_return_if_fail(PURPLE_IS_BLIST_NODE(child));
+	g_return_if_fail(PURPLE_IS_BLIST_NODE(location));
+	g_return_if_fail(PURPLE_IS_BLIST_NODE(location->parent));
+
+	klass = PURPLE_GET_BLIST_NODE_CLASS(location->parent);
+	if(klass && klass->add_sibling)
+		klass->add_sibling(child, location);
+}
+
+void
 purple_blist_node_remove(PurpleBlistNode *child)
 {
 	PurpleBlistNodeClass *klass;
@@ -513,19 +541,54 @@ purple_blist_node_remove(PurpleBlistNode
 	}
 }
 
-void
-purple_blist_node_strip(PurpleBlistNode *node)
+PurpleBlistNode *
+purple_blist_node_first_child(PurpleBlistNode *parent)
 {
-	g_return_if_fail(node);
-	node->parent = node->child = node->next = node->prev = NULL;
+	PurpleBlistNodeClass *klass;
+
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(parent), NULL);
+	klass = PURPLE_GET_BLIST_NODE_CLASS(parent);
+	if(klass && klass->first_child)
+		return klass->first_child(parent);
+	return NULL;
 }
 
-gboolean
-purple_blist_node_is_empty(PurpleBlistNode *node)
+PurpleBlistNode *
+purple_blist_node_parent(PurpleBlistNode *child)
 {
-	return node->child != NULL;
+	PurpleBlistNodeClass *klass;
+
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(child), NULL);
+	klass = PURPLE_GET_BLIST_NODE_CLASS(child);
+	if(klass && klass->parent)
+		return klass->parent(child);
+	return NULL;
 }
 
+PurpleBlistNode *
+purple_blist_node_next(PurpleBlistNode *node)
+{
+	PurpleBlistNodeClass *klass;
+
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(node), NULL);
+	klass = PURPLE_GET_BLIST_NODE_CLASS(node);
+	if(klass && klass->next)
+		return klass->next(node);
+	return NULL;
+}
+
+PurpleBlistNode *
+purple_blist_node_prev(PurpleBlistNode *node)
+{
+	PurpleBlistNodeClass *klass;
+
+	g_return_val_if_fail(PURPLE_IS_BLIST_NODE(node), NULL);
+	klass = PURPLE_GET_BLIST_NODE_CLASS(node);
+	if(klass && klass->prev)
+		return klass->prev(node);
+	return NULL;
+}
+
 /******************/
 /*  GObject Code  */
 /******************/
@@ -579,6 +642,10 @@ purple_blist_node_class_init(PurpleBlist
 	klass->add_child = purple_blist_node_real_add_child;
 	klass->add_sibling = purple_blist_node_real_add_sibling;
 	klass->remove = purple_blist_node_real_remove;
+	klass->first_child = purple_blist_node_real_first_child;
+	klass->parent = purple_blist_node_real_parent;
+	klass->next = purple_blist_node_real_next;
+	klass->prev = purple_blist_node_real_prev;
 
 	purple_signal_register( purple_blist_node_handle(),
 													"group-removed",
============================================================
--- libpurple/blist-node.h	19aa20eb3e8976efc482b2767b9947b3d1b12977
+++ libpurple/blist-node.h	251d3842c905b054d6d9353fb448494727663832
@@ -75,11 +75,15 @@ struct _PurpleBlistNodeClass {
 };
 
 struct _PurpleBlistNodeClass {
-	PurpleObjectClass parent;
+	PurpleObjectClass _parent;
 
 	void (*add_sibling)(PurpleBlistNode *child, PurpleBlistNode *location);
 	void (*add_child)(PurpleBlistNode *parent, PurpleBlistNode *child);
 	void (*remove)(PurpleBlistNode *child);
+	PurpleBlistNode *(*first_child)(PurpleBlistNode *parent);
+	PurpleBlistNode *(*parent)(PurpleBlistNode *child);
+	PurpleBlistNode *(*next)(PurpleBlistNode *node);
+	PurpleBlistNode *(*prev)(PurpleBlistNode *node);
 
 	void (*purple_reserved1)(void);
 	void (*purple_reserved2)(void);
@@ -99,7 +103,7 @@ struct _PurpleBlistNodeClass {
  * @see purple_blist_node_get_sibling_next
  * @see purple_blist_node_get_sibling_prev
  */
-PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline);
+PurpleBlistNode *purple_blist_node_next_online(PurpleBlistNode *node, gboolean offline);
 
 /**
  * Returns the parent node of a given node.
@@ -112,7 +116,7 @@ PurpleBlistNode *purple_blist_node_next(
  * @see purple_blist_node_get_sibling_prev
  * @see purple_blist_node_next
  */
-PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node);
+PurpleBlistNode *purple_blist_node_parent(PurpleBlistNode *node);
 
 /**
  * Returns the the first child node of a given node.
@@ -125,7 +129,7 @@ PurpleBlistNode *purple_blist_node_get_p
  * @see purple_blist_node_get_sibling_prev
  * @see purple_blist_node_next
  */
-PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node);
+PurpleBlistNode *purple_blist_node_first_child(PurpleBlistNode *node);
 
 /**
  * Returns the sibling node of a given node.
@@ -138,7 +142,7 @@ PurpleBlistNode *purple_blist_node_get_f
  * @see purple_blist_node_get_sibling_prev
  * @see purple_blist_node_next
  */
-PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node);
+PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node);
 
 /**
  * Returns the previous sibling node of a given node.
@@ -151,10 +155,10 @@ PurpleBlistNode *purple_blist_node_get_s
  * @see purple_blist_node_get_sibling_next
  * @see purple_blist_node_next
  */
-PurpleBlistNode *purple_blist_node_get_sibling_prev(PurpleBlistNode *node);
+PurpleBlistNode *purple_blist_node_prev(PurpleBlistNode *node);
 
 /**
- * Check whether a node is contained in a parent node. Simply checks if the node's parent is the other node.
+ * Check whether a node is contained in a parent node.
  *
  * @param parent The containing node
  * @param node The node to check with.
============================================================
--- libpurple/blist.c	4aa7c9f3a367c6f8d5523a0a53937804adc1f32c
+++ libpurple/blist.c	635658623a50d0d0de2eada54b96e2fe66a5e5ef
@@ -72,7 +72,7 @@ static void purple_blist_buddies_cache_a
 
 static void purple_blist_buddies_cache_add_account(PurpleAccount *account);
 
-PurpleBuddyList *
+static PurpleBuddyList *
 purple_blist_get_list()
 {
 	static PurpleBuddyList *list = NULL;
@@ -213,7 +213,7 @@ blist_to_xmlnode(void)
 
 	/* Write groups */
 	child = xmlnode_new_child(node, "blist");
-	gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list));
+	gnode = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
 	for (; gnode != NULL; gnode = gnode->next)
 	{
 		if (!PURPLE_BLIST_NODE_SHOULD_SAVE(gnode))
@@ -288,7 +288,7 @@ parse_group(xmlnode *groupnode)
 
 	group = purple_group_new(name);
 	purple_blist_add_group(group,
-	purple_blist_node_get_first_child(PURPLE_BLIST_NODE(purple_blist_get_list())));
+	purple_blist_node_first_child(PURPLE_BLIST_NODE(purple_blist_get_list())));
 
 	for (cnode = groupnode->child; cnode; cnode = cnode->next) {
 		if (cnode->type != XMLNODE_TYPE_TAG)
@@ -623,7 +623,7 @@ void purple_blist_add_contact(PurpleCont
 		if (g == NULL) {
 			g = purple_group_new(_("Buddies"));
 			purple_blist_add_group(g,
-					purple_blist_node_get_first_child(lnode));
+					purple_blist_node_first_child(lnode));
 		}
 	}
 
@@ -837,8 +837,8 @@ void purple_blist_remove_buddy(PurpleBud
 	g_return_if_fail(buddy != NULL);
 
 	node = PURPLE_BLIST_NODE(buddy);
-	cnode = purple_blist_node_get_parent(node);
-	gnode = purple_blist_node_get_parent(cnode);
+	cnode = purple_blist_node_parent(node);
+	gnode = purple_blist_node_parent(cnode);
 
 	purple_blist_node_remove(node);
 	
@@ -964,7 +964,7 @@ PurpleBuddy *purple_find_buddy(PurpleAcc
 	hb.account = account;
 	hb.name = g_strdup(purple_normalize(account, name));
 
-	group = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list));
+	group = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
 	for (;group; group = group->next) {
 		hb.group = group;
 		if ((buddy = g_hash_table_lookup(list->buddies, &hb))) {
@@ -1000,7 +1000,7 @@ GSList *purple_find_buddies(PurpleAccoun
 		hb.name = g_strdup(purple_normalize(account, name));
 		hb.account = account;
 		
-		node = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list));
+		node = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
 		for (; node != NULL; node = node->next) {
 			hb.group = node;
 			if ((buddy = g_hash_table_lookup(list->buddies, &hb)) != NULL)
@@ -1027,7 +1027,7 @@ void purple_blist_add_account(PurpleAcco
 	if (!ops || !ops->update)
 		return;
 	
-	gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list));
+	gnode = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
 	for (; gnode; gnode = gnode->next) {
 		if (!PURPLE_IS_GROUP(gnode))
 			continue;
@@ -1071,7 +1071,7 @@ void purple_blist_remove_account(PurpleA
 	GList *list = NULL, *iter = NULL;
 	PurpleBuddyList *blist = purple_blist_get_list();
 
-	gnode = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(blist));
+	gnode = purple_blist_node_first_child(PURPLE_BLIST_NODE(blist));
 	for (; gnode; gnode = gnode->next) {
 		if (!PURPLE_IS_GROUP(gnode))
 			continue;
@@ -1178,7 +1178,7 @@ void purple_blist_add_chat(PurpleChat *c
 		/* Add group to blist if isn't already on it. Fixes #2752. */
 		if (!purple_find_group(group->name)) {
 			purple_blist_add_group(group,
-					purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list)));
+					purple_blist_node_first_child(PURPLE_BLIST_NODE(list)));
 		}
 	} else {
 		group = (PurpleGroup*)node->parent;
@@ -1275,7 +1275,7 @@ void purple_blist_add_buddy(PurpleBuddy 
 		/* Add group to blist if isn't already on it. Fixes #2752. */
 		if (!purple_find_group(g->name)) {
 			purple_blist_add_group(g,
-					purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list)));
+					purple_blist_node_first_child(PURPLE_BLIST_NODE(list)));
 		}
 		c = purple_contact_new();
 		purple_blist_add_contact(c, g,
@@ -1417,7 +1417,7 @@ purple_blist_find_chat(PurpleAccount *ac
 		return prpl_info->find_blist_chat(account, name);
 
 	normname = g_strdup(purple_normalize(account, name));
-	group = purple_blist_node_get_first_child(PURPLE_BLIST_NODE(list));
+	group = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
 	for (; group != NULL; group = group->next) {
 		for (node = group->child; node != NULL; node = node->next) {
 			if (PURPLE_IS_CHAT(node)) {
============================================================
--- libpurple/buddyicon.c	200a370846cd005fb0837fed32a87875c2e5fb2d
+++ libpurple/buddyicon.c	3f4e525e430c9b9c601970a239589a384135ecb0
@@ -891,9 +891,9 @@ purple_buddy_icons_node_set_custom_icon(
 
 	if (PURPLE_IS_CONTACT(node)) {
 		PurpleBlistNode *child;
-		for (child = purple_blist_node_get_first_child(node);
+		for (child = purple_blist_node_first_child(node);
 		     child;
-			 child = purple_blist_node_get_sibling_next(child))
+			 child = purple_blist_node_next(child))
 		{
 			PurpleBuddy *buddy;
 			PurpleConversation *conv;
@@ -1231,7 +1231,7 @@ _purple_buddy_icons_blist_loaded_cb()
 				}
 			}
 		}
-		node = purple_blist_node_next(node, TRUE);
+		node = purple_blist_node_next_online(node, TRUE);
 	}
 }
 
============================================================
--- libpurple/contact.c	bf959f1f32bee7dcbf3ea0b6909ef73ea6e09f28
+++ libpurple/contact.c	e6db63186df849fa184159382f803da9fb0b6f58
@@ -333,8 +333,8 @@ purple_contact_remove_buddy(PurpleBlistN
 	PurpleContact *contact;
 	PurpleBuddy *buddy = PURPLE_BUDDY(child);
 	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
-	g_return_if_fail(purple_blist_node_get_parent(child));
-	contact = PURPLE_CONTACT(purple_blist_node_get_parent(child));
+	g_return_if_fail(purple_blist_node_parent(child));
+	contact = PURPLE_CONTACT(purple_blist_node_parent(child));
 
 	if (PURPLE_BUDDY_IS_ONLINE(buddy))
 		contact->online--;
@@ -346,7 +346,7 @@ purple_contact_remove_buddy(PurpleBlistN
 
 #warning The ui calls havent been thought out yet, as to where they ought to go.
 	/* Re-sort the contact */
-	if (purple_blist_node_get_first_child(PURPLE_BLIST_NODE(contact)) && contact->priority == buddy) {
+	if (purple_blist_node_first_child(PURPLE_BLIST_NODE(contact)) && contact->priority == buddy) {
 		purple_contact_invalidate_priority_buddy(contact);
 		if (ops && ops->update)
 			ops->update(PURPLE_BLIST_NODE(contact));
============================================================
--- libpurple/group.c	e53cc2d332d436a80cc52b9081762866fad9f83e
+++ libpurple/group.c	85176f73aafb5b9c6d76c5077df8315e9e29f427
@@ -100,7 +100,7 @@ purple_group_remove_node(PurpleBlistNode
 	PurpleChat *chat;
 
 	g_return_if_fail(child);
-	g_return_if_fail(purple_blist_node_get_parent(child));
+	g_return_if_fail(purple_blist_node_parent(child));
 	group = PURPLE_GROUP(child->parent);
 
 	if(PURPLE_IS_CHAT(child)){
============================================================
--- libpurple/log.c	e82b1a13e39fa862f69d9f7d1834ebb08fe2518e
+++ libpurple/log.c	63192dbf6fcc965dc6dfdfbbacceddbaadd719ce
@@ -2018,21 +2018,21 @@ static void old_logger_get_log_sets(Purp
 		/* Search the buddy list to find the account and to determine if this is a buddy. */
 		for (gnode = purple_blist_get_root();
 		     !found && gnode != NULL;
-			 gnode = purple_blist_node_get_sibling_next(gnode))
+			 gnode = purple_blist_node_next(gnode))
 		{
 			if (!PURPLE_IS_GROUP(gnode))
 				continue;
 
-			for (cnode = purple_blist_node_get_first_child(gnode);
+			for (cnode = purple_blist_node_first_child(gnode);
 			     !found && cnode != NULL;
-				 cnode = purple_blist_node_get_sibling_next(cnode))
+				 cnode = purple_blist_node_next(cnode))
 			{
 				if (!PURPLE_IS_CONTACT(cnode))
 					continue;
 
-				for (bnode = purple_blist_node_get_first_child(cnode);
+				for (bnode = purple_blist_node_first_child(cnode);
 				     !found && bnode != NULL;
-					 bnode = purple_blist_node_get_sibling_next(bnode))
+					 bnode = purple_blist_node_next(bnode))
 				{
 					PurpleBuddy *buddy = (PurpleBuddy *)bnode;
 
============================================================
--- libpurple/plugins/autoaccept.c	8e12770ed0a356f5628e5e986a8242abe275e224
+++ libpurple/plugins/autoaccept.c	9d24281b90486adf6c831a9a229568657e81ae25
@@ -104,7 +104,7 @@ file_recv_request_cb(PurpleXfer *xfer, g
 		return;
 	}
 
-	node = purple_blist_node_get_parent(node);
+	node = purple_blist_node_parent(node);
 	g_return_if_fail(PURPLE_IS_CONTACT(node));
 
 	pref = purple_prefs_get_string(PREF_PATH);
@@ -179,7 +179,7 @@ save_cb(PurpleBlistNode *node, int choic
 save_cb(PurpleBlistNode *node, int choice)
 {
 	if (PURPLE_IS_BUDDY(node))
-		node = purple_blist_node_get_parent(node);
+		node = purple_blist_node_parent(node);
 	g_return_if_fail(PURPLE_IS_CONTACT(node));
 	purple_blist_node_set_int(node, "autoaccept", choice);
 }
@@ -190,7 +190,7 @@ set_auto_accept_settings(PurpleBlistNode
 	char *message;
 
 	if (PURPLE_IS_BUDDY(node))
-		node = purple_blist_node_get_parent(node);
+		node = purple_blist_node_parent(node);
 	g_return_if_fail(PURPLE_IS_CONTACT(node));
 
 	message = g_strdup_printf(_("When a file-transfer request arrives from %s"), 
============================================================
--- libpurple/protocols/bonjour/bonjour.c	0cd60df8a1c8f9e5e28fbf5ca293a8b17776395c
+++ libpurple/protocols/bonjour/bonjour.c	cfb458298cd6a1aab1e872a0cb023837caeee234
@@ -59,12 +59,12 @@ bonjour_removeallfromlocal(PurpleConnect
 		return;
 
 	/* Go through and remove all buddies that belong to this account */
-	for (cnode = purple_blist_node_get_first_child((PurpleBlistNode *) bonjour_group); cnode; cnode = cnodenext) {
-		cnodenext = purple_blist_node_get_sibling_next(cnode);
+	for (cnode = purple_blist_node_first_child((PurpleBlistNode *) bonjour_group); cnode; cnode = cnodenext) {
+		cnodenext = purple_blist_node_next(cnode);
 		if (!PURPLE_IS_CONTACT(cnode))
 			continue;
-		for (bnode = purple_blist_node_get_first_child(cnode); bnode; bnode = bnodenext) {
-			bnodenext = purple_blist_node_get_sibling_next(bnode);
+		for (bnode = purple_blist_node_first_child(cnode); bnode; bnode = bnodenext) {
+			bnodenext = purple_blist_node_next(bnode);
 			if (!PURPLE_IS_BUDDY(bnode))
 				continue;
 			buddy = (PurpleBuddy *) bnode;
============================================================
--- libpurple/protocols/jabber/jabber.c	1d95dbfa80c63626aeaba11a85a7769a7f9a1e65
+++ libpurple/protocols/jabber/jabber.c	4a2d6fbd9f07c87381e6d52835caa5c9456f483f
@@ -2376,10 +2376,10 @@ PurpleChat *jabber_find_blist_chat(Purpl
 		return NULL;
 
 	for(gnode = purple_blist_get_root(); gnode;
-			gnode = purple_blist_node_get_sibling_next(gnode)) {
-		for(cnode = purple_blist_node_get_first_child(gnode);
+			gnode = purple_blist_node_next(gnode)) {
+		for(cnode = purple_blist_node_first_child(gnode);
 				cnode;
-				cnode = purple_blist_node_get_sibling_next(cnode)) {
+				cnode = purple_blist_node_next(cnode)) {
 			PurpleChat *chat = (PurpleChat*)cnode;
 			const char *room, *server;
 			GHashTable *components;
============================================================
--- libpurple/protocols/novell/novell.c	ba757729419cc58c39dff41837efc44d60f921d3
+++ libpurple/protocols/novell/novell.c	ed5b1ac0e3bea4d5453b021b96ef4bbc8c37930c
@@ -1238,19 +1238,19 @@ _remove_purple_buddies(NMUser *user)
 	const char *gname = NULL;
 
 	for (gnode = purple_blist_get_root(); gnode;
-			gnode = purple_blist_node_get_sibling_next(gnode)) {
+			gnode = purple_blist_node_next(gnode)) {
 		if (!PURPLE_IS_GROUP(gnode))
 			continue;
 		group = (PurpleGroup *) gnode;
 		gname = purple_group_get_name(group);
-		for (cnode = purple_blist_node_get_first_child(gnode);
+		for (cnode = purple_blist_node_first_child(gnode);
 				cnode;
-				cnode = purple_blist_node_get_sibling_next(cnode)) {
+				cnode = purple_blist_node_next(cnode)) {
 			if (!PURPLE_IS_CONTACT(cnode))
 				continue;
-			for (bnode = purple_blist_node_get_first_child(cnode);
+			for (bnode = purple_blist_node_first_child(cnode);
 					bnode;
-					bnode = purple_blist_node_get_sibling_next(bnode)) {
+					bnode = purple_blist_node_next(bnode)) {
 				if (!PURPLE_IS_BUDDY(bnode))
 					continue;
 				buddy = (PurpleBuddy *) bnode;
============================================================
--- libpurple/protocols/qq/group_internal.c	ea4921fefc58ba756a0685aa9cc9fa7d27d3aeac
+++ libpurple/protocols/qq/group_internal.c	807f08e0a7313de3bfdb5619817c44d7dbad53fc
@@ -393,9 +393,9 @@ void qq_room_data_initial(PurpleConnecti
 	}
 
 	count = 0;
-	for (node = purple_blist_node_get_first_child((PurpleBlistNode *)purple_group);
+	for (node = purple_blist_node_first_child((PurpleBlistNode *)purple_group);
 	     node != NULL;
-		 node = purple_blist_node_get_sibling_next(node))
+		 node = purple_blist_node_next(node))
 	{
 		if ( !PURPLE_IS_CHAT(node)) {
 			continue;
============================================================
--- libpurple/protocols/zephyr/zephyr.c	8e56542c0dec563f3adf4058168d0ae907389a68
+++ libpurple/protocols/zephyr/zephyr.c	8adcbaec770255ac6ca7f8bef96d27763c1dbbdd
@@ -2485,10 +2485,10 @@ static PurpleChat *zephyr_find_blist_cha
 
 	/* XXX needs to be %host%,%canon%, and %me% clean */
 	for(gnode = purple_blist_get_root(); gnode;
-			gnode = purple_blist_node_get_sibling_next(gnode)) {
-		for(cnode = purple_blist_node_get_first_child(gnode);
+			gnode = purple_blist_node_next(gnode)) {
+		for(cnode = purple_blist_node_first_child(gnode);
 				cnode;
-				cnode = purple_blist_node_get_sibling_next(cnode)) {
+				cnode = purple_blist_node_next(cnode)) {
 			PurpleChat *chat = (PurpleChat*)cnode;
 			char *zclass, *inst, *recip;
 			char** triple;


More information about the Commits mailing list