summaryrefslogtreecommitdiffstats
path: root/pcilib/xml.h
diff options
context:
space:
mode:
authorzilio nicolas <nicolas.zilio@kit.edu>2015-09-04 20:31:14 +0200
committerzilio nicolas <nicolas.zilio@kit.edu>2015-09-04 20:31:14 +0200
commitea28e2990ae59e21856d9ae0311cec5b5415237b (patch)
treed4b71d8880c9d6613a512f2a950b0508f5192858 /pcilib/xml.h
parent86cca494757d4911041367c5d1d3a86395a541f5 (diff)
downloadpcitool-ea28e2990ae59e21856d9ae0311cec5b5415237b.tar.gz
pcitool-ea28e2990ae59e21856d9ae0311cec5b5415237b.tar.bz2
pcitool-ea28e2990ae59e21856d9ae0311cec5b5415237b.tar.xz
pcitool-ea28e2990ae59e21856d9ae0311cec5b5415237b.zip
end of modifications
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_*/