kmail
KMMessagePart Class Reference
#include <kmmsgpart.h>
Detailed Description
Definition at line 31 of file kmmsgpart.h.
Constructor & Destructor Documentation
| KMMessagePart::KMMessagePart | ( | ) |
Definition at line 30 of file kmmsgpart.cpp.
| KMMessagePart::KMMessagePart | ( | QDataStream & | stream | ) |
Definition at line 37 of file kmmsgpart.cpp.
| KMMessagePart::~KMMessagePart | ( | ) | [virtual] |
Definition at line 57 of file kmmsgpart.cpp.
Member Function Documentation
| QByteArray KMMessagePart::additionalCTypeParamStr | ( | void | ) | const [inline] |
Definition at line 132 of file kmmsgpart.h.
| QByteArray KMMessagePart::body | ( | void | ) | const |
Get or set the message body.
Definition at line 475 of file kmmsgpart.cpp.
| QByteArray KMMessagePart::bodyDecoded | ( | void | ) | const |
Returns body as decoded string.
Assumes that content-transfer-encoding contains the correct encoding. This routine is meant for text strings!
Definition at line 281 of file kmmsgpart.cpp.
| QByteArray KMMessagePart::bodyDecodedBinary | ( | void | ) | const |
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 251 of file kmmsgpart.cpp.
| QString KMMessagePart::bodyToUnicode | ( | const QTextCodec * | codec = 0 |
) | const |
Returns the body part decoded to unicode.
Definition at line 142 of file kmmsgpart.cpp.
| QByteArray KMMessagePart::charset | ( | ) | const [inline] |
Get the message part charset.
Definition at line 172 of file kmmsgpart.h.
| void KMMessagePart::clear | ( | void | ) |
Reset to text/plain with 7bit cte and clear all other properties.
Definition at line 63 of file kmmsgpart.cpp.
| const QTextCodec * KMMessagePart::codec | ( | ) | const |
Get a QTextCodec suitable for this message part.
Definition at line 126 of file kmmsgpart.cpp.
| QString KMMessagePart::contentDescription | ( | void | ) | const |
Get or set the 'Content-Description' header field.
Definition at line 412 of file kmmsgpart.cpp.
| QByteArray KMMessagePart::contentDescriptionEncoded | ( | ) | const [inline] |
Definition at line 164 of file kmmsgpart.h.
| QByteArray KMMessagePart::contentDisposition | ( | ) | const [inline] |
Get or set the 'Content-Disposition' header field.
Definition at line 168 of file kmmsgpart.h.
| QByteArray KMMessagePart::contentId | ( | ) | const [inline] |
Content-Id.
Definition at line 118 of file kmmsgpart.h.
| int KMMessagePart::contentTransferEncoding | ( | void | ) | const |
Definition at line 388 of file kmmsgpart.cpp.
| QByteArray 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 381 of file kmmsgpart.cpp.
| int KMMessagePart::cte | ( | void | ) | const [inline] |
Definition at line 157 of file kmmsgpart.h.
| QByteArray KMMessagePart::cteStr | ( | void | ) | const [inline] |
Cte is short for ContentTransferEncoding.
These functions are an alternative to the ones with longer names.
Definition at line 156 of file kmmsgpart.h.
| int KMMessagePart::decodedSize | ( | ) | const |
Returns decoded length of body.
Definition at line 95 of file kmmsgpart.cpp.
| void KMMessagePart::duplicate | ( | const KMMessagePart & | msgPart | ) |
Obtains an independent copy (i.e.
without explicitly shared data) of the data contained in msgPart.
Definition at line 86 of file kmmsgpart.cpp.
| QString KMMessagePart::fileName | ( | void | ) | const |
Returns name of filename part of 'Content-Disposition' header field, if present.
Definition at line 432 of file kmmsgpart.cpp.
| QString KMMessagePart::iconName | ( | int | size = KIconLoader::Desktop |
) | 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 306 of file kmmsgpart.cpp.
| bool KMMessagePart::isComplete | ( | ) | [inline] |
If this part is complete (contains a body).
Definition at line 195 of file kmmsgpart.h.
| bool KMMessagePart::loadHeaders | ( | ) | [inline] |
Returns true if the headers should be loaded.
Definition at line 204 of file kmmsgpart.h.
| bool KMMessagePart::loadPart | ( | ) | [inline] |
Returns true if the part itself (as returned by kioslave) should be loaded.
Definition at line 210 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 294 of file kmmsgpart.cpp.
| QString KMMessagePart::name | ( | ) | const [inline] |
Get or set name parameter.
Definition at line 181 of file kmmsgpart.h.
| QByteArray 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 101 of file kmmsgpart.h.
| QByteArray KMMessagePart::parameterAttribute | ( | void | ) | const |
Get or set a custom content type parameter, consisting of an attribute name and a corresponding value.
Definition at line 361 of file kmmsgpart.cpp.
| QString KMMessagePart::parameterValue | ( | void | ) | const |
Definition at line 367 of file kmmsgpart.cpp.
| KMMessagePart* KMMessagePart::parent | ( | void | ) | [inline] |
Returns the parent part.
Definition at line 198 of file kmmsgpart.h.
| QString KMMessagePart::partSpecifier | ( | ) | const [inline] |
Returns the part number.
Definition at line 189 of file kmmsgpart.h.
| void KMMessagePart::setAdditionalCTypeParamStr | ( | const QByteArray & | param | ) | [inline] |
Definition at line 136 of file kmmsgpart.h.
| void KMMessagePart::setBody | ( | const QByteArray & | aStr | ) |
Definition at line 104 of file kmmsgpart.cpp.
| void KMMessagePart::setBodyAndGuessCte | ( | const QByteArray & | aBuf, | |
| QList< int > & | allowedCte, | |||
| bool | allow8Bit = false, |
|||
| bool | willBeSigned = false | |||
| ) |
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
Definition at line 165 of file kmmsgpart.cpp.
| void KMMessagePart::setBodyEncoded | ( | const QByteArray & | aStr | ) |
Sets body, encoded according to the content-transfer-encoding.
This one is for text strings, the trailing 0 is not used.
Definition at line 159 of file kmmsgpart.cpp.
| void KMMessagePart::setBodyEncodedBinary | ( | const QByteArray & | aStr | ) |
Sets body, encoded according to the content-transfer-encoding.
BEWARE: The entire aStr is used including trailing 0 of text strings!
Definition at line 189 of file kmmsgpart.cpp.
| 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 115 of file kmmsgpart.cpp.
| void KMMessagePart::setCharset | ( | const QByteArray & | c | ) |
Set the message part charset.
Definition at line 151 of file kmmsgpart.cpp.
| void KMMessagePart::setContentDescription | ( | const QString & | aStr | ) |
Definition at line 419 of file kmmsgpart.cpp.
| void KMMessagePart::setContentDisposition | ( | const QByteArray & | cd | ) | [inline] |
Definition at line 169 of file kmmsgpart.h.
| void KMMessagePart::setContentId | ( | const QByteArray & | aStr | ) | [inline] |
Definition at line 119 of file kmmsgpart.h.
| void KMMessagePart::setContentTransferEncoding | ( | int | aCte | ) |
Definition at line 402 of file kmmsgpart.cpp.
| void KMMessagePart::setContentTransferEncodingStr | ( | const QByteArray & | aStr | ) |
Definition at line 395 of file kmmsgpart.cpp.
| void KMMessagePart::setCte | ( | int | aCte | ) | [inline] |
Definition at line 159 of file kmmsgpart.h.
| void KMMessagePart::setCteStr | ( | const QByteArray & | aStr | ) | [inline] |
Definition at line 158 of file kmmsgpart.h.
| void KMMessagePart::setLoadHeaders | ( | bool | load | ) | [inline] |
Set to true if the headers should be loaded.
Definition at line 207 of file kmmsgpart.h.
| void KMMessagePart::setLoadPart | ( | bool | load | ) | [inline] |
Set to true if the part itself should be loaded.
Definition at line 213 of file kmmsgpart.h.
| void KMMessagePart::setMessageBody | ( | const QByteArray & | aBuf | ) |
Set a full message string as the body of the message part, disallowing anything but 7bit or 8bit encoding.
(RFC 1521 section 7.3)
Definition at line 225 of file kmmsgpart.cpp.
| void KMMessagePart::setName | ( | const QString & | name | ) | [inline] |
Definition at line 182 of file kmmsgpart.h.
| void KMMessagePart::setOriginalContentTypeStr | ( | const QByteArray & | txt | ) | [inline] |
Definition at line 104 of file kmmsgpart.h.
| void KMMessagePart::setParameter | ( | const QByteArray & | attribute, | |
| const QString & | value | |||
| ) |
Definition at line 373 of file kmmsgpart.cpp.
| void KMMessagePart::setParent | ( | KMMessagePart * | part | ) | [inline] |
Set the parent of this part.
Definition at line 201 of file kmmsgpart.h.
| void KMMessagePart::setPartSpecifier | ( | const QString & | part | ) | [inline] |
Sets the part number.
Definition at line 192 of file kmmsgpart.h.
| void KMMessagePart::setSubtype | ( | int | aSubtype | ) |
Definition at line 353 of file kmmsgpart.cpp.
| void KMMessagePart::setSubtypeStr | ( | const QByteArray & | aStr | ) | [inline] |
Definition at line 113 of file kmmsgpart.h.
| void KMMessagePart::setType | ( | int | aType | ) |
Definition at line 339 of file kmmsgpart.cpp.
| void KMMessagePart::setTypeStr | ( | const QByteArray & | aStr | ) | [inline] |
Definition at line 108 of file kmmsgpart.h.
| int KMMessagePart::subtype | ( | ) | const |
Definition at line 347 of file kmmsgpart.cpp.
| QByteArray KMMessagePart::subtypeStr | ( | ) | const [inline] |
Subtype.
Definition at line 112 of file kmmsgpart.h.
| int KMMessagePart::type | ( | ) | const |
Definition at line 333 of file kmmsgpart.cpp.
| QByteArray KMMessagePart::typeStr | ( | ) | const [inline] |
Definition at line 107 of file kmmsgpart.h.
Member Data Documentation
QByteArray KMMessagePart::mAdditionalCTypeParamStr [protected] |
Definition at line 224 of file kmmsgpart.h.
QByteArray KMMessagePart::mBody [protected] |
Definition at line 223 of file kmmsgpart.h.
int KMMessagePart::mBodyDecodedSize [mutable, protected] |
Definition at line 230 of file kmmsgpart.h.
QByteArray KMMessagePart::mCharset [protected] |
Definition at line 228 of file kmmsgpart.h.
QByteArray KMMessagePart::mContentDescription [protected] |
Definition at line 220 of file kmmsgpart.h.
QByteArray KMMessagePart::mContentDisposition [protected] |
Definition at line 221 of file kmmsgpart.h.
QByteArray KMMessagePart::mContentId [protected] |
Definition at line 222 of file kmmsgpart.h.
QByteArray KMMessagePart::mCte [protected] |
Definition at line 219 of file kmmsgpart.h.
bool KMMessagePart::mLoadHeaders [protected] |
Definition at line 232 of file kmmsgpart.h.
bool KMMessagePart::mLoadPart [protected] |
Definition at line 233 of file kmmsgpart.h.
QString KMMessagePart::mName [protected] |
Definition at line 225 of file kmmsgpart.h.
QByteArray KMMessagePart::mOriginalContentTypeStr [protected] |
Definition at line 216 of file kmmsgpart.h.
QByteArray KMMessagePart::mParameterAttribute [protected] |
Definition at line 226 of file kmmsgpart.h.
QString KMMessagePart::mParameterValue [protected] |
Definition at line 227 of file kmmsgpart.h.
KMMessagePart* KMMessagePart::mParent [protected] |
Definition at line 231 of file kmmsgpart.h.
QString KMMessagePart::mPartSpecifier [protected] |
Definition at line 229 of file kmmsgpart.h.
QByteArray KMMessagePart::mSubtype [protected] |
Definition at line 218 of file kmmsgpart.h.
QByteArray KMMessagePart::mType [protected] |
Definition at line 217 of file kmmsgpart.h.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference