KMime
headers.cpp
Go to the documentation of this file.
1821 maybeContentId.localPart = QString::fromLatin1(result); // FIXME: just use QByteArray instead of AddrSpec in msgIdList?
virtual QByteArray as7BitString(bool withHeaderType=true) const =0
Returns the encoded header.
void setRFC2047Charset(const QByteArray &cs)
Sets the charset for RFC2047-encoding.
Definition headers.cpp:114
QByteArray rfc2047Charset() const
Returns the charset that is used for RFC2047-encoding.
Definition headers.cpp:105
QByteArray typeIntro() const
Helper method, returns the header prefix including ":".
Definition headers.cpp:129
Represents a "Content-Description" header.
Definition headers.h:1233
Represents a "Content-Disposition" header.
Definition headers.h:1138
void setDisposition(contentDisposition disp)
Sets the content disposition.
Definition headers.cpp:1962
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1975
QString filename() const
Returns the suggested filename for the associated MIME part.
Definition headers.cpp:1967
void setFilename(const QString &filename)
Sets the suggested filename for the associated MIME part.
Definition headers.cpp:1971
Represents a "Content-Transfer-Encoding" header.
Definition headers.h:861
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1893
QByteArray as7BitString(bool withHeaderType=true) const override
Returns the encoded header.
Definition headers.cpp:1866
contentEncoding encoding() const
Returns the encoding specified in this header.
Definition headers.cpp:1881
QByteArray mediaType() const
Returns the media type (first part of the mimetype).
Definition headers.cpp:1578
bool isImage() const
Returns true if the associated MIME entity is an image.
Definition headers.cpp:1639
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1712
bool isMediatype(const char *mediatype) const
Tests if the media type equals mediatype.
Definition headers.cpp:1603
int partialCount() const
Returns the total number of parts in a multi-part set.
Definition headers.cpp:1698
bool isSubtype(const char *subtype) const
Tests if the mime sub-type equals subtype.
Definition headers.cpp:1610
QByteArray charset() const
Returns the charset for the associated MIME entity.
Definition headers.cpp:1651
QByteArray subType() const
Returns the mime sub-type (second part of the mimetype).
Definition headers.cpp:1588
bool isPlainText() const
Returns true if the associated MIME entity is a plain text.
Definition headers.cpp:1631
int partialNumber() const
Returns the position of this part in a multi-part set.
Definition headers.cpp:1689
bool isHTMLText() const
Returns true if the associated MIME entity is a HTML file.
Definition headers.cpp:1635
QByteArray as7BitString(bool withHeaderType=true) const override
Returns the encoded header.
Definition headers.cpp:1555
void setPartialParams(int total, int number)
Sets parameters of a partial MIME entity.
Definition headers.cpp:1707
bool isMultipart() const
Returns true if the associated MIME entity is a multipart container.
Definition headers.cpp:1643
QByteArray id() const
Returns the identifier of the associated MIME entity.
Definition headers.cpp:1681
bool isPartial() const
Returns true if the associated MIME entity contains partial data.
Definition headers.cpp:1647
bool isMimeType(const char *mimeType) const
Tests if the mime type is mimeType.
Definition headers.cpp:1621
QByteArray boundary() const
Returns the boundary (for multipart containers).
Definition headers.cpp:1664
void setBoundary(const QByteArray &s)
Sets the multipart container boundary.
Definition headers.cpp:1668
void setCancel(const QByteArray &msgid)
Changes this header into a cancel control message for the given message-id.
Definition headers.cpp:1241
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1248
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1404
Represents an arbitrary header, that can contain any header-field.
Definition headers.h:1193
Base class for headers that deal with (possibly multiple) addresses, allowing groups.
Definition headers.h:417
QStringList displayNames() const
Returns a list of all display names associated with the addresses in this header.
Definition headers.cpp:508
QList< QByteArray > addresses() const
Returns a list of all addresses in this header, regardless of groups.
Definition headers.cpp:496
Base class for headers containing a dot atom.
Definition headers.h:624
QString asUnicodeString() const override
Returns the decoded content of the header without the header-type.
Definition headers.cpp:731
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:741
Base class for headers which deal with a list of msg-id's.
Definition headers.h:488
QList< QByteArray > identifiers() const
Returns the list of identifiers contained in this header.
Definition headers.cpp:923
void fromIdent(const Ident *ident)
Initialize this identifier Copy the data from.
Definition headers.cpp:937
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:880
void appendIdentifier(const QByteArray &id)
Appends a new identifier to this header.
Definition headers.cpp:943
Base class for headers that deal with (possibly multiple) addresses, but don't allow groups.
Definition headers.h:308
Types::Mailbox::List mailboxes() const
Returns a list of mailboxes listed in this header.
Definition headers.cpp:344
QStringList displayNames() const
Returns a list of all display names associated with the addresses in this header.
Definition headers.cpp:315
Base class for headers containing a parameter list such as "Content-Type".
Definition headers.h:646
bool hasParameter(QByteArrayView key) const
Definition headers.cpp:810
QString parameter(QByteArrayView key) const
Returns the value of the specified parameter.
Definition headers.cpp:803
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:826
void setParameter(const QByteArray &key, const QString &value)
Sets the parameter key to value.
Definition headers.cpp:815
Base class for headers containing a list of phrases.
Definition headers.h:597
QString asUnicodeString() const override
Returns the decoded content of the header without the header-type.
Definition headers.cpp:656
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:671
QStringList phrases() const
Returns the list of phrases contained in this header.
Definition headers.cpp:666
Base class for headers which deal with a single msg-id.
Definition headers.h:531
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1035
QByteArray identifier() const
Returns the identifier contained in this header.
Definition headers.cpp:997
Base class for headers that deal with exactly one mailbox (e.g.
Definition headers.h:380
void setMailbox(const Types::Mailbox &mailbox)
Sets the mailboxes in this header, replacing the current content.
Definition headers.cpp:399
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:405
Base class for structured header fields.
Definition headers.h:269
QString asUnicodeString() const override
Returns the decoded content of the header without the header-type.
Definition headers.cpp:218
void fromUnicodeString(const QString &s) override
Parses the given Unicode representation of the header content.
Definition headers.cpp:223
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)=0
This method parses the raw header and needs to be implemented in every sub-class.
Base class for headers which deal with a single atom.
Definition headers.h:565
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:599
Abstract base class for unstructured header fields (e.g.
Definition headers.h:215
int numberOfLines() const
Returns the number of lines, undefined if isEmpty() returns true.
Definition headers.cpp:1523
QString asUnicodeString() const override
Returns the decoded content of the header without the header-type.
Definition headers.cpp:1512
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1532
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1339
bool alwaysCopy() const
Returns true if a mail copy was explicitly requested.
Definition headers.cpp:1313
QString asUnicodeString() const override
Returns the decoded content of the header without the header-type.
Definition headers.cpp:1294
void fromUnicodeString(const QString &s) override
Parses the given Unicode representation of the header content.
Definition headers.cpp:1443
void setGroups(const QList< QByteArray > &groups)
Sets the newsgroup list.
Definition headers.cpp:1459
bool isCrossposted() const
Returns true if this message has been cross-posted, i.e.
Definition headers.cpp:1464
QString asUnicodeString() const override
Returns the decoded content of the header without the header-type.
Definition headers.cpp:1449
QByteArray as7BitString(bool withHeaderType=true) const override
Returns the encoded header.
Definition headers.cpp:1423
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1468
bool parse(const char *&scursor, const char *const send, bool isCRLF=false) override
This method parses the raw header and needs to be implemented in every sub-class.
Definition headers.cpp:1086
Represents an (email address, display name) pair according RFC 2822, section 3.4.
Definition types.h:38
QByteArray as7BitString(const QByteArray &encCharset) const
Returns a 7bit transport encoded representation of this mailbox.
Definition types.cpp:182
QString prettyAddress(Quoting quoting=QuoteNever) const
Overloaded method that gives more control over the quoting of the display name.
Definition types.cpp:154
QByteArray address() const
Returns a string representation of the email address, without the angle brackets.
Definition types.cpp:93
static QString listToUnicodeString(const QList< Mailbox > &mailboxes)
Returns a unicode string representing the given list of mailboxes.
Definition types.cpp:220
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the API for handling MIME data and defines the various header classes:
contentEncoding
Various possible values for the "Content-Transfer-Encoding" header.
Definition headers.h:52
contentDisposition
Various possible values for the "Content-Disposition" header.
Definition headers.h:64
KCODECS_EXPORT QString decodeRFC2047String(QByteArrayView src, QByteArray *usedCS, const QByteArray &defaultCS=QByteArray(), CharsetOption option=NoOption)
QByteArray & append(QByteArrayView data)
int compare(QByteArrayView bv, Qt::CaseSensitivity cs) const const
const char * constData() const const
bool endsWith(QByteArrayView bv) const const
QByteArray first(qsizetype n) const const
bool isEmpty() const const
qsizetype length() const const
QByteArray & prepend(QByteArrayView ba)
void resize(qsizetype newSize, char c)
QByteArray & setNum(double n, char format, int precision)
bool startsWith(QByteArrayView bv) const const
int toInt(bool *ok, int base) const const
int compare(QByteArrayView bv, Qt::CaseSensitivity cs) const const
qsizetype size() const const
QByteArray toByteArray() const const
void append(QList< T > &&value)
void clear()
qsizetype count() const const
bool isEmpty() const const
void reserve(qsizetype size)
qsizetype size() const const
QLocale c()
QString toString(QDate date, FormatType format) const const
QString & append(QChar ch)
QString fromLatin1(QByteArrayView str)
QString fromUtf8(QByteArrayView str)
bool isEmpty() const const
QString number(double n, char format, int precision)
QByteArray toLatin1() const const
QString join(QChar separator) const const
CaseInsensitive
RFC2822Date
QTextStream & endl(QTextStream &stream)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.