diff options
author | Edwin Mons <edwin.mons@isode.com> | 2019-07-22 08:54:55 (GMT) |
---|---|---|
committer | Edwin Mons <edwin.mons@isode.com> | 2019-07-22 10:13:33 (GMT) |
commit | f6fb85ba98fdd6601c4b8323c51c8367ccc4b52e (patch) | |
tree | 16f37c7ad860a527aac7e29e4b9d7e61bf1b635f /Swiften/Parser/XMLParserClient.h | |
parent | f4b6bfbf4c1573e9914185e2ef170f47838ea11a (diff) | |
download | swift-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.h | 10 |
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 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2019 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -17,5 +17,13 @@ namespace Swift { virtual void handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) = 0; virtual void handleEndElement(const std::string& element, const std::string& ns) = 0; virtual void handleCharacterData(const std::string& data) = 0; + + /** + * Signal that a namespace prefix has been declared + * This callback might be called multiple times for a single element, + * and will trigger before the corresponding \ref handleStartElement + * is called. + */ + virtual void handleNamespaceDeclaration(const std::string& prefix, const std::string& uri); }; } |