diff options
Diffstat (limited to 'Swift/Controllers/UIInterfaces/ChatListWindow.h')
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatListWindow.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h index ce75ae8..477de04 100644 --- a/Swift/Controllers/UIInterfaces/ChatListWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h @@ -17,14 +17,22 @@ namespace Swift { public: class Chat { public: - Chat(const JID& jid, const std::string& chatName, const std::string& activity, bool isMUC, const std::string& nick = "") : jid(jid), chatName(chatName), activity(activity), isMUC(isMUC), nick(nick) {} - /** Assume that nicks aren't important for equality */ - bool operator==(const Chat& other) const {return jid.toBare() == other.jid.toBare() && isMUC == other.isMUC;}; + Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, bool isMUC, const std::string& nick = "") + : jid(jid), chatName(chatName), activity(activity), isMUC(isMUC), nick(nick), unreadCount(unreadCount) {} + /** Assume that nicks and other transient features aren't important for equality */ + bool operator==(const Chat& other) const { + return jid.toBare() == other.jid.toBare() + && isMUC == other.isMUC; + }; + void setUnreadCount(int unread) { + unreadCount = unread; + } JID jid; std::string chatName; std::string activity; bool isMUC; std::string nick; + int unreadCount; }; virtual ~ChatListWindow(); @@ -32,6 +40,7 @@ namespace Swift { virtual void addMUCBookmark(const MUCBookmark& bookmark) = 0; virtual void removeMUCBookmark(const MUCBookmark& bookmark) = 0; virtual void setRecents(const std::list<Chat>& recents) = 0; + virtual void setUnreadCount(int unread) = 0; virtual void clearBookmarks() = 0; boost::signal<void (const MUCBookmark&)> onMUCBookmarkActivated; |