summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Niedzielski <machekku@uaznia.net>2012-12-21 19:58:24 (GMT)
committerMaciej Niedzielski <machekku@uaznia.net>2013-01-09 12:34:06 (GMT)
commit4ed137080a3d80d20a2cead47f741e3dd2f2d42e (patch)
treef030f0d9b8e61733de4e2bec9cef7715d380af8f /Swift/Controllers/Chat/ChatControllerBase.h
parenta8e2d82a1be5e94ac39523fc3e0606fcc261e913 (diff)
downloadswift-4ed137080a3d80d20a2cead47f741e3dd2f2d42e.zip
swift-4ed137080a3d80d20a2cead47f741e3dd2f2d42e.tar.bz2
Highlighting support
Change-Id: Ib6bd42cecff018998117bc1e7db279a62b3af434 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.h')
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.h b/Swift/Controllers/Chat/ChatControllerBase.h
index 02cf9f6..baef9e6 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.h
+++ b/Swift/Controllers/Chat/ChatControllerBase.h
@@ -29,6 +29,7 @@
#include "Swiften/Base/IDGenerator.h"
#include <Swift/Controllers/HistoryController.h>
#include <Swiften/MUC/MUCRegistry.h>
+#include <Swift/Controllers/HighlightManager.h>
namespace Swift {
class IQRouter;
@@ -39,6 +40,8 @@ namespace Swift {
class UIEventStream;
class EventController;
class EntityCapsProvider;
+ class HighlightManager;
+ class Highlighter;
class ChatControllerBase : public boost::bsignals::trackable {
public:
@@ -47,8 +50,8 @@ namespace Swift {
void activateChatWindow();
void setAvailableServerFeatures(boost::shared_ptr<DiscoInfo> info);
void handleIncomingMessage(boost::shared_ptr<MessageEvent> message);
- std::string addMessage(const std::string& message, const std::string& senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time);
- void replaceMessage(const std::string& message, const std::string& id, const boost::posix_time::ptime& time);
+ std::string addMessage(const std::string& message, const std::string& senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time, const HighlightAction& highlight);
+ void replaceMessage(const std::string& message, const std::string& id, const boost::posix_time::ptime& time, const HighlightAction& highlight);
virtual void setOnline(bool online);
virtual void setEnabled(bool enabled);
virtual void setToJID(const JID& jid) {toJID_ = jid;}
@@ -60,7 +63,7 @@ namespace Swift {
void handleCapsChanged(const JID& jid);
protected:
- ChatControllerBase(const JID& self, StanzaChannel* stanzaChannel, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, const JID &toJID, PresenceOracle* presenceOracle, AvatarManager* avatarManager, bool useDelayForLatency, UIEventStream* eventStream, EventController* eventController, TimerFactory* timerFactory, EntityCapsProvider* entityCapsProvider, HistoryController* historyController, MUCRegistry* mucRegistry);
+ ChatControllerBase(const JID& self, StanzaChannel* stanzaChannel, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, const JID &toJID, PresenceOracle* presenceOracle, AvatarManager* avatarManager, bool useDelayForLatency, UIEventStream* eventStream, EventController* eventController, TimerFactory* timerFactory, EntityCapsProvider* entityCapsProvider, HistoryController* historyController, MUCRegistry* mucRegistry, HighlightManager* highlightManager);
/**
* Pass the Message appended, and the stanza used to send it.
@@ -69,7 +72,7 @@ namespace Swift {
virtual std::string senderDisplayNameFromMessage(const JID& from) = 0;
virtual bool isIncomingMessageFromMe(boost::shared_ptr<Message>) = 0;
virtual void preHandleIncomingMessage(boost::shared_ptr<MessageEvent>) {}
- virtual void postHandleIncomingMessage(boost::shared_ptr<MessageEvent>) {}
+ virtual void postHandleIncomingMessage(boost::shared_ptr<MessageEvent>, const HighlightAction&) {}
virtual void preSendMessageRequest(boost::shared_ptr<Message>) {}
virtual bool isFromContact(const JID& from);
virtual boost::optional<boost::posix_time::ptime> getMessageTimestamp(boost::shared_ptr<Message>) const = 0;
@@ -116,5 +119,6 @@ namespace Swift {
SecurityLabelsCatalog::Item lastLabel_;
HistoryController* historyController_;
MUCRegistry* mucRegistry_;
+ Highlighter* highlighter_;
};
}