X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fserver.h;h=17bec4f714b2c4e0dd9a0d23e829866977296858;hp=32060859df1579590229d2960ba3b5a35c0e58b6;hb=c9ef00c67a47448e92398a5dce6ce5b74e77783a;hpb=9ac6ae4ee26819874d8843ba09f38a24088d663d diff --git a/src/core/server.h b/src/core/server.h index 32060859..17bec4f7 100644 --- a/src/core/server.h +++ b/src/core/server.h @@ -65,7 +65,25 @@ public: CtcpHandler *ctcpHandler() const { return _ctcpHandler; } QVariant state(); ///< Return data necessary to restore the server's state upon core restart - + + //! Decode a string using the server (network) decoding. + QString serverDecode(const QByteArray &string) const; + + //! Decode a string using a buffer-specific encoding if one is set (and use the server encoding else). + QString bufferDecode(const QString &bufferName, const QByteArray &string) const; + + //! Decode a string using a IrcUser specific encoding, if one exists (using the server encoding else). + QString userDecode(const QString &userNick, const QByteArray &string) const; + + //! Encode a string using the server (network) encoding. + QByteArray serverEncode(const QString &string) const; + + //! Encode a string using the buffer-specific encoding, if set, and use the server encoding else. + QByteArray bufferEncode(const QString &bufferName, const QString &string) const; + + //! Encode a string using the user-specific encoding, if set, and use the server encoding else. + QByteArray userEncode(const QString &userNick, const QString &string) const; + public slots: // void setServerOptions(); void connectToIrc(QString net);