KMIME Library
kmime_headers.h
Go to the documentation of this file.
virtual const char * type() const
Returns the type of this header (e.g.
Definition kmime_headers.cpp:202
virtual QByteArray as7BitString(bool withHeaderType=true) const =0
Returns the encoded header.
virtual void fromUnicodeString(const QString &s, const QByteArray &b)=0
Parses the given string and set the charset.
virtual QString asUnicodeString() const =0
Returns the decoded content of the header without the header-type.
virtual bool isEmpty() const =0
Checks if this header contains any data.
virtual void from7BitString(const QByteArray &s)=0
Parses the given string.
void setRFC2047Charset(const QByteArray &cs)
Sets the charset for RFC2047-encoding.
Definition kmime_headers.cpp:187
QByteArray rfc2047Charset() const
Returns the charset that is used for RFC2047-encoding.
Definition kmime_headers.cpp:178
bool forceDefaultCharset() const
Returns if the default charset is mandatory.
Definition kmime_headers.cpp:192
QByteArray typeIntro() const
Helper method, returns the header prefix including ":".
Definition kmime_headers.cpp:222
Base(KMime::Content *parent=0)
Creates an empty header with a parent-content.
Definition kmime_headers.cpp:148
void setParent(KMime::Content *parent)
Sets the parent for this header to parent.
Definition kmime_headers.cpp:173
Represents a "Content-Description" header.
Definition kmime_headers.h:1287
Represents a "Content-Disposition" header.
Definition kmime_headers.h:1183
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:2211
void setDisposition(contentDisposition disp)
Sets the content disposition.
Definition kmime_headers.cpp:2195
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:2152
contentDisposition disposition() const
Returns the content disposition.
Definition kmime_headers.cpp:2190
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:2178
QString filename() const
Returns the suggested filename for the associated MIME part.
Definition kmime_headers.cpp:2201
void setFilename(const QString &filename)
Sets the suggested filename for the associated MIME part.
Definition kmime_headers.cpp:2206
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1988
Represents a "Content-Location" header.
Definition kmime_headers.h:1296
Represents a "Content-Transfer-Encoding" header.
Definition kmime_headers.h:891
bool needToEncode() const
Returns whether the Content containing this header needs to be encoded (i.e., if decoded() is true an...
Definition kmime_headers.cpp:2117
void setDecoded(bool decoded=true)
Set whether the Content containing this header is already decoded.
Definition kmime_headers.cpp:2111
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:2123
bool decoded() const
Returns whether the Content containing this header is already decoded.
Definition kmime_headers.cpp:2106
contentEncoding encoding() const
Returns the encoding specified in this header.
Definition kmime_headers.cpp:2088
QByteArray mediaType() const
Returns the media type (first part of the mimetype).
Definition kmime_headers.cpp:1749
void setName(const QString &s, const QByteArray &cs)
Sets the name to s using charset cs.
Definition kmime_headers.cpp:1864
bool isImage() const
Returns true if the associated MIME entity is an image.
Definition kmime_headers.cpp:1819
bool isMediatype(const char *mediatype) const
Tests if the media type equals mediatype.
Definition kmime_headers.cpp:1784
int partialCount() const
Returns the total number of parts in a multi-part set.
Definition kmime_headers.cpp:1891
bool isSubtype(const char *subtype) const
Tests if the mime sub-type equals subtype.
Definition kmime_headers.cpp:1792
QByteArray charset() const
Returns the charset for the associated MIME entity.
Definition kmime_headers.cpp:1834
QByteArray subType() const
Returns the mime sub-type (second part of the mimetype).
Definition kmime_headers.cpp:1760
bool isPlainText() const
Returns true if the associated MIME entity is a plain text.
Definition kmime_headers.cpp:1809
int partialNumber() const
Returns the position of this part in a multi-part set.
Definition kmime_headers.cpp:1881
bool isText() const
Returns true if the associated MIME entity is a text.
Definition kmime_headers.cpp:1804
bool isHTMLText() const
Returns true if the associated MIME entity is a HTML file.
Definition kmime_headers.cpp:1814
QString name() const
Returns the name of the associated MIME entity.
Definition kmime_headers.cpp:1859
void setPartialParams(int total, int number)
Sets parameters of a partial MIME entity.
Definition kmime_headers.cpp:1912
bool isMultipart() const
Returns true if the associated MIME entity is a mulitpart container.
Definition kmime_headers.cpp:1824
void setMimeType(const QByteArray &mimeType)
Sets the mimetype and clears already existing parameters.
Definition kmime_headers.cpp:1771
QByteArray id() const
Returns the identifier of the associated MIME entity.
Definition kmime_headers.cpp:1871
bool isPartial() const
Returns true if the associated MIME entity contains partial data.
Definition kmime_headers.cpp:1829
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1711
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:1724
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1918
QByteArray boundary() const
Returns the boundary (for mulitpart containers).
Definition kmime_headers.cpp:1849
void setBoundary(const QByteArray &s)
Sets the mulitpart container boundary.
Definition kmime_headers.cpp:1854
void setCancel(const QByteArray &msgid)
Changes this header into a cancel control message for the given message-id.
Definition kmime_headers.cpp:1362
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1342
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:1316
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1369
bool isCancel() const
Returns true if this is a cancel control message.
Definition kmime_headers.cpp:1357
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:1497
KDateTime dateTime() const
Returns the date contained in this header.
Definition kmime_headers.cpp:1522
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1517
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1539
virtual const char * type() const
Returns the type of this header (e.g.
Definition kmime_headers.cpp:1276
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1271
Base class for headers that deal with (possibly multiple) addresses, allowing groups.
Definition kmime_headers.h:481
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:568
QStringList prettyAddresses() const
Returns a list of assembled display name / address strings of the following form: "Display Name <addr...
Definition kmime_headers.cpp:626
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition kmime_headers.cpp:561
QStringList displayNames() const
Returns a list of all display names associated with the addresses in this header.
Definition kmime_headers.cpp:615
void addAddress(const Types::Mailbox &mbox)
Adds an address to this header.
Definition kmime_headers.cpp:584
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:579
Types::Mailbox::List mailboxes() const
Returns a list of mailboxes listed in this header.
Definition kmime_headers.cpp:637
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:540
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:648
QList< QByteArray > addresses() const
Returns a list of all addresses in this header, regardless of groups.
Definition kmime_headers.cpp:604
Base class for all address related headers.
Definition kmime_headers.h:367
Base class for headers containing a dot atom.
Definition kmime_headers.h:677
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:856
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:851
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:840
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:825
Base class for headers which deal with a list of msg-id's.
Definition kmime_headers.h:546
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:973
QList< QByteArray > identifiers() const
Returns the list of identifiers contained in this header.
Definition kmime_headers.cpp:1056
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1007
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1012
void appendIdentifier(const QByteArray &id)
Appends a new identifier to this header.
Definition kmime_headers.cpp:1070
Base class for headers that deal with (possibly multiple) addresses, but don't allow groups.
Definition kmime_headers.h:390
QList< QByteArray > addresses() const
Returns a list of all addresses in this header, regardless of groups.
Definition kmime_headers.cpp:448
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition kmime_headers.cpp:409
Types::Mailbox::List mailboxes() const
Returns a list of mailboxes listed in this header.
Definition kmime_headers.cpp:475
void addAddress(const Types::Mailbox &mbox)
Adds an address to this header.
Definition kmime_headers.cpp:432
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:427
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:480
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:416
QStringList prettyAddresses() const
Returns a list of assembled display name / address strings of the following form: "Display Name <addr...
Definition kmime_headers.cpp:466
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:390
QStringList displayNames() const
Returns a list of all display names associated with the addresses in this header.
Definition kmime_headers.cpp:457
Base class for headers containing a parameter list such as "Content-Type".
Definition kmime_headers.h:700
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:940
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:884
QString parameter(const QString &key) const
Returns the value of the specified parameter.
Definition kmime_headers.cpp:924
void setParameter(const QString &key, const QString &value)
Sets the parameter key to value.
Definition kmime_headers.cpp:934
bool hasParameter(const QString &key) const
Definition kmime_headers.cpp:929
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:951
Base class for headers containing a list of phrases.
Definition kmime_headers.h:649
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:736
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:770
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:780
QStringList phrases() const
Returns the list of phrases contained in this header.
Definition kmime_headers.cpp:775
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:759
Base class for headers which deal with a single msg-id.
Definition kmime_headers.h:585
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1125
QByteArray identifier() const
Returns the identifier contained in this header.
Definition kmime_headers.cpp:1098
Base class for headers that deal with exactly one mailbox (e.g.
Definition kmime_headers.h:457
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:516
Base class for structured header fields.
Definition kmime_headers.h:330
virtual void from7BitString(const QByteArray &s)
Parses the given string.
Definition kmime_headers.cpp:320
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:330
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition kmime_headers.cpp:335
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 kmime_headers.h:616
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:703
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:670
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:687
Abstract base class for unstructured header fields (e.g.
Definition kmime_headers.h:271
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:280
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:261
virtual void from7BitString(const QByteArray &s)
Parses the given string.
Definition kmime_headers.cpp:255
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:291
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition kmime_headers.cpp:273
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:1661
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1675
int numberOfLines() const
Returns the number of lines, undefined if isEmpty() returns true.
Definition kmime_headers.cpp:1680
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1691
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:1646
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1436
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1465
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:1414
bool neverCopy() const
Returns true if a mail copy was explicitly denied.
Definition kmime_headers.cpp:1453
bool alwaysCopy() const
Returns true if a mail copy was explicitly requested.
Definition kmime_headers.cpp:1441
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:1396
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:1554
void setGroups(const QList< QByteArray > &groups)
Sets the newsgroup list.
Definition kmime_headers.cpp:1604
bool isCrossposted() const
Returns true if this message has been cross-posted, i.e.
Definition kmime_headers.cpp:1610
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition kmime_headers.cpp:1583
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1594
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1615
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition kmime_headers.cpp:1575
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition kmime_headers.cpp:1150
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition kmime_headers.cpp:1177
virtual bool isEmpty() const
Checks if this header contains any data.
Definition kmime_headers.cpp:1171
Represents an (email address, display name) pair according RFC 2822, section 3.4.
Definition kmime_header_parsing.h:70
Base * createHeader(const QByteArray &type)
Creates a header based on.
Definition kmime_headers.cpp:2263
contentEncoding
Various possible values for the "Content-Transfer-Encoding" header.
Definition kmime_headers.h:74
contentDisposition
Various possible values for the "Content-Disposition" header.
Definition kmime_headers.h:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.