summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StreamStack/TLSLayer.h')
-rw-r--r--Swiften/StreamStack/TLSLayer.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/Swiften/StreamStack/TLSLayer.h b/Swiften/StreamStack/TLSLayer.h
index d232d29..f8cda41 100644
--- a/Swiften/StreamStack/TLSLayer.h
+++ b/Swiften/StreamStack/TLSLayer.h
@@ -4,22 +4,32 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFTEN_TLSLayer_H
-#define SWIFTEN_TLSLayer_H
+#include "Swiften/Base/boost_bsignals.h"
+#include "Swiften/Base/ByteArray.h"
#include "Swiften/StreamStack/StreamLayer.h"
-#include "Swiften/TLS/PKCS12Certificate.h"
namespace Swift {
+ class TLSContext;
+ class TLSContextFactory;
+ class PKCS12Certificate;
+
class TLSLayer : public StreamLayer {
public:
- virtual void connect() = 0;
- virtual bool setClientCertificate(const PKCS12Certificate&) = 0;
+ TLSLayer(TLSContextFactory*);
+ ~TLSLayer();
+
+ virtual void connect();
+ virtual bool setClientCertificate(const PKCS12Certificate&);
+
+ virtual void writeData(const ByteArray& data);
+ virtual void handleDataRead(const ByteArray& data);
public:
boost::signal<void ()> onError;
boost::signal<void ()> onConnected;
+
+ private:
+ TLSContext* context;
};
}
-
-#endif