/* * Copyright (c) 2010 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #pragma once #include #include namespace Swift { class HistoryMessage { public: HistoryMessage( const std::string& message, const JID& baseJID, const JID& fromJID, const std::string& displayNick, const boost::posix_time::ptime time) : message_(message), baseJID_(baseJID), fromJID_(fromJID), displayNick_(displayNick), time_(time) { } const std::string& getMessage() const { return message_; } const JID& getBaseJID() const { return baseJID_; } const JID& getFromJID() const { return fromJID_; } const std::string& getDisplayNick() const { return displayNick_; } boost::posix_time::ptime getTime() const { return time_; } bool operator==(const HistoryMessage& o) const { return baseJID_ == o.baseJID_ && message_ == o.message_ && fromJID_ == o.fromJID_ && displayNick_ == o.displayNick_ && time_ == o.time_; } private: std::string message_; JID baseJID_; JID fromJID_; std::string displayNick_; boost::posix_time::ptime time_; }; }