KCodecs
kcodecs.h
250KCODECS_EXPORT QString decodeRFC2047String(QByteArrayView src, QByteArray *usedCS, const QByteArray &defaultCS = QByteArray(), CharsetOption option = NoOption);
255 * This function also makes commas, quotes and other characters part of the encoded name, for example
256 * the string "Jöhn Döe" <john@example.com"> would be encoded as <encoded word for "Jöhn Döe"> <john@example.com>,
258 * Therefore don't use this function for input strings that contain semantically meaningful characters,
346 virtual qsizetype maxEncodedSizeFor(qsizetype insize, NewlineType newline = NewlineLF) const = 0;
356 virtual qsizetype maxDecodedSizeFor(qsizetype insize, NewlineType newline = NewlineLF) const = 0;
412 virtual bool encode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, NewlineType newline = NewlineLF) const;
450 virtual bool decode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, NewlineType newline = NewlineLF) const;
608 virtual bool decode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend) = 0;
663 virtual bool encode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend) = 0;
An abstract base class of codecs for common mail transfer encodings.
virtual qsizetype maxEncodedSizeFor(qsizetype insize, NewlineType newline=NewlineLF) const =0
Computes the maximum size, in characters, needed for the encoding.
virtual Decoder * makeDecoder(NewlineType newline=NewlineLF) const =0
Creates the decoder for the codec.
virtual Encoder * makeEncoder(NewlineType newline=NewlineLF) const =0
Creates the encoder for the codec.
virtual qsizetype maxDecodedSizeFor(qsizetype insize, NewlineType newline=NewlineLF) const =0
Computes the maximum size, in characters, needed for the deccoding.
Stateful CTE decoder class.
virtual bool finish(char *&dcursor, const char *const dend)=0
Call this method to finalize the output stream.
virtual bool decode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend)=0
Decodes a chunk of data, maintaining state information between calls.
Stateful encoder class.
virtual bool encode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend)=0
Encodes a chunk of data, maintaining state information between calls.
virtual bool finish(char *&dcursor, const char *const dend)=0
Call this method to finalize the output stream.
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 base45Decode(QByteArrayView in)
Decodes the given data that was encoded using the base45 codec.
Definition kcodecsbase45.cpp:25
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
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.