Files
@ 5768326d7b6e
Branch filter:
Location: libtransport.git/include/Swiften/Parser/PayloadParsers/HintPayloadParser.cpp - annotation
5768326d7b6e
1.0 KiB
text/x-c++hdr
cmake: cleanup configuration
* rename CMake modules to follow CMAKE_MODULE_PATH matching rules
* fix git ignore rules to not ignore CMake modules
* add CMake module to find jsoncpp without pkg-config
* drop unused/outdated modules
* rename CMake modules to follow CMAKE_MODULE_PATH matching rules
* fix git ignore rules to not ignore CMake modules
* add CMake module to find jsoncpp without pkg-config
* drop unused/outdated modules
0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 0a78acefef91 | /*
* Implements XEP-0334: Message Processing Hints
* Licensed under the Simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include <Swiften/Parser/PayloadParsers/HintPayloadParser.h>
namespace Swift {
HintPayloadParser::HintPayloadParser() : level_(0) {
}
void HintPayloadParser::handleStartElement(const std::string& element, const std::string& /*ns*/, const AttributeMap& /*attributes*/) {
if (level_ == 0) {
HintPayload::Type type = HintPayload::NoCopy;
if (element == "no-permanent-store") {
type = HintPayload::NoPermanentStore;
} else if (element == "no-store") {
type = HintPayload::NoStore;
} else if (element == "no-copy") {
type = HintPayload::NoCopy;
} else if (element == "store") {
type = HintPayload::Store;
}
getPayloadInternal()->setType(type);
}
++level_;
}
void HintPayloadParser::handleEndElement(const std::string&, const std::string&) {
--level_;
}
void HintPayloadParser::handleCharacterData(const std::string&) {
}
}
|