00001
00002
00003
00004 #ifndef __CHANNELLIST_H__
00005 #define __CHANNELLIST_H__
00006
00007 #include <string>
00008 #include "entity.h"
00009 #include "user.h"
00010 #include "irclist.h"
00011
00012 namespace ircpp {
00013 class message;
00014
00015 class channellist
00016 {
00017
00018 public:
00019
00020 channellist(session& parent, listmode mode);
00021 ~channellist();
00022
00023
00024 channel& find(const std::string& name) const;
00025 channel& add(const std::string& name);
00026 irclist<channel>::iterator begin() const;
00027 irclist<channel>::iterator end() const;
00028 size_t count() const;
00029 bool remove(channel& c);
00030 bool clear();
00031
00032
00033 void pre_join_slot(const std::string& user, const std::string& channel);
00034 void post_leave_slot(message& msg);
00035 void channel_deleting_slot(entity& c);
00036
00037
00038 boost::signals::connection post_leave_connection;
00039
00040
00041 private:
00042 session& s;
00043 listmode _mode;
00044 irclist<channel> _list;
00045 };
00046
00047 }
00048
00049 #endif