changeset 32427:ff051a32e1e8

Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
author andrew.victor@mxit.com
date Fri, 26 Aug 2011 19:55:34 +0000
parents 5b5fd57ff3ae
children a2febd62ec3d
files ChangeLog.API libpurple/ft.c libpurple/ft.h libpurple/roomlist.h
diffstat 4 files changed, 38 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
  **************************************************************************/
--- 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);
+
 /*@}*/
 
 /**************************************************************************/
--- 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);