kmail

KMMessagePart Class Reference

List of all members.

Detailed Description

Definition at line 31 of file kmmsgpart.h.


Public Member Functions

 KMMessagePart ()
 KMMessagePart (QDataStream &stream)
virtual ~KMMessagePart ()
void clear ()
void duplicate (const KMMessagePart &msgPart)
QCString body (void) const
void setBody (const QCString &aStr)
void setBodyFromUnicode (const QString &str)
QString bodyToUnicode (const QTextCodec *codec=0) const
virtual QByteArray bodyDecodedBinary (void) const
virtual QCString bodyDecoded (void) const
virtual void setBodyAndGuessCte (const QByteArray &aBuf, QValueList< int > &allowedCte, bool allow8Bit=false, bool willBeSigned=false)
virtual void setBodyAndGuessCte (const QCString &aBuf, QValueList< int > &allowedCte, bool allow8Bit=false, bool willBeSigned=false)
virtual void setBodyEncodedBinary (const QByteArray &aStr)
virtual void setBodyEncoded (const QCString &aStr)
virtual int decodedSize (void) const
QCString originalContentTypeStr (void) const
void setOriginalContentTypeStr (const QCString &txt)
QCString typeStr () const
void setTypeStr (const QCString &aStr)
int type () const
void setType (int aType)
QCString subtypeStr () const
void setSubtypeStr (const QCString &aStr)
int subtype () const
void setSubtype (int aSubtype)
QCString contentId () const
void setContentId (const QCString &aStr)
void magicSetType (bool autoDecode=TRUE)
QCString parameterAttribute (void) const
QString parameterValue (void) const
void setParameter (const QCString &attribute, const QString &value)
QCString additionalCTypeParamStr (void) const
void setAdditionalCTypeParamStr (const QCString &param)
QString iconName () const
QCString contentTransferEncodingStr (void) const
int contentTransferEncoding (void) const
void setContentTransferEncodingStr (const QCString &aStr)
void setContentTransferEncoding (int aCte)
QCString cteStr (void) const
int cte (void) const
void setCteStr (const QCString &aStr)
void setCte (int aCte)
QString contentDescription () const
QCString contentDescriptionEncoded () const
void setContentDescription (const QString &aStr)
QCString contentDisposition () const
void setContentDisposition (const QCString &cd)
QCString charset () const
void setCharset (const QCString &c)
const QTextCodec * codec () const
QString name () const
void setName (const QString &name)
QString fileName (void) const
QString partSpecifier () const
void setPartSpecifier (const QString &part)
bool isComplete ()
KMMessagePartparent ()
void setParent (KMMessagePart *part)
bool loadHeaders ()
void setLoadHeaders (bool load)
bool loadPart ()
void setLoadPart (bool load)

Protected Attributes

QCString mOriginalContentTypeStr
QCString mType
QCString mSubtype
QCString mCte
QCString mContentDescription
QCString mContentDisposition
QCString mContentId
QByteArray mBody
QCString mAdditionalCTypeParamStr
QString mName
QCString mParameterAttribute
QString mParameterValue
QCString mCharset
QString mPartSpecifier
int mBodyDecodedSize
KMMessagePartmParent
bool mLoadHeaders
bool mLoadPart

Member Function Documentation

QCString KMMessagePart::body void   )  const
 

Get or set the message body.

Definition at line 533 of file kmmsgpart.cpp.

QCString KMMessagePart::bodyDecoded void   )  const [virtual]
 

Returns body as decoded string.

Assumes that content-transfer-encoding contains the correct encoding. This routine is meant for text strings!

Definition at line 309 of file kmmsgpart.cpp.

QByteArray KMMessagePart::bodyDecodedBinary void   )  const [virtual]
 

Returns body as decoded string.

Assumes that content-transfer-encoding contains the correct encoding. This routine is meant for binary data. No trailing 0 is appended.

Definition at line 278 of file kmmsgpart.cpp.

QString KMMessagePart::bodyToUnicode const QTextCodec *  codec = 0  )  const
 

Returns the body part decoded to unicode.

Definition at line 141 of file kmmsgpart.cpp.

QCString KMMessagePart::charset  )  const [inline]
 

Get the message part charset.

Definition at line 170 of file kmmsgpart.h.

void KMMessagePart::clear  ) 
 

Reset to text/plain with 7bit cte and clear all other properties.

Definition at line 62 of file kmmsgpart.cpp.

const QTextCodec * KMMessagePart::codec  )  const
 

Get a QTextCodec suitable for this message part.

Definition at line 125 of file kmmsgpart.cpp.

QString KMMessagePart::contentDescription  )  const
 

Get or set the 'Content-Description' header field.

Definition at line 475 of file kmmsgpart.cpp.

QCString KMMessagePart::contentDisposition  )  const [inline]
 

Get or set the 'Content-Disposition' header field.

Definition at line 166 of file kmmsgpart.h.

QCString KMMessagePart::contentId  )  const [inline]
 

Content-Id.

Definition at line 116 of file kmmsgpart.h.

QCString KMMessagePart::contentTransferEncodingStr void   )  const
 

Get or set the 'Content-Transfer-Encoding' header field The member functions that involve enumerated types (ints) will work only for well-known encodings.

