diff options
Diffstat (limited to 'Swiften/Parser/BOSHBodyExtractor.h')
-rw-r--r-- | Swiften/Parser/BOSHBodyExtractor.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Swiften/Parser/BOSHBodyExtractor.h b/Swiften/Parser/BOSHBodyExtractor.h new file mode 100644 index 0000000..d1266c6 --- /dev/null +++ b/Swiften/Parser/BOSHBodyExtractor.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2011 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <boost/optional.hpp> + +#include <Swiften/Base/ByteArray.h> +#include <Swiften/Parser/XMLParserClient.h> + +namespace Swift { + struct XMLParserFactory; + + class BOSHBodyExtractor { + friend class BOSHBodyParserClient; + public: + struct BOSHBody { + AttributeMap attributes; + std::string content; + }; + + BOSHBodyExtractor(XMLParserFactory* parserFactory, const ByteArray& data); + + const boost::optional<BOSHBody>& getBody() { + return body; + } + + private: + boost::optional<BOSHBody> body; + }; +} |