23 #include <kiconloader.h>
26 #include <tqcstring.h>
38 KMMessagePart( TQDataStream & stream );
39 virtual ~KMMessagePart();
46 void duplicate(
const KMMessagePart & msgPart );
49 TQCString body(
void)
const;
50 void setBody(
const TQCString &aStr);
51 DwString dwBody()
const;
52 void setBody(
const DwString &aStr);
54 void setBody(
const TQByteArray &arr);
59 void setBodyFromUnicode(
const TQString & str );
63 TQString bodyToUnicode(
const TQTextCodec* codec=0)
const;
68 TQByteArray bodyDecodedBinary(
void)
const;
72 TQCString bodyDecoded(
void)
const;
83 void setBodyAndGuessCte(
const TQByteArray& aBuf,
84 TQValueList<int>& allowedCte,
85 bool allow8Bit =
false,
86 bool willBeSigned =
false);
88 void setBodyAndGuessCte(
const TQCString& aBuf,
89 TQValueList<int>& allowedCte,
90 bool allow8Bit =
false,
91 bool willBeSigned =
false);
97 void setBodyEncodedBinary(
const TQByteArray& aStr);
106 void setBodyEncoded(
const TQCString& aStr);
112 void setMessageBody(
const TQByteArray & aBuf );
115 int decodedSize(
void)
const;
120 TQCString originalContentTypeStr(
void)
const {
return mOriginalContentTypeStr; }
121 void setOriginalContentTypeStr(
const TQCString& txt )
123 mOriginalContentTypeStr = txt;
125 TQCString typeStr()
const {
return mType; }
126 void setTypeStr(
const TQCString & aStr ) { mType = aStr; }
128 void setType(
int aType);
130 TQCString subtypeStr()
const {
return mSubtype; }
131 void setSubtypeStr(
const TQCString & aStr ) { mSubtype = aStr; }
133 void setSubtype(
int aSubtype);
136 TQCString contentId()
const {
return mContentId; }
137 void setContentId(
const TQCString & aStr ) { mContentId = aStr; }
142 void magicSetType(
bool autoDecode=TRUE);
146 TQCString parameterAttribute(
void)
const;
147 TQString parameterValue(
void)
const;
148 void setParameter(
const TQCString &attribute,
const TQString &value);
150 TQCString additionalCTypeParamStr(
void)
const
152 return mAdditionalCTypeParamStr;
154 void setAdditionalCTypeParamStr(
const TQCString ¶m )
156 mAdditionalCTypeParamStr = param;
162 TQString iconName(
int size = TDEIcon::Desktop )
const;
167 TQCString contentTransferEncodingStr(
void)
const;
168 int contentTransferEncoding(
void)
const;
169 void setContentTransferEncodingStr(
const TQCString &aStr);
170 void setContentTransferEncoding(
int aCte);
174 TQCString cteStr(
void)
const {
return contentTransferEncodingStr(); }
175 int cte(
void)
const {
return contentTransferEncoding(); }
176 void setCteStr(
const TQCString& aStr) { setContentTransferEncodingStr(aStr); }
177 void setCte(
int aCte) { setContentTransferEncoding(aCte); }
181 TQString contentDescription()
const;
182 TQCString contentDescriptionEncoded()
const {
return mContentDescription; }
183 void setContentDescription(
const TQString &aStr);
186 TQCString contentDisposition()
const {
return mContentDisposition; }
187 void setContentDisposition(
const TQCString & cd ) { mContentDisposition = cd; }
190 TQCString charset()
const {
return mCharset; }
193 void setCharset(
const TQCString & c );
196 const TQTextCodec * codec()
const;
199 TQString name()
const {
return mName; }
200 void setName(
const TQString & name ) { mName = name; }
204 TQString fileName(
void)
const;
207 TQString partSpecifier()
const {
return mPartSpecifier; }
210 void setPartSpecifier(
const TQString & part ) { mPartSpecifier = part; }
213 bool isComplete() {
return (!mBody.isNull()); }
216 KMMessagePart* parent() {
return mParent; }
219 void setParent( KMMessagePart* part ) { mParent = part; }
222 bool loadHeaders() {
return mLoadHeaders; }
225 void setLoadHeaders(
bool load ) { mLoadHeaders = load; }
228 bool loadPart() {
return mLoadPart; }
231 void setLoadPart(
bool load ) { mLoadPart = load; }
234 TQCString mOriginalContentTypeStr;
238 TQCString mContentDescription;
239 TQCString mContentDisposition;
240 TQCString mContentId;
242 TQCString mAdditionalCTypeParamStr;
244 TQCString mParameterAttribute;
245 TQString mParameterValue;
247 TQString mPartSpecifier;
248 mutable int mBodyDecodedSize;
249 KMMessagePart* mParent;