00001 /* 00002 OpieIRC - An embedded IRC client 00003 Copyright (C) 2002 Wenzel Jakob 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 */ 00020 00021 #ifndef __IRCCHANNEL_H 00022 #define __IRCCHANNEL_H 00023 00024 #include <qobject.h> 00025 #include <qlist.h> 00026 #include <qstring.h> 00027 00028 #include "ircperson.h" 00029 00030 class IRCChannelPerson; 00031 00032 /* IRCChannel is the object-oriented representation 00033 of an IRC channel. It basically acts as a container 00034 for IRCChannelPersons */ 00035 class IRCChannel : public QObject { 00036 Q_OBJECT 00037 public: 00038 IRCChannel(QString channelname); 00039 ~IRCChannel(); 00040 00041 void addPerson(IRCChannelPerson *person); 00042 void removePerson(IRCChannelPerson *person); 00043 IRCChannelPerson *getPerson(QString nickname); 00044 QListIterator<IRCChannelPerson> people(); 00045 00046 /* hasPeople identifies whether the irc channel is 00047 done synchronizing with the current state - 00048 this is only relevant when joining a channel */ 00049 void setHasPeople(bool hasPeople); 00050 QString channelname(); 00051 bool hasPeople(); 00052 static bool isValid(const QString &channel); 00053 protected: 00054 QList<IRCChannelPerson> m_people; 00055 QString m_channelname; 00056 bool m_hasPeople; 00057 }; 00058 00059 #endif /* __IRCCHANNEL_H */
1.4.2