diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-06-02 16:23:59 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-06-02 16:23:59 (GMT) |
commit | 7520c7fed383d4f7631f5572ef40379022126264 (patch) | |
tree | ee87b26bb923d0289a670defce96e2012f3623e3 /Swift/Controllers/Chat/ChatController.cpp | |
parent | e8ab1af885ff61715ab0350c3cb22ed6988a082a (diff) | |
download | swift-contrib-7520c7fed383d4f7631f5572ef40379022126264.zip swift-contrib-7520c7fed383d4f7631f5572ef40379022126264.tar.bz2 |
Added whiteboard controller with simple sharing
Whiteboard controller is handled in ChatController only for
testing purposes.
Diffstat (limited to 'Swift/Controllers/Chat/ChatController.cpp')
-rw-r--r-- | Swift/Controllers/Chat/ChatController.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index 2fa4559..38f443b 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp @@ -29,6 +29,8 @@ #include <Swiften/Elements/DeliveryReceipt.h> #include <Swiften/Elements/DeliveryReceiptRequest.h> #include <Swift/Controllers/SettingConstants.h> +#include <Swift/Controllers/UIInterfaces/WhiteboardWindowFactory.h> +#include <Swift/Controllers/WhiteboardController.h> #include <Swiften/Base/Log.h> @@ -39,6 +41,8 @@ namespace Swift { */ ChatController::ChatController(const JID& self, StanzaChannel* stanzaChannel, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, const JID &contact, NickResolver* nickResolver, PresenceOracle* presenceOracle, AvatarManager* avatarManager, bool isInMUC, bool useDelayForLatency, UIEventStream* eventStream, EventController* eventController, TimerFactory* timerFactory, EntityCapsProvider* entityCapsProvider, bool userWantsReceipts, SettingsProvider* settings) : ChatControllerBase(self, stanzaChannel, iqRouter, chatWindowFactory, contact, presenceOracle, avatarManager, useDelayForLatency, eventStream, eventController, timerFactory, entityCapsProvider), eventStream_(eventStream), userWantsReceipts_(userWantsReceipts), settings_(settings) { + WhiteboardWindowFactory* fac = dynamic_cast<WhiteboardWindowFactory*>(chatWindowFactory); + whiteboardController_ = new WhiteboardController(stanzaChannel, toJID_, fac); isInMUC_ = isInMUC; lastWasPresence_ = false; chatStateNotifier_ = new ChatStateNotifier(stanzaChannel, contact, entityCapsProvider); @@ -89,6 +93,7 @@ ChatController::~ChatController() { nickResolver_->onNickChanged.disconnect(boost::bind(&ChatController::handleContactNickChanged, this, _1, _2)); delete chatStateNotifier_; delete chatStateTracker_; + delete whiteboardController_; } JID ChatController::getBaseJID() { @@ -138,6 +143,7 @@ bool ChatController::isIncomingMessageFromMe(boost::shared_ptr<Message>) { } void ChatController::preHandleIncomingMessage(boost::shared_ptr<MessageEvent> messageEvent) { + whiteboardController_->handleIncomingMessage(messageEvent); if (messageEvent->isReadable()) { chatWindow_->flash(); lastWasPresence_ = false; |