[project @ 2005-07-05 07:24:59 by unknown_lamer]
[clinton/bobotpp.git] / source / DCCConnection.H
CommitLineData
cb21075d 1// DCCConnection.H -*- C++ -*-
2// Copyright (c) 1998 Etienne BERNARD
4edefeb6 3// Copyright (c) 2002,2003 Clinton Ebadi
cb21075d 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
133eff7a 17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18// 02110-1301, USA.
cb21075d 19
20#ifndef DCCCONNECTION_H
21#define DCCCONNECTION_H
22
23#include <ctime>
24
25#include "Connection.H"
26#include "Bot.H"
fed59248 27#include "DCCPerson.H"
cb21075d 28
29class DCCPerson;
30class UserCommands;
31
32class DCCConnection : public Connection {
4edefeb6 33protected:
cb21075d 34 Bot *bot;
35 String nuh;
36 std::time_t lastSpoken;
37 bool autoRemove;
4edefeb6 38 DCCConnection (unsigned long, int);
cb21075d 39
40public:
41 DCCConnection(Bot *, String, unsigned long, int);
42
4edefeb6 43 virtual bool connect()=0;
44 virtual bool handleInput()=0;
cb21075d 45
4edefeb6 46 virtual void sendNotice(String)=0;
cb21075d 47
4edefeb6 48 // Accessors
49 virtual Bot* get_bot () const { return bot; };
50 virtual std::time_t get_lastSpoken () const { return lastSpoken; };
51 virtual bool get_autoRemove () const { return autoRemove; };
52 virtual String get_nuh () const { return nuh;};
53 // Setters
54 virtual void set_autoRemove (bool new_ar) { autoRemove = new_ar;};
55
56 // friend class Bot;
57 // friend class DCCPerson;
58 // friend class DCCParser;
59 // friend class UserCommands;
60 // friend class DCCManager;
cb21075d 61};
62
63#endif