diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-12 19:48:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-12 20:41:59 (GMT) |
commit | 8231ecc07c1c7d5e260a2795b0660de157501850 (patch) | |
tree | 935baa855914d632086fcac5f26330c2f0261216 /Swiften/Session | |
parent | 48bb7441f913144d6a20687ff79264e4631156f0 (diff) | |
download | swift-contrib-8231ecc07c1c7d5e260a2795b0660de157501850.zip swift-contrib-8231ecc07c1c7d5e260a2795b0660de157501850.tar.bz2 |
Created a TimerFactory, and abstracted Timer.
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; |