| 1 | // DCCConnection.H -*- C++ -*- |
| 2 | // Copyright (c) 1998 Etienne BERNARD |
| 3 | // Copyright (c) 2002,2003 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 |
| 18 | // 02110-1301, USA. |
| 19 | |
| 20 | #ifndef DCCCONNECTION_H |
| 21 | #define DCCCONNECTION_H |
| 22 | |
| 23 | #include <ctime> |
| 24 | |
| 25 | #include "Bot.H" |
| 26 | #include "Connection.H" |
| 27 | |
| 28 | class DCCConnection : public Connection { |
| 29 | protected: |
| 30 | Bot *bot; |
| 31 | String nuh; |
| 32 | std::time_t lastSpoken; |
| 33 | bool autoRemove; |
| 34 | DCCConnection (unsigned long, int); |
| 35 | |
| 36 | public: |
| 37 | DCCConnection(Bot *, String, unsigned long, int); |
| 38 | |
| 39 | virtual bool connect()=0; |
| 40 | virtual bool handleInput()=0; |
| 41 | |
| 42 | virtual void sendNotice(String)=0; |
| 43 | |
| 44 | // Accessors |
| 45 | virtual Bot* get_bot () const { return bot; }; |
| 46 | virtual std::time_t get_lastSpoken () const { return lastSpoken; }; |
| 47 | virtual bool get_autoRemove () const { return autoRemove; }; |
| 48 | virtual String get_nuh () const { return nuh;}; |
| 49 | // Setters |
| 50 | virtual void set_autoRemove (bool new_ar) { autoRemove = new_ar;}; |
| 51 | |
| 52 | // friend class Bot; |
| 53 | // friend class DCCPerson; |
| 54 | // friend class DCCParser; |
| 55 | // friend class UserCommands; |
| 56 | // friend class DCCManager; |
| 57 | }; |
| 58 | |
| 59 | #endif |