[project @ 2005-06-23 06:43:12 by unknown_lamer]
[clinton/bobotpp.git] / source / ServerQueueItem.H
CommitLineData
cb21075d 1// ServerQueueItem.H -*- C++ -*-
2// Copyright (c) 1998 Etienne BERNARD
3
4// This program is free software; you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation; either version 2 of the License, or
7// any later version.
8
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with this program; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17
18#ifndef SERVERQUEUEITEM_H
19#define SERVERQUEUEITEM_H
20
21class ServerQueueItem {
22public:
23 int priority, penalty, type;
24
25 enum {
26 CHANNELMODE, USERMODE, INVITE, JOIN, KICK,
27 NICK, NOTICE, PART, PASS, PING, PONG, PRIVMSG,
28 QUIT, TOPIC, USER, USERHOST, WHO, WHOIS, OTHER
29 };
30
31 ServerQueueItem(int, int, int);
32 virtual ~ServerQueueItem() { }
33
34 virtual bool merge(ServerQueueItem *) { return false; }
35 virtual String getLine() = 0;
36
37 friend class ServerQueue;
38
39private:
40 ServerQueueItem(const ServerQueueItem &);
41};
42
43
44class ServerQueueOtherItem : public ServerQueueItem {
45public:
46 String line;
47
48 ServerQueueOtherItem(String, int, int, int);
49 String getLine();
50};
51
52class ServerQueueChannelModeItem : public ServerQueueItem {
53public:
54 String channel;
55 String mode;
56 String parameters;
57 int paramcount;
58
59 ServerQueueChannelModeItem(String, String, String);
60 bool merge(ServerQueueItem *);
61 String getLine();
62};
63
64class ServerQueueKickItem : public ServerQueueItem {
65public:
66 String channel;
67 String who;
68 String reason;
69 int count;
70
71 ServerQueueKickItem(String, String, String);
72 bool merge(ServerQueueItem *);
73 String getLine();
74};
75
76class ServerQueueNoticeItem : public ServerQueueItem {
77public:
78 String dest;
79 String message;
80 int count;
81
82 ServerQueueNoticeItem(String, String);
83 bool merge(ServerQueueItem *);
84 String getLine();
85};
86
87#endif