summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2019-07-22 08:54:55 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2019-07-22 10:13:33 (GMT)
commitf6fb85ba98fdd6601c4b8323c51c8367ccc4b52e (patch)
tree16f37c7ad860a527aac7e29e4b9d7e61bf1b635f /Swiften/Parser/XMLParserClient.h
parentf4b6bfbf4c1573e9914185e2ef170f47838ea11a (diff)
downloadswift-f6fb85ba98fdd6601c4b8323c51c8367ccc4b52e.zip
swift-f6fb85ba98fdd6601c4b8323c51c8367ccc4b52e.tar.bz2
Signal namespace declarations to ParserClients
Prior to calling handleStartElement, the ParserClient handleNamespaceDeclaration will fire for each namespace declared on the element. Test-Information: Unit tests pass on Debian 9 for both expat and libxml2 Change-Id: Ic42e83aee83edfbb2aa5c971997808eb6e133223
Diffstat (limited to 'Swiften/Parser/XMLParserClient.h')
-rw-r--r--Swiften/Parser/XMLParserClient.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Swiften/Parser/XMLParserClient.h b/Swiften/Parser/XMLParserClient.h
index e4346f6..0682320 100644
--- a/Swiften/Parser/XMLParserClient.h
+++ b/Swiften/Parser/XMLParserClient.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010 Isode Limited. 2 * Copyright (c) 2010-2019 Isode Limited.
3 * All rights reserved. 3 * All rights reserved.
4 * See the COPYING file for more information. 4 * See the COPYING file for more information.
5 */ 5 */
@@ -17,5 +17,13 @@ namespace Swift {
17 virtual void handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) = 0; 17 virtual void handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) = 0;
18 virtual void handleEndElement(const std::string& element, const std::string& ns) = 0; 18 virtual void handleEndElement(const std::string& element, const std::string& ns) = 0;
19 virtual void handleCharacterData(const std::string& data) = 0; 19 virtual void handleCharacterData(const std::string& data) = 0;
20
21 /**
22 * Signal that a namespace prefix has been declared
23 * This callback might be called multiple times for a single element,
24 * and will trigger before the corresponding \ref handleStartElement
25 * is called.
26 */
27 virtual void handleNamespaceDeclaration(const std::string& prefix, const std::string& uri);
20 }; 28 };
21} 29}