comparison libpurple/protocols/zephyr/zephyr.c @ 25289:aa876d48b5b2

Some more struct hiding.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 31 Oct 2008 09:24:43 +0000
parents 16734635febf
children 8aa7d8bcbc7d
comparison
equal deleted inserted replaced
25288:da46097b4722 25289:aa876d48b5b2
1256 PurpleBlistNode *gnode, *cnode, *bnode; 1256 PurpleBlistNode *gnode, *cnode, *bnode;
1257 ZLocations_t locations; 1257 ZLocations_t locations;
1258 int numlocs; 1258 int numlocs;
1259 int one = 1; 1259 int one = 1;
1260 1260
1261 for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) { 1261 for (gnode = purple_blist_get_root(); gnode;
1262 gnode = purple_blist_node_get_sibling_next(gnode)) {
1262 if (!PURPLE_BLIST_NODE_IS_GROUP(gnode)) 1263 if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
1263 continue; 1264 continue;
1264 for (cnode = gnode->child; cnode; cnode = cnode->next) { 1265 for (cnode = purple_blist_node_get_first_child(gnode);
1266 cnode;
1267 cnode = purple_blist_node_get_sibling_next(cnode)) {
1265 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode)) 1268 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
1266 continue; 1269 continue;
1267 for (bnode = cnode->child; bnode; bnode = bnode->next) { 1270 for (bnode = purple_blist_node_get_first_child(cnode);
1271 bnode;
1272 bnode = purple_blist_node_get_sibling_next(bnode)) {
1268 PurpleBuddy *b = (PurpleBuddy *) bnode; 1273 PurpleBuddy *b = (PurpleBuddy *) bnode;
1269 1274
1270 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode)) 1275 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
1271 continue; 1276 continue;
1272 if (purple_buddy_get_account(b)->gc == zgc) { 1277 if (purple_buddy_get_account(b)->gc == zgc) {
1302 ald.user = NULL; 1307 ald.user = NULL;
1303 memset(&(ald.uid), 0, sizeof(ZUnique_Id_t)); 1308 memset(&(ald.uid), 0, sizeof(ZUnique_Id_t));
1304 ald.version = NULL; 1309 ald.version = NULL;
1305 } 1310 }
1306 1311
1307 for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) { 1312 for (gnode = purple_blist_get_root(); gnode;
1313 gnode = purple_blist_node_get_sibling_next(gnode)) {
1308 if (!PURPLE_BLIST_NODE_IS_GROUP(gnode)) 1314 if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
1309 continue; 1315 continue;
1310 for (cnode = gnode->child; cnode; cnode = cnode->next) { 1316 for (cnode = purple_blist_node_get_first_child(gnode);
1317 cnode;
1318 cnode = purple_blist_node_get_sibling_next(cnode)) {
1311 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode)) 1319 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
1312 continue; 1320 continue;
1313 for (bnode = cnode->child; bnode; bnode = bnode->next) { 1321 for (bnode = purple_blist_node_get_first_child(cnode);
1322 bnode;
1323 bnode = purple_blist_node_get_sibling_next(bnode)) {
1314 PurpleBuddy *b = (PurpleBuddy *) bnode; 1324 PurpleBuddy *b = (PurpleBuddy *) bnode;
1315 1325
1316 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode)) 1326 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
1317 continue; 1327 continue;
1318 if (purple_buddy_get_account(b) == account) { 1328 if (purple_buddy_get_account(b) == account) {
1951 g_free(fname); 1961 g_free(fname);
1952 return; 1962 return;
1953 } 1963 }
1954 1964
1955 account = purple_connection_get_account(gc); 1965 account = purple_connection_get_account(gc);
1956 for (gnode = purple_blist_get_root(); gnode; gnode = gnode->next) { 1966 for (gnode = purple_blist_get_root();
1967 gnode;
1968 gnode = purple_blist_node_get_sibling_next(gnode)) {
1957 if (!PURPLE_BLIST_NODE_IS_GROUP(gnode)) 1969 if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
1958 continue; 1970 continue;
1959 for (cnode = gnode->child; cnode; cnode = cnode->next) { 1971 for (cnode = purple_blist_node_get_first_child(gnode);
1972 cnode;
1973 cnode = purple_blist_node_get_sibling_next(cnode)) {
1960 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode)) 1974 if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
1961 continue; 1975 continue;
1962 for (bnode = cnode->child; bnode; bnode = bnode->next) { 1976 for (bnode = purple_blist_node_get_first_child(cnode);
1977 bnode;
1978 bnode = purple_blist_node_get_sibling_next(bnode)) {
1963 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode)) 1979 if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
1964 continue; 1980 continue;
1965 b = (PurpleBuddy *) bnode; 1981 b = (PurpleBuddy *) bnode;
1966 if (purple_buddy_get_account(b) == account) { 1982 if (purple_buddy_get_account(b) == account) {
1967 gchar *stripped_user = zephyr_strip_local_realm(zephyr, purple_buddy_get_name(b)); 1983 gchar *stripped_user = zephyr_strip_local_realm(zephyr, purple_buddy_get_name(b));
2505 static PurpleChat *zephyr_find_blist_chat(PurpleAccount *account, const char *name) 2521 static PurpleChat *zephyr_find_blist_chat(PurpleAccount *account, const char *name)
2506 { 2522 {
2507 PurpleBlistNode *gnode, *cnode; 2523 PurpleBlistNode *gnode, *cnode;
2508 2524
2509 /* XXX needs to be %host%,%canon%, and %me% clean */ 2525 /* XXX needs to be %host%,%canon%, and %me% clean */
2510 for(gnode = purple_blist_get_root(); gnode; gnode = gnode->next) { 2526 for(gnode = purple_blist_get_root(); gnode;
2511 for(cnode = gnode->child; cnode; cnode = cnode->next) { 2527 gnode = purple_blist_node_get_sibling_next(gnode)) {
2528 for(cnode = purple_blist_node_get_first_child(gnode);
2529 cnode;
2530 cnode = purple_blist_node_get_sibling_next(cnode)) {
2512 PurpleChat *chat = (PurpleChat*)cnode; 2531 PurpleChat *chat = (PurpleChat*)cnode;
2513 char *zclass, *inst, *recip; 2532 char *zclass, *inst, *recip;
2514 char** triple; 2533 char** triple;
2515 GHashTable *components; 2534 GHashTable *components;
2516 if(!PURPLE_BLIST_NODE_IS_CHAT(cnode)) 2535 if(!PURPLE_BLIST_NODE_IS_CHAT(cnode))