cpw.gillux.detachablepurple: 056b42c3: D-Busified PurpleBlistNode, so that we c...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Sun May 20 13:20:54 EDT 2012


----------------------------------------------------------------------
Revision: 056b42c3e9f4f361fe248f0e138cd377b097ffe1
Parent:   fcc1ef13e4e11d85b2d8d28e82b7e3cef8ddf6a8
Author:   gillux at soc.pidgin.im
Date:     05/20/12 12:11:21
Branch:   im.pidgin.cpw.gillux.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/056b42c3e9f4f361fe248f0e138cd377b097ffe1

Changelog: 

D-Busified PurpleBlistNode, so that we could have the whole buddy list
tree exported as-is. Note that previously, we did not do this; we
only loaded the buddy list by creating group/contact/buddy/chat objects.
But that wasn't a good strategy, because we also need to keep track of
any change in the buddy list, and let the user change it arbitrarily.

Changes against parent fcc1ef13e4e11d85b2d8d28e82b7e3cef8ddf6a8

  added    libpurple/dbus/blist-node.c
  added    libpurple/dbus/blist-node.h
  added    libpurple/dbus/blist-node.xml
  patched  libpurple/blist-node.c

-------------- next part --------------
============================================================
--- libpurple/blist-node.c	5032d81f233cbc07b621471351ff146b341258a1
+++ libpurple/blist-node.c	0c397a82c8115bdc4d7d29fbc750232e4aada64c
@@ -24,6 +24,7 @@
 
 #include "internal.h"
 #include "blist-node.h"
+#include "dbus/blist-node.h"
 #include "dbus-maybe.h"
 #include "debug.h"
 #include "server.h"
@@ -893,6 +894,8 @@ purple_blist_node_class_init(PurpleBlist
 			purple_smarshal_VOID__OBJECT_OBJECT,
 			G_TYPE_NONE,
 			2, PURPLE_TYPE_BLIST_NODE, PURPLE_TYPE_BLIST_NODE);	/* New parent, Old parent */
+
+	purple_blist_node_class_dbus_init(klass);
 }
 
 static void
============================================================
--- /dev/null	
+++ libpurple/dbus/blist-node.c	53d04b4967d5824bfc81adaeb3cf835b2c276b7f
@@ -0,0 +1,37 @@
+/* purple
+ *
+ * Purple is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ */
+
+#include "internal.h"
+#include "dbus/blist-node.h"
+#include "dbus/blist-node.xml.h"
+#include "pobject.h"
+
+void
+purple_blist_node_class_dbus_init(PurpleBlistNodeClass *klass)
+{
+	PurpleObjectClass *pobjclass = PURPLE_OBJECT_CLASS(klass);
+
+	/* Register our interface. */
+	purple_object_class_register_dbus_iface
+	  (pobjclass, PURPLE_TYPE_BLIST_NODE,
+	   &purple_blist_node_interface_info);
+}
+
============================================================
--- /dev/null	
+++ libpurple/dbus/blist-node.h	1db696ea1afa6ff14e4ec1b7c93beb2c17e9e946
@@ -0,0 +1,41 @@
+/* purple
+ *
+ * Purple is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ */
+#ifndef _PURPLE_DBUS_BLIST_NODE_H
+#define _PURPLE_DBUS_BLIST_NODE_H
+
+#ifdef HAVE_DBUS
+
+G_BEGIN_DECLS
+
+/**
+ * Initialize the dbus data of the blist-node class.
+ */
+void purple_blist_node_class_dbus_init(PurpleBlistNodeClass *klass);
+
+G_END_DECLS
+
+#else /* !HAVE_DBUS */
+
+#define purple_blist_node_class_dbus_init(klass)                 ((void)0)
+
+#endif /* HAVE_DBUS */
+#endif /* _PURPLE_DBUS_BLIST_NODE_H */
+
============================================================
--- /dev/null	
+++ libpurple/dbus/blist-node.xml	0e181ff77b2a289d762d2a61fd108a7c10dd3372
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node>
+	<interface name="im.pidgin.purple.blistnode">
+		<property type="o" name="prev"   access="read" />
+		<property type="o" name="next"   access="read" />
+		<property type="o" name="parent" access="read" />
+		<property type="o" name="child"  access="read" />
+	</interface>
+</node>


More information about the Commits mailing list