KMime::Headers::ContentType Class
class KMime::Headers::ContentTypeRepresents a "Content-Type" header. More...
| Header: | #include <KMime/Headers> |
| CMake: | find_package(KPim6 REQUIRED COMPONENTS Mime)target_link_libraries(mytarget PRIVATE KPim6::Mime) |
| Inherits: | KMime::Headers::Generics::Parametrized |
Public Functions
| QByteArray | boundary() const |
| QByteArray | charset() const |
| QByteArray | id() const |
| 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) |
(since 25.12) void | setPartialCount(int total) |
(since 25.12) void | setPartialNumber(int number) |
| QByteArray | subType() const |
Detailed Description
See RFC 2045, section 5.
Member Function Documentation
QByteArray ContentType::boundary() const
Returns the boundary (for multipart containers).
See also setBoundary().
QByteArray ContentType::charset() const
Returns the charset for the associated MIME entity.
See also setCharset().
QByteArray ContentType::id() const
Returns the identifier of the associated MIME entity.
See also setId().
bool ContentType::isHTMLText() const
Returns true if the associated MIME entity is a HTML file.
bool ContentType::isImage() const
Returns true if the associated MIME entity is an image.
bool ContentType::isMediatype(const char *mediatype) const
Tests if the media type equals mediatype.
bool ContentType::isMimeType(const char *mimeType) const
Tests if the mime type is mimeType.
bool ContentType::isMultipart() const
Returns true if the associated MIME entity is a multipart container.
bool ContentType::isPartial() const
Returns true if the associated MIME entity contains partial data.
See also partialNumber() and partialCount().
bool ContentType::isPlainText() const
Returns true if the associated MIME entity is a plain text.
bool ContentType::isSubtype(const char *subtype) const
Tests if the mime sub-type equals subtype.
bool ContentType::isText() const
Returns true if the associated MIME entity is a text.
QByteArray ContentType::mediaType() const
Returns the media type (first part of the mimetype).
QByteArray ContentType::mimeType() const
Returns the mimetype.
See also setMimeType().
QString ContentType::name() const
Returns the name of the associated MIME entity.
See also setName().
int ContentType::partialCount() const
Returns the total number of parts in a multi-part set.
See also setPartialCount(), isPartial(), and partialNumber().
int ContentType::partialNumber() const
Returns the position of this part in a multi-part set.
See also setPartialNumber(), isPartial(), and partialCount().
void ContentType::setBoundary(const QByteArray &s)
Sets the multipart container boundary.
See also boundary().
void ContentType::setCharset(const QByteArray &s)
Sets the charset.
See also charset().
void ContentType::setId(const QByteArray &s)
Sets the identifier.
See also id().
void ContentType::setMimeType(const QByteArray &mimeType)
Sets the mimetype.
mimeType The new mimetype.
See also mimeType().
void ContentType::setName(const QString &s)
Sets the name to s.
See also name().
[since 25.12] void ContentType::setPartialCount(int total)
Sets the total number of parts in a multi-part set.
This function was introduced in 25.12.
See also partialCount().
[since 25.12] void ContentType::setPartialNumber(int number)
Sets the position of this part in a multi-part set.
This function was introduced in 25.12.
See also partialNumber() and partialCount().
QByteArray ContentType::subType() const
Returns the mime sub-type (second part of the mimetype).