diff --git a/include/Swiften/Parser/PayloadParsers/GatewayPayloadParser.cpp b/include/Swiften/Parser/PayloadParsers/GatewayPayloadParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..304379262665a5fed3352e3dc2e07f2f3f8c67c4 --- /dev/null +++ b/include/Swiften/Parser/PayloadParsers/GatewayPayloadParser.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2012 Jan Kaluza + * Licensed under the Simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#include + +#include + +#include +#include +#include +#include +#include + +namespace Swift { + +void GatewayPayloadParser::handleTree(ParserElement::ref root) { + foreach (ParserElement::ref child, root->getAllChildren()) { + if (child->getName() == "desc") { + getPayloadInternal()->setDesc(child->getText()); + } + else if (child->getName() == "prompt") { + getPayloadInternal()->setPrompt(child->getText()); + } + else if (child->getName() == "jid") { + getPayloadInternal()->setJID(child->getText()); + } + } +} + +}