summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-04-27 20:42:11 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-04-27 20:58:17 (GMT)
commitf48dbee2fb5acf7c0abc9d7897d736233b1f0d2f (patch)
tree512879020dc60ecb0b0b5e70219bf588c5a2f5af /Swift/Controllers/UIInterfaces
parent73c97d9222040b6160321a32e55a5a3913923e5e (diff)
downloadswift-contrib-f48dbee2fb5acf7c0abc9d7897d736233b1f0d2f.zip
swift-contrib-f48dbee2fb5acf7c0abc9d7897d736233b1f0d2f.tar.bz2
Start on recent chats list
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r--Swift/Controllers/UIInterfaces/ChatListWindow.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h
index a2a0874..f717684 100644
--- a/Swift/Controllers/UIInterfaces/ChatListWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h
@@ -1,23 +1,35 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2011 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
+#include <list>
#include <boost/shared_ptr.hpp>
-
-#include "Swiften/MUC/MUCBookmark.h"
+#include <Swiften/MUC/MUCBookmark.h>
namespace Swift {
class ChatListWindow {
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 == other.jid && isMUC == other.isMUC;};
+ JID jid;
+ std::string chatName;
+ std::string activity;
+ bool isMUC;
+ std::string nick;
+ };
virtual ~ChatListWindow();
virtual void setBookmarksEnabled(bool enabled) = 0;
virtual void addMUCBookmark(const MUCBookmark& bookmark) = 0;
virtual void removeMUCBookmark(const MUCBookmark& bookmark) = 0;
- virtual void clear() = 0;
+ virtual void setRecents(const std::list<Chat>& recents) = 0;
+ virtual void clearBookmarks() = 0;
};
}