diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-08-15 14:22:38 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-08-15 14:26:58 (GMT) |
commit | 1c1056b42d092f943735a1fe033f295ac5b27a77 (patch) | |
tree | 18895760ed5090f1eda2d5d58c5cfab6421db481 /Swiften/Component | |
parent | 1e5b6e73e6b5d2a4973174cda334fbc9ce47db91 (diff) | |
download | swift-1c1056b42d092f943735a1fe033f295ac5b27a77.zip swift-1c1056b42d092f943735a1fe033f295ac5b27a77.tar.bz2 |
Make (Core)Component constructor consistent with (Core)Client.
Change-Id: I268e15b6fbf54d9b188a699d26d2bb1042174f5f
Diffstat (limited to 'Swiften/Component')
-rw-r--r-- | Swiften/Component/Component.cpp | 4 | ||||
-rw-r--r-- | Swiften/Component/Component.h | 4 | ||||
-rw-r--r-- | Swiften/Component/CoreComponent.cpp | 2 | ||||
-rw-r--r-- | Swiften/Component/CoreComponent.h | 3 | ||||
-rw-r--r-- | Swiften/Component/UnitTest/ComponentSessionTest.cpp | 1 |
5 files changed, 6 insertions, 8 deletions
diff --git a/Swiften/Component/Component.cpp b/Swiften/Component/Component.cpp index af378a7..a53f514 100644 --- a/Swiften/Component/Component.cpp +++ b/Swiften/Component/Component.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. */ @@ -10,7 +10,7 @@ namespace Swift { -Component::Component(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const std::string& secret) : CoreComponent(eventLoop, networkFactories, jid, secret) { +Component::Component(const JID& jid, const std::string& secret, NetworkFactories* networkFactories) : CoreComponent(jid, secret, networkFactories) { softwareVersionResponder = new SoftwareVersionResponder(getIQRouter()); softwareVersionResponder->start(); } diff --git a/Swiften/Component/Component.h b/Swiften/Component/Component.h index f3ae9e8..3ead1a5 100644 --- a/Swiften/Component/Component.h +++ b/Swiften/Component/Component.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. */ @@ -20,7 +20,7 @@ namespace Swift { */ class SWIFTEN_API Component : public CoreComponent { public: - Component(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const std::string& secret); + Component(const JID& jid, const std::string& secret, NetworkFactories* networkFactories); ~Component(); /** diff --git a/Swiften/Component/CoreComponent.cpp b/Swiften/Component/CoreComponent.cpp index de3b66e..eabe3f6 100644 --- a/Swiften/Component/CoreComponent.cpp +++ b/Swiften/Component/CoreComponent.cpp @@ -20,7 +20,7 @@ namespace Swift { -CoreComponent::CoreComponent(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const std::string& secret) : eventLoop(eventLoop), networkFactories(networkFactories), jid_(jid), secret_(secret), disconnectRequested_(false) { +CoreComponent::CoreComponent(const JID& jid, const std::string& secret, NetworkFactories* networkFactories) : networkFactories(networkFactories), jid_(jid), secret_(secret), disconnectRequested_(false) { stanzaChannel_ = new ComponentSessionStanzaChannel(); stanzaChannel_->onMessageReceived.connect(boost::ref(onMessageReceived)); stanzaChannel_->onPresenceReceived.connect(boost::ref(onPresenceReceived)); diff --git a/Swiften/Component/CoreComponent.h b/Swiften/Component/CoreComponent.h index 6f5231f..63b68f6 100644 --- a/Swiften/Component/CoreComponent.h +++ b/Swiften/Component/CoreComponent.h @@ -43,7 +43,7 @@ namespace Swift { */ class SWIFTEN_API CoreComponent : public Entity { public: - CoreComponent(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const std::string& secret); + CoreComponent(const JID& jid, const std::string& secret, NetworkFactories* networkFactories); ~CoreComponent(); void connect(const std::string& host, int port); @@ -88,7 +88,6 @@ namespace Swift { void handleDataWritten(const SafeByteArray&); private: - EventLoop* eventLoop; NetworkFactories* networkFactories; JID jid_; std::string secret_; diff --git a/Swiften/Component/UnitTest/ComponentSessionTest.cpp b/Swiften/Component/UnitTest/ComponentSessionTest.cpp index 97fde63..0533645 100644 --- a/Swiften/Component/UnitTest/ComponentSessionTest.cpp +++ b/Swiften/Component/UnitTest/ComponentSessionTest.cpp @@ -213,7 +213,6 @@ class ComponentSessionTest : public CppUnit::TestFixture { boost::shared_ptr<MockSessionStream> server; bool sessionFinishedReceived; - bool needCredentials; boost::shared_ptr<Error> sessionFinishedError; boost::shared_ptr<CryptoProvider> crypto; }; |