Mana
Loading...
Searching...
No Matches
channel.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2004-2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <string>
25
26class ChannelTab;
27
29{
30 public:
38 Channel(short id,
39 const std::string &name,
40 const std::string &announcement = std::string());
41
42 ~Channel();
43
47 int getId() const { return mId; }
48
52 const std::string &getName() const
53 { return mName; }
54
58 const std::string &getAnnouncement() const
59 { return mAnnouncement; }
60
64 void setName(const std::string &channelName)
65 { mName = channelName; }
66
70 void setAnnouncement(const std::string &channelAnnouncement)
71 { mAnnouncement = channelAnnouncement; }
72
73 ChannelTab *getTab() { return mTab; }
74
75 private:
76 unsigned short mId;
77 std::string mName;
78 std::string mAnnouncement;
80};
A tab for a chat channel.
Definition channeltab.h:32
ChannelTab * mTab
Definition channel.h:79
ChannelTab * getTab()
Definition channel.h:73
const std::string & getName() const
Get this channel's name.
Definition channel.h:52
~Channel()
Definition channel.cpp:36
std::string mAnnouncement
Definition channel.h:78
unsigned short mId
Definition channel.h:76
void setName(const std::string &channelName)
Sets the name of the channel.
Definition channel.h:64
int getId() const
Get the id associated witht his channel.
Definition channel.h:47
std::string mName
Definition channel.h:77
const std::string & getAnnouncement() const
Get the announcement message for this channel.
Definition channel.h:58
void setAnnouncement(const std::string &channelAnnouncement)
Sets the announcement string of the channel.
Definition channel.h:70