Definition at line 444 of file kmmsgpart.cpp.

QCString KMMessagePart::cteStr void   )  const [inline]
 

Cte is short for ContentTransferEncoding.

These functions are an alternative to the ones with longer names.

Definition at line 154 of file kmmsgpart.h.

int KMMessagePart::decodedSize void   )  const [virtual]
 

Returns decoded length of body.

Definition at line 94 of file kmmsgpart.cpp.

void KMMessagePart::duplicate const KMMessagePart msgPart  ) 
 

Obtains an independant copy (i.e.

without explicitely shared data) of the data contained in msgPart.

Definition at line 85 of file kmmsgpart.cpp.

QString KMMessagePart::fileName void   )  const
 

Returns name of filename part of 'Content-Disposition' header field, if present.

Definition at line 492 of file kmmsgpart.cpp.

QString KMMessagePart::iconName  )  const
 

Tries to find a good icon for the 'Content-Type' by scanning the installed mimelnk files.

Returns the found icon. If no matching icon is found, the one for application/octet-stream is returned.

Definition at line 383 of file kmmsgpart.cpp.

bool KMMessagePart::isComplete  )  [inline]
 

If this part is complete (contains a body).

Definition at line 193 of file kmmsgpart.h.

bool KMMessagePart::loadHeaders  )  [inline]
 

Returns true if the headers should be loaded.

Definition at line 202 of file kmmsgpart.h.

bool KMMessagePart::loadPart  )  [inline]
 

Returns true if the part itself (as returned by kioslave) should be loaded.

Definition at line 208 of file kmmsgpart.h.

void KMMessagePart::magicSetType bool  autoDecode = TRUE  ) 
 

Set the 'Content-Type' by mime-magic from the contents of the body.

If autoDecode is TRUE the decoded body will be used for mime type determination (this does not change the body itself).

Definition at line 368 of file kmmsgpart.cpp.

QString KMMessagePart::name  )  const [inline]
 

Get or set name parameter.

Definition at line 179 of file kmmsgpart.h.

QCString KMMessagePart::originalContentTypeStr void   )  const [inline]
 

Get or set the 'Content-Type' header field The member functions that involve enumerated types (ints) will work only for well-known types or subtypes.

Definition at line 100 of file kmmsgpart.h.

QCString KMMessagePart::parameterAttribute void   )  const
 

Get or set a custom content type parameter, consisting of an attribute name and a corresponding value.

Definition at line 424 of file kmmsgpart.cpp.

KMMessagePart* KMMessagePart::parent void   )  [inline]
 

Returns the parent part.

Definition at line 196 of file kmmsgpart.h.

QString KMMessagePart::partSpecifier  )  const [inline]
 

Returns the part number.

Definition at line 187 of file kmmsgpart.h.

void KMMessagePart::setBodyAndGuessCte const QCString &  aBuf,
QValueList< int > &  allowedCte,
bool  allow8Bit = false,
bool  willBeSigned = false
[virtual]
 

Same for text.

Definition at line 221 of file kmmsgpart.cpp.

virtual void KMMessagePart::setBodyAndGuessCte const QByteArray &  aBuf,
QValueList< int > &  allowedCte,
bool  allow8Bit = false,
bool  willBeSigned = false
[virtual]
 

Sets body, encoded in the best fitting content-transfer-encoding, which is determined by character frequency count.

Parameters:
aBuf input buffer
allowedCte return: list of allowed cte's
allow8Bit whether "8bit" is allowed as cte.
willBeSigned whether "7bit"/"8bit" is allowed as cte according to RFC 3156

void KMMessagePart::setBodyEncoded const QCString &  aStr  )  [virtual]
 

Sets body, encoded according to the content-transfer-encoding.

This one is for text strings, the trailing 0 is not used.

Definition at line 162 of file kmmsgpart.cpp.

virtual void KMMessagePart::setBodyEncodedBinary const QByteArray &  aStr  )  [virtual]
 

Sets body, encoded according to the content-transfer-encoding.

BEWARE: The entire aStr is used including trailing 0 of text strings!

void KMMessagePart::setBodyFromUnicode const QString &  str  ) 
 

Sets this body part's content to str.

str is subject to automatic charset and CTE detection.

Definition at line 114 of file kmmsgpart.cpp.

void KMMessagePart::setCharset const QCString &  c  ) 
 

Set the message part charset.

Definition at line 150 of file kmmsgpart.cpp.

void KMMessagePart::setLoadHeaders bool  load  )  [inline]
 

Set to true if the headers should be loaded.

Definition at line 205 of file kmmsgpart.h.

void KMMessagePart::setLoadPart bool  load  )  [inline]
 

Set to true if the part itself should be loaded.

Definition at line 211 of file kmmsgpart.h.

void KMMessagePart::setParent KMMessagePart part  )  [inline]
 

Set the parent of this part.

Definition at line 199 of file kmmsgpart.h.

void KMMessagePart::setPartSpecifier const QString &  part  )  [inline]
 

Sets the part number.

Definition at line 190 of file kmmsgpart.h.

QCString KMMessagePart::subtypeStr  )  const [inline]
 

Subtype.

Definition at line 110 of file kmmsgpart.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys