Improve include dependencies
[clinton/bobotpp.git] / source / ServerConnection.H
1 // ServerConnection.H -*- C++ -*-
2 // Copyright (c) 1997, 1998 Etienne BERNARD
3 // Copyright (c) 2002 Clinton Ebadi
4
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // any later version.
9
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19 #ifndef SERVERCONNECTION_H
20 #define SERVERCONNECTION_H
21
22 #ifdef HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25
26 #include <ctime>
27
28 #include "ServerQueue.H"
29 #include "Connection.H"
30
31 class Bot;
32 class Channel;
33 class Commands;
34 class Parser;
35 class Server;
36 class UserCommands;
37
38 #ifdef USESCRIPTS
39 class BotInterp;
40 class Interp;
41 class ScriptCommands;
42 #endif
43
44 class ServerConnection : public Connection {
45 Server * server;
46 Bot * bot;
47 ServerQueue * queue;
48 std::time_t pingTime;
49 int lag;
50 std::time_t serverLastSpoken;
51 bool debug;
52
53 public:
54 ServerConnection(Bot *, Server *, String);
55 ~ServerConnection();
56
57 bool connect();
58 bool handleInput();
59
60 friend class Bot;
61 friend class Person;
62 friend class Parser;
63 friend class Channel;
64 friend class Commands;
65 friend class UserCommands;
66 #ifdef USESCRIPTS
67 friend class Interp;
68 friend class BotInterp;
69 friend class ScriptCommands;
70 #endif
71 };
72
73 #endif