From 3149fdcec94191102fd801c7967a5e3cb5b330a7 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Tue, 2 Jun 2009 15:40:57 +0200 Subject: Rewrote the dmiMAP_ParseMappingXML(...) function and split it up Removed the automagic in the dmiMAP_ParseMappingXML(...) function from automatically decide what to parse (TypeMapping or GroupMapping). Introduced two new functions instead: - dmiMAP_ParseMappingXML_GroupName(xmlDoc *xmlmap, const char *name) Parses the XML mapping document, using the GroupMapping tags and building up a proper ptzMAP structure for all TypeMap defined in that group. - dmiMAP_ParseMappingXML_TypeID(xmlDoc *xmlmap, const char *typeid) Parses the XML mapping document, using only the TypeMapping section in th mapping document. Rewrote a lot of internal parts to reuse as much of the existing code as possible. --- src/xmlpythonizer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/xmlpythonizer.h') diff --git a/src/xmlpythonizer.h b/src/xmlpythonizer.h index e659340..bda077e 100644 --- a/src/xmlpythonizer.h +++ b/src/xmlpythonizer.h @@ -48,7 +48,8 @@ typedef struct ptzMAP_s { } ptzMAP; -ptzMAP *dmiMAP_ParseMappingXML(xmlDoc *xmlmap, const char *mapname); +ptzMAP *dmiMAP_ParseMappingXML_TypeID(xmlDoc *xmlmap, const char *mapname); +ptzMAP *dmiMAP_ParseMappingXML_GroupName(xmlDoc *xmlmap, const char *mapname); #define ptzmap_Free(ptr) { ptzmap_Free_func(ptr); ptr = NULL; } void ptzmap_Free_func(ptzMAP *ptr); -- cgit