const TLitC8< sizeof("<html")> KStartTag={sizeof("<html")-1,"<html"};const static TLitC8< sizeof("<head>")> KHeadTag={sizeof("<head>")-1,"<head>"};const static TLitC8< sizeof("<html><head><title></title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=")> KHtmlHeader1={sizeof("<html><head><title></title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=")-1,"<html><head><title></title><meta http-equiv=\"Content-Type\" content=\"text/html; charset="};const static TLitC8< sizeof("\"/></head><body>\xD\xA")> KHtmlHeader2={sizeof("\"/></head><body>\xD\xA")-1,"\"/></head><body>\xD\xA"};const static TLitC8< sizeof("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%S\">\n")> KHtmlHeader3={sizeof("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%S\">\n")-1,"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%S\">\n"};const static TLitC8< sizeof("\xD\xA</body></html>\xD\xA")> KHtmlEndTags={sizeof("\xD\xA</body></html>\xD\xA")-1,"\xD\xA</body></html>\xD\xA"};const static TLitC8< sizeof("charset")> KCharsetTag8={sizeof("charset")-1,"charset"};const static TLitC< sizeof(L"charset")/2 > KCharsetTag={sizeof(L"charset")/2-1, L"charset"};const static TLitC8< sizeof("<HTML><BODY></BODY></HTML>")> KHTMLEmptyContent={sizeof("<HTML><BODY></BODY></HTML>")-1,"<HTML><BODY></BODY></HTML>"};const static TLitC< sizeof(L"data:0")/2 > KHTMLDataScheme={sizeof(L"data:0")/2-1, L"data:0"};const static TLitC8< sizeof("<br>")> KHtmlLineBreak={sizeof("<br>")-1,"<br>"};const static TLitC8< sizeof("<br>\xD\xA")> KHtmlLineBreakCRLF={sizeof("<br>\xD\xA")-1,"<br>\xD\xA"};const static TLitC8< sizeof("<")> KHtmlLessThan={sizeof("<")-1,"<"};const static TLitC8< sizeof(">")> KHtmlGreaterThan={sizeof(">")-1,">"};const static TLitC8< sizeof("&")> KHtmlAmpersand={sizeof("&")-1,"&"};const static TLitC8< sizeof(""")> KHtmlQuotation={sizeof(""")-1,"""};const static TLitC8< sizeof("<a href=\"%S\">")> KHtmlLinkTag={sizeof("<a href=\"%S\">")-1,"<a href=\"%S\">"};const static TLitC8< sizeof("<a href=\"%S%S\">")> KHtmlLinkTagWWW={sizeof("<a href=\"%S%S\">")-1,"<a href=\"%S%S\">"};const static TLitC8< sizeof("</a>")> KHtmlLinkEndTag={sizeof("</a>")-1,"</a>"};const static TLitC< sizeof(L"body")/2 > KURLTypeBody={sizeof(L"body")/2-1, L"body"};const static TLitC< sizeof(L"cmail:const static TLitC<sizeof(L"cmail:const static TLitC< sizeof(L"cmail:const static TLitC<sizeof(L"cmail:const TText8 KGreaterThan=0x3e;const TText8 KLessThan=0x3c;const TText8 KAmpersand=0x26;const TText8 KQuotation=0x22;const TText8 KCharacterSpace=0x20;const TText8 KSOH=0x01;const TText8 KCR=0x0d;const TText8 KLF=0x0a;const TText8 KHT=0x09;const TReal KOverlayButtonMarginX=0.01;const TReal KOverlayButtonMarginY=0.01;const TReal KOverlayButtonSizeP=0.15;const TReal KOverlayButtonSizeLs=0.20;const TInt KStatusIndicatorHeight=50;const TInt KStatusIndicatorXMargin=50;CEUiHtmlViewerSettingsKeyListener::CEUiHtmlViewerSettingsKeyListener(MObserver &aObserver, TUint32 aKey):CActive(EPriorityStandard), iObserver(aObserver), iKey(aKey){CActiveScheduler::Add(this);StartListening();}CEUiHtmlViewerSettingsKeyListener::~CEUiHtmlViewerSettingsKeyListener(){Cancel();}void CEUiHtmlViewerSettingsKeyListener::StartListening(){SetActive();iObserver.Repository().NotifyRequest(iKey, iStatus);}void CEUiHtmlViewerSettingsKeyListener::RunL(){iObserver.KeyValueChangedL(iKey);StartListening();}void CEUiHtmlViewerSettingsKeyListener::DoCancel(){iObserver.Repository().NotifyCancel(iKey);}CEUiHtmlViewerSettings *CEUiHtmlViewerSettings::NewL(MObserver &aObserver){CEUiHtmlViewerSettings *self=new(ELeave) CEUiHtmlViewerSettings(aObserver);CleanupStack::PushL(self);self->ConstructL();CleanupStack::Pop();return self;}CEUiHtmlViewerSettings::~CEUiHtmlViewerSettings(){iKeyListeners.ResetAndDestroy();delete iRepository;}CEUiHtmlViewerSettings::CEUiHtmlViewerSettings(MObserver &aObserver):iObserver(aObserver){}void CEUiHtmlViewerSettings::ConstructL(){iRepository=CRepository::NewL(KFreestyleEmailCenRep);AddKeyListenerL(KFreestyleEmailDownloadHTMLImages);}void CEUiHtmlViewerSettings::AddKeyListenerL(TUint32 aKey){CEUiHtmlViewerSettingsKeyListener *listener=new(ELeave) CEUiHtmlViewerSettingsKeyListener(*this, aKey);CleanupStack::PushL(listener);iKeyListeners.AppendL(listener);CleanupStack::Pop();UpdateValue(aKey);}void CEUiHtmlViewerSettings::UpdateValue(TUint32 aKey){TInt value;iRepository->Get(aKey, value);switch(aKey){case KFreestyleEmailDownloadHTMLImages:iFlags.Assign(aKey, value==0);break;default:iFlags.Assign(aKey, value);break;}}void CEUiHtmlViewerSettings::KeyValueChangedL(TUint32 aKey){UpdateValue(aKey);iObserver.ViewerSettingsChangedL(aKey);}CRepository &CEUiHtmlViewerSettings::Repository(){return *iRepository;}TBool CEUiHtmlViewerSettings::AutoLoadImages() const {return iFlags.IsSet(EAutoLoadImages);}CFsEmailUiHtmlViewerContainer *CFsEmailUiHtmlViewerContainer::NewL(CFreestyleEmailUiAppUi &aAppUi, CFsEmailUiHtmlViewerView &aView){;CFsEmailUiHtmlViewerContainer *self=new(ELeave) CFsEmailUiHtmlViewerContainer(aAppUi, aView);CleanupStack::PushL(self);self->ConstructL();CleanupStack::Pop(self);return self;}CFsEmailUiHtmlViewerContainer::CFsEmailUiHtmlViewerContainer(CFreestyleEmailUiAppUi &aAppUi, CFsEmailUiHtmlViewerView &aView):iAppUi(aAppUi), iView(aView), iFs(iCoeEnv->FsSession()), iFirstTime(ETrue){;}CFsEmailUiHtmlViewerContainer::~CFsEmailUiHtmlViewerContainer(){;delete iViewerSettings;if(iObservingDownload &&iAppUi.DownloadInfoMediator()){iAppUi.DownloadInfoMediator()->StopObserving(this);}iFile.Close();iLinkContents.Close();iMessageParts.Close();delete iEventHandler;delete iBrCtlInterface;iConnection.Close();iSocketServer.Close();delete iStatusIndicator;delete iOverlayControlNext;delete iOverlayControlPrev;}void CFsEmailUiHtmlViewerContainer::PrepareForExit(){;HideDownloadStatus();if(iObservingDownload &&iAppUi.DownloadInfoMediator()){iAppUi.DownloadInfoMediator()->StopObserving(this);iObservingDownload=EFalse;}delete iBrCtlInterface;iBrCtlInterface=0;iConnection.Close();iSocketServer.Close();}void CFsEmailUiHtmlViewerContainer::PrepareForMessageNavigation(){;ResetContent();}void CFsEmailUiHtmlViewerContainer::ConstructL(){;iViewerSettings=CEUiHtmlViewerSettings::NewL(*this);SetHtmlFolderPathL();BaflUtils::EnsurePathExistsL(iFs, iHtmlFolderPath);SetTempHtmlFolderPath();BaflUtils::EnsurePathExistsL(iFs, iTempHtmlFolderPath);SetHTMLResourceFlagFullName();EnsureHTMLResourceL();CreateWindowL();SetRect(iView.ContainerRect());TUint brCtlCapabilities=TBrCtlDefs::ECapabilityClientResolveEmbeddedURL|TBrCtlDefs::ECapabilityDisplayScrollBar|TBrCtlDefs::ECapabilityClientNotifyURL|TBrCtlDefs::ECapabilityLoadHttpFw|TBrCtlDefs::ECapabilityCursorNavigation|TBrCtlDefs::ECapabilityPinchZoom;TRect rect(TPoint(), Size());iBrCtlInterface=CreateBrowserControlL(this, rect, brCtlCapabilities, TBrCtlDefs::ECommandIdBase, 0, this, this, 0, 0, this, 0);iBrCtlInterface- | SetBrowserSettingL | [static] |