1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
/*
* Copyright (c) 2011 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Parser/StreamManagementEnabledParser.h>
using namespace Swift;
StreamManagementEnabledParser::StreamManagementEnabledParser() : level(TopLevel) {
}
StreamManagementEnabledParser::~StreamManagementEnabledParser() {
}
void StreamManagementEnabledParser::handleStartElement(const std::string&, const std::string&, const AttributeMap& attributes) {
if (level == TopLevel) {
if (attributes.getBoolAttribute("resume", false)) {
getElementGeneric()->setResumeSupported();
}
getElementGeneric()->setResumeID(attributes.getAttribute("id"));
}
++level;
}
void StreamManagementEnabledParser::handleEndElement(const std::string&, const std::string&) {
--level;
}
|