Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMailMessagePart class provides a convenient interface for working with message attachments. More...
#include <QMailMessagePart>
This class is under development and is subject to change.
Inherits QMailMessagePartContainer.
The QMailMessagePart class provides a convenient interface for working with message attachments.
A message part inherits the properties of QMailMessagePartContainer, and can therefore contain a message body or a collection of sub-parts.
A message part differs from a message proper in that a part will often have properties specified by the MIME multipart specification, not relevant to messages. These include the 'name' and 'filename' parameters of the Content-Type and Content-Disposition fields, and the Content-Id and Content-Location fields.
See also QMailMessagePartContainer.
Constructs an empty message part object.
Returns the path to a QMailMessagePart attachment file. Returns an empty path for parts that are not attachments or have not been detached.
Returns the Content-Description header field for the part, if present; otherwise returns an empty string.
See also setContentDescription().
Returns the Content-Disposition header field for the part.
See also setContentDisposition().
Returns the Content-Id header field for the part, if present; otherwise returns an empty string.
See also setContentID().
Returns the Content-Language header field for the part, if present; otherwise returns an empty string.
See also setContentLanguage().
Returns the Content-Location header field for the part, if present; otherwise returns an empty string.
See also setContentLocation().
Detaches a file attachment QMailMessagePart, decoding and saving the file part into the directory specified by path, and recording the attachment path in the part. The name of the file is taken from the part. If another file already exists in the path a new unique name of the format <filename>.<random chars> is saved. Returns true on success or false otherwise.
Returns the leaf file name to which the part will be written if detached from the message.
Returns a non-empty string to identify the part, appropriate for display. If the part 'Content-Type' header field contains a 'name' parameter, that value is used. Otherwise, if the part has a 'Content-Disposition' header field containing a 'filename' parameter, that value is used. Otherwise, if the part has a 'Content-ID' header field, that value is used. Finally, a usable name will be created by combining the content type of the part with the part's number.
See also identifier().
Creates a QMailMessagePart containing an attachment of type disposition, from the data contained in input, of content type type and using the transfer encoding encoding. The current status of the data is specified as status.
See also QMailMessageBody::fromData().
This is an overloaded member function, provided for convenience.
Creates a QMailMessagePart containing an attachment of type disposition, from the data contained in input, of content type type and using the transfer encoding encoding.
See also QMailMessageBody::fromData().
Creates a QMailMessagePart containing an attachment of type disposition, from the data contained in filename, of content type type and using the transfer encoding encoding. The current status of the data is specified as status.
See also QMailMessageBody::fromFile().
Creates a QMailMessagePart containing an attachment of type disposition, from the data read from in, of content type type and using the transfer encoding encoding. The current status of the data is specified as status.
See also QMailMessageBody::fromStream().
This is an overloaded member function, provided for convenience.
Creates a QMailMessagePart containing an attachment of type disposition, from the data read from in, of content type type and using the transfer encoding encoding.
See also QMailMessageBody::fromStream().
Returns a non-empty string to identify the part, appropriate for storage. If the part has a 'Content-ID' header field, that value is used. Otherwise, if the part has a 'Content-Disposition' header field containing a 'filename' parameter, that value is used. Otherwise, if the part 'Content-Type' header field contains a 'name' parameter, that value is used. Finally, the part's number will be returned.
Returns the number of the part, if it has been set; otherwise returns -1.
See also setPartNumber().
Sets the Content-Description header field for the part to contain description.
See also contentDescription().
Sets the Content-Disposition header field for the part to contain disposition.
See also contentDisposition().
Sets the Content-Id header field for the part to contain id.
See also contentID().
Sets the Content-Language header field for the part to contain language.
See also contentLanguage().
Sets the Content-Location header field for the part to contain location.
See also contentLocation().
Sets the number of the part within its parent part container to partNumber.
See also partNumber().
Writes the decoded body of the part to a file under the directory specified by path. A 'qtopiamail' directory element will be included in the full path, to avoid filename clashes. Returns the path of the file written on sucess, or an empty string otherwise.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |