X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fnetworkinfo.h;h=e27c66b4d8a58c2e48be8d6534a764d8c719e642;hp=6f2ab48251ec67a93d6ed016e2dd9b2898a12ee1;hb=45d9ea6ed5d64eec3ca351fdcf7610c7cff3529d;hpb=902c95728306e5ba115de84800fc8d5d239c9d62 diff --git a/src/common/networkinfo.h b/src/common/networkinfo.h index 6f2ab482..e27c66b4 100644 --- a/src/common/networkinfo.h +++ b/src/common/networkinfo.h @@ -1,11 +1,11 @@ /*************************************************************************** - * 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 * @@ -29,7 +29,6 @@ #include class SignalProxy; -class Synchronizer; class IrcUser; class IrcChannel; @@ -42,13 +41,15 @@ class NetworkInfo : public QObject { Q_PROPERTY(QString myNick READ myNick WRITE setMyNick STORED false) public: - NetworkInfo(const uint &networkid, SignalProxy *proxy, QObject *parent = 0); - // virtual ~NetworkInfo(); + NetworkInfo(const uint &networkid, QObject *parent = 0); + //virtual ~NetworkInfo(); uint networkId() const; bool initialized() const; - Synchronizer *synchronizer(); + SignalProxy *proxy() const; + void setProxy(SignalProxy *proxy); + bool isMyNick(const QString &nick) const; bool isMyNick(IrcUser *ircuser) const; @@ -72,11 +73,11 @@ public: QString support(const QString ¶m) const; IrcUser *newIrcUser(const QString &hostmask); - IrcUser *ircUser(const QString &nickname) const; + IrcUser *ircUser(QString nickname) const; QList ircUsers() const; IrcChannel *newIrcChannel(const QString &channelname); - IrcChannel *ircChannel(const QString &channelname); + IrcChannel *ircChannel(QString channelname); QList ircChannels() const; public slots: @@ -88,6 +89,7 @@ public slots: void removeSupport(const QString ¶m); inline void addIrcUser(const QString &hostmask) { newIrcUser(hostmask); } + void removeIrcUser(QString nick); //init geters QVariantMap initSupports() const; @@ -104,23 +106,26 @@ public slots: // 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); void currentServerSet(const QString ¤tServer); void myNickSet(const QString &mynick); - void supportAdded(const QString ¶m, const QString &value = QString()); + void supportAdded(const QString ¶m, const QString &value); void supportRemoved(const QString ¶m); void ircUserAdded(QString hostmask); void ircChannelAdded(QString channelname); + void ircUserRemoved(QString nick); + void initDone(); void ircUserInitDone(); void ircChannelInitDone(); @@ -143,9 +148,9 @@ private: //QVariantMap networkSettings; //QVariantMap identity; - QPointer _synchronizer; - + QPointer _proxy; void determinePrefixes(); + }; #endif