20 #ifndef __FREESTYLEEMAILUI_HTML_VIEWER_CONTAINER_H__ |
20 #ifndef __FREESTYLEEMAILUI_HTML_VIEWER_CONTAINER_H__ |
21 #define __FREESTYLEEMAILUI_HTML_VIEWER_CONTAINER_H__ |
21 #define __FREESTYLEEMAILUI_HTML_VIEWER_CONTAINER_H__ |
22 |
22 |
23 |
23 |
24 #include <coecntrl.h> |
24 #include <coecntrl.h> |
25 #include <BrCtlSpecialLoadObserver.h> |
25 #include <brctlspecialloadobserver.h> |
26 #include <BrCtlLinkResolver.h> |
26 #include <brctllinkresolver.h> |
27 |
27 |
28 #include "FreestyleEmailDownloadInformationMediator.h" |
28 #include "FreestyleEmailDownloadInformationMediator.h" |
29 #include "OverlayControl.h" |
29 #include "OverlayControl.h" |
30 |
30 |
31 class CFSMailMessage; |
31 class CFSMailMessage; |
133 // Remove all previously created files from temporary HTML folder |
133 // Remove all previously created files from temporary HTML folder |
134 void EmptyTempHtmlFolderL(); |
134 void EmptyTempHtmlFolderL(); |
135 // Copies given file to temporary HTML folder and returns an open file |
135 // Copies given file to temporary HTML folder and returns an open file |
136 // handle to the created copy. |
136 // handle to the created copy. |
137 // <cmail> |
137 // <cmail> |
138 void CopyFileToHtmlFileL( RFile& aFile, const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart ); |
138 void CopyToHtmlFileL( CFSMailMessagePart& aHtmlBodyPart, const TDesC& aFileName ); |
|
139 void ConvertToHtmlFileL( CFSMailMessagePart& aTextBodyPart, const TDesC& aHtmlFileName ); |
|
140 |
139 // Reads given file content to buffer and return pointer to it |
141 // Reads given file content to buffer and return pointer to it |
140 HBufC8* ReadContentFromFileLC( RFile& aFile ); |
142 HBufC8* ReadContentFromFileLC( RFile& aFile ); |
141 // Writes buffer to given file |
143 // Writes buffer to given file |
142 void WriteContentToFileL( const TDesC8& aContent, const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart ); |
144 void WriteContentToFileL( const TDesC8& aContent, const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart ); |
143 |
145 |
|
146 void PrepareBodyHtmlL( const TDesC& aFileName ); |
144 void WriteEmptyBodyHtmlL( const TDesC& aFileName ); |
147 void WriteEmptyBodyHtmlL( const TDesC& aFileName ); |
145 |
148 |
146 // </cmail> |
149 // </cmail> |
147 // Finds the attachment from the list that matches the given content ID |
150 // Finds the attachment from the list that matches the given content ID |
148 CFSMailMessagePart* MatchingAttacmentL( const TDesC& aContentId, |
151 CFSMailMessagePart* MatchingAttacmentL( const TDesC& aContentId, |
164 void EnableHTMLResourceFlagL(); |
167 void EnableHTMLResourceFlagL(); |
165 TBool HTMLResourceFlagEnabled(); |
168 TBool HTMLResourceFlagEnabled(); |
166 void CopyHTMLResourceL(); |
169 void CopyHTMLResourceL(); |
167 // Ensure all resource files (eg. images) required by HTML display to be ready in C:\[private]\HtmlFile |
170 // Ensure all resource files (eg. images) required by HTML display to be ready in C:\[private]\HtmlFile |
168 void EnsureHTMLResourceL(); |
171 void EnsureHTMLResourceL(); |
169 void ConvertPlainTextToHTML(CFSMailMessagePart* aTextBodyPart, RFile htmlFile); |
|
170 void CopyFileToHtmlFileL( const TDesC8& aBuffer, |
|
171 const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart ); |
|
172 void ConvertToHTML( const TDesC8& aContent, |
172 void ConvertToHTML( const TDesC8& aContent, |
173 const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart ); |
173 const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart ); |
174 HBufC8* GetCharacterSetL( CFSMailMessagePart& aHtmlBodyPart ); |
174 HBufC8* GetCharacterSetL( CFSMailMessagePart& aHtmlBodyPart ); |
175 TBool IsMessageBodyURL(const TDesC& aUrl); |
175 TBool IsMessageBodyURL(const TDesC& aUrl); |
176 void CreateHyperlinksFromUrlsL( CBufBase& aSource ); |
176 void CreateHyperlinksFromUrlsL( CBufBase& aSource ); |
177 //Returns ETrue of clicking on a link requires a browser to be launched |
177 //Returns ETrue of clicking on a link requires a browser to be launched |
178 TBool NeedToLaunchBrowserL( const TDesC& aUrl ); |
178 TBool NeedToLaunchBrowserL( const TDesC& aUrl ); |
179 //Launch the browser as a standalone app |
179 //Launch the browser as a standalone app |
180 void LaunchBrowserL( const TDesC& aUrl ); |
180 void LaunchBrowserL( const TDesC& aUrl ); |
181 |
181 |