KMime::Headers::ContentType
#include <headers.h>
Public Member Functions | |
QByteArray | as7BitString (bool withHeaderType=true) const override |
QByteArray | boundary () const |
QByteArray | charset () const |
QByteArray | id () const |
bool | isEmpty () const override |
bool | isHTMLText () const |
bool | isImage () const |
bool | isMediatype (const char *mediatype) const |
bool | isMimeType (const char *mimeType) const |
bool | isMultipart () const |
bool | isPartial () const |
bool | isPlainText () const |
bool | isSubtype (const char *subtype) const |
bool | isText () const |
QByteArray | mediaType () const |
QByteArray | mimeType () const |
QString | name () const |
int | partialCount () const |
int | partialNumber () const |
void | setBoundary (const QByteArray &s) |
void | setCharset (const QByteArray &s) |
void | setId (const QByteArray &s) |
void | setMimeType (const QByteArray &mimeType) |
void | setName (const QString &s) |
void | setName (const QString &s, const QByteArray &cs) |
void | setPartialParams (int total, int number) |
QByteArray | subType () const |
Public Member Functions inherited from KMime::Headers::Generics::Parametrized | |
QByteArray | as7BitString (bool withHeaderType=true) const override |
template<std::size_t N> | |
bool | hasParameter (const char(&key)[N]) const |
bool | hasParameter (const QString &key) const |
bool | hasParameter (QByteArrayView key) const |
bool | hasParameter (QLatin1StringView key) const |
bool | isEmpty () const override |
template<std::size_t N> | |
QString | parameter (const char(&key)[N]) const |
QString | parameter (const QString &key) const |
QString | parameter (QByteArrayView key) const |
QString | parameter (QLatin1StringView key) const |
void | setParameter (const QByteArray &key, const QString &value) |
void | setParameter (const QString &key, const QString &value) |
Public Member Functions inherited from KMime::Headers::Generics::Structured | |
QString | asUnicodeString () const override |
void | from7BitString (QByteArrayView s) override |
void | fromUnicodeString (const QString &s) override |
void | fromUnicodeString (const QString &s, const QByteArray &b) |
Public Member Functions inherited from KMime::Headers::Base | |
Base () | |
virtual | ~Base () |
void | fromUnicodeString (const QString &s, const QByteArray &b) |
bool | is (QByteArrayView t) const |
QByteArray | rfc2047Charset () const |
void | setRFC2047Charset (const QByteArray &cs) |
virtual const char * | type () const |
Protected Member Functions | |
bool | parse (const char *&scursor, const char *const send, bool isCRLF=false) override |
Protected Member Functions inherited from KMime::Headers::Generics::Parametrized | |
bool | parse (const char *&scursor, const char *const send, bool isCRLF=false) override |
Protected Member Functions inherited from KMime::Headers::Generics::Structured | |
Protected Member Functions inherited from KMime::Headers::Base | |
QByteArray | typeIntro () const |
Additional Inherited Members | |
Public Types inherited from KMime::Headers::Base | |
typedef QList< KMime::Headers::Base * > | List |
Detailed Description
Represents a "Content-Type" header.
- See also
- RFC 2045, section 5.
Member Function Documentation
◆ as7BitString()
|
nodiscardoverridevirtual |
Returns the encoded header.
- Parameters
-
withHeaderType Specifies whether the header-type should be included.
Implements KMime::Headers::Base.
Definition at line 1518 of file headers.cpp.
◆ boundary()
|
nodiscard |
Returns the boundary (for multipart containers).
Definition at line 1627 of file headers.cpp.
◆ charset()
|
nodiscard |
Returns the charset for the associated MIME entity.
Definition at line 1614 of file headers.cpp.
◆ id()
|
nodiscard |
Returns the identifier of the associated MIME entity.
Definition at line 1644 of file headers.cpp.
◆ isEmpty()
|
nodiscardoverridevirtual |
Checks if this header contains any data.
Implements KMime::Headers::Base.
Definition at line 1514 of file headers.cpp.
◆ isHTMLText()
|
nodiscard |
Returns true if the associated MIME entity is a HTML file.
Definition at line 1598 of file headers.cpp.
◆ isImage()
|
nodiscard |
Returns true if the associated MIME entity is an image.
Definition at line 1602 of file headers.cpp.
◆ isMediatype()
|
nodiscard |
Tests if the media type equals mediatype
.
Definition at line 1566 of file headers.cpp.
◆ isMimeType()
|
nodiscard |
Tests if the mime type is mimeType
.
Definition at line 1584 of file headers.cpp.
◆ isMultipart()
|
nodiscard |
Returns true if the associated MIME entity is a multipart container.
Definition at line 1606 of file headers.cpp.
◆ isPartial()
|
nodiscard |
Returns true if the associated MIME entity contains partial data.
- See also
- partialNumber(), partialCount()
Definition at line 1610 of file headers.cpp.
◆ isPlainText()
|
nodiscard |
Returns true if the associated MIME entity is a plain text.
Definition at line 1594 of file headers.cpp.
◆ isSubtype()
|
nodiscard |
Tests if the mime sub-type equals subtype
.
Definition at line 1573 of file headers.cpp.
◆ isText()
|
nodiscard |
Returns true if the associated MIME entity is a text.
Definition at line 1590 of file headers.cpp.
◆ mediaType()
|
nodiscard |
Returns the media type (first part of the mimetype).
Definition at line 1541 of file headers.cpp.
◆ mimeType()
|
nodiscard |
Returns the mimetype.
Definition at line 1536 of file headers.cpp.
◆ name()
|
nodiscard |
Returns the name of the associated MIME entity.
Definition at line 1635 of file headers.cpp.
◆ parse()
|
overrideprotectedvirtual |
This method parses the raw header and needs to be implemented in every sub-class.
- Parameters
-
scursor Pointer to the start of the data still to parse. send Pointer to the end of the data. isCRLF true if input string is terminated with a CRLF.
Implements KMime::Headers::Generics::Structured.
Definition at line 1675 of file headers.cpp.
◆ partialCount()
|
nodiscard |
Returns the total number of parts in a multi-part set.
- See also
- isPartial(), partialNumber()
Definition at line 1661 of file headers.cpp.
◆ partialNumber()
|
nodiscard |
Returns the position of this part in a multi-part set.
- See also
- isPartial(), partialCount()
Definition at line 1652 of file headers.cpp.
◆ setBoundary()
void KMime::Headers::ContentType::setBoundary | ( | const QByteArray & | s | ) |
Sets the multipart container boundary.
Definition at line 1631 of file headers.cpp.
◆ setCharset()
void KMime::Headers::ContentType::setCharset | ( | const QByteArray & | s | ) |
Sets the charset.
Definition at line 1623 of file headers.cpp.
◆ setId()
void KMime::Headers::ContentType::setId | ( | const QByteArray & | s | ) |
Sets the identifier.
Definition at line 1648 of file headers.cpp.
◆ setMimeType()
void KMime::Headers::ContentType::setMimeType | ( | const QByteArray & | mimeType | ) |
Sets the mimetype.
- Parameters
-
mimeType The new mimetype.
Definition at line 1561 of file headers.cpp.
◆ setName() [1/2]
void KMime::Headers::ContentType::setName | ( | const QString & | s | ) |
Sets the name to s
.
Definition at line 1639 of file headers.cpp.
◆ setName() [2/2]
|
inline |
◆ setPartialParams()
void KMime::Headers::ContentType::setPartialParams | ( | int | total, |
int | number ) |
Sets parameters of a partial MIME entity.
- Parameters
-
total The total number of entities in the multi-part set. number The number of this entity in a multi-part set.
Definition at line 1670 of file headers.cpp.
◆ subType()
|
nodiscard |
Returns the mime sub-type (second part of the mimetype).
Definition at line 1551 of file headers.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:30:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.