summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/UnitTest/MockChatWindow.h')
-rw-r--r--Swift/Controllers/UnitTest/MockChatWindow.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h
index 7682781..38b3b1f 100644
--- a/Swift/Controllers/UnitTest/MockChatWindow.h
+++ b/Swift/Controllers/UnitTest/MockChatWindow.h
@@ -17,10 +17,11 @@ namespace Swift {
MockChatWindow() {}
virtual ~MockChatWindow();
- virtual std::string addMessage(const ChatMessage& message, const std::string& senderName, bool senderIsSelf, std::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/) {
+ virtual std::string addMessage(const ChatMessage& message, const std::string& senderName, bool senderIsSelf, std::shared_ptr<SecurityLabel> label, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/) {
lastAddedMessage_ = message;
lastAddedMessageSenderName_ = senderName;
lastAddedMessageSenderIsSelf_ = senderIsSelf;
+ lastAddedMessageSecurityLabel_ = label;
return "id";
}
@@ -72,7 +73,7 @@ namespace Swift {
virtual void activate() {}
virtual void setAvailableSecurityLabels(const std::vector<SecurityLabelsCatalog::Item>& labels) {labels_ = labels;}
virtual void setSecurityLabelsEnabled(bool enabled) {labelsEnabled_ = enabled;}
- virtual void setUnreadMessageCount(int /*count*/) {}
+ virtual void setUnreadMessageCount(size_t /*count*/) {}
virtual void convertToMUC(MUCType mucType) {
mucType_ = mucType;
@@ -133,10 +134,19 @@ namespace Swift {
lastAddedMessageSenderIsSelf_ = lastAddedActionSenderIsSelf_ = false;
}
+ void setChatSecurityMarking(const std::string& markingValue, const std::string& markingForegroundColorValue, const std::string& markingBackgroundColorValue) {
+ markingValue_ = markingValue;
+ markingForegroundColorValue_ = markingForegroundColorValue;
+ markingBackgroundColorValue_ = markingBackgroundColorValue;
+ }
+
+ void removeChatSecurityMarking() {}
+
std::string name_;
ChatMessage lastAddedMessage_;
std::string lastAddedMessageSenderName_;
bool lastAddedMessageSenderIsSelf_ = false;
+ std::shared_ptr<SecurityLabel> lastAddedMessageSecurityLabel_ = nullptr;
ChatMessage lastAddedAction_;
std::string lastAddedActionSenderName_;
bool lastAddedActionSenderIsSelf_ = false;
@@ -154,6 +164,9 @@ namespace Swift {
Roster* roster_ = nullptr;
std::vector<std::pair<std::string, ReceiptState>> receiptChanges_;
boost::optional<MUCType> mucType_;
+ std::string markingValue_;
+ std::string markingForegroundColorValue_;
+ std::string markingBackgroundColorValue_;
};
}