Mercurial > pidgin
diff libpurple/protocols/bonjour/bonjour.c @ 25788:ac967ea95b05
Use purple_buddy_get_protocol_data() and purple_buddy_set_protocol_data()
in the Bonjour prpl. It's still not fully updated to compile.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 30 Oct 2008 20:08:29 +0000 |
parents | c06b85e1d020 |
children | da46097b4722 |
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/bonjour.c Thu Oct 30 20:07:46 2008 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Thu Oct 30 20:08:29 2008 +0000 @@ -261,9 +261,10 @@ static void bonjour_remove_buddy(PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group) { - if (buddy->proto_data) { - bonjour_buddy_delete(buddy->proto_data); - buddy->proto_data = NULL; + BonjourBuddy *bb = purple_buddy_get_protocol_data(buddy); + if (bb) { + bonjour_buddy_delete(bb); + purple_buddy_set_protocol_data(buddy, NULL); } } @@ -303,7 +304,7 @@ PurpleBuddy *buddy = purple_find_buddy(connection->account, who); BonjourBuddy *bb; - if (buddy == NULL || buddy->proto_data == NULL) + if (buddy == NULL || (bb = purple_buddy_get_protocol_data(buddy)) == NULL) { /* * This buddy is not in our buddy list, and therefore does not really @@ -312,7 +313,6 @@ return; } - bb = buddy->proto_data; bonjour_jabber_close_conversation(bb->conversation); bb->conversation = NULL; } @@ -351,7 +351,7 @@ { PurplePresence *presence; PurpleStatus *status; - BonjourBuddy *bb = buddy->proto_data; + BonjourBuddy *bb = purple_buddy_get_protocol_data(buddy); const char *status_description; const char *message; @@ -417,8 +417,7 @@ { PurpleBuddy *buddy = purple_find_buddy(connection->account, who); - return (buddy != NULL && buddy->proto_data != NULL); - + return (buddy != NULL && purple_buddy_get_protocol_data(buddy) != NULL); } static gboolean