/***************************************************************************
- * Copyright (C) 2005/06 by The Quassel Team *
+ * Copyright (C) 2005-07 by the Quassel IRC Team *
* 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 <QVariantMap>
#include <QPointer>
+#include "types.h"
+
class SignalProxy;
class IrcUser;
class IrcChannel;
NetworkInfo(const uint &networkid, QObject *parent = 0);
//virtual ~NetworkInfo();
- uint networkId() const;
+ NetworkId networkId() const;
bool initialized() const;
SignalProxy *proxy() const;
void setProxy(SignalProxy *proxy);
-
+
bool isMyNick(const QString &nick) const;
bool isMyNick(IrcUser *ircuser) const;
QString prefixToMode(const QCharRef &prefix);
QString modeToPrefix(const QString &mode);
QString modeToPrefix(const QCharRef &mode);
-
+
QString networkName() const;
QString currentServer() const;
QString myNick() const;
bool supports(const QString ¶m) const;
QString support(const QString ¶m) const;
-
+
IrcUser *newIrcUser(const QString &hostmask);
- IrcUser *ircUser(const QString &nickname) const;
+ IrcUser *newIrcUser(const QByteArray &hostmask);
+ IrcUser *ircUser(QString nickname) const;
+ IrcUser *ircUser(const QByteArray &nickname) const;
QList<IrcUser *> ircUsers() const;
-
+
IrcChannel *newIrcChannel(const QString &channelname);
- IrcChannel *ircChannel(const QString &channelname);
+ IrcChannel *newIrcChannel(const QByteArray &channelname);
+ IrcChannel *ircChannel(QString channelname);
+ IrcChannel *ircChannel(const QByteArray &channelname);
+
QList<IrcChannel *> ircChannels() 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 setNetworkName(const QString &networkName);
void setCurrentServer(const QString ¤tServer);
// these slots are to keep the hashlists of all users and the
// channel lists up to date
void ircUserNickChanged(QString newnick);
+ void setInitialized();
+private slots:
void ircUserDestroyed();
void channelDestroyed();
-
- void setInitialized();
+ void removeIrcUser(IrcUser *ircuser);
signals:
void networkNameSet(const QString &networkName);
QPointer<SignalProxy> _proxy;
void determinePrefixes();
+
+ QTextCodec *_codecForEncoding;
+ QTextCodec *_codecForDecoding;
+
};
#endif