kmail Library API Documentation

KMail::PartNodeBodyPart Class Reference

an implemenation of the BodyPart interface using partNodes More...

#include <partnodebodypart.h>

Inheritance diagram for KMail::PartNodeBodyPart:

Inheritance graph
[legend]
Collaboration diagram for KMail::PartNodeBodyPart:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PartNodeBodyPart (partNode &n, const QTextCodec *codec=0)
QString makeLink (const QString &path) const
QString asText () const
QByteArray asBinary () const
QString contentTypeParameter (const char *param) const
QString contentDescription () const
QString contentDispositionParameter (const char *param) const
bool hasCompleteBody () const
Interface::BodyPartMementomemento () const
void setBodyPartMemento (Interface::BodyPartMemento *memento)

Detailed Description

an implemenation of the BodyPart interface using partNodes

Definition at line 48 of file partnodebodypart.h.


Member Function Documentation

QString KMail::PartNodeBodyPart::makeLink const QString path  )  const [virtual]
 

Returns:
a string respresentation of an URL that can be used to invoke a BodyPartURLHandler for this body part.

Implements KMail::Interface::BodyPart.

QString KMail::PartNodeBodyPart::asText  )  const [virtual]
 

Returns:
the decoded (CTE, canonicalisation, and charset encoding undone) text contained in the body part, or QString::null, it the body part is not of type "text".

Implements KMail::Interface::BodyPart.

QByteArray KMail::PartNodeBodyPart::asBinary  )  const [virtual]
 

Returns:
the decoded (CTE undone) content of the body part, or a null array if this body part instance is of type text.

Implements KMail::Interface::BodyPart.

QString KMail::PartNodeBodyPart::contentTypeParameter const char *  param  )  const [virtual]
 

Returns:
the value of the content-type header field parameter with name parameter, or QString::null, if that that parameter is not present in the body's content-type header field. RFC 2231 encoding is removed first.
Note that this method will suppress queries to certain standard parameters (most notably "charset") to keep plugins decent.

Note2 that this method preserves the case of the parameter value returned. So, if the parameter you want to use defines the value to be case-insensitive (such as the smime-type parameter), you need to make sure you do the casemap yourself before comparing to a reference value.

Implements KMail::Interface::BodyPart.

QString KMail::PartNodeBodyPart::contentDescription  )  const [virtual]
 

Returns:
the content of the content-description header field, or QString::null if that header is not present in this body part. RFC 2047 encoding is decoded first.

Implements KMail::Interface::BodyPart.

QString KMail::PartNodeBodyPart::contentDispositionParameter const char *  param  )  const [virtual]
 

Returns:
the value of the content-disposition header field parameter with name parameter, or QString::null if that parameter is not present in the body's content-disposition header field. RFC 2231 encoding is removed first.
The notes made for contentTypeParameter() above apply here as well.

Implements KMail::Interface::BodyPart.

bool KMail::PartNodeBodyPart::hasCompleteBody  )  const [virtual]
 

Returns:
whether this part already has it's complete body fetched e.g. from an IMAP server.

Implements KMail::Interface::BodyPart.

Interface::BodyPartMemento* KMail::PartNodeBodyPart::memento  )  const [virtual]
 

Returns:
the BodyPartMemento set for this part, or null, if none is set.

Implements KMail::Interface::BodyPart.


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Dec 21 14:25:30 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003