diff libpurple/blist.c @ 25821:2b8c85f74ede

Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions. Added PURPLE_BLIST_NODE, PURPLE_GROUP, PURPLE_CONTACT, PURPLE_BUDDY, and PURPLE_CHAT type casting macros. These will be later replaced with the gobject type checking and casting macros, so please try to convert all existing explicit typecasts that you see
author Gary Kramlich <grim@reaperworld.com>
date Mon, 03 Nov 2008 04:48:23 +0000
parents b48f6d0ecdf7
children 0e08c847517d
line wrap: on
line diff
--- a/libpurple/blist.c	Mon Nov 03 02:30:38 2008 +0000
+++ b/libpurple/blist.c	Mon Nov 03 04:48:23 2008 +0000
@@ -705,6 +705,18 @@
 	return purplebuddylist ? purplebuddylist->buddies : NULL;
 }
 
+void *
+purple_blist_get_ui_data()
+{
+	return purplebuddylist->ui_data;
+}
+
+void
+purple_blist_set_ui_data(void *ui_data)
+{
+	purplebuddylist->ui_data = ui_data;
+}
+
 void purple_blist_show()
 {
 	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
@@ -780,6 +792,21 @@
 	return node? node->prev : NULL;
 }
 
+void *
+purple_blist_node_get_ui_data(const PurpleBlistNode *node)
+{
+	g_return_val_if_fail(node, NULL);
+
+	return node->ui_data;
+}
+
+void
+purple_blist_node_set_ui_data(PurpleBlistNode *node, void *ui_data) {
+	g_return_if_fail(node);
+
+	node->ui_data = ui_data;
+}
+
 void
 purple_blist_update_buddy_status(PurpleBuddy *buddy, PurpleStatus *old_status)
 {