summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp
index c101623..aba1cae 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp
@@ -22,23 +22,23 @@ PubSubDefaultSerializer::~PubSubDefaultSerializer() {
}
std::string PubSubDefaultSerializer::serializePayload(boost::shared_ptr<PubSubDefault> payload) const {
- if (!payload) {
- return "";
- }
- XMLElement element("default", "http://jabber.org/protocol/pubsub");
- if (payload->getNode()) {
- element.setAttribute("node", *payload->getNode());
- }
- element.setAttribute("type", serializeType(payload->getType()));
- return element.serialize();
+ if (!payload) {
+ return "";
+ }
+ XMLElement element("default", "http://jabber.org/protocol/pubsub");
+ if (payload->getNode()) {
+ element.setAttribute("node", *payload->getNode());
+ }
+ element.setAttribute("type", serializeType(payload->getType()));
+ return element.serialize();
}
std::string PubSubDefaultSerializer::serializeType(PubSubDefault::Type value) {
- switch (value) {
- case PubSubDefault::None: return "none";
- case PubSubDefault::Collection: return "collection";
- case PubSubDefault::Leaf: return "leaf";
- }
- assert(false);
- return "";
+ switch (value) {
+ case PubSubDefault::None: return "none";
+ case PubSubDefault::Collection: return "collection";
+ case PubSubDefault::Leaf: return "leaf";
+ }
+ assert(false);
+ return "";
}