# HG changeset patch # User andrew.victor@mxit.com # Date 1314388534 0 # Node ID ff051a32e1e82c4449489939cbf0fd84ea314ff7 # Parent 5b5fd57ff3aeaefd707c1bdc45f4c92f91661be4 Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data(). diff -r 5b5fd57ff3ae -r ff051a32e1e8 ChangeLog.API --- a/ChangeLog.API Fri Aug 26 19:33:50 2011 +0000 +++ b/ChangeLog.API Fri Aug 26 19:55:34 2011 +0000 @@ -17,6 +17,8 @@ * purple_roomlist_set_ui_data * purple_xfer_get_protocol_data * purple_xfer_set_protocol_data + * purple_xfer_get_ui_data + * purple_xfer_set_ui_data Changed: * purple_connection_error now takes a PurpleConnectionError diff -r 5b5fd57ff3ae -r ff051a32e1e8 libpurple/ft.c --- a/libpurple/ft.c Fri Aug 26 19:33:50 2011 +0000 +++ b/libpurple/ft.c Fri Aug 26 19:55:34 2011 +0000 @@ -1717,6 +1717,21 @@ return xfer->proto_data; } +void purple_xfer_set_ui_data(PurpleXfer *xfer, gpointer ui_data) +{ + g_return_if_fail(xfer != NULL); + + xfer->ui_data = ui_data; +} + +gpointer purple_xfer_get_ui_data(PurpleXfer *xfer) +{ + g_return_val_if_fail(xfer != NULL, NULL); + + return xfer->ui_data; +} + + /************************************************************************** * File Transfer Subsystem API **************************************************************************/ diff -r 5b5fd57ff3ae -r ff051a32e1e8 libpurple/ft.h --- a/libpurple/ft.h Fri Aug 26 19:33:50 2011 +0000 +++ b/libpurple/ft.h Fri Aug 26 19:55:34 2011 +0000 @@ -758,6 +758,25 @@ */ gpointer purple_xfer_get_protocol_data(PurpleXfer *xfer); +/** + * Set the UI data associated with this file transfer. + * + * @param xfer The file transfer. + * @param ui_data A pointer to associate with this file transfer. + */ +void purple_xfer_set_ui_data(PurpleXfer *xfer, gpointer ui_data); + +/** + * Get the UI data associated with this file transfer. + * + * @param xfer The file transfer. + * + * @return The UI data associated with this file transfer. This is a + * convenience field provided to the UIs--it is not + * used by the libpurple core. + */ +gpointer purple_xfer_get_ui_data(PurpleXfer *xfer); + /*@}*/ /**************************************************************************/ diff -r 5b5fd57ff3ae -r ff051a32e1e8 libpurple/roomlist.h --- a/libpurple/roomlist.h Fri Aug 26 19:33:50 2011 +0000 +++ b/libpurple/roomlist.h Fri Aug 26 19:55:34 2011 +0000 @@ -228,7 +228,7 @@ * * @return The protocol data associated with this room list. This is a * convenience field provided to the protocol plugin--it is not - * used the libuprple core. + * used the libpurple core. */ gpointer purple_roomlist_get_proto_data(PurpleRoomlist *list); @@ -247,7 +247,7 @@ * * @return The UI data associated with this room list. This is a * convenience field provided to the UIs--it is not - * used by the libuprple core. + * used by the libpurple core. */ gpointer purple_roomlist_get_ui_data(PurpleRoomlist *list);