summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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;
};