pidgin: 0211e940: Added protocol_data and ui_data accessor...

andrew.victor at mxit.com andrew.victor at mxit.com
Tue Aug 30 18:26:01 EDT 2011


----------------------------------------------------------------------
Revision: 0211e9404fad264cb6796abc47b0ee51efba7003
Parent:   337b6cddc285ca1f22c4ddccba894c91eb71b94f
Author:   andrew.victor at mxit.com
Date:     08/30/11 16:43:52
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0211e9404fad264cb6796abc47b0ee51efba7003

Changelog: 

Added protocol_data and ui_data accessor functions for Whiteboard.


Changes against parent 337b6cddc285ca1f22c4ddccba894c91eb71b94f

  patched  ChangeLog.API
  patched  libpurple/ft.h
  patched  libpurple/whiteboard.c
  patched  libpurple/whiteboard.h

-------------- next part --------------
============================================================
--- libpurple/ft.h	0c7ddb1ef4943f83abcaa39bb73a63fb2ddaff45
+++ libpurple/ft.h	3ce0352dae09cfed6f84321789dc7041555b8cbc
@@ -741,7 +741,7 @@ void purple_xfer_prepare_thumbnail(Purpl
  * 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.
+ * @param protocol_data	The protocol data to set for the file transfer.
  *
  * @since 3.0.0
  */
============================================================
--- ChangeLog.API	8193df1ee0d5cc1383b0159f0189535ea1a57d28
+++ ChangeLog.API	a3fc0a359a63df05b35df6e0ed42243e823aaff8
@@ -20,6 +20,10 @@ version 3.0.0 (??/??/????):
 		* purple_roomlist_room_set_expanded_once
 		* purple_roomlist_set_proto_data
 		* purple_roomlist_set_ui_data
+		* purple_whiteboard_get_protocol_data
+		* purple_whiteboard_set_protocol_data
+		* purple_whiteboard_get_ui_data
+		* purple_whiteboard_set_ui_data
 		* purple_xfer_get_protocol_data
 		* purple_xfer_get_ui_data
 		* purple_xfer_set_protocol_data
============================================================
--- libpurple/whiteboard.c	f0b3552b97ebdb869cdbc32342f6e010028d707e
+++ libpurple/whiteboard.c	a6a905697766f875b446faf6bef413e5f8caa8de
@@ -206,3 +206,30 @@ void purple_whiteboard_set_brush(PurpleW
 		whiteboard_ui_ops->set_brush(wb, size, color);
 }
 
+void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data)
+{
+	g_return_if_fail(wb != NULL);
+
+	wb->proto_data = proto_data;
+}
+
+gpointer purple_whiteboard_get_protocol_data(const PurpleWhiteboard *wb)
+{
+	g_return_val_if_fail(wb != NULL, NULL);
+
+	return wb->proto_data;
+}
+
+void purple_whiteboard_set_ui_data(PurpleWhiteboard *wb, gpointer ui_data)
+{
+	g_return_if_fail(wb != NULL);
+
+	wb->ui_data = ui_data;
+}
+
+gpointer purple_whiteboard_get_ui_data(const PurpleWhiteboard *wb)
+{
+	g_return_val_if_fail(wb != NULL, NULL);
+
+	return wb->ui_data;
+}
============================================================
--- libpurple/whiteboard.h	1c248a7d0309e7c03f3f27e30818ab2f2cd7c4e0
+++ libpurple/whiteboard.h	a329a728dac45a2a57df3fbfb1a93c6276f81866
@@ -253,6 +253,42 @@ void purple_whiteboard_set_brush(PurpleW
  */
 void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color);
 
+/**
+ * Sets the protocol data for a whiteboard.
+ *
+ * @param wb			The whiteboard.
+ * @param protocol_data	The protocol data to set for the whiteboard.
+ */
+void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data);
+ 
+/**
+ * Gets the protocol data for a whiteboard.
+ *
+ * @param wb			The whiteboard.
+ *
+ * @return The protocol data for the whiteboard.
+ */
+gpointer purple_whiteboard_get_protocol_data(const PurpleWhiteboard *wb);
+
+/**
+ * Set the UI data associated with this whiteboard.
+ *
+ * @param wb			The whiteboard.
+ * @param ui_data		A pointer to associate with this whiteboard.
+ */
+void purple_whiteboard_set_ui_data(PurpleWhiteboard *wb, gpointer ui_data);
+
+/**
+ * Get the UI data associated with this whiteboard.
+ *
+ * @param wb			The whiteboard..
+ *
+ * @return The UI data associated with this whiteboard.  This is a
+ *         convenience field provided to the UIs--it is not
+ *         used by the libpurple core.
+ */
+gpointer purple_whiteboard_get_ui_data(const PurpleWhiteboard *wb);
+
 /*@}*/
 
 #ifdef __cplusplus


More information about the Commits mailing list