diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 12:02:47 (GMT) |
---|---|---|
committer | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 12:02:47 (GMT) |
commit | 0998d6a8f138e0fd00245fc3c1efc8878fa7b888 (patch) | |
tree | d728ad825753ec227ee190a2953db4315cf85d88 /Swiften/History/HistoryMessage.h | |
parent | ad7d00c25b74d212457fa599861c5583e79e7c13 (diff) | |
download | swift-contrib-0998d6a8f138e0fd00245fc3c1efc8878fa7b888.zip swift-contrib-0998d6a8f138e0fd00245fc3c1efc8878fa7b888.tar.bz2 |
Log messages to the sqlite db and dump all messages in the history viewer
Diffstat (limited to 'Swiften/History/HistoryMessage.h')
-rw-r--r-- | Swiften/History/HistoryMessage.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/Swiften/History/HistoryMessage.h b/Swiften/History/HistoryMessage.h index 461f5de..03e9206 100644 --- a/Swiften/History/HistoryMessage.h +++ b/Swiften/History/HistoryMessage.h @@ -12,19 +12,33 @@ namespace Swift { class HistoryMessage { public: - HistoryMessage(const std::string& message, const JID& from, const JID& to, const boost::posix_time::ptime time) : message_(message), from_(from), to_(to), time_(time) { + 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& getFrom() const { - return from_; + const JID& getBaseJID() const { + return baseJID_; } - const JID& getTo() const { - return to_; + const JID& getFromJID() const { + return fromJID_; + } + + const std::string& getDisplayNick() const { + return displayNick_; } boost::posix_time::ptime getTime() const { @@ -32,13 +46,14 @@ namespace Swift { } bool operator==(const HistoryMessage& o) const { - return message_ == o.message_ && from_ == o.from_ && to_ == o.to_ && time_ == o.time_; + return baseJID_ == o.baseJID_ && message_ == o.message_ && fromJID_ == o.fromJID_ && displayNick_ == o.displayNick_ && time_ == o.time_; } private: std::string message_; - JID from_; - JID to_; + JID baseJID_; + JID fromJID_; + std::string displayNick_; boost::posix_time::ptime time_; }; } |