X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Firclisthelper.h;h=87def608922cefddfecdf31863a2b5258ec2f454;hp=b4e8b9599c9f576064e20ae3f56fa041bfdb4f0c;hb=ac654fdeeece68d64561920479f064ad3c237e26;hpb=f824db0e31b54969e0b7fa0b5405b1e9173d482c diff --git a/src/common/irclisthelper.h b/src/common/irclisthelper.h index b4e8b959..87def608 100644 --- a/src/common/irclisthelper.h +++ b/src/common/irclisthelper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * 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. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef IRCLISTHELPER_H @@ -32,29 +32,27 @@ * when RPL_LISTEND is received the clients will be informed, that they can pull the data * 3.) client pulls the data by calling requestChannelList again. receiving the data in receiveChannelList */ -class IrcListHelper : public SyncableObject { - Q_OBJECT +class IrcListHelper : public SyncableObject +{ + SYNCABLE_OBJECT + Q_OBJECT public: - inline IrcListHelper(QObject *parent = 0) : SyncableObject(parent) { setInitialized(); }; + inline IrcListHelper(QObject *parent = 0) : SyncableObject(parent) { setInitialized(); }; - struct ChannelDescription { - QString channelName; - quint32 userCount; - QString topic; - ChannelDescription(const QString &channelName_, quint32 userCount_, const QString &topic_) : channelName(channelName_), userCount(userCount_), topic(topic_) {}; - }; + struct ChannelDescription { + QString channelName; + quint32 userCount; + QString topic; + ChannelDescription(const QString &channelName_, quint32 userCount_, const QString &topic_) : channelName(channelName_), userCount(userCount_), topic(topic_) {}; + }; public slots: - inline virtual QVariantList requestChannelList(const NetworkId &netId, const QStringList &channelFilters) { emit channelListRequested(netId, channelFilters); return QVariantList(); } - inline virtual void receiveChannelList(const NetworkId &, const QStringList &, const QVariantList &) {}; - inline virtual void reportFinishedList(const NetworkId &netId) { emit finishedListReported(netId); } - inline virtual void reportError(const QString &error) { emit errorReported(error); } - -signals: - void channelListRequested(const NetworkId &netId, const QStringList &channelFilters); - void finishedListReported(const NetworkId &netId); - void errorReported(const QString &error); + inline virtual QVariantList requestChannelList(const NetworkId &netId, const QStringList &channelFilters) { REQUEST(ARG(netId), ARG(channelFilters)); return QVariantList(); } + inline virtual void receiveChannelList(const NetworkId &, const QStringList &, const QVariantList &) {}; + inline virtual void reportFinishedList(const NetworkId &netId) { SYNC(ARG(netId)) } + inline virtual void reportError(const QString &error) { SYNC(ARG(error)) } }; + #endif //IRCLISTHELPER_H