Files
@ daeb6dfc9a9f
Branch filter:
Location: libtransport.git/include/Swiften/Serializer/PayloadSerializers/HintPayloadSerializer.cpp - annotation
daeb6dfc9a9f
1.0 KiB
text/x-c++hdr
Enable support for Qt5
Since Qt4 is EOL, we should also support libcommuni build with Qt5.
In order not to break Fedora docker builds, -DENABLE_QT4 is introduced.
When set to 'ON', support for Qt4 is being enabled,
otherwise support for Qt5 is enabled.
Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
Since Qt4 is EOL, we should also support libcommuni build with Qt5.
In order not to break Fedora docker builds, -DENABLE_QT4 is introduced.
When set to 'ON', support for Qt4 is being enabled,
otherwise support for Qt5 is enabled.
Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
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 <string>
#include <Swiften/Serializer/PayloadSerializers/HintPayloadSerializer.h>
#include <boost/shared_ptr.hpp>
#include <Swiften/Serializer/XML/XMLTextNode.h>
#include <Swiften/Serializer/XML/XMLRawTextNode.h>
#include <Swiften/Serializer/XML/XMLElement.h>
namespace Swift {
HintPayloadSerializer::HintPayloadSerializer() : GenericPayloadSerializer<HintPayload>() {
}
std::string HintPayloadSerializer::serializePayload(SWIFTEN_SHRPTR_NAMESPACE::shared_ptr<HintPayload> hint) const {
std::string tagname = "";
switch(hint->getType()) {
case HintPayload::NoPermanentStore: tagname = "no-permanent-store"; break;
case HintPayload::NoStore: tagname = "no-store"; break;
case HintPayload::NoCopy: tagname = "no-copy"; break;
case HintPayload::Store: tagname = "store"; break;
}
return XMLElement(tagname, "urn:xmpp:hints").serialize();
}
}
|