X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fctcphandler.h;fp=src%2Fcore%2Fctcphandler.h;h=0000000000000000000000000000000000000000;hp=e8d1c18f7a419310c51c08ece30fc4a0928cea80;hb=ddeaf866099f56f42bf86b2bfc72a92763c733aa;hpb=36ea1791352d34e34b6c6cdef02455a4c43acc17 diff --git a/src/core/ctcphandler.h b/src/core/ctcphandler.h deleted file mode 100644 index e8d1c18f..00000000 --- a/src/core/ctcphandler.h +++ /dev/null @@ -1,69 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005-10 by the Quassel Project * - * 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) version 3. * - * * - * 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 _CTCPHANDLER_H_ -#define _CTCPHANDLER_H_ - -#include -#include - -#include "corebasichandler.h" - -class CoreListIgnoreListManager; - -class CtcpHandler : public CoreBasicHandler { - Q_OBJECT - -public: - CtcpHandler(CoreNetwork *parent = 0); - - enum CtcpType {CtcpQuery, CtcpReply}; - - void parse(Message::Type, const QString &prefix, const QString &target, const QByteArray &message); - - QByteArray lowLevelQuote(const QByteArray &); - QByteArray lowLevelDequote(const QByteArray &); - QByteArray xdelimQuote(const QByteArray &); - QByteArray xdelimDequote(const QByteArray &); - - QByteArray pack(const QByteArray &ctcpTag, const QByteArray &message); - void query(const QString &bufname, const QString &ctcpTag, const QString &message); - void reply(const QString &bufname, const QString &ctcpTag, const QString &message); - -public slots: - void handleAction(CtcpType, const QString &prefix, const QString &target, const QString ¶m, QString &reply); - void handleClientinfo(CtcpType, const QString &prefix, const QString &target, const QString ¶m, QString &reply); - void handlePing(CtcpType, const QString &prefix, const QString &target, const QString ¶m, QString &reply); - void handleTime(CtcpType, const QString &prefix, const QString &target, const QString ¶m, QString &reply); - void handleVersion(CtcpType, const QString &prefix, const QString &target, const QString ¶m, QString &reply); - - void defaultHandler(const QString &cmd, CtcpType ctcptype, const QString &prefix, const QString &target, const QString ¶m, QString &reply); - -private: - void packedReply(const QString &bufname, const QList &replies); - - QByteArray XDELIM; - QHash ctcpMDequoteHash; - QHash ctcpXDelimDequoteHash; - CoreIgnoreListManager *_ignoreListManager; -}; - - -#endif