summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-03-28 13:40:14 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-03-28 13:40:43 (GMT)
commitb61486fefe602e0d18fa5279021006f87b965307 (patch)
tree437585cbef1179e1ec31f79789591d5610200c29 /Swiften/Session/BasicSessionStream.h
parentdae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8 (diff)
downloadswift-b61486fefe602e0d18fa5279021006f87b965307.zip
swift-b61486fefe602e0d18fa5279021006f87b965307.tar.bz2
Moved Swiften to a separate module.
Diffstat (limited to 'Swiften/Session/BasicSessionStream.h')
m---------Swiften0
-rw-r--r--Swiften/Session/BasicSessionStream.h75
2 files changed, 0 insertions, 75 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/Session/BasicSessionStream.h b/Swiften/Session/BasicSessionStream.h
deleted file mode 100644
index 8618458..0000000
--- a/Swiften/Session/BasicSessionStream.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#pragma once
-
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-
-#include "Swiften/Network/Connection.h"
-#include "Swiften/Session/SessionStream.h"
-
-namespace Swift {
- class TLSLayerFactory;
- class TLSLayer;
- class TimerFactory;
- class WhitespacePingLayer;
- class PayloadParserFactoryCollection;
- class PayloadSerializerCollection;
- class StreamStack;
- class XMPPLayer;
- class ConnectionLayer;
- class CompressionLayer;
-
- class BasicSessionStream :
- public SessionStream,
- public boost::enable_shared_from_this<BasicSessionStream> {
- public:
- BasicSessionStream(
- boost::shared_ptr<Connection> connection,
- PayloadParserFactoryCollection* payloadParserFactories,
- PayloadSerializerCollection* payloadSerializers,
- TLSLayerFactory* tlsLayerFactory,
- TimerFactory* whitespacePingLayerFactory
- );
- ~BasicSessionStream();
-
- void initialize();
-
- virtual bool isAvailable();
-
- virtual void writeHeader(const ProtocolHeader& header);
- virtual void writeElement(boost::shared_ptr<Element>);
- virtual void writeFooter();
-
- virtual void addZLibCompression();
-
- virtual bool supportsTLSEncryption();
- virtual void addTLSEncryption();
-
- virtual void setWhitespacePingEnabled(bool);
-
- virtual void resetXMPPParser();
-
- private:
- void handleConnectionError(const boost::optional<Connection::Error>& error);
- void handleXMPPError();
- void handleTLSConnected();
- void handleTLSError();
- void handleStreamStartReceived(const ProtocolHeader&);
- void handleElementReceived(boost::shared_ptr<Element>);
- void handleDataRead(const ByteArray& data);
- void handleDataWritten(const ByteArray& data);
-
- private:
- bool available;
- boost::shared_ptr<Connection> connection;
- PayloadParserFactoryCollection* payloadParserFactories;
- PayloadSerializerCollection* payloadSerializers;
- TLSLayerFactory* tlsLayerFactory;
- TimerFactory* timerFactory;
- boost::shared_ptr<XMPPLayer> xmppLayer;
- boost::shared_ptr<ConnectionLayer> connectionLayer;
- StreamStack* streamStack;
- boost::shared_ptr<CompressionLayer> compressionLayer;
- boost::shared_ptr<TLSLayer> tlsLayer;
- boost::shared_ptr<WhitespacePingLayer> whitespacePingLayer;
- };
-}