Mercurial > pidgin.yaz
comparison src/protocols/jabber/jabber.c @ 3867:43e396e94095
[gaim-migrate @ 4019]
compile cleanups by nathan
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Sun, 03 Nov 2002 07:36:09 +0000 |
parents | a72e303e6f5c |
children | c3968c878c68 |
comparison
equal
deleted
inserted
replaced
3866:994b5c4d15dd | 3867:43e396e94095 |
---|---|
2487 * Add/update buddy's roster entry on server | 2487 * Add/update buddy's roster entry on server |
2488 * | 2488 * |
2489 * If "alias" or "group" are NULL, gets them from Gaim's current buddylist values | 2489 * If "alias" or "group" are NULL, gets them from Gaim's current buddylist values |
2490 * for the buddy. | 2490 * for the buddy. |
2491 */ | 2491 */ |
2492 static void jabber_roster_update(struct gaim_connection *gc, char *name, char *alias, char *group) | 2492 static void jabber_roster_update(struct gaim_connection *gc, const char *name, const char *alias, const char *group) |
2493 { | 2493 { |
2494 xmlnode x, y; | 2494 xmlnode x, y; |
2495 char *realwho; | 2495 char *realwho; |
2496 gjconn gjc; | 2496 gjconn gjc; |
2497 struct buddy *buddy = NULL; | 2497 struct buddy *buddy = NULL; |
2498 struct group *buddy_group = NULL; | 2498 struct group *buddy_group = NULL; |
2499 char *my_alias = NULL; | 2499 const char *my_alias = NULL; |
2500 char *my_group = NULL; | 2500 const char *my_group = NULL; |
2501 | 2501 |
2502 if(gc && gc->proto_data && ((struct jabber_data *)gc->proto_data)->gjc && name) { | 2502 if(gc && gc->proto_data && ((struct jabber_data *)gc->proto_data)->gjc && name) { |
2503 gaim_jid gjid; | 2503 gaim_jid gjid; |
2504 gjc = ((struct jabber_data *)gc->proto_data)->gjc; | 2504 gjc = ((struct jabber_data *)gc->proto_data)->gjc; |
2505 | 2505 |
2572 } | 2572 } |
2573 | 2573 |
2574 /* | 2574 /* |
2575 * Change buddy's group on server roster | 2575 * Change buddy's group on server roster |
2576 */ | 2576 */ |
2577 static void jabber_group_change(struct gaim_connection *gc, char *name, char *old_group, char *new_group) | 2577 static void jabber_group_change(struct gaim_connection *gc, const char *name, const char *old_group, const char *new_group) |
2578 { | 2578 { |
2579 if(old_group && new_group && strcmp(old_group, new_group)) | 2579 if(old_group && new_group && strcmp(old_group, new_group)) |
2580 jabber_roster_update(gc, name, NULL, new_group); | 2580 jabber_roster_update(gc, name, NULL, new_group); |
2581 } | 2581 } |
2582 | 2582 |
2586 * Jabber doesn't have "groups," per se. "Group" is simply a JID attribute. | 2586 * Jabber doesn't have "groups," per se. "Group" is simply a JID attribute. |
2587 * So we iterate through the list of buddies that are in the group and change | 2587 * So we iterate through the list of buddies that are in the group and change |
2588 * the group attribute for each of them. | 2588 * the group attribute for each of them. |
2589 */ | 2589 */ |
2590 static void jabber_rename_group(struct gaim_connection *gc, | 2590 static void jabber_rename_group(struct gaim_connection *gc, |
2591 char *old_group, | 2591 const char *old_group, |
2592 char *new_group, | 2592 const char *new_group, |
2593 GList *members) | 2593 GList *members) |
2594 { | 2594 { |
2595 if(old_group && new_group && strcmp(old_group, new_group)) | 2595 if(old_group && new_group && strcmp(old_group, new_group)) |
2596 while(members) { | 2596 while(members) { |
2597 jabber_group_change(gc, (char *)(members->data), old_group, new_group); | 2597 jabber_group_change(gc, (char *)(members->data), old_group, new_group); |