summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Session/BasicSessionStream.h')
-rw-r--r--Swiften/Session/BasicSessionStream.h126
1 files changed, 63 insertions, 63 deletions
diff --git a/Swiften/Session/BasicSessionStream.h b/Swiften/Session/BasicSessionStream.h
index 2298351..db4a7e0 100644
--- a/Swiften/Session/BasicSessionStream.h
+++ b/Swiften/Session/BasicSessionStream.h
@@ -17,78 +17,78 @@
#include <Swiften/TLS/TLSOptions.h>
namespace Swift {
- class TLSContextFactory;
- class TLSLayer;
- class TimerFactory;
- class WhitespacePingLayer;
- class PayloadParserFactoryCollection;
- class PayloadSerializerCollection;
- class StreamStack;
- class XMPPLayer;
- class ConnectionLayer;
- class CompressionLayer;
- class XMLParserFactory;
+ class TLSContextFactory;
+ class TLSLayer;
+ class TimerFactory;
+ class WhitespacePingLayer;
+ class PayloadParserFactoryCollection;
+ class PayloadSerializerCollection;
+ class StreamStack;
+ class XMPPLayer;
+ class ConnectionLayer;
+ class CompressionLayer;
+ class XMLParserFactory;
- class SWIFTEN_API BasicSessionStream : public SessionStream {
- public:
- BasicSessionStream(
- StreamType streamType,
- boost::shared_ptr<Connection> connection,
- PayloadParserFactoryCollection* payloadParserFactories,
- PayloadSerializerCollection* payloadSerializers,
- TLSContextFactory* tlsContextFactory,
- TimerFactory* whitespacePingLayerFactory,
- XMLParserFactory* xmlParserFactory,
- const TLSOptions& tlsOptions
- );
- virtual ~BasicSessionStream();
+ class SWIFTEN_API BasicSessionStream : public SessionStream {
+ public:
+ BasicSessionStream(
+ StreamType streamType,
+ boost::shared_ptr<Connection> connection,
+ PayloadParserFactoryCollection* payloadParserFactories,
+ PayloadSerializerCollection* payloadSerializers,
+ TLSContextFactory* tlsContextFactory,
+ TimerFactory* whitespacePingLayerFactory,
+ XMLParserFactory* xmlParserFactory,
+ const TLSOptions& tlsOptions
+ );
+ virtual ~BasicSessionStream();
- virtual void close();
- virtual bool isOpen();
+ virtual void close();
+ virtual bool isOpen();
- virtual void writeHeader(const ProtocolHeader& header);
- virtual void writeElement(boost::shared_ptr<ToplevelElement>);
- virtual void writeFooter();
- virtual void writeData(const std::string& data);
+ virtual void writeHeader(const ProtocolHeader& header);
+ virtual void writeElement(boost::shared_ptr<ToplevelElement>);
+ virtual void writeFooter();
+ virtual void writeData(const std::string& data);
- virtual bool supportsZLibCompression();
- virtual void addZLibCompression();
+ virtual bool supportsZLibCompression();
+ virtual void addZLibCompression();
- virtual bool supportsTLSEncryption();
- virtual void addTLSEncryption();
- virtual bool isTLSEncrypted();
- virtual Certificate::ref getPeerCertificate() const;
- virtual std::vector<Certificate::ref> getPeerCertificateChain() const;
+ virtual bool supportsTLSEncryption();
+ virtual void addTLSEncryption();
+ virtual bool isTLSEncrypted();
+ virtual Certificate::ref getPeerCertificate() const;
+ virtual std::vector<Certificate::ref> getPeerCertificateChain() const;
- virtual boost::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const;
- virtual ByteArray getTLSFinishMessage() const;
+ virtual boost::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const;
+ virtual ByteArray getTLSFinishMessage() const;
- virtual void setWhitespacePingEnabled(bool);
+ virtual void setWhitespacePingEnabled(bool);
- virtual void resetXMPPParser();
+ virtual void resetXMPPParser();
- private:
- void handleConnectionFinished(const boost::optional<Connection::Error>& error);
- void handleXMPPError();
- void handleTLSConnected();
- void handleTLSError(boost::shared_ptr<TLSError>);
- void handleStreamStartReceived(const ProtocolHeader&);
- void handleElementReceived(boost::shared_ptr<ToplevelElement>);
- void handleDataRead(const SafeByteArray& data);
- void handleDataWritten(const SafeByteArray& data);
+ private:
+ void handleConnectionFinished(const boost::optional<Connection::Error>& error);
+ void handleXMPPError();
+ void handleTLSConnected();
+ void handleTLSError(boost::shared_ptr<TLSError>);
+ void handleStreamStartReceived(const ProtocolHeader&);
+ void handleElementReceived(boost::shared_ptr<ToplevelElement>);
+ void handleDataRead(const SafeByteArray& data);
+ void handleDataWritten(const SafeByteArray& data);
- private:
- bool available;
- boost::shared_ptr<Connection> connection;
- TLSContextFactory* tlsContextFactory;
- TimerFactory* timerFactory;
- XMPPLayer* xmppLayer;
- ConnectionLayer* connectionLayer;
- CompressionLayer* compressionLayer;
- TLSLayer* tlsLayer;
- WhitespacePingLayer* whitespacePingLayer;
- StreamStack* streamStack;
- TLSOptions tlsOptions_;
- };
+ private:
+ bool available;
+ boost::shared_ptr<Connection> connection;
+ TLSContextFactory* tlsContextFactory;
+ TimerFactory* timerFactory;
+ XMPPLayer* xmppLayer;
+ ConnectionLayer* connectionLayer;
+ CompressionLayer* compressionLayer;
+ TLSLayer* tlsLayer;
+ WhitespacePingLayer* whitespacePingLayer;
+ StreamStack* streamStack;
+ TLSOptions tlsOptions_;
+ };
}