Mercurial > pidgin.yaz
changeset 25278:12b8ccc3e9ec
Add purple_buddy_get_protocol_data() and purple_buddy_set_protocol_data()
accessors for PurpleBuddy->proto_data.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 30 Oct 2008 20:07:46 +0000 |
parents | bc632f651319 |
children | ac967ea95b05 |
files | ChangeLog.API libpurple/blist.c libpurple/blist.h |
diffstat | 3 files changed, 49 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Thu Oct 30 20:03:40 2008 +0000 +++ b/ChangeLog.API Thu Oct 30 20:07:46 2008 +0000 @@ -1,5 +1,11 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul +version 2.6.0 (??/??/????): + libpurple: + Added: + * purple_buddy_get_protocol_data + * purple_buddy_set_protocol_data + version 2.5.0 (08/18/2008): libpurple: Added:
--- a/libpurple/blist.c Thu Oct 30 20:03:40 2008 +0000 +++ b/libpurple/blist.c Thu Oct 30 20:07:46 2008 +0000 @@ -1234,6 +1234,23 @@ return buddy->icon; } +gpointer +purple_buddy_get_protocol_data(const PurpleBuddy *buddy) +{ + g_return_val_if_fail(buddy != NULL, NULL); + + return buddy->proto_data; +} + +void +purple_buddy_set_protocol_data(PurpleBuddy *buddy, gpointer data) +{ + g_return_if_fail(buddy != NULL); + + buddy->proto_data = data; +} + + void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node) { PurpleBlistNode *cnode = (PurpleBlistNode*)chat;
--- a/libpurple/blist.h Thu Oct 30 20:03:40 2008 +0000 +++ b/libpurple/blist.h Thu Oct 30 20:07:46 2008 +0000 @@ -470,6 +470,32 @@ PurpleBuddyIcon *purple_buddy_get_icon(const PurpleBuddy *buddy); /** + * Returns a buddy's protocol-specific data. + * + * This should only be called from the associated prpl. + * + * @param buddy The buddy. + * @return The protocol data. + * + * @see purple_buddy_set_protocol_data() + * @since 2.6.0 + */ +gpointer purple_buddy_get_protocol_data(const PurpleBuddy *buddy); + +/** + * Sets a buddy's protocol-specific data. + * + * This should only be called from the associated prpl. + * + * @param buddy The buddy. + * @param data The data. + * + * @see purple_buddy_get_protocol_data() + * @since 2.6.0 + */ +void purple_buddy_set_protocol_data(PurpleBuddy *buddy, gpointer data); + +/** * Returns a buddy's contact. * * @param buddy The buddy.