X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fnetwork.h;h=4a432d841b002969026fb15e1cc2c86a62f317d2;hb=c6fc5ae878a4f92b658c3da2861bcc7da9c2594f;hp=ee6ba7fcd063a4fcf7d8c3625050a9a23896f58d;hpb=e9a8478aa3546063dc39cbadb9280e5566416eeb;p=quassel.git diff --git a/src/common/network.h b/src/common/network.h index ee6ba7fc..4a432d84 100644 --- a/src/common/network.h +++ b/src/common/network.h @@ -143,14 +143,14 @@ public: bool supports(const QString ¶m) const { return _supports.contains(param); } QString support(const QString ¶m) const; - IrcUser *newIrcUser(const QString &hostmask); + IrcUser *newIrcUser(const QString &hostmask, const QVariantMap &initData = QVariantMap()); inline IrcUser *newIrcUser(const QByteArray &hostmask) { return newIrcUser(decodeServerString(hostmask)); } IrcUser *ircUser(QString nickname) const; inline IrcUser *ircUser(const QByteArray &nickname) const { return ircUser(decodeServerString(nickname)); } inline QList ircUsers() const { return _ircUsers.values(); } inline quint32 ircUserCount() const { return _ircUsers.count(); } - IrcChannel *newIrcChannel(const QString &channelname); + IrcChannel *newIrcChannel(const QString &channelname, const QVariantMap &initData = QVariantMap()); inline IrcChannel *newIrcChannel(const QByteArray &channelname) { return newIrcChannel(decodeServerString(channelname)); } IrcChannel *ircChannel(QString channelname) const; inline IrcChannel *ircChannel(const QByteArray &channelname) const { return ircChannel(decodeServerString(channelname)); } @@ -210,8 +210,6 @@ public slots: inline void addIrcUser(const QString &hostmask) { newIrcUser(hostmask); } inline void addIrcChannel(const QString &channel) { newIrcChannel(channel); } - void removeIrcUser(const QString &nick); - void removeIrcChannel(const QString &channel); //init geters QVariantMap initSupports() const; @@ -240,13 +238,9 @@ public slots: void emitConnectionError(const QString &); private slots: - void ircUserDestroyed(); - void channelDestroyed(); void removeIrcUser(IrcUser *ircuser); void removeIrcChannel(IrcChannel *ircChannel); void removeChansAndUsers(); - void ircUserInitDone(); - void ircChannelInitDone(); signals: void aboutToBeDestroyed(); @@ -284,16 +278,6 @@ signals: void ircChannelAdded(const QString &channelname); void ircChannelAdded(IrcChannel *); - void ircUserRemoved(const QString &nick); - void ircChannelRemoved(const QString &channel); - - // needed for client sync progress - void ircUserRemoved(QObject *); - void ircChannelRemoved(QObject *); - - void ircUserInitDone(IrcUser *); - void ircChannelInitDone(IrcChannel *); - void connectRequested(NetworkId id = 0) const; void disconnectRequested(NetworkId id = 0) const; void setNetworkInfoRequested(const NetworkInfo &) const; @@ -346,6 +330,9 @@ private: static QTextCodec *_defaultCodecForDecoding; bool _autoAwayActive; // when this is active handle305 and handle306 don't trigger any output + + friend class IrcUser; + friend class IrcChannel; }; //! Stores all editable information about a network (as opposed to runtime state).