diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-10 19:29:39 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-10 19:29:39 (GMT) |
commit | 3914231a023e36881c2a760a3d8973ffdd2a18ad (patch) | |
tree | 7d1c2d61f1cf74f9369092f8473386dc5e9649a3 /Swiften/Session/SessionStream.h | |
parent | c682941cd230ad8caed3f3d457de3dc0cd7172d4 (diff) | |
download | swift-contrib-3914231a023e36881c2a760a3d8973ffdd2a18ad.zip swift-contrib-3914231a023e36881c2a760a3d8973ffdd2a18ad.tar.bz2 |
More Client refactoring.
Diffstat (limited to 'Swiften/Session/SessionStream.h')
-rw-r--r-- | Swiften/Session/SessionStream.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h index b2444f5..6bba237 100644 --- a/Swiften/Session/SessionStream.h +++ b/Swiften/Session/SessionStream.h @@ -13,7 +13,16 @@ namespace Swift { public: class Error : public Swift::Error { public: - Error() {} + enum Type { + ParseError, + TLSError, + InvalidTLSCertificateError, + ConnectionError + }; + + Error(Type type) : type(type) {} + + Type type; }; virtual ~SessionStream(); @@ -43,6 +52,8 @@ namespace Swift { 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 { |