summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StreamStack')
-rw-r--r--Swiften/StreamStack/UnitTest/StreamStackTest.cpp2
-rw-r--r--Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp2
-rw-r--r--Swiften/StreamStack/XMPPLayer.cpp5
-rw-r--r--Swiften/StreamStack/XMPPLayer.h4
4 files changed, 8 insertions, 5 deletions
diff --git a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp
index ab716b4..0ea0835 100644
--- a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp
+++ b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp
@@ -36,7 +36,7 @@ class StreamStackTest : public CppUnit::TestFixture
void setUp() {
physicalStream_ = boost::shared_ptr<TestLowLayer>(new TestLowLayer());
- xmppStream_ = boost::shared_ptr<XMPPLayer>(new XMPPLayer(&parserFactories_, &serializers_));
+ xmppStream_ = boost::shared_ptr<XMPPLayer>(new XMPPLayer(&parserFactories_, &serializers_, ClientStreamType));
elementsReceived_ = 0;
dataWriteReceived_ = 0;
}
diff --git a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp
index 8f98de5..6db997e 100644
--- a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp
+++ b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp
@@ -33,7 +33,7 @@ class XMPPLayerTest : public CppUnit::TestFixture
XMPPLayerTest() {}
void setUp() {
- testling_ = new XMPPLayer(&parserFactories_, &serializers_);
+ testling_ = new XMPPLayer(&parserFactories_, &serializers_, ClientStreamType);
elementsReceived_ = 0;
dataReceived_ = "";
errorReceived_ = 0;
diff --git a/Swiften/StreamStack/XMPPLayer.cpp b/Swiften/StreamStack/XMPPLayer.cpp
index 9782240..d4e329b 100644
--- a/Swiften/StreamStack/XMPPLayer.cpp
+++ b/Swiften/StreamStack/XMPPLayer.cpp
@@ -13,13 +13,14 @@ namespace Swift {
XMPPLayer::XMPPLayer(
PayloadParserFactoryCollection* payloadParserFactories,
- PayloadSerializerCollection* payloadSerializers) :
+ PayloadSerializerCollection* payloadSerializers,
+ StreamType streamType) :
payloadParserFactories_(payloadParserFactories),
payloadSerializers_(payloadSerializers),
resetParserAfterParse_(false),
inParser_(false) {
xmppParser_ = new XMPPParser(this, payloadParserFactories_);
- xmppSerializer_ = new XMPPSerializer(payloadSerializers_);
+ xmppSerializer_ = new XMPPSerializer(payloadSerializers_, streamType);
}
XMPPLayer::~XMPPLayer() {
diff --git a/Swiften/StreamStack/XMPPLayer.h b/Swiften/StreamStack/XMPPLayer.h
index 0df1f14..7316afe 100644
--- a/Swiften/StreamStack/XMPPLayer.h
+++ b/Swiften/StreamStack/XMPPLayer.h
@@ -12,6 +12,7 @@
#include "Swiften/Base/ByteArray.h"
#include "Swiften/Elements/Element.h"
+#include "Swiften/Elements/StreamType.h"
#include "Swiften/Parser/XMPPParserClient.h"
namespace Swift {
@@ -25,7 +26,8 @@ namespace Swift {
public:
XMPPLayer(
PayloadParserFactoryCollection* payloadParserFactories,
- PayloadSerializerCollection* payloadSerializers);
+ PayloadSerializerCollection* payloadSerializers,
+ StreamType streamType);
~XMPPLayer();
void writeHeader(const ProtocolHeader& header);