Logo Search packages:      
Sourcecode: qmf version File versions  Download package

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends

QMailMessagePart Class Reference

The QMailMessagePart class provides a convenient interface for working with message attachments. More...

Inheritance diagram for QMailMessagePart:
Inheritance graph
[legend]
Collaboration diagram for QMailMessagePart:
Collaboration graph
[legend]

List of all members.

Classes

class  Location
 The Location class contains a specification of the location of a message part with the message that contains it. More...

Public Types

typedef QMailMessagePartPrivate ImplementationType
enum  MultipartType {
  MultipartNone = 0, MultipartSigned = 1, MultipartEncrypted = 2, MultipartMixed = 3,
  MultipartAlternative = 4, MultipartDigest = 5, MultipartParallel = 6, MultipartRelated = 7,
  MultipartFormData = 8, MultipartReport = 9
}
enum  ReferenceType { None = 0, MessageReference, PartReference }

Public Member Functions

virtual void appendHeaderField (const QString &id, const QString &content)
virtual void appendHeaderField (const QMailMessageHeaderField &field)
void appendPart (const QMailMessagePart &part)
QMailMessageBody body () const
QByteArray boundary () const
void clearParts ()
virtual bool contentAvailable () const
QString contentDescription () const
QMailMessageContentDisposition contentDisposition () const
QString contentID () const
QString contentLanguage () const
QString contentLocation () const
virtual bool contentModified () const
QMailMessageContentType contentType () const
template<typename Stream >
void deserialize (Stream &stream)
QString displayName () const
QList
< QMailMessagePartContainer::Location
findAttachmentLocations () const
QMailMessagePartContainerfindHtmlContainer () const
QMailMessagePartContainerfindPlainTextContainer () const
template<typename F >
bool foreachPart (F func)
template<typename F >
bool foreachPart (F func) const
bool hasAttachments () const
bool hasBody () const
bool hasHtmlBody () const
bool hasPlainTextBody () const
QMailMessageHeaderField headerField (const QString &id, QMailMessageHeaderField::FieldType fieldType=QMailMessageHeaderField::StructuredField) const
QList< QMailMessageHeaderFieldheaderFields (const QString &id, QMailMessageHeaderField::FieldType fieldType=QMailMessageHeaderField::StructuredField) const
QList< QMailMessageHeaderFieldheaderFields () const
QStringList headerFieldsText (const QString &id) const
QString headerFieldText (const QString &id) const
QString identifier () const
ImplementationSubclass * impl ()
InterfaceType::QMailMessagePartContainerPrivate * impl (InterfaceType *)
const ImplementationSubclass * impl () const
const
InterfaceType::QMailMessagePartContainerPrivate * 
impl (const InterfaceType *) const
virtual uint indicativeSize () const
Location location () const
QMailMessageId messageReference () const
MultipartType multipartType () const
QMailMessagePartpartAt (uint pos)
const QMailMessagePartpartAt (uint pos) const
uint partCount () const
virtual bool partialContentAvailable () const
int partNumber () const
QMailMessagePart::Location partReference () const
void prependPart (const QMailMessagePart &part)
 QMailMessagePart ()
QString referenceResolution () const
ReferenceType referenceType () const
virtual void removeHeaderField (const QString &id)
void removePartAt (uint pos)
template<typename Stream >
void serialize (Stream &stream) const
void setAttachments (const QStringList &attachments)
void setAttachments (const QList< const QMailMessagePart * > attachments)
void setBody (const QMailMessageBody &body)
void setBoundary (const QByteArray &text)
void setContentDescription (const QString &s)
void setContentDisposition (const QMailMessageContentDisposition &disposition)
void setContentID (const QString &s)
void setContentLanguage (const QString &s)
void setContentLocation (const QString &s)
virtual void setHeaderField (const QMailMessageHeaderField &field)
virtual void setHeaderField (const QString &id, const QString &content)
void setHtmlAndPlainTextBody (const QMailMessageBody &htmlBody, const QMailMessageBody &plainTextBody)
void setMultipartType (MultipartType type)
void setPlainTextBody (const QMailMessageBody &plainTextBody)
void setReference (const QMailMessageId &id, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding)
void setReference (const QMailMessagePart::Location &location, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding)
void setReferenceResolution (const QString &uri)
QMailMessageBody::TransferEncoding transferEncoding () const
QString writeBodyTo (const QString &path) const

Static Public Member Functions

static QMailMessagePart fromData (const QByteArray &input, const QMailMessageContentDisposition &disposition, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding, QMailMessageBody::EncodingStatus status=QMailMessageBody::RequiresEncoding)
static QMailMessagePart fromData (const QString &input, const QMailMessageContentDisposition &disposition, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding)
static QMailMessagePart fromFile (const QString &filename, const QMailMessageContentDisposition &disposition, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding, QMailMessageBody::EncodingStatus status=QMailMessageBody::RequiresEncoding)
static QMailMessagePart fromMessageReference (const QMailMessageId &id, const QMailMessageContentDisposition &disposition, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding)
static QMailMessagePart fromPartReference (const QMailMessagePart::Location &partLocation, const QMailMessageContentDisposition &disposition, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding)
static QMailMessagePart fromStream (QDataStream &in, const QMailMessageContentDisposition &disposition, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding, QMailMessageBody::EncodingStatus status=QMailMessageBody::RequiresEncoding)
static QMailMessagePart fromStream (QTextStream &in, const QMailMessageContentDisposition &disposition, const QMailMessageContentType &type, QMailMessageBody::TransferEncoding encoding)
static MultipartType multipartTypeForName (const QByteArray &name)
static QByteArray nameForMultipartType (MultipartType type)

Protected Member Functions

virtual void setHeader (const QMailMessageHeader &header, const QMailMessagePartContainerPrivate *parent=0)

Protected Attributes

QPrivateImplementationPointer
< QMailMessagePartContainerPrivate
d

Private Member Functions

void output (QDataStream &out, bool includeAttachments, bool stripInternal) const
virtual void setUnmodified ()

Friends

class QMailMessagePartContainerPrivate
class QMailMessagePrivate

Detailed Description

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.

A message part may consist entirely of a reference to an external message, or a part within an external message. Parts that consists of references may be used with some protocols that permit data to be transmitted by reference, such as IMAP with the URLAUTH extension. Not all messaging protocols support the use of content references. The partReference() and messageReference() functions enable the creation of reference parts.

See also:
QMailMessagePartContainer

Definition at line 409 of file qmailmessage.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index