summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-10 17:23:57 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-10 17:38:05 (GMT)
commite2f5588d089e4d2148762ea092e032976254a467 (patch)
tree851946c7a36ffa96e0f3ab54bc72f233f8b2c746 /Swiften/Controllers/ChatController.cpp
parent7214d768dca85a6d43892169d5008898249dce73 (diff)
downloadswift-e2f5588d089e4d2148762ea092e032976254a467.zip
swift-e2f5588d089e4d2148762ea092e032976254a467.tar.bz2
Moved Swiften/Controllers to Swift/Controllers.
Diffstat (limited to 'Swiften/Controllers/ChatController.cpp')
-rw-r--r--Swiften/Controllers/ChatController.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/Swiften/Controllers/ChatController.cpp b/Swiften/Controllers/ChatController.cpp
deleted file mode 100644
index bac73d4..0000000
--- a/Swiften/Controllers/ChatController.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "Swiften/Controllers/ChatController.h"
-
-#include "Swiften/Controllers/ChatWindow.h"
-#include "Swiften/Controllers/ChatWindowFactory.h"
-#include "Swiften/Controllers/NickResolver.h"
-
-namespace Swift {
-
-/**
- * The controller does not gain ownership of the stanzaChannel, nor the factory.
- */
-ChatController::ChatController(StanzaChannel* stanzaChannel, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, const JID &contact, NickResolver* nickResolver, PresenceOracle* presenceOracle)
- : ChatControllerBase(stanzaChannel, iqRouter, chatWindowFactory, contact, presenceOracle) {
- nickResolver_ = nickResolver;
-}
-
-bool ChatController::isIncomingMessageFromMe(boost::shared_ptr<Message>) {
- return false;
-}
-
-void ChatController::preHandleIncomingMessage(boost::shared_ptr<Message> message) {
- JID from = message->getFrom();
- if (!from.equals(toJID_, JID::WithResource)) {
- if (toJID_.equals(from, JID::WithoutResource) && toJID_.isBare()){
- toJID_ = from;
- }
- }
-}
-
-void ChatController::postSendMessage(const String& body) {
- chatWindow_->addMessage(body, "me", true, labelsEnabled_ ? chatWindow_->getSelectedSecurityLabel() : boost::optional<SecurityLabel>());
-}
-
-String ChatController::senderDisplayNameFromMessage(JID from) {
- return nickResolver_->jidToNick(from);
-}
-
-}