KCodecs
kcodecs.cpp
46 auto it = std::find_if(charsetCache.cbegin(), charsetCache.cend(), [&name](const QByteArray &charset) {
200 QByteArray maybeCharset(charsetStart, (languageStart ? languageStart - 1 : scursor) - charsetStart);
245 if (*(scursor + 1) != '=') { // We expect a '=' after the '?', but we got something else; ignore
323 qWarning() << codec->name() << "codec lies about its maxDecodedSizeFor(" << encodedTextLength << ")\nresult may be truncated";
346QString KCodecs::decodeRFC2047String(QByteArrayView src, QByteArray *usedCS, const QByteArray &defaultCS, CharsetOption charsetOption)
535 const auto it = std::lower_bound(s_codecs.begin(), s_codecs.end(), name, [](const auto &lhs, auto rhs) {
545bool KCodecs::Codec::encode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, NewlineType newline) const
617bool KCodecs::Codec::decode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, NewlineType newline) const
An abstract base class of codecs for common mail transfer encodings.
static Codec * codecForName(QByteArrayView name)
Returns a codec associated with the specified name.
Definition kcodecs.cpp:519
virtual bool decode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, NewlineType newline=NewlineLF) const
Convenience wrapper that can be used for small chunks of data when you can provide a large enough buf...
Definition kcodecs.cpp:617
virtual bool encode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, NewlineType newline=NewlineLF) const
Convenience wrapper that can be used for small chunks of data when you can provide a large enough buf...
Definition kcodecs.cpp:545
Decoder(Codec::NewlineType newline=Codec::NewlineLF)
Protected constructor.
Definition kcodecs.cpp:711
bool write(char ch, char *&dcursor, const char *const dend)
Writes character ch to the output stream or the output buffer, depending on whether or not the output...
Definition kcodecs.cpp:656
bool flushOutputBuffer(char *&dcursor, const char *const dend)
Writes characters from the output buffer to the output stream.
Definition kcodecs.cpp:675
Encoder(Codec::NewlineType newline=Codec::NewlineLF)
Protected constructor.
Definition kcodecs.cpp:649
bool writeCRLF(char *&dcursor, const char *const dend)
Convenience function.
Definition kcodecs.cpp:695
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the API for handling MIME data and defines the Base64 and RFC2047B Codec classes...
This file is part of the API for handling MIME data and defines the QuotedPrintable,...
This file is part of the API for handling MIME data and defines a uuencode Codec class.
A wrapper class for the most commonly used encoding and decoding algorithms.
Definition kcodecs.cpp:41
KCODECS_EXPORT QByteArray encodeRFC2047String(QStringView src, const QByteArray &charset)
Encodes string src according to RFC2047 using charset charset.
Definition kcodecs.cpp:407
KCODECS_EXPORT QByteArray uudecode(QByteArrayView in)
Decodes the given data using the uudecode algorithm.
Definition kcodecs.cpp:130
KCODECS_EXPORT QByteArray base64Encode(QByteArrayView in)
Encodes the given data using the base64 algorithm.
Definition kcodecs.cpp:107
KCODECS_EXPORT QByteArray quotedPrintableDecode(QByteArrayView in)
Decodes a quoted-printable encoded data.
Definition kcodecs.cpp:96
KCODECS_EXPORT QByteArray base64Decode(QByteArrayView in)
Decodes the given data that was encoded using the base64 algorithm.
Definition kcodecs.cpp:119
KCODECS_EXPORT QByteArray quotedPrintableEncode(QByteArrayView in, bool useCRLF=true)
Encodes the given data using the quoted-printable algorithm.
Definition kcodecs.cpp:85
KCODECS_EXPORT QString decodeRFC2047String(QStringView text)
Decodes string text according to RFC2047, i.e., the construct =?charset?[qb]?encoded?...
Definition kcodecs.cpp:340
iterator begin()
void clear()
const char * constData() const const
bool contains(QByteArrayView bv) const const
char * data()
iterator end()
bool isEmpty() const const
QByteArray left(qsizetype len) const const
qsizetype length() const const
QByteArray mid(qsizetype pos, qsizetype len) const const
void resize(qsizetype newSize, char c)
QByteArray right(qsizetype len) const const
QByteArray toBase64(Base64Options options) const const
void truncate(qsizetype pos)
const_iterator begin() const const
const_pointer constData() const const
const_iterator end() const const
qsizetype length() const const
qsizetype size() const const
void append(QList< T > &&value)
const_iterator cbegin() const const
const_iterator cend() const const
T & last()
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QString fromUtf8(QByteArrayView str)
QString toUpper() const const
QByteArray toUtf8() const const
System
bool hasError() const const
bool isValid() const const
const char * name() const const
EncodedData< QByteArrayView > decode(QByteArrayView ba)
DecodedData< QStringView > encode(QStringView in)
QByteArray toUtf8() const const
CaseInsensitive
QTextStream & dec(QTextStream &stream)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.