summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-02-09 13:29:34 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-02-09 13:29:34 (GMT)
commit743daff856b6d71848b045a6587f9ae102f5f94f (patch)
tree0d20ad50a0ff2997c302f79dc7dd3a0885cf4a7e /Swiften
parentb3a803ed132b5f1b7a21130c5466a8deb106d193 (diff)
downloadswift-743daff856b6d71848b045a6587f9ae102f5f94f.zip
swift-743daff856b6d71848b045a6587f9ae102f5f94f.tar.bz2
Remove dependency on PlatformDomainNameResolver from CoreComponent.
Change-Id: I3f59fcd19355fb93d3bdede5137b9fae59ef3c67
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Component/CoreComponent.cpp6
-rw-r--r--Swiften/Component/CoreComponent.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/Swiften/Component/CoreComponent.cpp b/Swiften/Component/CoreComponent.cpp
index e11d2b0..aac2d89 100644
--- a/Swiften/Component/CoreComponent.cpp
+++ b/Swiften/Component/CoreComponent.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 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.
*/
@@ -20,7 +20,7 @@
namespace Swift {
-CoreComponent::CoreComponent(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const std::string& secret) : eventLoop(eventLoop), networkFactories(networkFactories), resolver_(eventLoop), jid_(jid), secret_(secret), disconnectRequested_(false) {
+CoreComponent::CoreComponent(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const std::string& secret) : eventLoop(eventLoop), networkFactories(networkFactories), jid_(jid), secret_(secret), disconnectRequested_(false) {
stanzaChannel_ = new ComponentSessionStanzaChannel();
stanzaChannel_->onMessageReceived.connect(boost::ref(onMessageReceived));
stanzaChannel_->onPresenceReceived.connect(boost::ref(onPresenceReceived));
@@ -44,7 +44,7 @@ CoreComponent::~CoreComponent() {
void CoreComponent::connect(const std::string& host, int port) {
assert(!connector_);
- connector_ = ComponentConnector::create(host, port, &resolver_, networkFactories->getConnectionFactory(), networkFactories->getTimerFactory());
+ connector_ = ComponentConnector::create(host, port, networkFactories->getDomainNameResolver(), networkFactories->getConnectionFactory(), networkFactories->getTimerFactory());
connector_->onConnectFinished.connect(boost::bind(&CoreComponent::handleConnectorFinished, this, _1));
connector_->setTimeoutMilliseconds(60*1000);
connector_->start();
diff --git a/Swiften/Component/CoreComponent.h b/Swiften/Component/CoreComponent.h
index 4f39ffd..6f5231f 100644
--- a/Swiften/Component/CoreComponent.h
+++ b/Swiften/Component/CoreComponent.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 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.
*/
@@ -11,7 +11,6 @@
#include <Swiften/Base/API.h>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Base/Error.h>
-#include <Swiften/Network/PlatformDomainNameResolver.h>
#include <Swiften/Component/ComponentConnector.h>
#include <Swiften/Component/ComponentSession.h>
#include <Swiften/Component/ComponentError.h>
@@ -26,6 +25,7 @@
#include <Swiften/Base/SafeByteArray.h>
namespace Swift {
+ class EventLoop;
class IQRouter;
class NetworkFactories;
class ComponentSession;
@@ -90,7 +90,6 @@ namespace Swift {
private:
EventLoop* eventLoop;
NetworkFactories* networkFactories;
- PlatformDomainNameResolver resolver_;
JID jid_;
std::string secret_;
ComponentSessionStanzaChannel* stanzaChannel_;