williamr@2
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __MIUTMSG_H__
|
williamr@2
|
17 |
#define __MIUTMSG_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#include <msvstd.h>
|
williamr@2
|
20 |
#include <msvapi.h> // TMsvEntry, CMsvOperation etc
|
williamr@2
|
21 |
#include <mentact.h> // CMsgActive
|
williamr@2
|
22 |
#include <miuthdr.h> // CImHeader, CImMimeHeader
|
williamr@2
|
23 |
#include <txtrich.h> // CRichText etc
|
williamr@2
|
24 |
#include <miutdef.h> // CImHeader, CImMimeHeader
|
williamr@2
|
25 |
#include <mtmdef.h>
|
williamr@2
|
26 |
#include <miutatch.h>
|
williamr@2
|
27 |
#include <smtpset.h>
|
williamr@2
|
28 |
#include <miutpars.h> // TImMessageField
|
williamr@2
|
29 |
|
williamr@2
|
30 |
#include <barsc.h> // RResourceFile
|
williamr@2
|
31 |
#include <conarc.h>
|
williamr@2
|
32 |
#include <conlist.h>
|
williamr@2
|
33 |
|
williamr@2
|
34 |
#include <txtmrtsr.h>
|
williamr@2
|
35 |
|
williamr@2
|
36 |
|
williamr@2
|
37 |
|
williamr@2
|
38 |
//#include <mmsvattachmentmanager.h>
|
williamr@2
|
39 |
#include <s32mem.h>
|
williamr@2
|
40 |
|
williamr@2
|
41 |
//Content-Transfer-Encoding: types
|
williamr@2
|
42 |
_LIT8(KMimeQuotedPrintable, " quoted-printable");
|
williamr@2
|
43 |
_LIT8(KMimeApplOctet, " application/octet-stream");
|
williamr@2
|
44 |
_LIT8(KMime7Bit, " 7-bit");
|
williamr@2
|
45 |
_LIT8(KMimeBase64, " base64");
|
williamr@2
|
46 |
_LIT8(KMimeMime, "MIME*");
|
williamr@2
|
47 |
// Content-Disposition: types
|
williamr@2
|
48 |
_LIT8(KMimeInline, "inline");
|
williamr@2
|
49 |
_LIT8(KMimeAttachment, "attachment");
|
williamr@2
|
50 |
// Content-Type: types
|
williamr@2
|
51 |
_LIT8(KMimeMultipart, "multipart");
|
williamr@2
|
52 |
_LIT8(KMimeText, "text");
|
williamr@2
|
53 |
_LIT8(KMimeImage, "image");
|
williamr@2
|
54 |
_LIT8(KMimeAudio, "audio");
|
williamr@2
|
55 |
_LIT8(KMimeVideo, "video");
|
williamr@2
|
56 |
_LIT8(KMimeApplication, "application");
|
williamr@2
|
57 |
_LIT8(KMimeMessage, "message");
|
williamr@2
|
58 |
// Content-Type: Multipart types
|
williamr@2
|
59 |
_LIT8(KMimeMixed, "mixed");
|
williamr@2
|
60 |
_LIT8(KMimeRelated, "related");
|
williamr@2
|
61 |
_LIT8(KMimeAlternative, "alternative");
|
williamr@2
|
62 |
_LIT8(KMimeEncrypted, "encrypted");
|
williamr@2
|
63 |
_LIT8(KMimeParallel, "parallel");
|
williamr@2
|
64 |
_LIT8(KMimeDigest, "digest");
|
williamr@2
|
65 |
_LIT8(KMimeSigned, "signed");
|
williamr@2
|
66 |
// Content-Type: Text types
|
williamr@2
|
67 |
_LIT8(KMimeHtml, "html");
|
williamr@2
|
68 |
_LIT8(KMimePlain, "plain");
|
williamr@2
|
69 |
_LIT8(KMimeDirectory, "directory");
|
williamr@2
|
70 |
// Content-Type: Message types
|
williamr@2
|
71 |
_LIT8(KMimePartial, "partial");
|
williamr@2
|
72 |
_LIT8(KMimeExternal, "external-body");
|
williamr@2
|
73 |
_LIT8(KMimeRfc822, "rfc822");
|
williamr@2
|
74 |
// Content-Type: Directory types
|
williamr@2
|
75 |
_LIT8(KMimeProfile, "profile");
|
williamr@2
|
76 |
_LIT(KMimeVCardExtension, ".vcf");
|
williamr@2
|
77 |
_LIT8(KMimeVCalender, "vcalendar");
|
williamr@2
|
78 |
// Content-Type: Image, Audio, Video, Application types
|
williamr@2
|
79 |
_LIT8(KMimeBmp, "bmp");
|
williamr@2
|
80 |
_LIT8(KMimeGif, "gif");
|
williamr@2
|
81 |
_LIT8(KMimeJpeg, "jpeg");
|
williamr@2
|
82 |
_LIT8(KMimeTiff, "tiff");
|
williamr@2
|
83 |
_LIT8(KMimeWav, "wav");
|
williamr@2
|
84 |
_LIT8(KMimeZip, "x-gzip");
|
williamr@2
|
85 |
_LIT(KMimeHtmlExtension, ".html");
|
williamr@2
|
86 |
_LIT(KMiutMsgDefaultHtmlFileName, "attachment.html");
|
williamr@2
|
87 |
const TUid KUidMimeHeaders = {0x10204281};
|
williamr@2
|
88 |
|
williamr@2
|
89 |
class CImHtmlConverter;
|
williamr@2
|
90 |
|
williamr@2
|
91 |
class CImAttachmentManager;
|
williamr@2
|
92 |
class CMsvMimeHeaders;
|
williamr@2
|
93 |
class CMsvPlainBodyText;
|
williamr@2
|
94 |
class CImPlainBodyText;
|
williamr@2
|
95 |
|
williamr@2
|
96 |
class TImCreateMessageOptions
|
williamr@2
|
97 |
/**
|
williamr@2
|
98 |
@internalComponent
|
williamr@2
|
99 |
@released
|
williamr@2
|
100 |
*/
|
williamr@2
|
101 |
{
|
williamr@2
|
102 |
public:
|
williamr@2
|
103 |
TMsvPartList iMsvPartList;
|
williamr@2
|
104 |
TMsvEmailTypeList iMsvEmailTypeList;
|
williamr@2
|
105 |
TUid iMessageType;
|
williamr@2
|
106 |
};
|
williamr@2
|
107 |
|
williamr@2
|
108 |
// Mixin provides interface to Browser control to resolve MHTML URIs.
|
williamr@2
|
109 |
|
williamr@2
|
110 |
class MImURITranslator
|
williamr@2
|
111 |
/** Translates a URI in an MHTML message into a message body part file name.
|
williamr@2
|
112 |
|
williamr@2
|
113 |
MHTML messages may contain multiple HTML body parts. Each of these body parts
|
williamr@2
|
114 |
is able to reference another body part within the same multipart structure,
|
williamr@2
|
115 |
or a body part within a parent multipart structure [RFC2110]. These references
|
williamr@2
|
116 |
are called URI's.
|
williamr@2
|
117 |
|
williamr@2
|
118 |
When an MHTML message is parsed by the message engine, the HTML body of each
|
williamr@2
|
119 |
part is stored as a binary file. This interface provides a means of finding
|
williamr@2
|
120 |
the file name of the body part that corresponds to a given a URI.
|
williamr@2
|
121 |
|
williamr@2
|
122 |
The URI resolving process has the potential to become time consuming, therefore
|
williamr@2
|
123 |
it is broken into two steps:
|
williamr@2
|
124 |
|
williamr@2
|
125 |
Resolve asynchronously the relative URI into an absolute URI. The message
|
williamr@2
|
126 |
body parts are recursively searched in order to find an absolute base for
|
williamr@2
|
127 |
the relative URI [RFC2110, RFC1808].
|
williamr@2
|
128 |
|
williamr@2
|
129 |
Once a relative URI has been resolved in to an absolute URI, then the message
|
williamr@2
|
130 |
is searched for a body part that corresponds to it [RFC2110].
|
williamr@2
|
131 |
|
williamr@2
|
132 |
If no matching body part can be found, then the absolute URI is returned to
|
williamr@2
|
133 |
the caller in place of the filename. This absolute URI should be used to search
|
williamr@2
|
134 |
for the required data externally, for example by using HTTP.
|
williamr@2
|
135 |
|
williamr@2
|
136 |
@see CImEmailMessage
|
williamr@2
|
137 |
@publishedAll
|
williamr@2
|
138 |
@released
|
williamr@2
|
139 |
*/
|
williamr@2
|
140 |
{
|
williamr@2
|
141 |
public:
|
williamr@2
|
142 |
/** Starts an asynchronous operation to resolve a specified URI.
|
williamr@2
|
143 |
|
williamr@2
|
144 |
@param aMessageId The ID of the body part containing the URI which is to be
|
williamr@2
|
145 |
resolved. CImEmailMessage::FindFirstHTMLPageL() can be used to find the aMessageId
|
williamr@2
|
146 |
parameter for the first HTML page in a message.
|
williamr@2
|
147 |
@param rBase The base parameter from the HTML part that contains the URI to
|
williamr@2
|
148 |
be resolved. If there is no base parameter in the HTML, then an empty descriptor
|
williamr@2
|
149 |
should be passed in.
|
williamr@2
|
150 |
@param rURI The URI to be resolved.
|
williamr@2
|
151 |
@param aStatus Asynchronous status word */
|
williamr@2
|
152 |
virtual void FindUniversalResourceIdentifierL(TMsvId aMessageId, const TDesC& rBase, const TDesC& rURI, TRequestStatus &aStatus) = 0;
|
williamr@2
|
153 |
|
williamr@2
|
154 |
/** Gets the results after a search.
|
williamr@2
|
155 |
|
williamr@2
|
156 |
@param aLinkedEntryId On return, the message ID of the linked body part, providing
|
williamr@2
|
157 |
one is found. Note that you should keep a record of the returned message ID
|
williamr@2
|
158 |
as it is required for resolving any URI's that may be found in the linked
|
williamr@2
|
159 |
body part.
|
williamr@2
|
160 |
@param aFileFound On return, true if a linked body part has been found. It
|
williamr@2
|
161 |
is set to false otherwise.
|
williamr@2
|
162 |
@return If successful, the filename that corresponds to the URI, or the absolute
|
williamr@2
|
163 |
URI if no matching file can be found. If failed, NULL. */
|
williamr@2
|
164 |
virtual HBufC* GetUniversalResourceIdentifierL(TMsvId& aLinkedEntryId, TBool& aFileFound) const = 0;
|
williamr@2
|
165 |
|
williamr@2
|
166 |
/** Starts an asynchronous operation to resolve a specified URI.
|
williamr@2
|
167 |
|
williamr@2
|
168 |
@param aMessageId The ID of the body part containing the URI which is to be
|
williamr@2
|
169 |
resolved. CImEmailMessage::FindFirstHTMLPageFileHandleL() can be used to find the aMessageId
|
williamr@2
|
170 |
parameter for the first HTML page in a message.
|
williamr@2
|
171 |
@param aBase The base parameter from the HTML part that contains the URI to
|
williamr@2
|
172 |
be resolved. If there is no base parameter in the HTML, then an empty descriptor
|
williamr@2
|
173 |
should be passed in.
|
williamr@2
|
174 |
@param aURI The URI to be resolved.
|
williamr@2
|
175 |
@param aStatus Asynchronous status word */
|
williamr@2
|
176 |
virtual void FindUniversalResourceIdentifierFileHandleL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus) = 0;
|
williamr@2
|
177 |
|
williamr@2
|
178 |
/** Gets the results after a search.
|
williamr@2
|
179 |
|
williamr@2
|
180 |
@param aLinkedEntryId On return, the message ID of the linked body part, providing
|
williamr@2
|
181 |
one is found. Note that you should keep a record of the returned message ID
|
williamr@2
|
182 |
as it is required for resolving any URI's that may be found in the linked
|
williamr@2
|
183 |
body part.
|
williamr@2
|
184 |
|
williamr@2
|
185 |
@param aFile On return, the file handle corresponding to the URI if successful.
|
williamr@2
|
186 |
If not successful, then this is not valid.
|
williamr@2
|
187 |
|
williamr@2
|
188 |
@return KErrNone if successful and therefore aFile contains the filehandle
|
williamr@2
|
189 |
that corresponds to the URI. An error code if unsuccessful and therefore
|
williamr@2
|
190 |
aFile is not valid. */
|
williamr@2
|
191 |
virtual TInt GetUniversalResourceIdentifierFileHandle(TMsvId& aLinkedEntryId, RFile& aFile) const = 0;
|
williamr@2
|
192 |
};
|
williamr@2
|
193 |
|
williamr@2
|
194 |
|
williamr@2
|
195 |
|
williamr@2
|
196 |
|
williamr@2
|
197 |
class CImMhtmlUriResolver;
|
williamr@2
|
198 |
class CImRemoveMessagePart;
|
williamr@2
|
199 |
class CImStoreMessagePart;
|
williamr@2
|
200 |
class CImMimeHeader;
|
williamr@2
|
201 |
|
williamr@2
|
202 |
class CImEmailMessage : public CMsgActive , public MImURITranslator
|
williamr@2
|
203 |
/**
|
williamr@2
|
204 |
This class can be used to manipulate new emails that
|
williamr@2
|
205 |
have been created using CImEmailOperation when composing a message.
|
williamr@2
|
206 |
|
williamr@2
|
207 |
Use an instance of this class to add attachments, MHTML parts, body
|
williamr@2
|
208 |
text, and existing messages to a new message before it is to be sent.
|
williamr@2
|
209 |
|
williamr@2
|
210 |
This class can also be used to retrieve the body text, list of attachments,
|
williamr@2
|
211 |
and embedded messages from emails that have been downloaded and stored within
|
williamr@2
|
212 |
the message store.
|
williamr@2
|
213 |
|
williamr@2
|
214 |
If the store_8bit_body_text flag in imcm.rss is enabled, an instance of this class
|
williamr@2
|
215 |
can be used to retrieve the original body text character set for a particular message.
|
williamr@2
|
216 |
It can also be used to override the original body text character set so it will
|
williamr@2
|
217 |
be decoded in a new character set next time it is viewed.
|
williamr@2
|
218 |
|
williamr@2
|
219 |
@see CImEmailOperation
|
williamr@2
|
220 |
|
williamr@2
|
221 |
@publishedAll
|
williamr@2
|
222 |
@released
|
williamr@2
|
223 |
*/
|
williamr@2
|
224 |
{
|
williamr@2
|
225 |
public:
|
williamr@2
|
226 |
/** Flags that specify to process on any messages embedded in this message. */
|
williamr@2
|
227 |
enum TImEmailEntryType
|
williamr@2
|
228 |
{
|
williamr@2
|
229 |
/** Do not process embedded messages. */
|
williamr@2
|
230 |
EThisMessageOnly,
|
williamr@2
|
231 |
/** Process embedded messages. */
|
williamr@2
|
232 |
EThisMessageAndEmbeddedMessages // i.e messages with in a message
|
williamr@2
|
233 |
};
|
williamr@2
|
234 |
/** Flags to specify types of attachment. */
|
williamr@2
|
235 |
enum TImAttachmentType
|
williamr@2
|
236 |
{
|
williamr@2
|
237 |
/** All attachments. */
|
williamr@2
|
238 |
EAllAttachments=0, // all attachment files contained within this message (but not inside messages within this message)
|
williamr@2
|
239 |
/** VCards. */
|
williamr@2
|
240 |
EVCards,
|
williamr@2
|
241 |
/** VCalendars. */
|
williamr@2
|
242 |
EVCalendars,
|
williamr@2
|
243 |
/** VCards, VCalendars and ICalendars. */
|
williamr@2
|
244 |
EVEntries, // ie VCards, VCalendars or ICalendars (or all three)
|
williamr@2
|
245 |
/** Encrypted. */
|
williamr@2
|
246 |
EEncrypted,
|
williamr@2
|
247 |
/** Signed. */
|
williamr@2
|
248 |
ESigned,
|
williamr@2
|
249 |
/** Secure. */
|
williamr@2
|
250 |
ESecure, // ie Encrypted or signed (or both)
|
williamr@2
|
251 |
/** ICalendars. */
|
williamr@2
|
252 |
EICalendars
|
williamr@2
|
253 |
//.. add new items here
|
williamr@2
|
254 |
};
|
williamr@2
|
255 |
public:
|
williamr@2
|
256 |
IMPORT_C static CImEmailMessage* NewL(CMsvEntry& aEntry);
|
williamr@2
|
257 |
IMPORT_C static CImEmailMessage* NewLC(CMsvEntry& aEntry);
|
williamr@2
|
258 |
IMPORT_C ~CImEmailMessage();
|
williamr@2
|
259 |
|
williamr@2
|
260 |
IMPORT_C void GetAttachmentsListL(TRequestStatus& aStatus, TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType);
|
williamr@2
|
261 |
IMPORT_C void GetAttachmentsListL(TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType);
|
williamr@2
|
262 |
void DoGetAttachmentsListL(TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType);
|
williamr@2
|
263 |
|
williamr@2
|
264 |
IMPORT_C void FindFirstHTMLPageL(TMsvId aMessageId, TRequestStatus& aStatus);
|
williamr@2
|
265 |
|
williamr@2
|
266 |
IMPORT_C const CMsvEntrySelection& Selection() const; // return selection
|
williamr@2
|
267 |
IMPORT_C const TDesC8& ProgressL() const;
|
williamr@2
|
268 |
|
williamr@2
|
269 |
IMPORT_C void GetBodyTextL(TRequestStatus& aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer,CCharFormatLayer& aCharLayer);
|
williamr@2
|
270 |
IMPORT_C void GetBodyTextL(TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer,CCharFormatLayer& aCharLayer);
|
williamr@2
|
271 |
void DoGetBodyTextInitL(TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer);
|
williamr@2
|
272 |
|
williamr@2
|
273 |
IMPORT_C void GetBodyTextEntryIdL(TRequestStatus& aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType);
|
williamr@2
|
274 |
IMPORT_C void GetBodyTextEntryIdL(TMsvId aMessageId, TImEmailEntryType aEntryType);
|
williamr@2
|
275 |
|
williamr@2
|
276 |
IMPORT_C CImPlainBodyText* OpenPlainBodyTextForWriteL();
|
williamr@2
|
277 |
|
williamr@2
|
278 |
IMPORT_C CImPlainBodyText* OpenPlainBodyTextForReadL(TImEmailEntryType aEntryType, TInt aChunkLength);
|
williamr@2
|
279 |
|
williamr@2
|
280 |
IMPORT_C virtual void FindUniversalResourceIdentifierL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus);
|
williamr@2
|
281 |
IMPORT_C virtual HBufC* GetUniversalResourceIdentifierL(TMsvId& aLinkedEntryId, TBool& aFileFound) const;
|
williamr@2
|
282 |
IMPORT_C void FindUniversalResourceIdentifierFileHandleL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus);
|
williamr@2
|
283 |
IMPORT_C void FindFirstHTMLPageFileHandleL(TMsvId aMessageId, TRequestStatus& aStatus);
|
williamr@2
|
284 |
IMPORT_C virtual TInt GetUniversalResourceIdentifierFileHandle(TMsvId& aLinkedEntryId, RFile& aFile) const;
|
williamr@2
|
285 |
IMPORT_C MMsvAttachmentManager& AttachmentManager() const;
|
williamr@2
|
286 |
void AddAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus);
|
williamr@2
|
287 |
void AddAttachmentL(RFile& aFileHandle, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus);
|
williamr@2
|
288 |
void AddLinkedAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus);
|
williamr@2
|
289 |
void AddEntryAsAttachmentL(TMsvId aAttachmentEntryId, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus);
|
williamr@2
|
290 |
const RPointerArray<CMsvAttachment>& AttachmentInfoSelection() const;
|
williamr@2
|
291 |
void RemoveAttachmentL(TMsvAttachmentId aAttachmentId,TRequestStatus& aStatus) ;
|
williamr@2
|
292 |
void RemoveAttachedMessageL(TMsvAttachmentId aAttachmentId,TRequestStatus& aStatus) ;
|
williamr@2
|
293 |
void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus);
|
williamr@2
|
294 |
void CheckEntryAndResetStoreMessageL(TMsvId aMessageId);
|
williamr@2
|
295 |
void CheckEntryAndResetRemoveMessageL(TMsvId aMessageId);
|
williamr@2
|
296 |
void DoSetActive(TRequestStatus& aStatus);
|
williamr@2
|
297 |
CImMimeHeader* ConvertToImMimeHeadersL(CMsvMimeHeaders* aMimeHeaders);
|
williamr@2
|
298 |
CMsvMimeHeaders* ConvertToMsvMimeHeadersL(CImMimeHeader* aMimeHeader);
|
williamr@2
|
299 |
void AppendEntryAttachmentInfoL();
|
williamr@2
|
300 |
IMPORT_C void AddRelatedPartL(TMsvId aMessageId, const TDesC& aAttachmentFullName, TRequestStatus& aStatus, TMsvId aRelatedPartId, const TDesC8& aContentId);
|
williamr@2
|
301 |
IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText& aRichText, TRequestStatus& aStatus);
|
williamr@2
|
302 |
IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText& aRichText, TRequestStatus& aStatus, TBool aUsePlainTextStorage);
|
williamr@2
|
303 |
IMPORT_C void GetMessageDigestEntriesL(TRequestStatus& aStatus, TMsvId aMessageId);
|
williamr@2
|
304 |
IMPORT_C void GetCharacterSetL(TMsvId aMessageId, TUint& aCharacterSetId, TBool& aOverride);
|
williamr@2
|
305 |
IMPORT_C void SetCharacterSetL(TMsvId aMessageId, TUint aCharacterSetId);
|
williamr@2
|
306 |
IMPORT_C void StoreBodyTextWithMimeHeaderL(TMsvId aMessageId, CRichText& aRichText, const CImMimeHeader& aMimeHeader, TRequestStatus& aStatus);
|
williamr@2
|
307 |
|
williamr@2
|
308 |
TMsvId EmailEntryId();
|
williamr@2
|
309 |
|
williamr@2
|
310 |
private:
|
williamr@2
|
311 |
void DoRunL();
|
williamr@2
|
312 |
void DoCancel();
|
williamr@2
|
313 |
CImEmailMessage(CMsvEntry& aEntry);
|
williamr@2
|
314 |
void ConstructL();
|
williamr@2
|
315 |
void DoComplete(TInt&);
|
williamr@2
|
316 |
void DoStateL();
|
williamr@2
|
317 |
|
williamr@2
|
318 |
void Start(TRequestStatus& aStatus);
|
williamr@2
|
319 |
void StartL();
|
williamr@2
|
320 |
|
williamr@2
|
321 |
void Reset();
|
williamr@2
|
322 |
void ChangeMessageContextL();
|
williamr@2
|
323 |
void CompareChildrenAndPopulateSelL();
|
williamr@2
|
324 |
void AttachmentInfoL();
|
williamr@2
|
325 |
void AssembleBodyTextL();
|
williamr@2
|
326 |
void CheckAndInitialiseL(TMsvId aMessageId);
|
williamr@2
|
327 |
|
williamr@2
|
328 |
void AppendAttachmentL();
|
williamr@2
|
329 |
TBool MessageDigestEntry();
|
williamr@2
|
330 |
TBool HandleDifferentFolderTypesL();
|
williamr@2
|
331 |
void GetTextForAlternateFolderL();
|
williamr@2
|
332 |
void GetTextForRelatedFolderL();
|
williamr@2
|
333 |
void GetAttachmentsForRelatedFolderL();
|
williamr@2
|
334 |
TBool GetBodyTextCharacterSetL();
|
williamr@2
|
335 |
TUint GetOverrideCharacterSetL();
|
williamr@2
|
336 |
TInt FindFilename(const CImMimeHeader& aMimeInfo, TPtrC8& aFilename);
|
williamr@2
|
337 |
void FindFilenameDecodeL(
|
williamr@2
|
338 |
const CImMimeHeader& aMimeInfo, TFileName& aFileName, TUint aCharset);
|
williamr@2
|
339 |
void AppendAttachmentNameL();
|
williamr@2
|
340 |
void SetBodyTextCharacterSetL(TMsvId aEntryId, TUint8 aNewCharacterSetId);
|
williamr@2
|
341 |
void FindFirstBodyTextPartL(TMsvId aEntryId, TBool& found);
|
williamr@2
|
342 |
|
williamr@2
|
343 |
CImMimeHeader* FindAttachmentMimeHeaderL();
|
williamr@2
|
344 |
TMsvEntry FindIdEntryL(TMsvId aMessageId);
|
williamr@2
|
345 |
|
williamr@2
|
346 |
void DoGetBodyTextEntryIdL(TMsvId aMessageId, TImEmailEntryType aEntryType);
|
williamr@2
|
347 |
|
williamr@2
|
348 |
|
williamr@2
|
349 |
enum TImEmailMessageStates
|
williamr@2
|
350 |
{
|
williamr@2
|
351 |
EIdle=0,
|
williamr@2
|
352 |
ETextForThisMsg,
|
williamr@2
|
353 |
ETextForMsgDigest,
|
williamr@2
|
354 |
ETextEntryIdForThisMsg,
|
williamr@2
|
355 |
ETextEntryIdMsgDigest,
|
williamr@2
|
356 |
ETextForThisMsgGetCharacterSet,
|
williamr@2
|
357 |
EAttachmentsForThisMsg,
|
williamr@2
|
358 |
EAttachmentsForMsgDigest,
|
williamr@2
|
359 |
EMsgDigestEntries,
|
williamr@2
|
360 |
EResolveURI,
|
williamr@2
|
361 |
EStoreMessagePart,
|
williamr@2
|
362 |
ERemoveMessagePart,
|
williamr@2
|
363 |
EFinished
|
williamr@2
|
364 |
};
|
williamr@2
|
365 |
CMsvEntry& iClientEntry;
|
williamr@2
|
366 |
CMsvEntrySelection* iCompleteSel;
|
williamr@2
|
367 |
CMsvEntrySelection* iResultSel;
|
williamr@2
|
368 |
|
williamr@2
|
369 |
CRichText* iRichText;
|
williamr@2
|
370 |
CParaFormatLayer* iParaLayer;
|
williamr@2
|
371 |
CCharFormatLayer* iCharLayer;
|
williamr@2
|
372 |
TMsvId iParentMsgId; // the Id passed into Getxxx() function representing the 'parent' message ID
|
williamr@2
|
373 |
TImEmailMessageStates iState;
|
williamr@2
|
374 |
TImAttachmentType iAttachmentType;
|
williamr@2
|
375 |
TMsvEmailEntry iEntry;
|
williamr@2
|
376 |
CImMhtmlUriResolver* iUriResolver;
|
williamr@2
|
377 |
TBool iUriFileFound;
|
williamr@2
|
378 |
CImStoreMessagePart* iStoreMessagePart;
|
williamr@2
|
379 |
CImRemoveMessagePart* iRemoveMessagePart;
|
williamr@2
|
380 |
TPckgBuf<TMsvId> iProgress;
|
williamr@2
|
381 |
TImEmailEntryType iEntryType;
|
williamr@2
|
382 |
TBool iIsAMHTMLmessage;
|
williamr@2
|
383 |
TUint iCharacterSetId;
|
williamr@2
|
384 |
RFs iFs;
|
williamr@2
|
385 |
CDesCArray* iAttachmentNameList;
|
williamr@2
|
386 |
CImAttachmentManager* iAttachmentManager;
|
williamr@2
|
387 |
CMsvStore* iStore;
|
williamr@2
|
388 |
|
williamr@2
|
389 |
// This is the entry Id using which the CImEmailMessage was created.
|
williamr@2
|
390 |
// store this , so that when the message id to which attachment is
|
williamr@2
|
391 |
// retrieved then the CIMEmailMessage is reset with this Id.
|
williamr@2
|
392 |
TMsvId iEmailEntryId;
|
williamr@2
|
393 |
enum TImAttachmentStates
|
williamr@2
|
394 |
{
|
williamr@2
|
395 |
ENoAttachment=0,
|
williamr@2
|
396 |
EAddAttachment,
|
williamr@2
|
397 |
EDeleteAttachment,
|
williamr@2
|
398 |
ECreateAttachment
|
williamr@2
|
399 |
};
|
williamr@2
|
400 |
TInt iAttachmentState;
|
williamr@2
|
401 |
|
williamr@2
|
402 |
};
|
williamr@2
|
403 |
|
williamr@2
|
404 |
class CImRemoveMessagePart : public CMsvOperation
|
williamr@2
|
405 |
/**
|
williamr@2
|
406 |
@internalComponent
|
williamr@2
|
407 |
@released
|
williamr@2
|
408 |
*/
|
williamr@2
|
409 |
{
|
williamr@2
|
410 |
public:
|
williamr@2
|
411 |
static CImRemoveMessagePart* DeleteAttachmentL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachmentId);
|
williamr@2
|
412 |
static CImRemoveMessagePart* DeleteAttachedMessageL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachedMessageId);
|
williamr@2
|
413 |
~CImRemoveMessagePart();
|
williamr@2
|
414 |
const TDesC8& FinalProgress();
|
williamr@2
|
415 |
void DoCancel();
|
williamr@2
|
416 |
void RunL();
|
williamr@2
|
417 |
const TDesC8& ProgressL(); // returns NULL until operation completed - then returns MessageId
|
williamr@2
|
418 |
TMsvId RemovedAttachmentId();
|
williamr@2
|
419 |
private:
|
williamr@2
|
420 |
CImRemoveMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId);
|
williamr@2
|
421 |
void ConstructL(TMsvId aAttachmentId);
|
williamr@2
|
422 |
void ErrorRecovery(TInt aError);
|
williamr@2
|
423 |
void SelectNextStateL(); // selects next state to go to
|
williamr@2
|
424 |
void ChangeStateL(); // initiates the next state operation
|
williamr@2
|
425 |
void SelectAndChangeToNextStateL();
|
williamr@2
|
426 |
void RequestComplete(TInt aError);
|
williamr@2
|
427 |
void Recover(); // leave message in a 'good' state
|
williamr@2
|
428 |
|
williamr@2
|
429 |
void CheckAttachmentParentTypeL();
|
williamr@2
|
430 |
void MoveOtherEntryToParentOfFolderL();
|
williamr@2
|
431 |
void DeleteAttachmentEntryL();
|
williamr@2
|
432 |
void DeleteFolderEntryL();
|
williamr@2
|
433 |
void CompleteRemoveMessagePartL();
|
williamr@2
|
434 |
private:
|
williamr@2
|
435 |
enum TImRemoveMessagePartState
|
williamr@2
|
436 |
{
|
williamr@2
|
437 |
ECheckAttachmentParentType,
|
williamr@2
|
438 |
EMoveOtherEntryToParentOfFolder,
|
williamr@2
|
439 |
EDeleteAttachmentEntry,
|
williamr@2
|
440 |
EDeleteFolderEntry,
|
williamr@2
|
441 |
ECompleteRemoveMessagePart,
|
williamr@2
|
442 |
EFinished
|
williamr@2
|
443 |
};
|
williamr@2
|
444 |
CMsvEntry& iMsvEntry;
|
williamr@2
|
445 |
CMsvOperation* iMsvOperation;
|
williamr@2
|
446 |
|
williamr@2
|
447 |
CMsvEntrySelection* iMessageEntrySelection;
|
williamr@2
|
448 |
CImEmailMessage* iEmailMessage;
|
williamr@2
|
449 |
|
williamr@2
|
450 |
TInt iState;
|
williamr@2
|
451 |
TPckgBuf<TMsvId> iDataMember;
|
williamr@2
|
452 |
TMsvId iMessageId;
|
williamr@2
|
453 |
TMsvId iFolderToDeleteId;
|
williamr@2
|
454 |
TInt iAttachmentSize;
|
williamr@2
|
455 |
TMsvId iAttachmentId;
|
williamr@2
|
456 |
TMsvId iEntryToMoveId;
|
williamr@2
|
457 |
};
|
williamr@2
|
458 |
|
williamr@2
|
459 |
class CImStoreMessagePart : public CMsvOperation
|
williamr@2
|
460 |
/**
|
williamr@2
|
461 |
@internalComponent
|
williamr@2
|
462 |
@released
|
williamr@2
|
463 |
*/
|
williamr@2
|
464 |
{
|
williamr@2
|
465 |
public:
|
williamr@2
|
466 |
static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId, const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus );
|
williamr@2
|
467 |
static CImStoreMessagePart* AddEntryAsAttachmentL(TMsvId aMessageId,TMsvId aAttachmentMessageId, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus);
|
williamr@2
|
468 |
static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId,RFile& aFile, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus);
|
williamr@2
|
469 |
static CImStoreMessagePart* AddLinkedAttachmentL(TMsvId aMessageId,const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus );
|
williamr@2
|
470 |
static CImStoreMessagePart* CreateAttachmentL(TMsvId aMessageId,const TDesC& aFileName, RFile& aAttachmentFile,CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus);
|
williamr@2
|
471 |
static CImStoreMessagePart* AddRelatedPartL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId);
|
williamr@2
|
472 |
static CImStoreMessagePart* StoreBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, TBool aUsePlainTextStorage = EFalse);
|
williamr@2
|
473 |
static CImStoreMessagePart* StoreBodyTextWithMimeHeaderL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, const CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = EFalse);
|
williamr@2
|
474 |
static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = ETrue);
|
williamr@2
|
475 |
static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = ETrue);
|
williamr@2
|
476 |
~CImStoreMessagePart();
|
williamr@2
|
477 |
const TDesC8& FinalProgress();
|
williamr@2
|
478 |
void DoCancel();
|
williamr@2
|
479 |
void RunL();
|
williamr@2
|
480 |
const TDesC8& ProgressL();
|
williamr@2
|
481 |
private:
|
williamr@2
|
482 |
enum TImMessagePart
|
williamr@2
|
483 |
{
|
williamr@2
|
484 |
EMessagePartAttachment,
|
williamr@2
|
485 |
EMessagePartBody,
|
williamr@2
|
486 |
EMessagePartMessageAttachment
|
williamr@2
|
487 |
};
|
williamr@2
|
488 |
void ConstructL(RFile& aFile);
|
williamr@2
|
489 |
void ConstructL(RFile& aFile,const TDesC& aAttachmentName);
|
williamr@2
|
490 |
void ConstructL(const TDesC& aAttachmentFullName, const TDesC8& aContentId);
|
williamr@2
|
491 |
void ConstructAttachmentInfo(CMsvAttachment* aAttachmentInfo,TInt aAttachmentCreationState);
|
williamr@2
|
492 |
CImStoreMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = EFalse);
|
williamr@2
|
493 |
|
williamr@2
|
494 |
void ConstructL();
|
williamr@2
|
495 |
void ConstructL(const TDesC& aAttachmentFullName);
|
williamr@2
|
496 |
void ConstructL(TMsvId aAttachmentMessageId);
|
williamr@2
|
497 |
void ConstructL(const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId);
|
williamr@2
|
498 |
void ConstructL(CRichText& aRichText);
|
williamr@2
|
499 |
void ConstructL(CRichText& aRichText, const CImMimeHeader& aMimeHeader);
|
williamr@2
|
500 |
void ConstructL(CImMimeHeader& aMimeHeader);
|
williamr@2
|
501 |
void ConstructL(TImMessagePart aMessagePart);
|
williamr@2
|
502 |
void ErrorRecovery(TInt error);
|
williamr@2
|
503 |
void SelectNextStateL(); // selects next state to go to
|
williamr@2
|
504 |
void ChangeStateL(); // initiates the next state operation
|
williamr@2
|
505 |
void SelectAndChangeToNextStateL();
|
williamr@2
|
506 |
void RequestComplete(TInt aError);
|
williamr@2
|
507 |
void Recover();
|
williamr@2
|
508 |
|
williamr@2
|
509 |
TBool HTMLMessage() const;
|
williamr@2
|
510 |
void SetHTMLMessage(TBool aFlag);
|
williamr@2
|
511 |
TBool MultipartMixedExists() const;
|
williamr@2
|
512 |
void SetMultipartMixedExists(TBool aFlag);
|
williamr@2
|
513 |
TBool MultipartMixedCreated() const;
|
williamr@2
|
514 |
void SetMultipartMixedCreated(TBool aFlag);
|
williamr@2
|
515 |
TBool MultipartAlternativeExists() const;
|
williamr@2
|
516 |
void SetMultipartAlternativeExists(TBool aFlag);
|
williamr@2
|
517 |
TBool MultipartAlternativeCreated() const;
|
williamr@2
|
518 |
void SetMultipartAlternativeCreated(TBool aFlag);
|
williamr@2
|
519 |
TBool MultipartRelatedExists() const;
|
williamr@2
|
520 |
void SetMultipartRelatedExists(TBool aFlag);
|
williamr@2
|
521 |
TBool MultipartRelatedCreated() const;
|
williamr@2
|
522 |
void SetMultipartRelatedCreated(TBool aFlag);
|
williamr@2
|
523 |
TBool TextPartExists() const;
|
williamr@2
|
524 |
void SetTextPartExists(TBool aFlag);
|
williamr@2
|
525 |
TBool TextPartCreated() const;
|
williamr@2
|
526 |
void SetTextPartCreated(TBool aFlag);
|
williamr@2
|
527 |
TBool AttachmentEntryCreated() const;
|
williamr@2
|
528 |
void SetAttachmentEntryCreated(TBool aFlag);
|
williamr@2
|
529 |
|
williamr@2
|
530 |
void FindMultipartRelatedFolderL();
|
williamr@2
|
531 |
void CheckForSubfolderL();
|
williamr@2
|
532 |
void CreateAttachmentEntryL();
|
williamr@2
|
533 |
void CopyOrigMessageToMessageL();
|
williamr@2
|
534 |
void CreateMultipartMixedFolderEntryL();
|
williamr@2
|
535 |
void CreateMultipartAlternativeFolderEntryL();
|
williamr@2
|
536 |
void CreateMultipartRelatedFolderEntryL();
|
williamr@2
|
537 |
void MoveOriginalMessageEntryChildrenToNewFolderL();
|
williamr@2
|
538 |
void CreateTextEntryL();
|
williamr@2
|
539 |
void StoreRichTextL();
|
williamr@2
|
540 |
void CompleteStoreMessagePartL();
|
williamr@2
|
541 |
void CreateHTMLEntryL();
|
williamr@2
|
542 |
void PrepareToStoreHTMLEntryTextL();
|
williamr@2
|
543 |
void StoreHTMLEntryTextL();
|
williamr@2
|
544 |
void RemoveHTMLEntryL();
|
williamr@2
|
545 |
void MoveTextEntryToAltFolderL();
|
williamr@2
|
546 |
TPtrC GetDefaultAttachmentName();
|
williamr@2
|
547 |
void OpenAndReadResourceFileL();
|
williamr@2
|
548 |
void StoreMimeHeaderL();
|
williamr@2
|
549 |
TBool CreateAttachmentMimeHeaderL(CImMimeHeader& aMimeHeader, const TDesC& aDetails);
|
williamr@2
|
550 |
void CreateFolderMimeHeaderL(CImMimeHeader& aMimeHeader);
|
williamr@2
|
551 |
void CreateMessageMimeHeaderL(CImMimeHeader& aMimeHeader);
|
williamr@2
|
552 |
void AddAttachmentL();
|
williamr@2
|
553 |
void AddAttachmentUsingFileHandleL();
|
williamr@2
|
554 |
void AddLinkedAttachmentL();
|
williamr@2
|
555 |
void AddEntryAsAttachmentL();
|
williamr@2
|
556 |
void CreateAttachmentL();
|
williamr@2
|
557 |
void DoAttachmentStoreL();
|
williamr@2
|
558 |
TInt CheckMimeInAttachmentInfoL(CMsvMimeHeaders& aMsvMimeHeaders);
|
williamr@2
|
559 |
CImMimeHeader* ProcessAttachmentMimeHeadersL();
|
williamr@2
|
560 |
void SetEntryDetailsL(TMsvEntry& aEntry);
|
williamr@2
|
561 |
void StorePlainTextL();
|
williamr@2
|
562 |
private:
|
williamr@2
|
563 |
enum TImStoreMessagePartState
|
williamr@2
|
564 |
{
|
williamr@2
|
565 |
EFindMultipartRelatedFolder,
|
williamr@2
|
566 |
ECheckForSubfolder,
|
williamr@2
|
567 |
ECreateAttachmentEntry,
|
williamr@2
|
568 |
EStoreAttachment,
|
williamr@2
|
569 |
ECopyOrigMessageToMessage,
|
williamr@2
|
570 |
ECreateMultipartMixedFolderEntry,
|
williamr@2
|
571 |
ECreateMultipartRelatedFolderEntry,
|
williamr@2
|
572 |
ECreateMultipartAlternativeFolderEntry,
|
williamr@2
|
573 |
EMoveOriginalMessageEntryChildrenToNewFolder,
|
williamr@2
|
574 |
ECreateTextEntry,
|
williamr@2
|
575 |
EStoreRichText,
|
williamr@2
|
576 |
ERemoveHTMLEntry,
|
williamr@2
|
577 |
EMoveTextToAlternativeFolder,
|
williamr@2
|
578 |
ECreateHTMLEntry,
|
williamr@2
|
579 |
EPrepareToStoreHTMLEntryText,
|
williamr@2
|
580 |
EStoreHTMLEntryText,
|
williamr@2
|
581 |
ECompleteStoreMessage,
|
williamr@2
|
582 |
EFinished
|
williamr@2
|
583 |
,EStoreHTMLTextInEntry,
|
williamr@2
|
584 |
EAddEntryAttachment
|
williamr@2
|
585 |
};
|
williamr@2
|
586 |
|
williamr@2
|
587 |
enum TImStoreMessagePartFlags
|
williamr@2
|
588 |
{
|
williamr@2
|
589 |
KStoreMessagePartClearFlag = 0x00000000,
|
williamr@2
|
590 |
KStoreMessagePartHTMLMessage = 0x00000001,
|
williamr@2
|
591 |
KStoreMessagePartMultipartMixedExists = 0x00000002,
|
williamr@2
|
592 |
KStoreMessagePartMultipartMixedCreated = 0x00000004,
|
williamr@2
|
593 |
KStoreMessagePartMultipartAlternativeExists = 0x00000008,
|
williamr@2
|
594 |
KStoreMessagePartMultipartAlternativeCreated = 0x00000010,
|
williamr@2
|
595 |
KStoreMessagePartTextPartExists = 0x00000020,
|
williamr@2
|
596 |
KStoreMessagePartTextPartCreated = 0x00000040,
|
williamr@2
|
597 |
KStoreMessagePartAttachmentEntryCreated = 0x00000080,
|
williamr@2
|
598 |
KStoreMessagePartOrigMessageEntryChildrenCopied = 0x00000100,
|
williamr@2
|
599 |
KStoreMessagePartOrigMessageEntryChildrenDeleted = 0x00000200,
|
williamr@2
|
600 |
KStoreMessagePartMultipartRelatedExists = 0x00000400,
|
williamr@2
|
601 |
KStoreMessagePartMultipartRelatedCreated = 0x00000800
|
williamr@2
|
602 |
};
|
williamr@2
|
603 |
CMsvEntry& iMsvEntry;
|
williamr@2
|
604 |
CMsvOperation* iMsvOperation;
|
williamr@2
|
605 |
|
williamr@2
|
606 |
CRichText* iRichTextToStore; // I don't own this object!
|
williamr@2
|
607 |
CImMimeHeader* iMimeHeaderOfBodyText;
|
williamr@2
|
608 |
CRichText* iRichText;
|
williamr@2
|
609 |
CFileMan* iFileMan;
|
williamr@2
|
610 |
CMsvEntrySelection* iMessageEntrySelection;
|
williamr@2
|
611 |
|
williamr@2
|
612 |
TInt iState;
|
williamr@2
|
613 |
TPckgBuf<TMsvId> iDataMember;
|
williamr@2
|
614 |
TMsvId iMessageId;
|
williamr@2
|
615 |
TImMessagePart iMessagePart;
|
williamr@2
|
616 |
TMsvId iMixFolderId;
|
williamr@2
|
617 |
TMsvId iAltFolderId;
|
williamr@2
|
618 |
TMsvId iRelFolderId;
|
williamr@2
|
619 |
HBufC* iAttachmentFullName;
|
williamr@2
|
620 |
TInt iAttachmentSize;
|
williamr@2
|
621 |
TMsvId iAttachmentId;
|
williamr@2
|
622 |
TMsvId iTextId;
|
williamr@2
|
623 |
TMsvId iHtmlId;
|
williamr@2
|
624 |
TMsvId iRelatedPartId;
|
williamr@2
|
625 |
TMsvId iAttachmentMessageId;
|
williamr@2
|
626 |
TUint32 iFlags;
|
williamr@2
|
627 |
HBufC8* iContentId;
|
williamr@2
|
628 |
CImEmailMessage* iEmailMessage;
|
williamr@2
|
629 |
|
williamr@2
|
630 |
// Used when converting rich text to html
|
williamr@2
|
631 |
CParaFormatLayer* iParaLayer;
|
williamr@2
|
632 |
CCharFormatLayer* iCharLayer;
|
williamr@2
|
633 |
CImHtmlConverter* iHtmlConverter;
|
williamr@2
|
634 |
TBool iFinishedConvertingHTML;
|
williamr@2
|
635 |
CMsvAttachment* iAttachmentInfo;
|
williamr@2
|
636 |
CMsvStore* iStore;
|
williamr@2
|
637 |
TInt iAttachmentCreateState;
|
williamr@2
|
638 |
TBool iIsAddByFileHandle;
|
williamr@2
|
639 |
RFile* iFileHandle;
|
williamr@2
|
640 |
RFile iFile;
|
williamr@2
|
641 |
// Indicates whether to store message body as CRichText or plaintext.
|
williamr@2
|
642 |
TBool iUsePlainTextStorage;
|
williamr@2
|
643 |
// Size of the plain text body.
|
williamr@2
|
644 |
TInt iSizeOfBody;
|
williamr@2
|
645 |
// Size of the Fwd'ed/ReplyTo plaintext body part.
|
williamr@2
|
646 |
TInt iSizeFwdReplyBody;
|
williamr@2
|
647 |
// The error value returned when CRichText is populated with message body text.
|
williamr@2
|
648 |
TInt iRestoreErr;
|
williamr@2
|
649 |
enum TImAttachmentCreation
|
williamr@2
|
650 |
{
|
williamr@2
|
651 |
EAddAttachment,
|
williamr@2
|
652 |
EAddAttachmentUsingFileHandle,
|
williamr@2
|
653 |
EAddLinkedAttachment,
|
williamr@2
|
654 |
EAddEntryAsAttachment,
|
williamr@2
|
655 |
ECreateAttachment
|
williamr@2
|
656 |
};
|
williamr@2
|
657 |
};
|
williamr@2
|
658 |
|
williamr@2
|
659 |
class CImEmailOperation : public CMsvOperation
|
williamr@2
|
660 |
/** Provides simple email messages creation functions, including creation of new
|
williamr@2
|
661 |
messages, replies, forwarded messages, and receipts.
|
williamr@2
|
662 |
|
williamr@2
|
663 |
Both plain-text and HTML messages, with or without attachments, can be created.
|
williamr@2
|
664 |
@publishedAll
|
williamr@2
|
665 |
@released
|
williamr@2
|
666 |
*/
|
williamr@2
|
667 |
{
|
williamr@2
|
668 |
public:
|
williamr@2
|
669 |
IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
670 |
IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard);
|
williamr@2
|
671 |
|
williamr@2
|
672 |
IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority , TBool aUsePlainTextStorage);
|
williamr@2
|
673 |
|
williamr@2
|
674 |
IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
675 |
IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
676 |
IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority);
|
williamr@2
|
677 |
IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage);
|
williamr@2
|
678 |
IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
679 |
IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
680 |
IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard);
|
williamr@2
|
681 |
IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage);
|
williamr@2
|
682 |
IMPORT_C static CImEmailOperation* CreateForwardAsAttachmentL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
683 |
IMPORT_C static CImEmailOperation* CreateForwardAsAttachmentL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aSmtpServiceId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard);
|
williamr@2
|
684 |
IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
685 |
IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
686 |
IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority);
|
williamr@2
|
687 |
IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage);
|
williamr@2
|
688 |
IMPORT_C ~CImEmailOperation();
|
williamr@2
|
689 |
IMPORT_C const TDesC8& FinalProgress();
|
williamr@2
|
690 |
void DoCancel();
|
williamr@2
|
691 |
void RunL();
|
williamr@2
|
692 |
const TDesC8& ProgressL();
|
williamr@2
|
693 |
|
williamr@2
|
694 |
static CImEmailOperation* CreateCopyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType);
|
williamr@2
|
695 |
|
williamr@2
|
696 |
private:
|
williamr@2
|
697 |
enum TImEmailOperation
|
williamr@2
|
698 |
{
|
williamr@2
|
699 |
ENew = 0,
|
williamr@2
|
700 |
EReply = 1,
|
williamr@2
|
701 |
EForward = 2,
|
williamr@2
|
702 |
EReceipt = 3,
|
williamr@2
|
703 |
EDeletingBadEmail = 4,
|
williamr@2
|
704 |
ECopy = 5,
|
williamr@2
|
705 |
EAttachOriginal = 0x80,
|
williamr@2
|
706 |
EForwardAsAttachment = EForward | EAttachOriginal,
|
williamr@2
|
707 |
EReplyAsAttachment = EReply | EAttachOriginal
|
williamr@2
|
708 |
};
|
williamr@2
|
709 |
|
williamr@2
|
710 |
private:
|
williamr@2
|
711 |
CImEmailOperation(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage);
|
williamr@2
|
712 |
void ConstructL(TMsvId aMessageId, const TDesC& aFormatString, TImEmailOperation aOperation);
|
williamr@2
|
713 |
void ConstructL(TMsvId aMessageId, TImEmailOperation aOperation);
|
williamr@2
|
714 |
void ConstructL(TImEmailOperation aOperation);
|
williamr@2
|
715 |
void OpenAndReadResourceFileL();
|
williamr@2
|
716 |
void SetSmtpServiceFromDefaultsL();
|
williamr@2
|
717 |
void SetSmtpServiceFromOriginalMessageL();
|
williamr@2
|
718 |
void ErrorRecovery(TInt error);
|
williamr@2
|
719 |
void SelectNextStateL();
|
williamr@2
|
720 |
void ProcessStateL();
|
williamr@2
|
721 |
void SelectAndProcessNextStateL();
|
williamr@2
|
722 |
void RequestComplete(TInt aError);
|
williamr@2
|
723 |
void CreateNewHeaderL();
|
williamr@2
|
724 |
void GetBodyTextL();
|
williamr@2
|
725 |
TInt RemoveIncompleteAttachments();
|
williamr@2
|
726 |
void CreateEntryDetails(TMsvEmailEntry& aMsvEmailEntry);
|
williamr@2
|
727 |
void CreateNewMessageL(TMsvId aDestinationId);
|
williamr@2
|
728 |
void CreateMultipartMixedFolderEntryL();
|
williamr@2
|
729 |
void CreateTextEntryL(TMsvId aFolderId);
|
williamr@2
|
730 |
void StoreBodyL();
|
williamr@2
|
731 |
void StorePlainBodyL();
|
williamr@2
|
732 |
void CheckForSignatureOrVCardL();
|
williamr@2
|
733 |
void CreateAttachmentEntryL();
|
williamr@2
|
734 |
void StoreAttachmentL();
|
williamr@2
|
735 |
void CreateMultipartAlternativeFolderEntryL();
|
williamr@2
|
736 |
void AppendHtmlAttachmentL();
|
williamr@2
|
737 |
void AttachOriginalMessageToNewMessageL();
|
williamr@2
|
738 |
void CompleteEmailOperationL();
|
williamr@2
|
739 |
void CreateHTMLEntryL();
|
williamr@2
|
740 |
void PrepareToStoreHTMLEntryTextL();
|
williamr@2
|
741 |
void StoreHTMLEntryTextL();
|
williamr@2
|
742 |
void CreateVCardAttachmentL();
|
williamr@2
|
743 |
void AddVCardAttachmentL();
|
williamr@2
|
744 |
void AddMessageAsAttachmentL();
|
williamr@2
|
745 |
TPtrC GetDefaultAttachmentName();
|
williamr@2
|
746 |
void RestoreSmtpSettingsL();
|
williamr@2
|
747 |
TMsvId ServiceId();
|
williamr@2
|
748 |
TBool NeedMultipartMixedFolder() const;
|
williamr@2
|
749 |
void ReadDefaultHtmlAttachmentNameL(TDes& aFileName);
|
williamr@2
|
750 |
void CreateDefaultAttachmentL();
|
williamr@2
|
751 |
void AddMessageAttachmentInfoL(TMsvId aAttachmentMessageId);
|
williamr@2
|
752 |
void ResetStoreL();
|
williamr@2
|
753 |
void CreateAddressListStringL(HBufC*& aListBuffer, const CDesCArray& aAddressArray);
|
williamr@2
|
754 |
void RestoreOriginalHeaderL();
|
williamr@2
|
755 |
void SetBodyHeaderFormatL();
|
williamr@2
|
756 |
static void ClosePlainBodyTextArray(TAny* aPtr);
|
williamr@2
|
757 |
void StorePlainTextL();
|
williamr@2
|
758 |
TInt GetPlainBodyTextSizeL();
|
williamr@2
|
759 |
|
williamr@2
|
760 |
private:
|
williamr@2
|
761 |
enum TImEmailOperationState
|
williamr@2
|
762 |
{
|
williamr@2
|
763 |
ECreateNewHeader,
|
williamr@2
|
764 |
EGetBodyText,
|
williamr@2
|
765 |
EGetAttachmentList,
|
williamr@2
|
766 |
EGetMessageDigest,
|
williamr@2
|
767 |
ECreateNewMessageEntry,
|
williamr@2
|
768 |
ECheckMultipartMixedFolderRequired,
|
williamr@2
|
769 |
ECreateMultipartMixedFolderEntry,
|
williamr@2
|
770 |
ECheckMultipartAlternativeFolderRequired,
|
williamr@2
|
771 |
ECreateMultipartAlternativeFolderEntry,
|
williamr@2
|
772 |
ECheckTextEntryRequired,
|
williamr@2
|
773 |
ECreateTextEntry,
|
williamr@2
|
774 |
EStoreBody,
|
williamr@2
|
775 |
ECheckVCardRequired,
|
williamr@2
|
776 |
ECreateVCardAttachment,
|
williamr@2
|
777 |
EAddVCardAttachment,
|
williamr@2
|
778 |
ECheckHTMLEntryRequired,
|
williamr@2
|
779 |
ECreateHTMLEntry,
|
williamr@2
|
780 |
EPrepareToStoreHTMLEntryText,
|
williamr@2
|
781 |
EStoreHTMLEntryText,
|
williamr@2
|
782 |
ECheckAttachOriginalMessageRequired,
|
williamr@2
|
783 |
EAttachOriginalMessage,
|
williamr@2
|
784 |
ECheckHTMLPageRequired,
|
williamr@2
|
785 |
EFindHTMLPage,
|
williamr@2
|
786 |
ECopyHTMLPartToAttachment,
|
williamr@2
|
787 |
ECheckAttachmentsRequired,
|
williamr@2
|
788 |
ECreateAttachmentEntry,
|
williamr@2
|
789 |
EStoreAttachment,
|
williamr@2
|
790 |
ECheckEmbeddedMessagesRequired,
|
williamr@2
|
791 |
EAddEmbeddedMessagesAsAttachments,
|
williamr@2
|
792 |
ECompleteEmailOperation,
|
williamr@2
|
793 |
EFinished
|
williamr@2
|
794 |
,ECreateDefaultHtmlAttachment,
|
williamr@2
|
795 |
EStoreHTMLTextInEntry,
|
williamr@2
|
796 |
EAddMessageAttachmentInfo
|
williamr@2
|
797 |
};
|
williamr@2
|
798 |
|
williamr@2
|
799 |
// Flags specifying format of body header information to include
|
williamr@2
|
800 |
// in reply and forwarded email addresses
|
williamr@2
|
801 |
enum TImBodyHeaderFormat
|
williamr@2
|
802 |
{
|
williamr@2
|
803 |
ENoToCcInfo=0,
|
williamr@2
|
804 |
EToOnly,
|
williamr@2
|
805 |
ECcOnly,
|
williamr@2
|
806 |
EToAndCc
|
williamr@2
|
807 |
};
|
williamr@2
|
808 |
|
williamr@2
|
809 |
CMsvEntry* iMsvEntry;
|
williamr@2
|
810 |
CMsvOperation* iMsvOperation;
|
williamr@2
|
811 |
|
williamr@2
|
812 |
CImHeader* iNewHeader;
|
williamr@2
|
813 |
CParaFormatLayer* iParaLayer;
|
williamr@2
|
814 |
CCharFormatLayer* iCharLayer;
|
williamr@2
|
815 |
CRichText* iRichText;
|
williamr@2
|
816 |
CImEmailMessage* iEmailMessage;
|
williamr@2
|
817 |
HBufC* iFormatString;
|
williamr@2
|
818 |
CFileMan* iFileMan;
|
williamr@2
|
819 |
CImSmtpSettings* iSmtpSettings;
|
williamr@2
|
820 |
TInt iState;
|
williamr@2
|
821 |
TImEmailOperation iOperation;
|
williamr@2
|
822 |
TMsvId iDestinationId;
|
williamr@2
|
823 |
TMsvId iMultipartMixedId;
|
williamr@2
|
824 |
TMsvId iMultipartAlternativeId;
|
williamr@2
|
825 |
TMsvId iOrigMessageId;
|
williamr@2
|
826 |
TMsvId iNewMessageId;
|
williamr@2
|
827 |
TMsvId iSmtpServiceId;
|
williamr@2
|
828 |
TMsvId iAttachedMessageId;
|
williamr@2
|
829 |
TUid iMsgType;
|
williamr@2
|
830 |
TMsvPartList iPartList;
|
williamr@2
|
831 |
TMsvEmailTypeList iMsvEmailTypeList;
|
williamr@2
|
832 |
TInt iAttachmentCount;
|
williamr@2
|
833 |
TInt iTotalAttachments;
|
williamr@2
|
834 |
TPckgBuf<TMsvId> iDataMember;
|
williamr@2
|
835 |
HBufC* iBodyHeaderFormatString;
|
williamr@2
|
836 |
HBufC* iBodyHeaderDateTimeFormatString;
|
williamr@2
|
837 |
HBufC* iBodyHeaderToString;
|
williamr@2
|
838 |
HBufC* iBodyHeaderCcString;
|
williamr@2
|
839 |
HBufC* iBodyHeader;
|
williamr@2
|
840 |
HBufC* iUserEmailAddress;
|
williamr@2
|
841 |
TInt iRichTextSize;
|
williamr@2
|
842 |
TInt iVCardAndHtmlSize;
|
williamr@2
|
843 |
TBool iOrigMessageHtml;
|
williamr@2
|
844 |
TBool iHtmlNoTextAlt;
|
williamr@2
|
845 |
TInt iEmbeddedMessagesToProcess;
|
williamr@2
|
846 |
TImMessageField iMessageField;
|
williamr@2
|
847 |
|
williamr@2
|
848 |
// for MIME messages:
|
williamr@2
|
849 |
TBool iCreateHtmlMessage;
|
williamr@2
|
850 |
TBool iMultipartMixedFolderCreated;
|
williamr@2
|
851 |
TBool iMultipartAlternativeFolderCreated;
|
williamr@2
|
852 |
TMsvId iTextId;
|
williamr@2
|
853 |
TMsvId iHtmlId;
|
williamr@2
|
854 |
TMsvId iVcardId;
|
williamr@2
|
855 |
|
williamr@2
|
856 |
// Used when converting rich text to html
|
williamr@2
|
857 |
CImHtmlConverter* iHtmlConverter;
|
williamr@2
|
858 |
TBool iFinishedConvertingHTML;
|
williamr@2
|
859 |
|
williamr@2
|
860 |
// Relating to adding Signature and/or Vcard to an email
|
williamr@2
|
861 |
TBool iNeedToAddVCardAttachment;
|
williamr@2
|
862 |
HBufC* iDefaultVCardNameFormatString;
|
williamr@2
|
863 |
TStreamId iVcardStoreId;
|
williamr@2
|
864 |
CStreamStore* iVcardStore;
|
williamr@2
|
865 |
CRichText* iSignatureText;
|
williamr@2
|
866 |
TFileName iFileName;
|
williamr@2
|
867 |
TImAttachmentFile iAttachmentFile;
|
williamr@2
|
868 |
|
williamr@2
|
869 |
// PCMail
|
williamr@2
|
870 |
TMsvId iPCMailServiceId;
|
williamr@2
|
871 |
RPointerArray<CMsvAttachment> iAttachmentInfoList;
|
williamr@2
|
872 |
// set this anytime during the object life cycle attachment manager was used
|
williamr@2
|
873 |
TBool iAttachmentMgrUsed;
|
williamr@2
|
874 |
CMsvStore* iStore;
|
williamr@2
|
875 |
RFile iFile;
|
williamr@2
|
876 |
|
williamr@2
|
877 |
TImBodyHeaderFormat iBodyHeaderFormat;
|
williamr@2
|
878 |
CImHeader* iOriginalHeader;
|
williamr@2
|
879 |
/** Indicates if the body text entry is plain text */
|
williamr@2
|
880 |
TBool iUsePlainTextStorage;
|
williamr@2
|
881 |
// The error value returned when CRichText is populated with message body text.
|
williamr@2
|
882 |
TInt iRestoreErr;
|
williamr@2
|
883 |
};
|
williamr@2
|
884 |
|
williamr@2
|
885 |
|
williamr@2
|
886 |
class CImHtmlConverter : public CBase
|
williamr@2
|
887 |
/**
|
williamr@2
|
888 |
@internalComponent
|
williamr@2
|
889 |
@released
|
williamr@2
|
890 |
*/
|
williamr@2
|
891 |
{
|
williamr@2
|
892 |
public:
|
williamr@2
|
893 |
static CImHtmlConverter* CImHtmlConverter::NewL(CMsvEntry& aMsvEntry,
|
williamr@2
|
894 |
CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer);
|
williamr@2
|
895 |
~CImHtmlConverter();
|
williamr@2
|
896 |
void PrepareToStoreHTMLEntryTextL(TMsvId& aHtmlId, const TMsvId aTextId);
|
williamr@2
|
897 |
void ResetStoreL();
|
williamr@2
|
898 |
void ResetStoreWithoutCommit();
|
williamr@2
|
899 |
TBool StoreHTMLEntryTextAL(TRequestStatus& aStatus);
|
williamr@2
|
900 |
CMsvOperation* ChangeHTMLTextInEnrtyL(TRequestStatus& aStatus);
|
williamr@2
|
901 |
|
williamr@2
|
902 |
void ReadDefaultAttachmentNameL( RResourceFile& resourceFile);
|
williamr@2
|
903 |
TInt Size() const;
|
williamr@2
|
904 |
|
williamr@2
|
905 |
private:
|
williamr@2
|
906 |
CImHtmlConverter(CMsvEntry& aMsvEntry, CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer);
|
williamr@2
|
907 |
TFileName HtmlFilename(CMsvEntry& aEntry, TPtrC aFileName);
|
williamr@2
|
908 |
TPtrC GetDefaultAttachmentName();
|
williamr@2
|
909 |
void ConstructL();
|
williamr@2
|
910 |
|
williamr@2
|
911 |
private:
|
williamr@2
|
912 |
CMsvEntry& iMsvEntry;
|
williamr@2
|
913 |
CParaFormatLayer& iParaLayer;
|
williamr@2
|
914 |
CCharFormatLayer& iCharLayer;
|
williamr@2
|
915 |
|
williamr@2
|
916 |
CConverterBase* iToHTMLConverter;
|
williamr@2
|
917 |
CCnaConverterList* iConverterList;
|
williamr@2
|
918 |
|
williamr@2
|
919 |
TMsvId iTextId;
|
williamr@2
|
920 |
TMsvId iHtmlId;
|
williamr@2
|
921 |
TInt iSize;
|
williamr@2
|
922 |
HBufC* iDefaultAttachmentName;
|
williamr@2
|
923 |
CRichText* iRichText;
|
williamr@2
|
924 |
RDesReadStream iSourceStream;
|
williamr@2
|
925 |
RFileWriteStream iTargetStream;
|
williamr@2
|
926 |
CMsvStore* iStore;
|
williamr@2
|
927 |
RFile iFile;
|
williamr@2
|
928 |
};
|
williamr@2
|
929 |
|
williamr@2
|
930 |
class CImStoreResolver : public CBase, public MRichTextStoreResolver
|
williamr@2
|
931 |
/**
|
williamr@2
|
932 |
@internalComponent
|
williamr@2
|
933 |
@released
|
williamr@2
|
934 |
*/
|
williamr@2
|
935 |
{
|
williamr@2
|
936 |
public:
|
williamr@2
|
937 |
CImStoreResolver(CStreamStore* aStore);
|
williamr@2
|
938 |
~CImStoreResolver();
|
williamr@2
|
939 |
//
|
williamr@2
|
940 |
private:
|
williamr@2
|
941 |
const CStreamStore& StreamStoreL(TInt aPos)const;
|
williamr@2
|
942 |
//
|
williamr@2
|
943 |
private:
|
williamr@2
|
944 |
CStreamStore* iStore;
|
williamr@2
|
945 |
};
|
williamr@2
|
946 |
|
williamr@2
|
947 |
|
williamr@2
|
948 |
|
williamr@2
|
949 |
|
williamr@2
|
950 |
#endif // __MIUTMSG_H__
|