// DCCConnection.H -*- C++ -*-
// Copyright (c) 1998 Etienne BERNARD
-// Copyright (c) 2002 Clinton Ebadi
+// Copyright (c) 2002,2003 Clinton Ebadi
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+// 02110-1301, USA.
#ifndef DCCCONNECTION_H
#define DCCCONNECTION_H
class UserCommands;
class DCCConnection : public Connection {
+protected:
Bot *bot;
String nuh;
std::time_t lastSpoken;
bool autoRemove;
+ DCCConnection (unsigned long, int);
public:
DCCConnection(Bot *, String, unsigned long, int);
- bool connect();
- bool handleInput();
+ virtual bool connect()=0;
+ virtual bool handleInput()=0;
- void sendNotice(String);
+ virtual void sendNotice(String)=0;
- friend class Bot;
- friend class DCCPerson;
- friend class DCCParser;
- friend class UserCommands;
- friend class DCCManager;
+ // Accessors
+ virtual Bot* get_bot () const { return bot; };
+ virtual std::time_t get_lastSpoken () const { return lastSpoken; };
+ virtual bool get_autoRemove () const { return autoRemove; };
+ virtual String get_nuh () const { return nuh;};
+ // Setters
+ virtual void set_autoRemove (bool new_ar) { autoRemove = new_ar;};
+
+ // friend class Bot;
+ // friend class DCCPerson;
+ // friend class DCCParser;
+ // friend class UserCommands;
+ // friend class DCCManager;
};
#endif