summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-09-15 15:50:21 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-09-15 16:47:52 (GMT)
commit5159571a0464c28ce376de22faaa52066168a205 (patch)
tree7842a670a13736570cbcdf5183788658b4bb7168 /Swift/Controllers/Chat/ChatControllerBase.h
parentc0ea59aed73b5425ad78e6bdb6f8f12e2b44567e (diff)
downloadswift-5159571a0464c28ce376de22faaa52066168a205.zip
swift-5159571a0464c28ce376de22faaa52066168a205.tar.bz2
Print date changes in chat windows.
Resolves: #452
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.h')
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.h b/Swift/Controllers/Chat/ChatControllerBase.h
index 2466690..d537d84 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.h
+++ b/Swift/Controllers/Chat/ChatControllerBase.h
@@ -15,6 +15,8 @@
#include <boost/optional.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
+#include "Swiften/Network/Timer.h"
+#include "Swiften/Network/TimerFactory.h"
#include "Swiften/Elements/Stanza.h"
#include "Swiften/Base/String.h"
#include "Swiften/Elements/DiscoInfo.h"
@@ -45,7 +47,7 @@ namespace Swift {
virtual void setEnabled(bool enabled);
virtual void setToJID(const JID& jid) {toJID_ = 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);
+ 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);
/**
* Pass the Message appended, and the stanza used to send it.
@@ -59,10 +61,12 @@ namespace Swift {
virtual boost::optional<boost::posix_time::ptime> getMessageTimestamp(boost::shared_ptr<Message>) const = 0;
private:
+ void createDayChangeTimer();
void handleSendMessageRequest(const String &body);
void handleAllMessagesRead();
void handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog>, const boost::optional<ErrorPayload>& error);
String getErrorMessage(boost::shared_ptr<ErrorPayload>);
+ void handleDayChangeTick();
protected:
JID selfJID_;
@@ -77,6 +81,8 @@ namespace Swift {
AvatarManager* avatarManager_;
bool useDelayForLatency_;
EventController* eventController_;
+ boost::shared_ptr<Timer> dateChangeTimer_;
+ TimerFactory* timerFactory_;
};
}