diff options
author | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
commit | cfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch) | |
tree | 18d94153a302445196fc0c18586abf44a1ce4a38 /Swiften/Session/SessionStream.h | |
parent | 1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff) | |
download | swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2 |
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines
in the process.
Changed CheckTabs.py tool to disallow hard tabs in source
files.
Test-Information:
Manually checked 30 random files that the conversion worked
as expected.
Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Swiften/Session/SessionStream.h')
-rw-r--r-- | Swiften/Session/SessionStream.h | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h index 9dcec71..18404c6 100644 --- a/Swiften/Session/SessionStream.h +++ b/Swiften/Session/SessionStream.h @@ -20,72 +20,72 @@ #include <Swiften/TLS/CertificateWithKey.h> namespace Swift { - class SWIFTEN_API SessionStream { - public: - class SWIFTEN_API SessionStreamError : public Swift::Error { - public: - enum Type { - ParseError, - TLSError, - InvalidTLSCertificateError, - ConnectionReadError, - ConnectionWriteError - }; - - SessionStreamError(Type type) : type(type) {} - - Type type; - }; - - SessionStream(): certificate() {} - - virtual ~SessionStream(); - - virtual void close() = 0; - virtual bool isOpen() = 0; - - virtual void writeHeader(const ProtocolHeader& header) = 0; - virtual void writeFooter() = 0; - virtual void writeElement(boost::shared_ptr<ToplevelElement>) = 0; - virtual void writeData(const std::string& data) = 0; - - virtual bool supportsZLibCompression() = 0; - virtual void addZLibCompression() = 0; - - virtual bool supportsTLSEncryption() = 0; - virtual void addTLSEncryption() = 0; - virtual bool isTLSEncrypted() = 0; - virtual void setWhitespacePingEnabled(bool enabled) = 0; - - virtual void resetXMPPParser() = 0; - - void setTLSCertificate(CertificateWithKey::ref cert) { - certificate = cert; - } - - virtual bool hasTLSCertificate() { - return certificate && !certificate->isNull(); - } - - virtual Certificate::ref getPeerCertificate() const = 0; - virtual std::vector<Certificate::ref> getPeerCertificateChain() const = 0; - virtual boost::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const = 0; - - virtual ByteArray getTLSFinishMessage() const = 0; - - boost::signal<void (const ProtocolHeader&)> onStreamStartReceived; - boost::signal<void (boost::shared_ptr<ToplevelElement>)> onElementReceived; - boost::signal<void (boost::shared_ptr<Error>)> onClosed; - boost::signal<void ()> onTLSEncrypted; - boost::signal<void (const SafeByteArray&)> onDataRead; - boost::signal<void (const SafeByteArray&)> onDataWritten; - - protected: - CertificateWithKey::ref getTLSCertificate() const { - return certificate; - } - - private: - CertificateWithKey::ref certificate; - }; + class SWIFTEN_API SessionStream { + public: + class SWIFTEN_API SessionStreamError : public Swift::Error { + public: + enum Type { + ParseError, + TLSError, + InvalidTLSCertificateError, + ConnectionReadError, + ConnectionWriteError + }; + + SessionStreamError(Type type) : type(type) {} + + Type type; + }; + + SessionStream(): certificate() {} + + virtual ~SessionStream(); + + virtual void close() = 0; + virtual bool isOpen() = 0; + + virtual void writeHeader(const ProtocolHeader& header) = 0; + virtual void writeFooter() = 0; + virtual void writeElement(boost::shared_ptr<ToplevelElement>) = 0; + virtual void writeData(const std::string& data) = 0; + + virtual bool supportsZLibCompression() = 0; + virtual void addZLibCompression() = 0; + + virtual bool supportsTLSEncryption() = 0; + virtual void addTLSEncryption() = 0; + virtual bool isTLSEncrypted() = 0; + virtual void setWhitespacePingEnabled(bool enabled) = 0; + + virtual void resetXMPPParser() = 0; + + void setTLSCertificate(CertificateWithKey::ref cert) { + certificate = cert; + } + + virtual bool hasTLSCertificate() { + return certificate && !certificate->isNull(); + } + + virtual Certificate::ref getPeerCertificate() const = 0; + virtual std::vector<Certificate::ref> getPeerCertificateChain() const = 0; + virtual boost::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const = 0; + + virtual ByteArray getTLSFinishMessage() const = 0; + + boost::signal<void (const ProtocolHeader&)> onStreamStartReceived; + boost::signal<void (boost::shared_ptr<ToplevelElement>)> onElementReceived; + boost::signal<void (boost::shared_ptr<Error>)> onClosed; + boost::signal<void ()> onTLSEncrypted; + boost::signal<void (const SafeByteArray&)> onDataRead; + boost::signal<void (const SafeByteArray&)> onDataWritten; + + protected: + CertificateWithKey::ref getTLSCertificate() const { + return certificate; + } + + private: + CertificateWithKey::ref certificate; + }; } |