/* * Copyright (c) 2012 Catalin Badea * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #pragma once #include #include #include #include #include #include namespace Swift { class HistoryManager; class JID; class HistoryController { public: HistoryController(); ~HistoryController(); void addMessage(const std::string& message, const JID& fromJID, const JID& toJID, HistoryMessage::Type type, const boost::posix_time::ptime& timeStamp); std::vector getMessages(const JID& selfJID, const JID& contactJID, HistoryMessage::Type type) const; std::set getContacts(const JID& selfJID, HistoryMessage::Type type, const std::string& keyword = std::string()) const; boost::signal onNewMessage; private: HistoryManager* localHistory_; bool remoteArchiveSupported_; }; }