summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network')
-rw-r--r--Swiften/Network/BoostNetworkFactories.cpp6
-rw-r--r--Swiften/Network/BoostNetworkFactories.h7
-rw-r--r--Swiften/Network/NetworkFactories.h4
3 files changed, 14 insertions, 3 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp
index 1265682..9f781e4 100644
--- a/Swiften/Network/BoostNetworkFactories.cpp
+++ b/Swiften/Network/BoostNetworkFactories.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2012 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,6 +17,8 @@
#include <Swiften/Network/PlatformProxyProvider.h>
#include <Swiften/IDN/PlatformIDNConverter.h>
#include <Swiften/IDN/IDNConverter.h>
+#include <Swiften/Crypto/PlatformCryptoProvider.h>
+#include <Swiften/Crypto/CryptoProvider.h>
namespace Swift {
@@ -35,9 +37,11 @@ BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) : eventLoop(e
proxyProvider = new PlatformProxyProvider();
idnConverter = PlatformIDNConverter::create();
domainNameResolver = new PlatformDomainNameResolver(idnConverter, eventLoop);
+ cryptoProvider = PlatformCryptoProvider::create();
}
BoostNetworkFactories::~BoostNetworkFactories() {
+ delete cryptoProvider;
delete domainNameResolver;
delete idnConverter;
delete proxyProvider;
diff --git a/Swiften/Network/BoostNetworkFactories.h b/Swiften/Network/BoostNetworkFactories.h
index 8bf3576..9c3bab1 100644
--- a/Swiften/Network/BoostNetworkFactories.h
+++ b/Swiften/Network/BoostNetworkFactories.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2012 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -67,6 +67,10 @@ namespace Swift {
return idnConverter;
}
+ virtual CryptoProvider* getCryptoProvider() const SWIFTEN_OVERRIDE {
+ return cryptoProvider;
+ }
+
private:
BoostIOServiceThread ioServiceThread;
TimerFactory* timerFactory;
@@ -80,5 +84,6 @@ namespace Swift {
ProxyProvider* proxyProvider;
EventLoop* eventLoop;
IDNConverter* idnConverter;
+ CryptoProvider* cryptoProvider;
};
}
diff --git a/Swiften/Network/NetworkFactories.h b/Swiften/Network/NetworkFactories.h
index 228d92d..dd8e216 100644
--- a/Swiften/Network/NetworkFactories.h
+++ b/Swiften/Network/NetworkFactories.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2012 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -19,6 +19,7 @@ namespace Swift {
class EventLoop;
class IDNConverter;
class NetworkEnvironment;
+ class CryptoProvider;
/**
* An interface collecting network factories.
@@ -38,5 +39,6 @@ namespace Swift {
virtual ProxyProvider* getProxyProvider() const = 0;
virtual EventLoop* getEventLoop() const = 0;
virtual IDNConverter* getIDNConverter() const = 0;
+ virtual CryptoProvider* getCryptoProvider() const = 0;
};
}