blob: 0437b48bfd6e6a47094fd48845187a5e4ba5f8ec (
plain)
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
30
31
32
33
34
35
36
|
/*
* Copyright (c) 2017 Tarun Gupta
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include <Swiften/Parser/PayloadParsers/MIXDestroyParser.h>
#include <boost/optional.hpp>
#include <Swiften/Parser/PayloadParserFactory.h>
#include <Swiften/Parser/PayloadParsers/FormParser.h>
using namespace Swift;
MIXDestroyParser::MIXDestroyParser() : level_(0) {
}
MIXDestroyParser::~MIXDestroyParser() {
}
void MIXDestroyParser::handleStartElement(const std::string&, const std::string&, const AttributeMap& attributes) {
if (level_ == 0) {
if (boost::optional<std::string> attributeValue = attributes.getAttributeValue("channel")) {
getPayloadInternal()->setChannel(*attributeValue);
}
}
++level_;
}
void MIXDestroyParser::handleEndElement(const std::string&, const std::string&) {
--level_;
}
void MIXDestroyParser::handleCharacterData(const std::string&) {
}
|