summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/History/HistoryMessage.h')
-rw-r--r--Swiften/History/HistoryMessage.h31
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_;
};
}