diff options
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatListWindow.h | 7 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatWindow.h | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h index 38d8c3e..f7eb151 100644 --- a/Swift/Controllers/UIInterfaces/ChatListWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h @@ -15,21 +15,21 @@ #include <boost/filesystem/path.hpp> #include <Swiften/Base/foreach.h> #include <Swiften/Base/boost_bsignals.h> namespace Swift { class ChatListWindow { public: class Chat { public: - Chat() : statusType(StatusShow::None), isMUC(false), unreadCount(0) {} - Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, StatusShow::Type statusType, const boost::filesystem::path& avatarPath, bool isMUC, const std::string& nick = "", const boost::optional<std::string> password = boost::optional<std::string>()) - : jid(jid), chatName(chatName), activity(activity), statusType(statusType), isMUC(isMUC), nick(nick), password(password), unreadCount(unreadCount), avatarPath(avatarPath) {} + Chat() : statusType(StatusShow::None), isMUC(false), unreadCount(0), isPrivateMessage(false) {} + Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, StatusShow::Type statusType, const boost::filesystem::path& avatarPath, bool isMUC, bool isPrivateMessage = false, const std::string& nick = "", const boost::optional<std::string> password = boost::optional<std::string>()) + : jid(jid), chatName(chatName), activity(activity), statusType(statusType), isMUC(isMUC), nick(nick), password(password), unreadCount(unreadCount), avatarPath(avatarPath), isPrivateMessage(isPrivateMessage) {} /** Assume that nicks and other transient features aren't important for equality */ bool operator==(const Chat& other) const { if (impromptuJIDs.empty()) { return jid.toBare() == other.jid.toBare() && isMUC == other.isMUC; } else { /* compare the chat occupant lists */ typedef std::map<std::string, JID> JIDMap; foreach (const JIDMap::value_type& jid, impromptuJIDs) { bool found = false; @@ -71,18 +71,19 @@ namespace Swift { std::string chatName; std::string activity; StatusShow::Type statusType; bool isMUC; std::string nick; boost::optional<std::string> password; int unreadCount; boost::filesystem::path avatarPath; std::map<std::string, JID> impromptuJIDs; + bool isPrivateMessage; }; virtual ~ChatListWindow(); virtual void setBookmarksEnabled(bool enabled) = 0; virtual void addMUCBookmark(const MUCBookmark& bookmark) = 0; virtual void addWhiteboardSession(const ChatListWindow::Chat& chat) = 0; virtual void removeWhiteboardSession(const JID& jid) = 0; virtual void removeMUCBookmark(const MUCBookmark& bookmark) = 0; virtual void setRecents(const std::list<Chat>& recents) = 0; diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h index bf4744b..81d26c8 100644 --- a/Swift/Controllers/UIInterfaces/ChatWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatWindow.h @@ -124,18 +124,19 @@ namespace Swift { virtual std::string addWhiteboardRequest(bool senderIsSelf) = 0; virtual void setWhiteboardSessionStatus(std::string id, const ChatWindow::WhiteboardSessionState state) = 0; // message receipts virtual void setMessageReceiptState(const std::string& id, ChatWindow::ReceiptState state) = 0; virtual void setContactChatState(ChatState::ChatStateType state) = 0; virtual void setName(const std::string& name) = 0; virtual void show() = 0; + virtual bool isVisible() const = 0; virtual void activate() = 0; virtual void setAvailableSecurityLabels(const std::vector<SecurityLabelsCatalog::Item>& labels) = 0; virtual void setSecurityLabelsEnabled(bool enabled) = 0; virtual void setCorrectionEnabled(Tristate enabled) = 0; virtual void setFileTransferEnabled(Tristate enabled) = 0; virtual void setUnreadMessageCount(int count) = 0; virtual void convertToMUC(MUCType mucType) = 0; // virtual TreeWidget *getTreeWidget() = 0; virtual void setSecurityLabelsError() = 0; |