X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=a579e3bbac2549b9214515be4b11277167019913;hp=a6d367805c7fdc0653e01eb42a1d1deac4ad542b;hb=14281719026a2d9d30667f63f3659c2c4e7e0cca;hpb=63bc3c3a34a0df70cad72b1f36d4fb7b8245d79c diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index a6d36780..a579e3bb 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -23,6 +23,7 @@ #include "network.h" #include "coreircchannel.h" +#include "coreircuser.h" #include @@ -33,6 +34,10 @@ # include #endif +#ifdef HAVE_QCA2 +# include "cipher.h" +#endif + #include "coresession.h" class CoreIdentity; @@ -108,6 +113,13 @@ public slots: void addChannelKey(const QString &channel, const QString &key); void removeChannelKey(const QString &channel); + // Blowfish stuff +#ifdef HAVE_QCA2 + Cipher *cipher(const QString &recipient) const; + QByteArray cipherKey(const QString &recipient) const; + void setCipherKey(const QString &recipient, const QByteArray &key); +#endif + void setAutoWhoEnabled(bool enabled); void setAutoWhoInterval(int interval); void setAutoWhoDelay(int delay); @@ -138,6 +150,13 @@ signals: protected: inline virtual IrcChannel *ircChannelFactory(const QString &channelname) { return new CoreIrcChannel(channelname, this); } + inline virtual IrcUser *ircUserFactory(const QString &hostmask) { return new CoreIrcUser(hostmask, this); } + +protected slots: + // TODO: remove cached cipher keys, when appropriate + //virtual void removeIrcUser(IrcUser *ircuser); + //virtual void removeIrcChannel(IrcChannel *ircChannel); + //virtual void removeChansAndUsers(); private slots: void socketHasData(); @@ -209,6 +228,9 @@ private: QList _msgQueue; QString _requestedUserModes; // 2 strings separated by a '-' character. first part are requested modes to add, the second to remove + + // Blowfish key map + QHash _cipherKeys; }; #endif //CORENETWORK_H