summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-12 16:15:41 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-12 16:15:41 +0300
commit7fce8a7217dd38316debcf2104fc8909c840a053 (patch)
tree28a4066bde1f0851652aa8dd0105433d72ffc499 /src/mir_app
parent34f7b71e7f52fe9a8368ed3ec182d3a1a0d48225 (diff)
tinyxml2 added to mir_core to replace the old xml parser
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/xmlApi.cpp2
-rw-r--r--src/mir_app/src/xmlParser.h27
2 files changed, 28 insertions, 1 deletions
diff --git a/src/mir_app/src/xmlApi.cpp b/src/mir_app/src/xmlApi.cpp
index 3545529df1..06a07fad45 100644
--- a/src/mir_app/src/xmlApi.cpp
+++ b/src/mir_app/src/xmlApi.cpp
@@ -164,7 +164,7 @@ MIR_APP_DLL(LPTSTR) xmlToString(HXML _n, int* datalen)
return XMLNode(_n).createXMLString(0, datalen);
}
-MIR_APP_DLL(XMLError) xmlToFile(HXML _n, LPCTSTR filename, int withformatting)
+MIR_APP_DLL(int) xmlToFile(HXML _n, LPCTSTR filename, int withformatting)
{
return XMLNode(_n).writeToFile(filename, nullptr, withformatting);
}
diff --git a/src/mir_app/src/xmlParser.h b/src/mir_app/src/xmlParser.h
index 0f1e477fe9..f489b583cd 100644
--- a/src/mir_app/src/xmlParser.h
+++ b/src/mir_app/src/xmlParser.h
@@ -146,6 +146,33 @@
#define TRUE 1
#endif /* TRUE */
+/// Enumeration for XML parse errors.
+typedef enum XMLError
+{
+ eXMLErrorNone = 0,
+ eXMLErrorMissingEndTag,
+ eXMLErrorNoXMLTagFound,
+ eXMLErrorEmpty,
+ eXMLErrorMissingTagName,
+ eXMLErrorMissingEndTagName,
+ eXMLErrorUnmatchedEndTag,
+ eXMLErrorUnmatchedEndClearTag,
+ eXMLErrorUnexpectedToken,
+ eXMLErrorNoElements,
+ eXMLErrorFileNotFound,
+ eXMLErrorFirstTagNotFound,
+ eXMLErrorUnknownCharacterEntity,
+ eXMLErrorCharacterCodeAbove255,
+ eXMLErrorCharConversionError,
+ eXMLErrorCannotOpenWriteFile,
+ eXMLErrorCannotWriteFile,
+
+ eXMLErrorBase64DataSizeIsNotMultipleOf4,
+ eXMLErrorBase64DecodeIllegalCharacter,
+ eXMLErrorBase64DecodeTruncatedData,
+ eXMLErrorBase64DecodeBufferTooSmall
+} XMLError;
+
/// Enumeration used to manage type of data. Use in conjunction with structure XMLNodeContents
typedef enum XMLElementType
{