summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-12 17:57:48 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-12 18:49:51 (GMT)
commit72858ab262a16aa8db209c2898ab0d3c951a9829 (patch)
tree411ccedbf9bdd746ccb1f124e74fe91111d63a56 /Swiften/Parser
parenteb1338be843c53aa02fac0d38455aada3f89db0b (diff)
downloadswift-contrib-72858ab262a16aa8db209c2898ab0d3c951a9829.zip
swift-contrib-72858ab262a16aa8db209c2898ab0d3c951a9829.tar.bz2
Added ServerFromClientSession.
Diffstat (limited to 'Swiften/Parser')
-rw-r--r--Swiften/Parser/XMPPParser.cpp2
-rw-r--r--Swiften/Parser/XMPPParserClient.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/Swiften/Parser/XMPPParser.cpp b/Swiften/Parser/XMPPParser.cpp
index e05cbca..59cfce7 100644
--- a/Swiften/Parser/XMPPParser.cpp
+++ b/Swiften/Parser/XMPPParser.cpp
@@ -54,7 +54,7 @@ bool XMPPParser::parse(const String& data) {
void XMPPParser::handleStartElement(const String& element, const String& ns, const AttributeMap& attributes) {
if (!inStream()) {
if (element == "stream" && ns == "http://etherx.jabber.org/streams") {
- client_->handleStreamStart();
+ client_->handleStreamStart(attributes.getAttribute("to"));
}
else {
parseErrorOccurred_ = true;
diff --git a/Swiften/Parser/XMPPParserClient.h b/Swiften/Parser/XMPPParserClient.h
index abecc71..d19c7d0 100644
--- a/Swiften/Parser/XMPPParserClient.h
+++ b/Swiften/Parser/XMPPParserClient.h
@@ -6,12 +6,13 @@
#include "Swiften/Elements/Element.h"
namespace Swift {
- class XMPPParserClient
- {
+ class String;
+
+ class XMPPParserClient {
public:
virtual ~XMPPParserClient();
- virtual void handleStreamStart() = 0;
+ virtual void handleStreamStart(const String& header) = 0;
virtual void handleElement(boost::shared_ptr<Element>) = 0;
virtual void handleStreamEnd() = 0;
};