summaryrefslogtreecommitdiffstats
path: root/pcilib/xml.h
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/xml.h')
-rw-r--r--pcilib/xml.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/pcilib/xml.h b/pcilib/xml.h
index ef08d10..c10a9d3 100644
--- a/pcilib/xml.h
+++ b/pcilib/xml.h
@@ -12,23 +12,24 @@
#ifndef _XML_
#define _XML_
-/*#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-*/
+#include <libxml/tree.h>
#include "pcilib.h"
-#define REGISTERS_PATH ((xmlChar*)"/model/banks/bank/registers/register") /**<all standard registers nodes.*/
-
-#define BITS_REGISTERS_PATH ((xmlChar*)"/model/banks/bank/registers/register/registers_bits/register_bits") /**<all bits registers nodes.*/
-
-#define BANKS_PATH ((xmlChar*)"/model/banks/bank/bank_description") /**< path to complete nodes of banks.*/
+typedef struct{
+ xmlDocPtr* docs;
+}pcilib_xml_context_t;
/**
* this function gets the xml files and validates them, before filling the pcilib_t struct with the registers and banks of those files
*@param[in,out] pci the pcilib_t struct running that gets filled with banks and registers
+ *@param[in] model the name of the model
*/
-int pcilib_init_xml(pcilib_t* pci);
+int pcilib_init_xml(pcilib_t* pci, char* model);
+
+/** pcilib_clean_xml
+ * this function free the xml parts of the pcilib_t running, and some libxml ashes
+ * @param[in] pci the pcilib_t running
+*/
+void pcilib_clean_xml(pcilib_t* pci);
#endif /*_XML_*/