diff options
Diffstat (limited to 'Swiften/Parser/XMLParser.h')
-rw-r--r-- | Swiften/Parser/XMLParser.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/Swiften/Parser/XMLParser.h b/Swiften/Parser/XMLParser.h index 6ecc626..3b09d22 100644 --- a/Swiften/Parser/XMLParser.h +++ b/Swiften/Parser/XMLParser.h @@ -1,7 +1,7 @@ /* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2010-2019 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ #pragma once @@ -11,20 +11,25 @@ #include <Swiften/Base/API.h> namespace Swift { - class XMLParserClient; + class XMLParserClient; - class SWIFTEN_API XMLParser { - public: - XMLParser(XMLParserClient* client); - virtual ~XMLParser(); + class SWIFTEN_API XMLParser { + public: + XMLParser(XMLParserClient* client, bool allowComments = false); + virtual ~XMLParser(); - virtual bool parse(const std::string& data) = 0; + virtual bool parse(const std::string& data, bool finalData = false) = 0; - XMLParserClient* getClient() const { - return client_; - } + XMLParserClient* getClient() const { + return client_; + } - private: - XMLParserClient* client_; - }; + bool allowsComments() const { + return allowComments_; + } + + private: + XMLParserClient* client_; + const bool allowComments_ = false; + }; } |