X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fbasichandler.h;fp=src%2Fcore%2Fbasichandler.h;h=61a3f2e9bd6ac1fa2f6f4e450bd2f16e3973ddeb;hp=0000000000000000000000000000000000000000;hb=902c95728306e5ba115de84800fc8d5d239c9d62;hpb=06a46322b6107fe4a38c310a6292cc1ef3330950 diff --git a/src/core/basichandler.h b/src/core/basichandler.h new file mode 100644 index 00000000..61a3f2e9 --- /dev/null +++ b/src/core/basichandler.h @@ -0,0 +1,61 @@ +/*************************************************************************** + * Copyright (C) 2005/06 by The Quassel Team * + * devel@quassel-irc.org * + * * + * 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 * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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. * + ***************************************************************************/ + +#ifndef _BASICHANDLER_H_ +#define _BASICHANDLER_H_ + +#include +#include +#include +#include + +#include "message.h" + +class Server; +class NetworkInfo; + +class BasicHandler : public QObject { + Q_OBJECT + +public: + BasicHandler(Server *parent = 0); + + QStringList providesHandlers() const; + +signals: + void displayMsg(Message::Type, QString target, QString text, QString sender = "", quint8 flags = Message::None); + void putCmd(QString cmd, QStringList params, QString prefix = 0); + void putRawLine(QString msg); + +protected: + virtual void handle(const QString &member, const QGenericArgument &val0 = QGenericArgument(0), + const QGenericArgument &val1 = QGenericArgument(), const QGenericArgument &val2 = QGenericArgument(), + const QGenericArgument &val3 = QGenericArgument(), const QGenericArgument &val4 = QGenericArgument(), + const QGenericArgument &val5 = QGenericArgument(), const QGenericArgument &val6 = QGenericArgument(), + const QGenericArgument &val7 = QGenericArgument(), const QGenericArgument &val8 = QGenericArgument()); + + Server *server; + + +protected: + NetworkInfo *networkInfo() const; + +}; +#endif