summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/UnitTest/MockChatListWindow.h3
-rw-r--r--Swift/Controllers/UIInterfaces/ChatListWindow.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/UnitTest/MockChatListWindow.h b/Swift/Controllers/Chat/UnitTest/MockChatListWindow.h
index 5fa264d..287c4b9 100644
--- a/Swift/Controllers/Chat/UnitTest/MockChatListWindow.h
+++ b/Swift/Controllers/Chat/UnitTest/MockChatListWindow.h
@@ -1,27 +1,28 @@
/*
- * Copyright (c) 2011 Kevin Smith
+ * Copyright (c) 2011-2014 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
#include "Swift/Controllers/UIInterfaces/ChatListWindow.h"
namespace Swift {
class MockChatListWindow : public ChatListWindow {
public:
MockChatListWindow() {}
virtual ~MockChatListWindow() {}
void addMUCBookmark(const MUCBookmark& /*bookmark*/) {}
void removeMUCBookmark(const MUCBookmark& /*bookmark*/) {}
void addWhiteboardSession(const ChatListWindow::Chat& /*chat*/) {}
void removeWhiteboardSession(const JID& /*jid*/) {}
void setBookmarksEnabled(bool /*enabled*/) {}
void setRecents(const std::list<ChatListWindow::Chat>& /*recents*/) {}
void setUnreadCount(int /*unread*/) {}
void clearBookmarks() {}
+ void setOnline(bool /*isOnline*/) {}
};
}
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h
index f7eb151..5a7b527 100644
--- a/Swift/Controllers/UIInterfaces/ChatListWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h
@@ -57,42 +57,43 @@ namespace Swift {
}
std::string getImpromptuTitle() const {
typedef std::pair<std::string, JID> StringJIDPair;
std::string title;
foreach(StringJIDPair pair, impromptuJIDs) {
if (title.empty()) {
title += pair.first;
} else {
title += ", " + pair.first;
}
}
return title;
}
JID jid;
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;
virtual void setUnreadCount(int unread) = 0;
virtual void clearBookmarks() = 0;
+ virtual void setOnline(bool isOnline) = 0;
boost::signal<void (const MUCBookmark&)> onMUCBookmarkActivated;
boost::signal<void (const Chat&)> onRecentActivated;
boost::signal<void (const JID&)> onWhiteboardActivated;
boost::signal<void ()> onClearRecentsRequested;
};
}