pidgin: a4b2e618: Add additional accessor functions for Wh...

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


----------------------------------------------------------------------
Revision: a4b2e618587494a1f9d9bd8e874f696175aac31a
Parent:   af57d7a8b36956896c8ed439c0fee77a4672ff68
Author:   andrew.victor at mxit.com
Date:     08/30/11 18:02:29
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a4b2e618587494a1f9d9bd8e874f696175aac31a

Changelog: 

Add additional accessor functions for Whiteboard.


Changes against parent af57d7a8b36956896c8ed439c0fee77a4672ff68

  patched  libpurple/whiteboard.c
  patched  libpurple/whiteboard.h

-------------- next part --------------
============================================================
--- libpurple/whiteboard.c	a6a905697766f875b446faf6bef413e5f8caa8de
+++ libpurple/whiteboard.c	1ecb7d8fda55135e9fa86547e7f2502810852d6f
@@ -90,6 +90,34 @@ void purple_whiteboard_destroy(PurpleWhi
 	g_free(wb);
 }
 
+PurpleAccount *purple_whiteboard_get_account(const PurpleWhiteboard *wb)
+{
+	g_return_val_if_fail(wb != NULL, NULL);
+
+	return wb->account;
+}
+
+const char *purple_whiteboard_get_who(const PurpleWhiteboard *wb)
+{
+	g_return_val_if_fail(wb != NULL, NULL);
+
+	return wb->who;	
+}
+
+void purple_whiteboard_set_state(PurpleWhiteboard *wb, int state)
+{
+	g_return_if_fail(wb != NULL);
+
+	wb->state = state;
+}
+
+int purple_whiteboard_get_state(const PurpleWhiteboard *wb)
+{
+	g_return_val_if_fail(wb != NULL, -1);
+
+	return wb->state;
+}
+
 void purple_whiteboard_start(PurpleWhiteboard *wb)
 {
 	/* Create frontend for whiteboard */
@@ -206,6 +234,20 @@ void purple_whiteboard_set_brush(PurpleW
 		whiteboard_ui_ops->set_brush(wb, size, color);
 }
 
+GList *purple_whiteboard_get_draw_list(const PurpleWhiteboard *wb)
+{
+	g_return_val_if_fail(wb != NULL, NULL);
+
+	return wb->draw_list;
+}
+
+void purple_whiteboard_set_draw_list(PurpleWhiteboard *wb, GList* draw_list)
+{
+	g_return_if_fail(wb != NULL);
+
+	wb->draw_list = draw_list;
+}
+
 void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data)
 {
 	g_return_if_fail(wb != NULL);
============================================================
--- libpurple/whiteboard.h	a329a728dac45a2a57df3fbfb1a93c6276f81866
+++ libpurple/whiteboard.h	5fa0d8d851ed890e0f70ea97b0d7bf23ce67b64b
@@ -135,6 +135,41 @@ void purple_whiteboard_destroy(PurpleWhi
 void purple_whiteboard_destroy(PurpleWhiteboard *wb);
 
 /**
+ * Returns the whiteboard's account.
+ *
+ * @param wb		The whiteboard.
+ *
+ * @return The whiteboard's account.
+ */
+PurpleAccount *purple_whiteboard_get_account(const PurpleWhiteboard *wb);
+
+/**
+ * Return who you're drawing with.
+ *
+ * @param wb		The whiteboard
+ *
+ * @return Who you're drawing with.
+ */
+const char *purple_whiteboard_get_who(const PurpleWhiteboard *wb);
+
+/**
+ * Set the state of the whiteboard.
+ *
+ * @param wb		The whiteboard.
+ * @param state		The state
+ */
+void purple_whiteboard_set_state(PurpleWhiteboard *wb, int state);
+
+/**
+ * Return the state of the whiteboard.
+ *
+ * @param wb		The whiteboard.
+ *
+ * @return The state of the whiteboard.
+ */
+int purple_whiteboard_get_state(const PurpleWhiteboard *wb);
+
+/**
  * Starts a whiteboard
  *
  * @param wb The whiteboard.
@@ -254,6 +289,23 @@ void purple_whiteboard_set_brush(PurpleW
 void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color);
 
 /**
+ * Return the drawing list.
+ *
+ * @param wb			The whiteboard.
+ *
+ * @return The drawing list
+ */
+GList *purple_whiteboard_get_draw_list(const PurpleWhiteboard *wb);
+
+/**
+ * Set the drawing list.
+ *
+ * @param wb			The whiteboard
+ * @param draw_list		The drawing list.
+ */
+void purple_whiteboard_set_draw_list(PurpleWhiteboard *wb, GList* draw_list);
+
+/**
  * Sets the protocol data for a whiteboard.
  *
  * @param wb			The whiteboard.


More information about the Commits mailing list