channel.h

Go to the documentation of this file.
00001 /*
00002 #########################################################################
00003 #
00004 #  This file is part of trustyRC.
00005 #
00006 #  trustyRC, fully modular IRC robot 
00007 #  Copyright (C) 2006-2008 Nicoleau Fabien 
00008 #
00009 #  trustyRC is free software: you can redistribute it and/or modify
00010 #  it under the terms of the GNU General Public License as published by
00011 #  the Free Software Foundation, either version 3 of the License, or
00012 #  (at your option) any later version.
00013 #
00014 #  trustyRC is distributed in the hope that it will be useful,
00015 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 #  GNU General Public License for more details.
00018 #
00019 #  You should have received a copy of the GNU General Public License
00020 #  along with trustyRC.  If not, see <http://www.gnu.org/licenses/>.
00021 #
00022 #########################################################################
00023 */
00024 
00029 #ifndef CHANNEL_H
00030 #define CHANNEL_H
00031 
00032 #include "tools.h"
00033 #include <vector>
00034 #include <string>
00035 #include <iostream>
00036 using namespace std;
00037 
00044 class Channel
00045 {
00046    public:
00048       Channel(string);
00050       ~Channel();
00052                 string getName();
00054                 bool addUser(string,string,string,string);
00056                 bool delUserByNick(string);
00058                 bool delUserByHost(string);
00060       string * getInfosByNick(string);
00062                 string getNickByHost(string);
00064                 string getStatusByNick(string);
00066                 string getStatusByHost(string);
00068                 string getHostByNick(string);
00070                 string getIdentByNick(string);
00072                 string getIdentByHost(string);
00074                 bool setNickByNick(string,string);
00076                 bool setNickByHost(string,string);
00078                 bool updateStatusByNick(string,char,char);
00080                 bool checkNickAccess(string,char);
00082                 void truncateUsersList();
00084                 vector<string*> getUsers();
00086                 time_t getLastWhoUpdate();
00088                 void notifyWho();
00090                 string getTopic();
00092                 void setTopic(string);
00094       string* getLastPartInfos();
00096       bool isOnChannel(string);
00097    private:
00099                 vector<string*> users; // nick host ident status
00101                 vector<string*>::iterator getIterator(string,unsigned int);
00103                 string name ;
00105                 time_t lastWhoUpdate;
00107                 string topic;
00109       string lastPart[4];
00110 };
00111 
00112 #endif

Generated on Sun Aug 16 15:28:26 2009 for trustyRC by  doxygen 1.5.8