Commit c13c1b2a authored by Damien Caliste's avatar Damien Caliste

[libqmfclient1] Move contentDisposition and contentDescription into...

[libqmfclient1] Move contentDisposition and contentDescription into QMailMessagePartContainer, contributes to MER#1579.
parent 8bb3bb88
......@@ -4799,6 +4799,39 @@ void QMailMessagePartContainer::setBoundary(const QByteArray& text)
impl(this)->setBoundary(text);
}
/*!
Returns the Content-Description header field for the part, if present;
otherwise returns an empty string.
*/
QString QMailMessagePartContainer::contentDescription() const
{
return headerFieldText("Content-Description");
}
/*!
Sets the Content-Description header field for the part to contain \a description.
*/
void QMailMessagePartContainer::setContentDescription(const QString &description)
{
setHeaderField("Content-Description", description);
}
/*!
Returns the Content-Disposition header field for the part.
*/
QMailMessageContentDisposition QMailMessagePartContainer::contentDisposition() const
{
return QMailMessageContentDisposition(headerField("Content-Disposition"));
}
/*!
Sets the Content-Disposition header field for the part to contain \a disposition.
*/
void QMailMessagePartContainer::setContentDisposition(const QMailMessageContentDisposition &disposition)
{
setHeaderField("Content-Disposition", disposition.toString(false, false));
}
/*!
Sets the part to contain the body element \a body, \a encodingStatus describes the current status of \a body regarding encoding.
Note: No encoding/decoding operation will be performed in the body element, only the encoding status flag
......@@ -6024,39 +6057,6 @@ void QMailMessagePart::setContentLocation(const QString &location)
setHeaderField("Content-Location", location);
}
/*!
Returns the Content-Description header field for the part, if present;
otherwise returns an empty string.
*/
QString QMailMessagePart::contentDescription() const
{
return headerFieldText("Content-Description");
}
/*!
Sets the Content-Description header field for the part to contain \a description.
*/
void QMailMessagePart::setContentDescription(const QString &description)
{
setHeaderField("Content-Description", description);
}
/*!
Returns the Content-Disposition header field for the part.
*/
QMailMessageContentDisposition QMailMessagePart::contentDisposition() const
{
return QMailMessageContentDisposition(headerField("Content-Disposition"));
}
/*!
Sets the Content-Disposition header field for the part to contain \a disposition.
*/
void QMailMessagePart::setContentDisposition(const QMailMessageContentDisposition &disposition)
{
setHeaderField("Content-Disposition", disposition.toString(false, false));
}
/*!
Returns the Content-Language header field for the part, if present;
otherwise returns an empty string.
......
......@@ -343,6 +343,12 @@ public:
QByteArray boundary() const;
void setBoundary(const QByteArray& text);
QString contentDescription() const;
void setContentDescription(const QString &s);
QMailMessageContentDisposition contentDisposition() const;
void setContentDisposition(const QMailMessageContentDisposition& disposition);
// Body management interface:
void setBody(const QMailMessageBody& body, QMailMessageBody::EncodingFormat encodingStatus = QMailMessageBody::None);
QMailMessageBody body() const;
......@@ -453,12 +459,6 @@ public:
QString contentLocation() const;
void setContentLocation(const QString &s);
QString contentDescription() const;
void setContentDescription(const QString &s);
QMailMessageContentDisposition contentDisposition() const;
void setContentDisposition(const QMailMessageContentDisposition& disposition);
QString contentLanguage() const;
void setContentLanguage(const QString &s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment