diff libpurple/xmlnode.h @ 25086:774ef2a2e7f8

added a more generic function to read xml files (and made the util version into a wrapper) so it can be used by the theme loaders
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Mon, 16 Jun 2008 21:43:34 +0000
parents eb0f36c3a58f
children 4aeef8c3cce3
line wrap: on
line diff
--- a/libpurple/xmlnode.h	Mon Jun 16 19:48:56 2008 +0000
+++ b/libpurple/xmlnode.h	Mon Jun 16 21:43:34 2008 +0000
@@ -297,6 +297,20 @@
  */
 void xmlnode_free(xmlnode *node);
 
+/**
+ * Creates a node from a XML File.  Calling this on the
+ * root node of an XML document will parse the entire document
+ * into a tree of nodes, and return the xmlnode of the root.
+ *
+ * @param str  The string of xml.
+ * @param description  The description of the file being parsed
+ * @process  The utility that is calling xmlnode_from_file
+ *
+ * @return The new node.
+ */
+xmlnode *xmlnode_from_file(const char *dir, const char *filename, 
+			   const char *description, const char *process);
+
 #ifdef __cplusplus
 }
 #endif