diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/JingleIBBTransportMethodPayloadParser.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/JingleIBBTransportMethodPayloadParser.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/Swiften/Parser/PayloadParsers/JingleIBBTransportMethodPayloadParser.cpp b/Swiften/Parser/PayloadParsers/JingleIBBTransportMethodPayloadParser.cpp index d140368..438420b 100644 --- a/Swiften/Parser/PayloadParsers/JingleIBBTransportMethodPayloadParser.cpp +++ b/Swiften/Parser/PayloadParsers/JingleIBBTransportMethodPayloadParser.cpp @@ -5,43 +5,43 @@ */ /* - * Copyright (c) 2013 Remko Tronçon - * Licensed under the GNU General Public License. + * Copyright (c) 2013-2016 Isode Limited. + * All rights reserved. * See the COPYING file for more information. */ +#include <Swiften/Parser/PayloadParsers/JingleIBBTransportMethodPayloadParser.h> + #include <boost/lexical_cast.hpp> #include <boost/optional.hpp> -#include "JingleIBBTransportMethodPayloadParser.h" - #include <Swiften/Base/Log.h> namespace Swift { - JingleIBBTransportMethodPayloadParser::JingleIBBTransportMethodPayloadParser() : level(0) { - - } - - void JingleIBBTransportMethodPayloadParser::handleStartElement(const std::string&, const std::string&, const AttributeMap& attributes) { - try { - boost::optional<std::string> blockSize = attributes.getAttributeValue("block-size"); - if (blockSize) { - getPayloadInternal()->setBlockSize(boost::lexical_cast<unsigned int>(*blockSize)); - } - } - catch (boost::bad_lexical_cast &) { - } - getPayloadInternal()->setSessionID(attributes.getAttributeValue("sid").get_value_or("")); - ++level; - } - - void JingleIBBTransportMethodPayloadParser::handleEndElement(const std::string&, const std::string&) { - --level; - - - } - - void JingleIBBTransportMethodPayloadParser::handleCharacterData(const std::string&) { - - } + JingleIBBTransportMethodPayloadParser::JingleIBBTransportMethodPayloadParser() : level(0) { + + } + + void JingleIBBTransportMethodPayloadParser::handleStartElement(const std::string&, const std::string&, const AttributeMap& attributes) { + try { + boost::optional<std::string> blockSize = attributes.getAttributeValue("block-size"); + if (blockSize) { + getPayloadInternal()->setBlockSize(boost::lexical_cast<unsigned int>(*blockSize)); + } + } + catch (boost::bad_lexical_cast &) { + } + getPayloadInternal()->setSessionID(attributes.getAttributeValue("sid").get_value_or("")); + ++level; + } + + void JingleIBBTransportMethodPayloadParser::handleEndElement(const std::string&, const std::string&) { + --level; + + + } + + void JingleIBBTransportMethodPayloadParser::handleCharacterData(const std::string&) { + + } } |