1 /***************************************************************************
2 * Copyright (C) 2005-2012 by the Quassel Project *
3 * devel@quassel-irc.org *
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 * (at your option) version 3. *
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. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
28 class CtcpEvent : public IrcEvent {
36 explicit CtcpEvent(EventManager::EventType type, Network *network, const QString &prefix, const QString &target,
37 CtcpType ctcpType, const QString &ctcpCmd, const QString ¶m,
38 const QDateTime ×tamp = QDateTime(), const QUuid &uuid = QUuid())
39 : IrcEvent(type, network, prefix),
46 setTimestamp(timestamp);
49 inline CtcpType ctcpType() const { return _ctcpType; }
50 inline void setCtcpType(CtcpType type) { _ctcpType = type; }
52 inline QString ctcpCmd() const { return _ctcpCmd; }
53 inline void setCtcpCmd(const QString &ctcpCmd) { _ctcpCmd = ctcpCmd; }
55 inline QString target() const { return _target; }
56 inline void setTarget(const QString &target) { _target = target; }
58 inline QString param() const { return _param; }
59 inline void setParam(const QString ¶m) { _param = param; }
61 inline QString reply() const { return _reply; }
62 inline void setReply(const QString &reply) { _reply = reply; }
64 inline QUuid uuid() const { return _uuid; }
65 inline void setUuid(const QUuid &uuid) { _uuid = uuid; }
68 virtual inline QString className() const { return "CtcpEvent"; }
69 virtual inline void debugInfo(QDebug &dbg) const {
70 NetworkEvent::debugInfo(dbg);
71 dbg << ", prefix = " << qPrintable(prefix())
72 << ", target = " << qPrintable(target())
73 << ", ctcptype = " << (ctcpType() == Query? "query" : "reply")
74 << ", cmd = " << qPrintable(ctcpCmd())
75 << ", param = " << qPrintable(param())
76 << ", reply = " << qPrintable(reply());
82 QString _target, _param, _reply;