Files
@ 3ba2aa3d34f3
Branch filter:
Location: libtransport.git/include/Swiften/Parser/PayloadParsers/PubSubItemParser.cpp - annotation
3ba2aa3d34f3
833 B
text/x-c++hdr
AdHocCommand: fix empty response when user is not registered or storage not configured
7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 7c90087b1774 | /*
* Copyright (c) 2012 Jan Kaluza
* Licensed under the Simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include <Swiften/Parser/PayloadParsers/PubSubItemParser.h>
#include <boost/lexical_cast.hpp>
#include <Swiften/Parser/PayloadParserFactoryCollection.h>
#include <Swiften/Parser/PayloadParserFactory.h>
#include <Swiften/Base/foreach.h>
#include <Swiften/Elements/MUCOccupant.h>
#include <Swiften/Parser/Tree/TreeReparser.h>
namespace Swift {
void PubSubItemParser::handleTree(ParserElement::ref root) {
std::string id = root->getAttributes().getAttribute("id");
if (!id.empty()) {
getPayloadInternal()->setId(id);
}
foreach (ParserElement::ref child, root->getAllChildren()) {
getPayloadInternal()->addPayload(TreeReparser::parseTree(child, factories));
}
}
}
|