changeset 32417:d61170e263b4

Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
author andrew.victor@mxit.com
date Fri, 26 Aug 2011 17:59:08 +0000
parents e46321099396
children a7c0e3ebdd84
files ChangeLog.API libpurple/ft.c libpurple/ft.h
diffstat 3 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Fri Aug 26 05:05:30 2011 +0000
+++ b/ChangeLog.API	Fri Aug 26 17:59:08 2011 +0000
@@ -15,6 +15,8 @@
 		* purple_roomlist_room_set_expanded_once
 		* purple_roomlist_set_proto_data
 		* purple_roomlist_set_ui_data
+		* purple_xfer_get_protocol_data
+		* purple_xfer_set_protocol_data
 
 		Changed:
 		* purple_connection_error now takes a PurpleConnectionError
--- a/libpurple/ft.c	Fri Aug 26 05:05:30 2011 +0000
+++ b/libpurple/ft.c	Fri Aug 26 17:59:08 2011 +0000
@@ -1701,6 +1701,22 @@
 	}
 }
 
+void
+purple_xfer_set_protocol_data(PurpleXfer *xfer, void *proto_data)
+{
+	g_return_if_fail(xfer != NULL);
+
+	xfer->data = proto_data;
+}
+
+void *
+purple_xfer_get_protocol_data(PurpleXfer *xfer)
+{
+	g_return_val_if_fail(xfer != NULL, NULL);
+
+	return xfer->data;
+}
+
 /**************************************************************************
  * File Transfer Subsystem API
  **************************************************************************/
--- a/libpurple/ft.h	Fri Aug 26 05:05:30 2011 +0000
+++ b/libpurple/ft.h	Fri Aug 26 17:59:08 2011 +0000
@@ -737,6 +737,26 @@
  */
 void purple_xfer_prepare_thumbnail(PurpleXfer *xfer, const gchar *formats);
 
+/**
+ * Sets the protocol data for a file transfer.
+ *
+ * @param xfer			The file transfer.
+ * @param protol_data	The protocol data to set for the file transfer.
+ *
+ * @since 3.0.0
+ */
+void purple_xfer_set_protocol_data(PurpleXfer *xfer, void *proto_data);
+ 
+/**
+ * Gets the protocol data for a file transfer.
+ *
+ * @param xfer			The file transfer.
+ *
+ * @return The protocol data for the file transfer.
+ *
+ * @since 3.0.0
+ */
+void *purple_xfer_get_protocol_data(PurpleXfer *xfer);
 
 /*@}*/