summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-01-17 00:17:11 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-01-17 00:20:41 (GMT)
commited8990c5ee4f54d63e88b6bad28356d0c032a8c3 (patch)
treeac0ca6f18e4b01c76471d0f4660f8e111bc4fdac /Swift/Controllers/MUCController.cpp
parent9ece5e827fa308b36f18884487d34e0073870496 (diff)
downloadswift-ed8990c5ee4f54d63e88b6bad28356d0c032a8c3.zip
swift-ed8990c5ee4f54d63e88b6bad28356d0c032a8c3.tar.bz2
Preparation. for /me.
QtUI's implementation isn't done yet.
Diffstat (limited to 'Swift/Controllers/MUCController.cpp')
-rw-r--r--Swift/Controllers/MUCController.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/Controllers/MUCController.cpp b/Swift/Controllers/MUCController.cpp
index 4d0acca..c85fffa 100644
--- a/Swift/Controllers/MUCController.cpp
+++ b/Swift/Controllers/MUCController.cpp
@@ -1,55 +1,55 @@
#include "Swift/Controllers/MUCController.h"
#include <boost/bind.hpp>
#include "Swiften/Base/foreach.h"
-#include "Swift/Controllers/ChatWindow.h"
-#include "Swift/Controllers/ChatWindowFactory.h"
+#include "Swift/Controllers/UIInterfaces/ChatWindow.h"
+#include "Swift/Controllers/UIInterfaces/ChatWindowFactory.h"
#include "Swiften/Avatars/AvatarManager.h"
#include "Swiften/MUC/MUC.h"
#include "Swiften/Client/StanzaChannel.h"
#include "Swiften/Roster/Roster.h"
#include "Swiften/Roster/SetAvatar.h"
#include "Swiften/Roster/SetPresence.h"
#include "Swiften/Roster/TreeWidgetFactory.h"
namespace Swift {
/**
* The controller does not gain ownership of the stanzaChannel, nor the factory.
*/
MUCController::MUCController (
const JID& self,
const JID &muc,
const String &nick,
StanzaChannel* stanzaChannel,
PresenceSender* presenceSender,
IQRouter* iqRouter,
ChatWindowFactory* chatWindowFactory,
TreeWidgetFactory *treeWidgetFactory,
PresenceOracle* presenceOracle,
AvatarManager* avatarManager) :
ChatControllerBase(self, stanzaChannel, iqRouter, chatWindowFactory, muc, presenceOracle, avatarManager),
muc_(new MUC(stanzaChannel, presenceSender, muc)),
nick_(nick),
treeWidgetFactory_(treeWidgetFactory) {
roster_ = new Roster(chatWindow_->getTreeWidget(), treeWidgetFactory_);
chatWindow_->onClosed.connect(boost::bind(&MUCController::handleWindowClosed, this));
muc_->joinAs(nick);
muc_->onOccupantJoined.connect(boost::bind(&MUCController::handleOccupantJoined, this, _1));
muc_->onOccupantPresenceChange.connect(boost::bind(&MUCController::handleOccupantPresenceChange, this, _1));
muc_->onOccupantLeft.connect(boost::bind(&MUCController::handleOccupantLeft, this, _1, _2, _3));
chatWindow_->convertToMUC();
chatWindow_->show();
if (avatarManager_ != NULL) {
avatarManager_->onAvatarChanged.connect(boost::bind(&MUCController::handleAvatarChanged, this, _1, _2));
}
}
MUCController::~MUCController() {
delete muc_;
delete roster_;
}
void MUCController::handleAvatarChanged(const JID& jid, const String&) {
String path = avatarManager_->getAvatarPath(jid).string();