diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-10-01 10:37:45 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-10-01 10:37:45 (GMT) |
commit | 3476833ca17c19dba0a31645d689f216039107dc (patch) | |
tree | 258a0498acd20bb4718dbe0d06fb896e573fcf81 /Swiften/Parser/BOSHBodyExtractor.h | |
parent | b23589f7ee2451653895f741506602ff94e482be (diff) | |
download | swift-contrib-3476833ca17c19dba0a31645d689f216039107dc.zip swift-contrib-3476833ca17c19dba0a31645d689f216039107dc.tar.bz2 |
Added <body/> extractor code.
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; + }; +} |