made the signalproxy compile with MSVC
[quassel.git] / src / common / ircchannel.h
index c66bf2b..d970814 100644 (file)
@@ -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        *
 #include <QStringList>
 #include <QVariantMap>
 
+#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;
   bool isValidChannelUserMode(const QString &mode) const;
 
-  bool initialized() const;
-
   QString name() const;
   QString topic() const;
 
@@ -53,6 +53,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);
 
@@ -77,8 +87,6 @@ public slots:
   // init seters
   void initSetUserModes(const QVariantMap &usermodes);
 
-  void setInitialized();
-
 signals:
   void topicSet(QString topic);
   void userModesSet(QString nick, QString modes);
@@ -95,8 +103,6 @@ signals:
   void ircUserModeRemoved(IrcUser *ircuser, QString mode);
   void ircUserModesSet(IrcUser *ircuser, QString modes);
 
-  void initDone();
-
 private slots:
    void ircUserDestroyed();
    void ircUserNickSet(QString nick);
@@ -108,7 +114,10 @@ private:
 
   QHash<IrcUser *, QString> _userModes;
 
-  NetworkInfo *networkInfo;
+  Network *network;
+
+  QTextCodec *_codecForEncoding;
+  QTextCodec *_codecForDecoding;
 };
 
 #endif