summaryrefslogtreecommitdiffstats
blob: a52f24d43c977cdbc92b79446c10f124eca22e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * 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>

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.toBare() == other.jid.toBare() && 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 setRecents(const std::list<Chat>& recents) = 0;
			virtual void clearBookmarks() = 0;
	};
}