blob: 2b31f908d99024b79b408d9ffe7bc321e1c00711 (
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 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
#include <boost/optional.hpp>
#include "Swiften/Base/String.h"
#include "Swiften/JID/JID.h"
namespace Swift {
class MUCBookmark {
public:
MUCBookmark(const JID& room, const String& bookmarkName) : room_(room), name_(bookmarkName){};
void setAutojoin(bool enabled) {autojoin_ = enabled;};
void setNick(const boost::optional<String>& nick) {nick_ = nick;};
void setPassword(const boost::optional<String>& password) {password_ = password;};
bool getAutojoin() const {return autojoin_;};
const boost::optional<String>& getNick() const {return nick_;};
const boost::optional<String>& getPassword() const {return password_;};
const String& getName() const {return name_;};
const JID& getRoom() const {return room_;};
bool operator==(const MUCBookmark& rhs) {return rhs.room_ == room_ && rhs.name_ == name_ && rhs.nick_ == nick_ && rhs.password_ == password_ && rhs.autojoin_ == autojoin_;};
private:
JID room_;
String name_;
boost::optional<String> nick_;
boost::optional<String> password_;
bool autojoin_;
};
}
|