diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/SoftwareVersionParser.h')
-rw-r--r-- | Swiften/Parser/PayloadParsers/SoftwareVersionParser.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/SoftwareVersionParser.h b/Swiften/Parser/PayloadParsers/SoftwareVersionParser.h new file mode 100644 index 0000000..bfffc90 --- /dev/null +++ b/Swiften/Parser/PayloadParsers/SoftwareVersionParser.h @@ -0,0 +1,26 @@ +#ifndef SWIFTEN_SoftwareVersionParser_H +#define SWIFTEN_SoftwareVersionParser_H + +#include "Swiften/Elements/SoftwareVersion.h" +#include "Swiften/Parser/GenericPayloadParser.h" + +namespace Swift { + class SoftwareVersionParser : public GenericPayloadParser<SoftwareVersion> { + public: + SoftwareVersionParser(); + + virtual void handleStartElement(const String& element, const String&, const AttributeMap& attributes); + virtual void handleEndElement(const String& element, const String&); + virtual void handleCharacterData(const String& data); + + private: + enum Level { + TopLevel = 0, + PayloadLevel = 1 + }; + int level_; + String currentText_; + }; +} + +#endif |