pidgin.next.minor: 8ca9aeb3: Some more struct hiding.
sadrul at pidgin.im
sadrul at pidgin.im
Fri Oct 31 05:25:58 EDT 2008
-----------------------------------------------------------------
Revision: 8ca9aeb3df19d685ba250c54ec950e4b1a0b5f41
Ancestor: 3188aac7a63ba672881f02e6bf158ef388b0ac71
Author: sadrul at pidgin.im
Date: 2008-10-31T09:24:43
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/8ca9aeb3df19d685ba250c54ec950e4b1a0b5f41
Modified files:
libpurple/protocols/jabber/jabber.c
libpurple/protocols/msn/session.c
libpurple/protocols/msn/userlist.c
libpurple/protocols/novell/novell.c
libpurple/protocols/oscar/oscar.c
libpurple/protocols/sametime/sametime.c
libpurple/protocols/silc/buddy.c
libpurple/protocols/silc/ops.c
libpurple/protocols/simple/simple.c
libpurple/protocols/zephyr/zephyr.c
ChangeLog:
Some more struct hiding.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c 06bd84f4de52041be126df78184bebdfa8e62404
+++ libpurple/protocols/jabber/jabber.c 82b27de9a3c59c87a364b9397756702a64f52846
@@ -1881,8 +1881,11 @@ PurpleChat *jabber_find_blist_chat(Purpl
if(!(jid = jabber_id_new(name)))
return NULL;
- for(gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
- for(cnode = gnode->child; cnode; cnode = cnode->next) {
+ for(gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
+ for(cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
PurpleChat *chat = (PurpleChat*)cnode;
const char *room, *server;
GHashTable *components;
============================================================
--- libpurple/protocols/msn/session.c 23126805de3512cb6583b1622886b2f36c9be753
+++ libpurple/protocols/msn/session.c e7b4c61e33ef66d85aeb5549d8a9d6ddcbd3eb15
@@ -274,16 +274,21 @@ msn_session_sync_users(MsnSession *sessi
* being logged in. This no longer happens, so we manually iterate
* over the whole buddy list to identify sync issues.
*/
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for (gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
PurpleGroup *group = (PurpleGroup *)gnode;
const char *group_name;
if(!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
group_name = purple_group_get_name(group);
- for(cnode = gnode->child; cnode; cnode = cnode->next) {
+ for(cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if(!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for(bnode = cnode->child; bnode; bnode = bnode->next) {
+ for(bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
PurpleBuddy *b;
if(!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
============================================================
--- libpurple/protocols/msn/userlist.c fdf1f791f7a96660597eb3d18657cfafa9fc2182
+++ libpurple/protocols/msn/userlist.c 7b5fc8b57f2abad6497c7039cdb39509d700bdb2
@@ -883,15 +883,20 @@ msn_userlist_load(MsnSession *session)
g_return_if_fail(gc != NULL);
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next)
+ for (gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode))
{
if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
- for (cnode = gnode->child; cnode; cnode = cnode->next)
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode))
{
if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode; bnode = bnode->next)
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode))
{
PurpleBuddy *b;
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
============================================================
--- libpurple/protocols/novell/novell.c 67beb6ce4ed0ec603c26541a0dfa26bebf3f00a0
+++ libpurple/protocols/novell/novell.c 09c924f4edebb8e0e82ec9879c1cd832ef00ce36
@@ -1237,15 +1237,20 @@ _remove_purple_buddies(NMUser *user)
NMFolder *folder = NULL;
const char *gname = NULL;
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for (gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
group = (PurpleGroup *) gnode;
gname = purple_group_get_name(group);
- for (cnode = gnode->child; cnode; cnode = cnode->next) {
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode; bnode = bnode->next) {
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
buddy = (PurpleBuddy *) bnode;
============================================================
--- libpurple/protocols/oscar/oscar.c 145e76f79c4f08746aff655aa347ffde8699c7a8
+++ libpurple/protocols/oscar/oscar.c 35db7f8f3b52b82daec4144b3abbe7bea2d8b70d
@@ -5024,16 +5024,21 @@ static int purple_ssi_parselist(OscarDat
/* Buddies */
cur = NULL;
if ((blist = purple_get_blist()) != NULL) {
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for (gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
const char *gname;
if(!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
g = (PurpleGroup *)gnode;
gname = purple_group_get_name(g);
- for (cnode = gnode->child; cnode; cnode = cnode->next) {
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if(!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode; bnode = bnode->next) {
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
const char *bname;
if(!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
@@ -6435,16 +6440,21 @@ static void oscar_show_awaitingauth(Purp
text = g_strdup("");
account = purple_connection_get_account(gc);
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for (gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
PurpleGroup *group = (PurpleGroup *)gnode;
const char *gname;
if(!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
gname = purple_group_get_name(group);
- for (cnode = gnode->child; cnode; cnode = cnode->next) {
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if(!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode; bnode = bnode->next) {
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
PurpleBuddy *buddy = (PurpleBuddy *)bnode;
const char *bname;
if(!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
============================================================
--- libpurple/protocols/sametime/sametime.c 263b10548f64abf685dafad9ff563992f782d8d3
+++ libpurple/protocols/sametime/sametime.c fe4e3730754ddd5f602097720da6cc86ad973c7c
@@ -668,7 +668,8 @@ static void blist_export(PurpleConnectio
acct = purple_connection_get_account(gc);
g_return_if_fail(acct != NULL);
- for(gn = purple_blist_get_root(); gn; gn = gn->next) {
+ for(gn = purple_blist_get_root(); gn;
+ gn = purple_blist_node_get_sibling_next(gn)) {
const char *owner;
const char *gname;
enum mwSametimeGroupType gtype;
@@ -707,10 +708,14 @@ static void blist_export(PurpleConnectio
if(gtype == mwSametimeGroup_DYNAMIC)
continue;
- for(cn = gn->child; cn; cn = cn->next) {
+ for(cn = purple_blist_node_get_first_child(gn);
+ cn;
+ cn = purple_blist_node_get_sibling_next(cn)) {
if(! PURPLE_BLIST_NODE_IS_CONTACT(cn)) continue;
- for(bn = cn->child; bn; bn = bn->next) {
+ for(bn = purple_blist_node_get_first_child(cn);
+ bn;
+ bn = purple_blist_node_get_sibling_next(bn)) {
if(! PURPLE_BLIST_NODE_IS_BUDDY(bn)) continue;
if(! PURPLE_BLIST_NODE_SHOULD_SAVE(bn)) continue;
@@ -917,7 +922,8 @@ static PurpleGroup *group_ensure(PurpleC
NSTR(name), NSTR(alias));
/* first attempt at finding the group, by the name key */
- for(gn = purple_blist_get_root(); gn; gn = gn->next) {
+ for(gn = purple_blist_get_root(); gn;
+ gn = purple_blist_node_get_sibling_next(gn)) {
const char *n, *o;
if(! PURPLE_BLIST_NODE_IS_GROUP(gn)) continue;
n = purple_blist_node_get_string(gn, GROUP_KEY_NAME);
@@ -1004,10 +1010,14 @@ static void group_clear(PurpleGroup *gro
gn = (PurpleBlistNode *) group;
- for(cn = gn->child; cn; cn = cn->next) {
+ for(cn = purple_blist_node_get_first_child(gn);
+ cn;
+ cn = purple_blist_node_get_sibling_next(cn)) {
if(! PURPLE_BLIST_NODE_IS_CONTACT(cn)) continue;
- for(bn = cn->child; bn; bn = bn->next) {
+ for(bn = purple_blist_node_get_first_child(cn);
+ bn;
+ bn = purple_blist_node_get_sibling_next(bn)) {
PurpleBuddy *gb = (PurpleBuddy *) bn;
if(! PURPLE_BLIST_NODE_IS_BUDDY(bn)) continue;
@@ -1069,10 +1079,14 @@ static void group_prune(PurpleConnection
gn = (PurpleBlistNode *) group;
- for(cn = gn->child; cn; cn = cn->next) {
+ for(cn = purple_blist_node_get_first_child(gn);
+ cn;
+ cn = purple_blist_node_get_sibling_next(cn)) {
if(! PURPLE_BLIST_NODE_IS_CONTACT(cn)) continue;
- for(bn = cn->child; bn; bn = bn->next) {
+ for(bn = purple_blist_node_get_first_child(cn);
+ bn;
+ bn = purple_blist_node_get_sibling_next(bn)) {
PurpleBuddy *gb = (PurpleBuddy *) bn;
if(! PURPLE_BLIST_NODE_IS_BUDDY(bn)) continue;
@@ -1136,7 +1150,8 @@ static void blist_sync(PurpleConnection
g_list_free(gtl);
/* find all groups which should be pruned from the local list */
- for(gn = purple_blist_get_root(); gn; gn = gn->next) {
+ for(gn = purple_blist_get_root(); gn;
+ gn = purple_blist_node_get_sibling_next(gn)) {
PurpleGroup *grp = (PurpleGroup *) gn;
const char *gname, *owner;
struct mwSametimeGroup *stgrp;
@@ -1349,17 +1364,22 @@ static void blist_init(PurpleAccount *ac
PurpleBlistNode *gnode, *cnode, *bnode;
GList *add_buds = NULL;
- for(gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for(gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
if(! PURPLE_BLIST_NODE_IS_GROUP(gnode)) continue;
- for(cnode = gnode->child; cnode; cnode = cnode->next) {
+ for(cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if(! PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for(bnode = cnode->child; bnode; bnode = bnode->next) {
+ for(bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
PurpleBuddy *b;
if(!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
-
+
b = (PurpleBuddy *)bnode;
if(purple_buddy_get_account(b) == acct) {
add_buds = g_list_append(add_buds, b);
@@ -1391,7 +1411,8 @@ static void services_starting(struct mwP
mwServiceStorage_load(pd->srvc_store, unit, fetch_blist_cb, pd, NULL);
/* find all the NAB groups and subscribe to them */
- for(l = purple_blist_get_root(); l; l = l->next) {
+ for(l = purple_blist_get_root(); l;
+ l = purple_blist_node_get_sibling_next(l)) {
PurpleGroup *group = (PurpleGroup *) l;
enum mwSametimeGroupType gt;
const char *owner;
============================================================
--- libpurple/protocols/silc/buddy.c 961da3f92b67f8a1bfab941b9eec39f52f60dab9
+++ libpurple/protocols/silc/buddy.c 89d82bd0c06955d105f754240c0a888fec7b6867
@@ -1407,15 +1407,21 @@ void silcpurple_send_buddylist(PurpleCon
account = purple_connection_get_account(gc);
- for (gnode = purple_blist_get_root(); gnode != NULL; gnode = gnode->next)
+ for (gnode = purple_blist_get_root();
+ gnode != NULL;
+ gnode = purple_blist_node_get_sibling_next(gnode))
{
if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
- for (cnode = gnode->child; cnode != NULL; cnode = cnode->next)
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode != NULL;
+ cnode = purple_blist_node_get_sibling_next(cnode))
{
if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode != NULL; bnode = bnode->next)
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode != NULL;
+ bnode = purple_blist_node_get_sibling_next(bnode))
{
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
============================================================
--- libpurple/protocols/silc/ops.c 279e98d2a236fc7dc4fb574d39b77338ed73438a
+++ libpurple/protocols/silc/ops.c bf1887d3dac50e06bf1283faf50a068f7a42d54e
@@ -858,14 +858,17 @@ silc_notify(SilcClient client, SilcClien
/* Find buddy by associated public key */
for (gnode = purple_blist_get_root(); gnode;
- gnode = gnode->next) {
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
- for (cnode = gnode->child; cnode; cnode = cnode->next) {
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if( !PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode;
- bnode = bnode->next) {
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
b = (PurpleBuddy *)bnode;
============================================================
--- libpurple/protocols/simple/simple.c 9f4cdebe325f0d988a40edde1ae8ab622ffc8154
+++ libpurple/protocols/simple/simple.c 5c08142b0744b56bbf2aeed769cc2417b81db9bb
@@ -219,11 +219,16 @@ static void simple_get_buddies(PurpleCon
purple_debug_info("simple", "simple_get_buddies\n");
account = purple_connection_get_account(gc);
- for(gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for(gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
if(!PURPLE_BLIST_NODE_IS_GROUP(gnode)) continue;
- for(cnode = gnode->child; cnode; cnode = cnode->next) {
+ for(cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if(!PURPLE_BLIST_NODE_IS_CONTACT(cnode)) continue;
- for(bnode = cnode->child; bnode; bnode = bnode->next) {
+ for(bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
if(!PURPLE_BLIST_NODE_IS_BUDDY(bnode)) continue;
if(purple_buddy_get_account((PurpleBuddy*)bnode) == account)
simple_add_buddy(gc, (PurpleBuddy*)bnode, (PurpleGroup *)gnode);
============================================================
--- libpurple/protocols/zephyr/zephyr.c 905f3c17c98834fe9521131fb638245c187a7f9d
+++ libpurple/protocols/zephyr/zephyr.c 8ad7edcc44e4311cd97bd430bd1ed6343d2a7faa
@@ -1258,13 +1258,18 @@ static gint check_loc(gpointer_data)
int numlocs;
int one = 1;
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for (gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
- for (cnode = gnode->child; cnode; cnode = cnode->next) {
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode; bnode = bnode->next) {
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
PurpleBuddy *b = (PurpleBuddy *) bnode;
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
@@ -1304,13 +1309,18 @@ static gint check_loc(gpointer data)
ald.version = NULL;
}
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for (gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
- for (cnode = gnode->child; cnode; cnode = cnode->next) {
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode; bnode = bnode->next) {
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
PurpleBuddy *b = (PurpleBuddy *) bnode;
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
@@ -1953,13 +1963,19 @@ static void write_anyone(PurpleConnectio
}
account = purple_connection_get_account(gc);
- for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
+ for (gnode = purple_blist_get_root();
+ gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
continue;
- for (cnode = gnode->child; cnode; cnode = cnode->next) {
+ for (cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
continue;
- for (bnode = cnode->child; bnode; bnode = bnode->next) {
+ for (bnode = purple_blist_node_get_first_child(cnode);
+ bnode;
+ bnode = purple_blist_node_get_sibling_next(bnode)) {
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
b = (PurpleBuddy *) bnode;
@@ -2507,8 +2523,11 @@ static PurpleChat *zephyr_find_blist_cha
PurpleBlistNode *gnode, *cnode;
/* XXX needs to be %host%,%canon%, and %me% clean */
- for(gnode = purple_blist_get_root(); gnode; gnode = gnode->next) {
- for(cnode = gnode->child; cnode; cnode = cnode->next) {
+ for(gnode = purple_blist_get_root(); gnode;
+ gnode = purple_blist_node_get_sibling_next(gnode)) {
+ for(cnode = purple_blist_node_get_first_child(gnode);
+ cnode;
+ cnode = purple_blist_node_get_sibling_next(cnode)) {
PurpleChat *chat = (PurpleChat*)cnode;
char *zclass, *inst, *recip;
char** triple;
More information about the Commits
mailing list