kmail
KMMessagePart Class Reference
#include <kmmsgpart.h>
Detailed Description
Definition at line 34 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
QCString KMMessagePart::additionalCTypeParamStr | ( | void | ) | const [inline] |
Definition at line 150 of file kmmsgpart.h.
QCString KMMessagePart::body | ( | void | ) | const |
QCString 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 359 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 328 of file kmmsgpart.cpp.
QString KMMessagePart::bodyToUnicode | ( | const QTextCodec * | codec = 0 |
) | const |
QCString KMMessagePart::charset | ( | ) | const [inline] |
void KMMessagePart::clear | ( | ) |
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 |
QString KMMessagePart::contentDescription | ( | void | ) | const |
QCString KMMessagePart::contentDescriptionEncoded | ( | ) | const [inline] |
Definition at line 182 of file kmmsgpart.h.
QCString KMMessagePart::contentDisposition | ( | ) | const [inline] |
QCString KMMessagePart::contentId | ( | ) | const [inline] |
int KMMessagePart::contentTransferEncoding | ( | void | ) | const |
Definition at line 511 of file kmmsgpart.cpp.
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 504 of file kmmsgpart.cpp.
int KMMessagePart::cte | ( | void | ) | const [inline] |
Definition at line 175 of file kmmsgpart.h.
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 174 of file kmmsgpart.h.
int KMMessagePart::decodedSize | ( | void | ) | const |
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 86 of file kmmsgpart.cpp.
DwString KMMessagePart::dwBody | ( | ) | const |
Definition at line 599 of file kmmsgpart.cpp.
QString KMMessagePart::fileName | ( | void | ) | const |
Returns name of filename part of 'Content-Disposition' header field, if present.
Definition at line 552 of file kmmsgpart.cpp.
QString KMMessagePart::iconName | ( | int | size = KIcon::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 432 of file kmmsgpart.cpp.
bool KMMessagePart::isComplete | ( | ) | [inline] |
bool KMMessagePart::loadHeaders | ( | ) | [inline] |
bool KMMessagePart::loadPart | ( | ) | [inline] |
Returns true if the part itself (as returned by kioslave) should be loaded.
Definition at line 228 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 417 of file kmmsgpart.cpp.
QString KMMessagePart::name | ( | ) | const [inline] |
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 120 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 484 of file kmmsgpart.cpp.
QString KMMessagePart::parameterValue | ( | void | ) | const |
Definition at line 490 of file kmmsgpart.cpp.
KMMessagePart* KMMessagePart::parent | ( | void | ) | [inline] |
QString KMMessagePart::partSpecifier | ( | ) | const [inline] |
void KMMessagePart::setAdditionalCTypeParamStr | ( | const QCString & | param | ) | [inline] |
Definition at line 154 of file kmmsgpart.h.
void KMMessagePart::setBody | ( | const QByteArray & | arr | ) |
Definition at line 126 of file kmmsgpart.cpp.
void KMMessagePart::setBody | ( | const DwString & | aStr | ) |
Definition at line 115 of file kmmsgpart.cpp.
void KMMessagePart::setBody | ( | const QCString & | aStr | ) |
Definition at line 104 of file kmmsgpart.cpp.
void KMMessagePart::setBodyAndGuessCte | ( | const QCString & | aBuf, | |
QValueList< int > & | allowedCte, | |||
bool | allow8Bit = false , |
|||
bool | willBeSigned = false | |||
) |
void KMMessagePart::setBodyAndGuessCte | ( | const QByteArray & | aBuf, | |
QValueList< 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 222 of file kmmsgpart.cpp.
void KMMessagePart::setBodyEncoded | ( | const QCString & | aStr | ) |
Sets body, encoded according to the content-transfer-encoding.
This one is for text strings, the trailing 0 is not used.
For speed reasons, prefer setBodyEncodedBinary. When possible (the QCString isn't used afterwards), change setBodyEncoded(myQCString) into: setBodyEncodedBinary(byteArrayFromQCStringNoDetach(myQCString));
Definition at line 185 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! This version is faster than setBodyEncoded, no duplication necessary.
Definition at line 269 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 137 of file kmmsgpart.cpp.
void KMMessagePart::setCharset | ( | const QCString & | c | ) |
void KMMessagePart::setContentDescription | ( | const QString & | aStr | ) |
Definition at line 542 of file kmmsgpart.cpp.
void KMMessagePart::setContentDisposition | ( | const QCString & | cd | ) | [inline] |
Definition at line 187 of file kmmsgpart.h.
void KMMessagePart::setContentId | ( | const QCString & | aStr | ) | [inline] |
Definition at line 137 of file kmmsgpart.h.
void KMMessagePart::setContentTransferEncoding | ( | int | aCte | ) |
Definition at line 525 of file kmmsgpart.cpp.
void KMMessagePart::setContentTransferEncodingStr | ( | const QCString & | aStr | ) |
Definition at line 518 of file kmmsgpart.cpp.
void KMMessagePart::setCte | ( | int | aCte | ) | [inline] |
Definition at line 177 of file kmmsgpart.h.
void KMMessagePart::setCteStr | ( | const QCString & | aStr | ) | [inline] |
Definition at line 176 of file kmmsgpart.h.
void KMMessagePart::setLoadHeaders | ( | bool | load | ) | [inline] |
void KMMessagePart::setLoadPart | ( | bool | load | ) | [inline] |
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 303 of file kmmsgpart.cpp.
void KMMessagePart::setName | ( | const QString & | name | ) | [inline] |
Definition at line 200 of file kmmsgpart.h.
void KMMessagePart::setOriginalContentTypeStr | ( | const QCString & | txt | ) | [inline] |
Definition at line 121 of file kmmsgpart.h.
Definition at line 496 of file kmmsgpart.cpp.
void KMMessagePart::setParent | ( | KMMessagePart * | part | ) | [inline] |
void KMMessagePart::setPartSpecifier | ( | const QString & | part | ) | [inline] |
void KMMessagePart::setSubtype | ( | int | aSubtype | ) |
Definition at line 476 of file kmmsgpart.cpp.
void KMMessagePart::setSubtypeStr | ( | const QCString & | aStr | ) | [inline] |
Definition at line 131 of file kmmsgpart.h.
void KMMessagePart::setType | ( | int | aType | ) |
Definition at line 462 of file kmmsgpart.cpp.
void KMMessagePart::setTypeStr | ( | const QCString & | aStr | ) | [inline] |
Definition at line 126 of file kmmsgpart.h.
int KMMessagePart::subtype | ( | ) | const |
Definition at line 470 of file kmmsgpart.cpp.
QCString KMMessagePart::subtypeStr | ( | ) | const [inline] |
int KMMessagePart::type | ( | void | ) | const |
Definition at line 456 of file kmmsgpart.cpp.
QCString KMMessagePart::typeStr | ( | ) | const [inline] |
Definition at line 125 of file kmmsgpart.h.
Member Data Documentation
QCString KMMessagePart::mAdditionalCTypeParamStr [protected] |
Definition at line 242 of file kmmsgpart.h.
QByteArray KMMessagePart::mBody [protected] |
Definition at line 241 of file kmmsgpart.h.
int KMMessagePart::mBodyDecodedSize [mutable, protected] |
Definition at line 248 of file kmmsgpart.h.
QCString KMMessagePart::mCharset [protected] |
Definition at line 246 of file kmmsgpart.h.
QCString KMMessagePart::mContentDescription [protected] |
Definition at line 238 of file kmmsgpart.h.
QCString KMMessagePart::mContentDisposition [protected] |
Definition at line 239 of file kmmsgpart.h.
QCString KMMessagePart::mContentId [protected] |
Definition at line 240 of file kmmsgpart.h.
QCString KMMessagePart::mCte [protected] |
Definition at line 237 of file kmmsgpart.h.
bool KMMessagePart::mLoadHeaders [protected] |
Definition at line 250 of file kmmsgpart.h.
bool KMMessagePart::mLoadPart [protected] |
Definition at line 251 of file kmmsgpart.h.
QString KMMessagePart::mName [protected] |
Definition at line 243 of file kmmsgpart.h.
QCString KMMessagePart::mOriginalContentTypeStr [protected] |
Definition at line 234 of file kmmsgpart.h.
QCString KMMessagePart::mParameterAttribute [protected] |
Definition at line 244 of file kmmsgpart.h.
QString KMMessagePart::mParameterValue [protected] |
Definition at line 245 of file kmmsgpart.h.
KMMessagePart* KMMessagePart::mParent [protected] |
Definition at line 249 of file kmmsgpart.h.
QString KMMessagePart::mPartSpecifier [protected] |
Definition at line 247 of file kmmsgpart.h.
QCString KMMessagePart::mSubtype [protected] |
Definition at line 236 of file kmmsgpart.h.
QCString KMMessagePart::mType [protected] |
Definition at line 235 of file kmmsgpart.h.
The documentation for this class was generated from the following files: