diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-07-03 13:17:51 (GMT) |
---|---|---|
committer | Catalin Badea <catalin.badea392@gmail.com> | 2012-07-03 13:17:51 (GMT) |
commit | 40dc0541e60549cc2db83005f45b51f93d42cc00 (patch) | |
tree | a197714d94fd3681802555e0783e6df694d7d6cc /Swift/Controllers/HistoryController.cpp | |
parent | fbeef036efeabe1218490f5a7659d8779350af7c (diff) | |
download | swift-contrib-40dc0541e60549cc2db83005f45b51f93d42cc00.zip swift-contrib-40dc0541e60549cc2db83005f45b51f93d42cc00.tar.bz2 |
Added message type logging. Fixed handling new messages.
Diffstat (limited to 'Swift/Controllers/HistoryController.cpp')
-rw-r--r-- | Swift/Controllers/HistoryController.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Swift/Controllers/HistoryController.cpp b/Swift/Controllers/HistoryController.cpp index 5bd4ffa..fe54e79 100644 --- a/Swift/Controllers/HistoryController.cpp +++ b/Swift/Controllers/HistoryController.cpp @@ -19,18 +19,18 @@ HistoryController::~HistoryController() { delete localHistory_; } -void HistoryController::addMessage(const std::string& message, const JID& fromJID, const JID& toJID, bool isGroupChat, const boost::posix_time::ptime& timeStamp) { - HistoryMessage historyMessage(message, fromJID, toJID, isGroupChat, timeStamp); +void HistoryController::addMessage(const std::string& message, const JID& fromJID, const JID& toJID, HistoryMessage::Type type, const boost::posix_time::ptime& timeStamp) { + HistoryMessage historyMessage(message, fromJID, toJID, type, timeStamp); localHistory_->addMessage(historyMessage); onNewMessage(historyMessage); } -std::vector<HistoryMessage> HistoryController::getMessages(const JID& selfJID, const JID& contactJID, bool isGroupChat) const { - return localHistory_->getMessages(selfJID, contactJID, isGroupChat); +std::vector<HistoryMessage> HistoryController::getMessages(const JID& selfJID, const JID& contactJID, HistoryMessage::Type type) const { + return localHistory_->getMessages(selfJID, contactJID, type); } -void HistoryController::getAllContacts(const JID& selfJID, std::set<JID>& mucs, std::set<JID>& contacts) const { - return localHistory_->getAllContacts(selfJID, mucs, contacts); +std::set<JID> HistoryController::getContacts(const JID& selfJID, HistoryMessage::Type type) const { + return localHistory_->getContacts(selfJID, type); } } |