X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fircchannel.h;h=2840b5240cc05a66367baa0bcaeeb6a3cf93d72d;hb=a3a8e528916f4930bd731ed074bcdd190d4fe327;hp=c66bf2b0a16de830d33767c8aacebe606db23876;hpb=e671e9da1edaab37ec403f575979f9a92a766e9a;p=quassel.git diff --git a/src/common/ircchannel.h b/src/common/ircchannel.h index c66bf2b0..2840b524 100644 --- a/src/common/ircchannel.h +++ b/src/common/ircchannel.h @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005/06 by The Quassel Team * + * Copyright (C) 2005/06 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) any later version. * + * (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 * @@ -26,18 +26,20 @@ #include #include +#include "syncableobject.h" + class IrcUser; -class NetworkInfo; +class Network; class SignalProxy; -class IrcChannel : public QObject { +class IrcChannel : public SyncableObject { Q_OBJECT Q_PROPERTY(QString name READ name STORED false) Q_PROPERTY(QString topic READ topic WRITE setTopic STORED false) public: - IrcChannel(const QString &channelname, NetworkInfo *networkInfo); + IrcChannel(const QString &channelname, Network *network); ~IrcChannel(); bool isKnownUser(IrcUser *ircuser) const; @@ -53,6 +55,16 @@ public: QString userModes(IrcUser *ircuser) const; QString userModes(const QString &nick) const; + QTextCodec *codecForEncoding() const; + QTextCodec *codecForDecoding() const; + void setCodecForEncoding(const QString &codecName); + void setCodecForEncoding(QTextCodec *codec); + void setCodecForDecoding(const QString &codecName); + void setCodecForDecoding(QTextCodec *codec); + + QString decodeString(const QByteArray &text) const; + QByteArray encodeString(const QString string) const; + public slots: void setTopic(const QString &topic); @@ -108,7 +120,10 @@ private: QHash _userModes; - NetworkInfo *networkInfo; + Network *network; + + QTextCodec *_codecForEncoding; + QTextCodec *_codecForDecoding; }; #endif