diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 13:40:14 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 13:40:43 (GMT) |
commit | b61486fefe602e0d18fa5279021006f87b965307 (patch) | |
tree | 437585cbef1179e1ec31f79789591d5610200c29 /Swiften/Session/SessionStream.h | |
parent | dae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8 (diff) | |
download | swift-contrib-b61486fefe602e0d18fa5279021006f87b965307.zip swift-contrib-b61486fefe602e0d18fa5279021006f87b965307.tar.bz2 |
Moved Swiften to a separate module.
Diffstat (limited to 'Swiften/Session/SessionStream.h')
m--------- | Swiften | 0 | ||||
-rw-r--r-- | Swiften/Session/SessionStream.h | 69 |
2 files changed, 0 insertions, 69 deletions
diff --git a/Swiften b/Swiften new file mode 160000 +Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h deleted file mode 100644 index 8c64ccf..0000000 --- a/Swiften/Session/SessionStream.h +++ /dev/null @@ -1,69 +0,0 @@ -#pragma once - -#include <boost/signal.hpp> -#include <boost/shared_ptr.hpp> - -#include "Swiften/Elements/ProtocolHeader.h" -#include "Swiften/Elements/Element.h" -#include "Swiften/Base/Error.h" -#include "Swiften/TLS/PKCS12Certificate.h" - -namespace Swift { - class SessionStream { - public: - class Error : public Swift::Error { - public: - enum Type { - ParseError, - TLSError, - InvalidTLSCertificateError, - ConnectionReadError, - ConnectionWriteError - }; - - Error(Type type) : type(type) {} - - Type type; - }; - - virtual ~SessionStream(); - - virtual bool isAvailable() = 0; - - virtual void writeHeader(const ProtocolHeader& header) = 0; - virtual void writeFooter() = 0; - virtual void writeElement(boost::shared_ptr<Element>) = 0; - - virtual void addZLibCompression() = 0; - - virtual bool supportsTLSEncryption() = 0; - virtual void addTLSEncryption() = 0; - virtual void setWhitespacePingEnabled(bool enabled) = 0; - - virtual void resetXMPPParser() = 0; - - void setTLSCertificate(const PKCS12Certificate& cert) { - certificate = cert; - } - - virtual bool hasTLSCertificate() { - return !certificate.isNull(); - } - - - boost::signal<void (const ProtocolHeader&)> onStreamStartReceived; - boost::signal<void (boost::shared_ptr<Element>)> onElementReceived; - boost::signal<void (boost::shared_ptr<Error>)> onError; - boost::signal<void ()> onTLSEncrypted; - boost::signal<void (const String&)> onDataRead; - boost::signal<void (const String&)> onDataWritten; - - protected: - const PKCS12Certificate& getTLSCertificate() const { - return certificate; - } - - private: - PKCS12Certificate certificate; - }; -} |