summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp
index 91a467c..f537f40 100644
--- a/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp
@@ -17,20 +17,20 @@ DiscoItemsSerializer::DiscoItemsSerializer() : GenericPayloadSerializer<DiscoIte
}
std::string DiscoItemsSerializer::serializePayload(boost::shared_ptr<DiscoItems> discoItems) const {
- XMLElement queryElement("query", "http://jabber.org/protocol/disco#items");
- if (!discoItems->getNode().empty()) {
- queryElement.setAttribute("node", discoItems->getNode());
- }
- foreach(const DiscoItems::Item& item, discoItems->getItems()) {
- boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
- itemElement->setAttribute("name", item.getName());
- itemElement->setAttribute("jid", item.getJID());
- if (!item.getNode().empty()) {
- itemElement->setAttribute("node", item.getNode());
- }
- queryElement.addNode(itemElement);
- }
- return queryElement.serialize();
+ XMLElement queryElement("query", "http://jabber.org/protocol/disco#items");
+ if (!discoItems->getNode().empty()) {
+ queryElement.setAttribute("node", discoItems->getNode());
+ }
+ foreach(const DiscoItems::Item& item, discoItems->getItems()) {
+ boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
+ itemElement->setAttribute("name", item.getName());
+ itemElement->setAttribute("jid", item.getJID());
+ if (!item.getNode().empty()) {
+ itemElement->setAttribute("node", item.getNode());
+ }
+ queryElement.addNode(itemElement);
+ }
+ return queryElement.serialize();
}
}