Improve include dependencies
[clinton/bobotpp.git] / source / ServerConnection.H
CommitLineData
cb21075d 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
39b022cb 17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
cb21075d 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
cb21075d 28#include "ServerQueue.H"
29#include "Connection.H"
30
31class Bot;
cb21075d 32class Channel;
33class Commands;
cfa82921 34class Parser;
35class Server;
cb21075d 36class UserCommands;
cfa82921 37
cb21075d 38#ifdef USESCRIPTS
cb21075d 39class BotInterp;
cfa82921 40class Interp;
cb21075d 41class ScriptCommands;
42#endif
43
44class 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
53public:
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