KMime
content.h
Go to the documentation of this file.
587 [[nodiscard]] inline QString decodedText(bool trimText, bool removeTrailingNewlines = false) const
Headers::ContentDescription * contentDescription(bool create=true)
Returns the Content-Description header.
void setBody(const QByteArray &body)
Sets the Content decoded body raw data.
Definition content.cpp:83
Headers::ContentType * contentType(bool create=true)
Returns the Content-Type header.
Content(Content *parent=nullptr)
Creates an empty Content object with a specified parent.
Definition content.cpp:39
QString decodedText(bool trimText, bool removeTrailingNewlines=false) const
Returns the decoded text.
Definition content.h:587
const Headers::ContentType * contentType() const
Returns the Content-Type header.
Content * parent()
Returns the parent content object, or 0 if the content doesn't have a parent.
Definition content.cpp:759
const Headers::ContentLocation * contentLocation() const
Returns the Content-Location header.
bool removeHeader()
Searches for the first header of type T, and deletes it, removing it from this Content.
Definition content.h:817
Headers::ContentTransferEncoding * contentTransferEncoding(bool create=true)
Returns the Content-Transfer-Encoding header.
void clearContents(bool del=true)
Removes all sub-Contents from this content.
Definition content.cpp:226
Headers::ContentDisposition * contentDisposition(bool create=true)
Returns the Content-Disposition header.
void setEncodedBody(const QByteArray &body)
Sets the Content body raw data encoded according to the content transfer encoding.
Definition content.cpp:89
QByteArray encodedContent(bool useCrLf=false) const
Returns a QByteArray containing the encoded Content, including the Content header and all sub-Content...
Definition content.cpp:236
QByteArray encodedBody() const
Like encodedContent(), with the difference that only the body will be returned, i....
Definition content.cpp:259
void appendHeader(Headers::Base *h)
Appends the specified header to the headers of this Content.
Definition content.cpp:599
qsizetype size() const
Returns the size of the Content body after encoding.
Definition content.cpp:625
const Headers::ContentTransferEncoding * contentTransferEncoding() const
Returns the Content-Transfer-Encoding header.
Headers::Base * headerByType(QByteArrayView type) const
Returns the first header of type type, if it exists.
Definition content.cpp:568
Headers::ContentID * contentID(bool create=true)
Returns the Content-ID header.
const Headers::ContentDisposition * contentDisposition() const
Returns the Content-Disposition header.
void setContent(const QByteArray &s)
Sets the Content to the given raw data, containing the Content head and body separated by two linefee...
Definition content.cpp:59
void setFrozen(bool frozen=true)
Freezes this Content if frozen is true; otherwise unfreezes it.
Definition content.cpp:184
Headers::ContentLocation * contentLocation(bool create=true)
Returns the Content-Location header.
qsizetype storageSize() const
Returns the size of this Content and all sub-Contents.
Definition content.cpp:641
QString decodedText(DecodedTextTrimOption trimOption=NoTrim) const
Returns the decoded text.
Definition content.cpp:371
const Headers::ContentDescription * contentDescription() const
Returns the Content-Description header.
Represents a "Content-Description" header.
Definition headers.h:1240
Represents a "Content-Disposition" header.
Definition headers.h:1145
Represents a "Content-Transfer-Encoding" header.
Definition headers.h:868
This file is part of the API for handling MIME data and defines the ContentIndex class.
This file is part of the API for handling MIME data and defines the various header classes:
KIOCORE_EXPORT QStringList list(const QString &fileClass)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:20 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:20 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.