summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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_;