summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-15 16:15:57 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-15 16:15:57 (GMT)
commit062658db9f46ef749eeec09c162e5afaf1524ab6 (patch)
tree12ea883e39c7d938310ea715c71127bc1801319c /Swiften/StreamStack
parentf52aa93c3d6d5976b072d31f3d3336beb1596ece (diff)
downloadswift-contrib-062658db9f46ef749eeec09c162e5afaf1524ab6.zip
swift-contrib-062658db9f46ef749eeec09c162e5afaf1524ab6.tar.bz2
Added Component parser, serializer, element, and connector.
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);