X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fserver.h;h=771db62e6b58d6d381269a80465071d926d998a8;hp=32060859df1579590229d2960ba3b5a35c0e58b6;hb=8699dd758516d0ded076811e8ea656adc95e69d0;hpb=9ac6ae4ee26819874d8843ba09f38a24088d663d diff --git a/src/core/server.h b/src/core/server.h index 32060859..771db62e 100644 --- a/src/core/server.h +++ b/src/core/server.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-07 by the Quassel IRC Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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);