Files
@ 4bb61b98b4fc
Branch filter:
Location: libtransport.git/include/Swiften/Parser/PayloadParsers/HintPayloadParser.cpp - annotation
4bb61b98b4fc
1.0 KiB
text/x-c++hdr
Twitter backend: disable DM polling
* Twitter make Direct Message API deprecated, DM polling is disabled until backend upgraded to new API
* Twitter make Direct Message API deprecated, DM polling is disabled until backend upgraded to new API
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&) {
}
}
|