summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-19 14:10:39 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-19 17:17:45 (GMT)
commitd67ecb18c1178ecf69e6cb5e8c8ee1fecee35e4c (patch)
tree5f05b975ae39b2318d85f9ed673e2434f2916981 /Swiften/Session/Session.cpp
parente8b2e33a6fc569af116a32ebb5e441728e390c8f (diff)
downloadswift-d67ecb18c1178ecf69e6cb5e8c8ee1fecee35e4c.zip
swift-d67ecb18c1178ecf69e6cb5e8c8ee1fecee35e4c.tar.bz2
Refactoring streamstack to not use signal/slots.
Diffstat (limited to 'Swiften/Session/Session.cpp')
-rw-r--r--Swiften/Session/Session.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Swiften/Session/Session.cpp b/Swiften/Session/Session.cpp
index 747d1d9..39fab14 100644
--- a/Swiften/Session/Session.cpp
+++ b/Swiften/Session/Session.cpp
@@ -20,12 +20,16 @@ Session::Session(
connection(connection),
payloadParserFactories(payloadParserFactories),
payloadSerializers(payloadSerializers),
+ xmppLayer(NULL),
+ connectionLayer(NULL),
streamStack(0),
finishing(false) {
}
Session::~Session() {
delete streamStack;
+ delete connectionLayer;
+ delete xmppLayer;
}
void Session::startSession() {
@@ -50,8 +54,7 @@ void Session::finishSession(const SessionError& error) {
}
void Session::initializeStreamStack() {
- xmppLayer = boost::shared_ptr<XMPPLayer>(
- new XMPPLayer(payloadParserFactories, payloadSerializers, ClientStreamType));
+ xmppLayer = new XMPPLayer(payloadParserFactories, payloadSerializers, ClientStreamType);
xmppLayer->onStreamStart.connect(
boost::bind(&Session::handleStreamStart, shared_from_this(), _1));
xmppLayer->onElement.connect(boost::bind(&Session::handleElement, shared_from_this(), _1));
@@ -61,7 +64,7 @@ void Session::initializeStreamStack() {
xmppLayer->onWriteData.connect(boost::bind(boost::ref(onDataWritten), _1));
connection->onDisconnected.connect(
boost::bind(&Session::handleDisconnected, shared_from_this(), _1));
- connectionLayer = boost::shared_ptr<ConnectionLayer>(new ConnectionLayer(connection));
+ connectionLayer = new ConnectionLayer(connection);
streamStack = new StreamStack(xmppLayer, connectionLayer);
}