diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2006-01-18 00:09:21 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2006-01-18 00:09:21 +0000 |
commit | 2c1461de62e85772143fd58b7a13f1a8a964c930 (patch) | |
tree | ce793467c5ddaba927260b223108b8f1cb81bd06 /src/chatchannel.h | |
parent | 4871897d9f2b2155bcc71c5dafd925983edf8127 (diff) | |
download | manaserv-2c1461de62e85772143fd58b7a13f1a8a964c930.tar.gz manaserv-2c1461de62e85772143fd58b7a13f1a8a964c930.tar.xz manaserv-2c1461de62e85772143fd58b7a13f1a8a964c930.zip |
Chat channeling commit part 2.
Diffstat (limited to 'src/chatchannel.h')
-rw-r--r-- | src/chatchannel.h | 51 |
1 files changed, 36 insertions, 15 deletions
diff --git a/src/chatchannel.h b/src/chatchannel.h index 0b35ee9..4baf093 100644 --- a/src/chatchannel.h +++ b/src/chatchannel.h @@ -24,9 +24,11 @@ #ifndef _TMWSERV_CHATCHANNEL_H_ #define _TMWSERV_CHATCHANNEL_H_ -#include <list> +#include <vector> #include <string> +#include "being.h" + class ChatChannel { public: @@ -34,9 +36,9 @@ class ChatChannel { /** * Constructors */ - ChatChannel(); - - ChatChannel(short channelId, std::string channelName); + ChatChannel(const std::string channelName, + const std::string ChannelAnnouncement, + const std::string ChannelPassword); /** * Destructor @@ -46,49 +48,68 @@ class ChatChannel { /** * Get the name of the channel */ - const std::string getName(); + const std::string& getName() const; + + /** + * Get the Announcement string of the channel + */ + const std::string& getAnnouncement() const; + + /** + * Get the password of the channel + */ + const std::string& getPassword() const; /** * Set the name of the channel */ - void setName(std::string channelName); + void setName(const std::string channelName); /** - * Get the id of the channel + * Set the Announcement string of the channel */ - const short getChannelId(); + void setAnnouncement(const std::string channelAnnouncement); + + /** + * Set the password of the channel + */ + void setPassword(const std::string channelPassword); /** * Get the list of the users registered in the channel */ - const std::list<std::string> getUserList(); + std::vector<tmwserv::BeingPtr> getUserList() const; /** * Add a user in the channel */ - bool addUserInChannel(std::string playerName); + bool addUserInChannel(tmwserv::BeingPtr beingPtr); /** * Remove a user from the channel. */ - bool removeUserFromChannel(std::string playerName); + bool removeUserFromChannel(tmwserv::BeingPtr beingPtr); private: + /** + * The Channel's name + */ + std::string mChannelName; /** - * The channel id which must be unique. + * The Channel's name */ - short mChannelId; + std::string mChannelAnnouncement; /** * The Channel's name */ - std::string mChannelName; + std::string mChannelPassword; /** * The registered user list */ - std::list<std::string> mRegisteredUsers; + std::vector<tmwserv::BeingPtr> mRegisteredUsers; }; |