From 743daff856b6d71848b045a6587f9ae102f5f94f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 9 Feb 2013 14:29:34 +0100
Subject: Remove dependency on PlatformDomainNameResolver from CoreComponent.

Change-Id: I3f59fcd19355fb93d3bdede5137b9fae59ef3c67

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_;
-- 
cgit v0.10.2-6-g49f6