summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp13
-rw-r--r--Swift/Controllers/MainController.cpp4
-rw-r--r--Swift/Controllers/RosterController.h1
-rw-r--r--Swift/Controllers/UnitTest/RosterControllerTest.cpp3
4 files changed, 7 insertions, 14 deletions
diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
index 4b95948..ffd5185 100644
--- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
@@ -18,7 +18,7 @@
#include "Swift/Controllers/EventController.h"
#include "Swift/Controllers/Chat/MUCController.h"
#include "Swiften/Presence/PresenceSender.h"
-#include "Swiften/Avatars/AvatarManager.h"
+#include "Swiften/Avatars/NullAvatarManager.h"
#include "Swiften/Avatars/AvatarMemoryStorage.h"
#include "Swiften/VCards/VCardManager.h"
#include "Swiften/VCards/VCardMemoryStorage.h"
@@ -70,18 +70,12 @@ public:
mocks_->ExpectCall(chatListWindowFactory_, ChatListWindowFactory::createWindow).With(uiEventStream_).Return(NULL);
manager_ = new ChatsManager(jid_, stanzaChannel_, iqRouter_, eventController_, chatWindowFactory_, nickResolver_, presenceOracle_, serverDiscoInfo_, presenceSender_, uiEventStream_, chatListWindowFactory_, true, NULL, mucRegistry_);
- vcardStorage_ = new VCardMemoryStorage();
- vcardManager_ = new VCardManager(jid_, iqRouter_, vcardStorage_);
- avatarStorage_ = new AvatarMemoryStorage();
- avatarManager_ = new AvatarManager(vcardManager_, stanzaChannel_, avatarStorage_, NULL);
+ avatarManager_ = new NullAvatarManager();
manager_->setAvatarManager(avatarManager_);
};
void tearDown() {
delete avatarManager_;
- delete avatarStorage_;
- delete vcardManager_;
- delete vcardStorage_;
delete manager_;
delete presenceSender_;
delete presenceOracle_;
@@ -315,9 +309,6 @@ private:
ChatWindowFactory* chatWindowFactory_;
NickResolver* nickResolver_;
PresenceOracle* presenceOracle_;
- VCardStorage* vcardStorage_;
- VCardManager* vcardManager_;
- AvatarStorage* avatarStorage_;
AvatarManager* avatarManager_;
boost::shared_ptr<DiscoInfo> serverDiscoInfo_;
boost::shared_ptr<XMPPRoster> xmppRoster_;
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index f3bd6d5..afffa59 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -54,7 +54,7 @@
#include "Swiften/Queries/Requests/GetDiscoInfoRequest.h"
#include "Swiften/Queries/Requests/GetVCardRequest.h"
#include "Swiften/Avatars/AvatarStorage.h"
-#include "Swiften/Avatars/AvatarManager.h"
+#include "Swiften/Avatars/AvatarManagerImpl.h"
#include "Swiften/Disco/CapsFileStorage.h"
#include "Swiften/Disco/CapsManager.h"
#include "Swiften/Disco/EntityCapsManager.h"
@@ -243,7 +243,7 @@ void MainController::handleConnected() {
mucRegistry_ = new MUCRegistry();
vcardManager_ = new VCardManager(jid_, client_, getVCardStorageForProfile(jid_));
vcardManager_->onVCardChanged.connect(boost::bind(&MainController::handleVCardReceived, this, _1, _2));
- avatarManager_ = new AvatarManager(vcardManager_, client_, avatarStorage_, mucRegistry_);
+ avatarManager_ = new AvatarManagerImpl(vcardManager_, client_, avatarStorage_, mucRegistry_);
capsManager_ = new CapsManager(capsStorage_, client_, client_);
entityCapsManager_ = new EntityCapsManager(capsManager_, client_);
diff --git a/Swift/Controllers/RosterController.h b/Swift/Controllers/RosterController.h
index ba8d4e2..389df44 100644
--- a/Swift/Controllers/RosterController.h
+++ b/Swift/Controllers/RosterController.h
@@ -10,6 +10,7 @@
#include "Swiften/JID/JID.h"
#include "Swiften/Base/String.h"
#include "Swiften/Elements/Presence.h"
+#include "Swiften/Elements/ErrorPayload.h"
#include "Swiften/Elements/RosterPayload.h"
#include "Swiften/Avatars/AvatarManager.h"
#include "Swift/Controllers/UIEvents/UIEvent.h"
diff --git a/Swift/Controllers/UnitTest/RosterControllerTest.cpp b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
index 23fca2c..fdcc44f 100644
--- a/Swift/Controllers/UnitTest/RosterControllerTest.cpp
+++ b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
@@ -20,6 +20,7 @@
#include "Swiften/Roster/Roster.h"
#include "Swiften/Roster/GroupRosterItem.h"
#include "Swiften/Roster/ContactRosterItem.h"
+#include "Swiften/Avatars/NullAvatarManager.h"
#include "Swift/Controllers/EventController.h"
#include "Swiften/Presence/PresenceOracle.h"
#include "Swift/Controllers/NickResolver.h"
@@ -43,7 +44,7 @@ class RosterControllerTest : public CppUnit::TestFixture
void setUp() {
jid_ = JID("testjid@swift.im/swift");
xmppRoster_ = boost::shared_ptr<XMPPRoster>(new XMPPRoster());
- avatarManager_ = NULL;//new AvatarManager();
+ avatarManager_ = new NullAvatarManager();
mainWindowFactory_ = new MockMainWindowFactory();
mucRegistry_ = new MUCRegistry();
nickResolver_ = new NickResolver(jid_.toBare(), xmppRoster_, NULL, mucRegistry_);