diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-08 16:12:48 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-08 18:32:15 (GMT) |
commit | f1d74218cb432513c376b46aa115acb3e107ed3a (patch) | |
tree | 24df6a3233f1fd3c2c2592637cfcfd1846040dee /Swiften/Session/BasicSessionStream.h | |
parent | b6003bea740e8898127ec135e230eed421924370 (diff) | |
download | swift-contrib-f1d74218cb432513c376b46aa115acb3e107ed3a.zip swift-contrib-f1d74218cb432513c376b46aa115acb3e107ed3a.tar.bz2 |
Added Error class.
Diffstat (limited to 'Swiften/Session/BasicSessionStream.h')
-rw-r--r-- | Swiften/Session/BasicSessionStream.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Swiften/Session/BasicSessionStream.h b/Swiften/Session/BasicSessionStream.h index bf92bbb..d248ebc 100644 --- a/Swiften/Session/BasicSessionStream.h +++ b/Swiften/Session/BasicSessionStream.h @@ -1,6 +1,7 @@ #pragma once #include <boost/shared_ptr.hpp> +#include <boost/enable_shared_from_this.hpp> #include "Swiften/Network/Connection.h" #include "Swiften/Session/SessionStream.h" @@ -17,7 +18,7 @@ namespace Swift { class BasicSessionStream : public SessionStream, - public boost::BOOST_SIGNALS_NAMESPACE::trackable { + public boost::enable_shared_from_this<BasicSessionStream> { public: BasicSessionStream( boost::shared_ptr<Connection> connection, @@ -27,6 +28,8 @@ namespace Swift { ); ~BasicSessionStream(); + void initialize(); + virtual void writeHeader(const ProtocolHeader& header); virtual void writeElement(boost::shared_ptr<Element>); @@ -40,12 +43,17 @@ namespace Swift { private: void handleXMPPError(); void handleTLSError(); + void handleStreamStartReceived(const ProtocolHeader&); + void handleElementReceived(boost::shared_ptr<Element>); private: + boost::shared_ptr<Connection> connection; + PayloadParserFactoryCollection* payloadParserFactories; + PayloadSerializerCollection* payloadSerializers; + TLSLayerFactory* tlsLayerFactory; boost::shared_ptr<XMPPLayer> xmppLayer; boost::shared_ptr<ConnectionLayer> connectionLayer; StreamStack* streamStack; - TLSLayerFactory* tlsLayerFactory; boost::shared_ptr<TLSLayer> tlsLayer; boost::shared_ptr<WhitespacePingLayer> whitespacePingLayer; }; |