diff options
Diffstat (limited to 'Swiften/Session')
-rw-r--r-- | Swiften/Session/BasicSessionStream.cpp | 4 | ||||
-rw-r--r-- | Swiften/Session/BasicSessionStream.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp index a9a3cb0..0d0f49f 100644 --- a/Swiften/Session/BasicSessionStream.cpp +++ b/Swiften/Session/BasicSessionStream.cpp @@ -11,7 +11,7 @@ namespace Swift { -BasicSessionStream::BasicSessionStream(boost::shared_ptr<Connection> connection, PayloadParserFactoryCollection* payloadParserFactories, PayloadSerializerCollection* payloadSerializers, TLSLayerFactory* tlsLayerFactory) : available(false), connection(connection), payloadParserFactories(payloadParserFactories), payloadSerializers(payloadSerializers), tlsLayerFactory(tlsLayerFactory) { +BasicSessionStream::BasicSessionStream(boost::shared_ptr<Connection> connection, PayloadParserFactoryCollection* payloadParserFactories, PayloadSerializerCollection* payloadSerializers, TLSLayerFactory* tlsLayerFactory, TimerFactory* timerFactory) : available(false), connection(connection), payloadParserFactories(payloadParserFactories), payloadSerializers(payloadSerializers), tlsLayerFactory(tlsLayerFactory), timerFactory(timerFactory) { } void BasicSessionStream::initialize() { @@ -77,7 +77,7 @@ void BasicSessionStream::addTLSEncryption() { void BasicSessionStream::setWhitespacePingEnabled(bool enabled) { if (enabled) { if (!whitespacePingLayer) { - whitespacePingLayer = boost::shared_ptr<WhitespacePingLayer>(new WhitespacePingLayer()); + whitespacePingLayer = boost::shared_ptr<WhitespacePingLayer>(new WhitespacePingLayer(timerFactory)); streamStack->addLayer(whitespacePingLayer); } whitespacePingLayer->setActive(); diff --git a/Swiften/Session/BasicSessionStream.h b/Swiften/Session/BasicSessionStream.h index 07bae81..f36df83 100644 --- a/Swiften/Session/BasicSessionStream.h +++ b/Swiften/Session/BasicSessionStream.h @@ -9,6 +9,7 @@ namespace Swift { class TLSLayerFactory; class TLSLayer; + class TimerFactory; class WhitespacePingLayer; class PayloadParserFactoryCollection; class PayloadSerializerCollection; @@ -24,7 +25,8 @@ namespace Swift { boost::shared_ptr<Connection> connection, PayloadParserFactoryCollection* payloadParserFactories, PayloadSerializerCollection* payloadSerializers, - TLSLayerFactory* tlsLayerFactory + TLSLayerFactory* tlsLayerFactory, + TimerFactory* whitespacePingLayerFactory ); ~BasicSessionStream(); @@ -59,6 +61,7 @@ namespace Swift { PayloadParserFactoryCollection* payloadParserFactories; PayloadSerializerCollection* payloadSerializers; TLSLayerFactory* tlsLayerFactory; + TimerFactory* timerFactory; boost::shared_ptr<XMPPLayer> xmppLayer; boost::shared_ptr<ConnectionLayer> connectionLayer; StreamStack* streamStack; |