CSVGTAppObserverUtil Class Reference
class CSVGTAppObserverUtil : public CBase |
This class is used as a utility class for implementing observer for the SVGT UI Control. It provides helper function/reference implementation for following functionality: a. Hyperlink handling b. Download manager + UI Usage c. Save Option Implementation d. Misc (GetSmilFitValue) SVGTAppObserverUtil
- Since
- 3.0
Public Member Functions |
---|
| ~CSVGTAppObserverUtil() |
IMPORT_C void | AssignEmbededDataL(const TDesC &) |
IMPORT_C TBool | CanShowDownload() |
IMPORT_C TBool | CanShowSave() |
IMPORT_C void | DialogDismissedL(TInt) |
IMPORT_C void | DisplayDownloadMenuL() |
IMPORT_C void | DoSaveL(TInt) |
TBool
| ExitWhenOrientationChange() |
TInt
| FetchFont(const TDesC &, RFs &, RFile &) |
IMPORT_C TInt | FetchImage(const TDesC &, RFs &, RFile &) |
IMPORT_C TBool | GetFileNameFromUri(const TDesC &, TDes &) |
IMPORT_C TBool | GetLocalFile(const TDesC &, TDes &, const TDesC &) |
IMPORT_C void | GetSmilFitValue(TDes &) |
void | GetUniqueFileName(TDes &) |
IMPORT_C void | HandleDMgrEventL(RHttpDownload &, THttpDownloadEvent) |
IMPORT_C TDownloadNeeded | IsDownloadNeededL(const TDesC &) |
TBool
| IsGzipContent(const RFile &) |
IMPORT_C TBool | IsSavingDone() |
IMPORT_C TBool | LinkActivated(const TDesC &) |
IMPORT_C void | LinkActivatedL(const TDesC &) |
IMPORT_C TBool | LinkActivatedWithShow(const TDesC &, const TDesC &) |
IMPORT_C void | LinkActivatedWithShowL(const TDesC &, const TDesC &) |
IMPORT_C TInt | NewFetchImageData(const TDesC &) |
IMPORT_C CSVGTAppObserverUtil * | NewL(CSVGTUIDialog *, RFile *, const TDesC &, TBool, TBool, TBool) |
IMPORT_C CSVGTAppObserverUtil * | NewL(CSVGTUIDialog *, RFile *) |
CSVGTAppObserverUtil * | NewLC(CSVGTUIDialog *, RFile *, const TDesC &, TBool, TBool, TBool) |
CSVGTAppObserverUtil * | NewLC(CSVGTUIDialog *, RFile *) |
IMPORT_C void | SVGTPositionChanged(TInt) |
IMPORT_C void | SVGTSavingDoneL(TInt) |
void | SaveContentL(RFile &, const TDesC &, TDes &, TBool) |
void | SaveSvgTextContentL(const RFile &, TDes &) |
IMPORT_C void | SetDownloadMenu(TBool) |
Protected Member Functions |
---|
| CSVGTAppObserverUtil(CSVGTUIDialog *) |
IMPORT_C void | ConstructL() |
IMPORT_C void | ConstructL(RFile *, const TDesC &, TBool, TBool, TBool) |
IMPORT_C void | ConstructL(RFile *) |
CSVGTViewerAppDownloads * | FindDownload(const RHttpDownload *) |
IMPORT_C TBool | GetDefaultInetAccessPointL(TUint32 &) |
IMPORT_C void | GetFileNameAndExt(TDes &) |
IMPORT_C TBool | IsAllowMove() |
IMPORT_C TBool | IsFileFullPathAvailable() |
IMPORT_C void | LaunchDownloadedFileL(const TDesC &, TBool, TBool) |
void | LaunchWaitNoteL(TInt, TBool, const TDesC &) |
TInt
| StartDownloadingImageL(const TDesC &, RFs &, RFile &, TBool, TBool, TBool) |
Constructor & Destructor Documentation
CSVGTAppObserverUtil(CSVGTUIDialog *)
IMPORT_C | CSVGTAppObserverUtil | ( | CSVGTUIDialog * | aAppDialog | ) | [protected] |
C++ default constructor. aAppDialog: Pointer to the SVGT Dialog
~CSVGTAppObserverUtil()
IMPORT_C | ~CSVGTAppObserverUtil | ( | ) | [virtual] |
Member Functions Documentation
AssignEmbededDataL(const TDesC &)
IMPORT_C void | AssignEmbededDataL | ( | const TDesC & | aUri | ) | |
CanShowDownload()
IMPORT_C TBool | CanShowDownload | ( | ) | const [virtual] |
This function is called by the Ui Dialog to enable/disable the downloads menu in the options menu
- Since
- 3.0
CanShowSave()
IMPORT_C TBool | CanShowSave | ( | ) | [virtual] |
ConstructL()
IMPORT_C void | ConstructL | ( | ) | [protected] |
Default Symbian 2nd phase constructor.
ConstructL(RFile *, const TDesC &, TBool, TBool, TBool)
IMPORT_C void | ConstructL | ( | RFile * | aFileHdlPtr, |
| const TDesC & | aFilename, |
| TBool | aIsFileFullPathAvailable, |
| TBool | aCanSaveContent, |
| TBool | aShouldMoveContent |
| ) | [protected] |
Default Symbian 2nd phase constructor. RFile* aFileHdlPtr: File handle to the content. const TDesC& filename: Filepath. TBool aIsFileFullPathAvailable: Flag to indicate if content's fullpath is available. TBool aCanSaveContent, TBool aShouldMoveContent.
ConstructL(RFile *)
IMPORT_C void | ConstructL | ( | RFile * | aFileHdlPtr | ) | [protected] |
Default Symbian 2nd phase constructor. RFile* aFileHdlPtr: File handle to the content.
DialogDismissedL(TInt)
IMPORT_C void | DialogDismissedL | ( | TInt | aButtonId | ) | |
DisplayDownloadMenuL()
IMPORT_C void | DisplayDownloadMenuL | ( | ) | [virtual] |
DoAssignImageDataL(const CSVGTViewerAppDownloads *, RHttpDownload &)
Reads the downloaded file & assign to the svg engine.
- Since
- 3.1
DoAssignLocalFileDataL(const TDesC &, const TDesC &)
void | DoAssignLocalFileDataL | ( | const TDesC & | aOriginalUri, |
| const TDesC & | aNewUri |
| ) | const [private] |
DoGetProcessedEmbededDataL(const TDesC &)
HBufC8 * | DoGetProcessedEmbededDataL | ( | const TDesC & | aXlinkHrefValue | ) | const [private] |
Parameters
const TDesC & aXlinkHrefValue | |
DoSaveL(TInt)
IMPORT_C void | DoSaveL | ( | TInt | aCommandId | ) | [virtual] |
ExitWhenOrientationChange()
TBool
| ExitWhenOrientationChange | ( | ) | |
FetchFont(const TDesC &, RFs &, RFile &)
FetchImage(const TDesC &, RFs &, RFile &)
IMPORT_C TInt | FetchImage | ( | const TDesC & | aUri, |
| RFs & | aSession, |
| RFile & | aFileHandle |
| ) | [virtual] |
This method is called by the svg engine when there is an image tag encountered in the svg file. This function parses the uri, checks whether the uri is a local file or a remote file. If the file is a remote file, the file is downloaded. Fetched file is then opened and the file handle returned to the engine.
- Since
- 3.0
MSvgRequestObserver::FetchImage
FindDownload(const RHttpDownload *)
This method is called by HandleDMgrEventL This iterates through the linked list and return the link corresponding to the given http download handle
- Since
- 3.0
Parameters
const RHttpDownload * aHttpDownload | |
GetDefaultInetAccessPointL(TUint32 &)
IMPORT_C TBool | GetDefaultInetAccessPointL | ( | TUint32 & | aIapId | ) | const [protected] |
This method is called by the Fetch Image before starting the download to get Access point id.
- Since
- 3.0
GetFileNameAndExt(TDes &)
IMPORT_C void | GetFileNameAndExt | ( | TDes & | filename | ) | const [protected] |
This method is used to get back the filename of the currently playing svg content in filname.ext format.
- Since
- 3.0
GetFileNameFromUri(const TDesC &, TDes &)
IMPORT_C TBool | GetFileNameFromUri | ( | const TDesC & | aUri, |
| TDes & | aFileName |
| ) | const |
This method is called by LinkActivated(WithShow), FetchImage This gets the filename from the uri and the
- Since
- 3.0
GetLocalFile(const TDesC &, TDes &, const TDesC &)
IMPORT_C TBool | GetLocalFile | ( | const TDesC & | aUri, |
| TDes & | aFileName, |
| const TDesC & | aSvgFileName |
| ) | [static] |
This method is called by LinkActivated(WithShow), FetchImage This gets the filename with full path from the uri and the
- Since
- 3.0
GetSmilFitValue(TDes &)
IMPORT_C void | GetSmilFitValue | ( | TDes & | aSmilValue | ) | [virtual] |
GetUniqueFileName(TDes &)
void | GetUniqueFileName | ( | TDes & | aName | ) | const |
This function generates a unique file name in the private directory
Parameters
TDes & aName | On return contains the full path on return. |
HandleDMgrEventL(RHttpDownload &, THttpDownloadEvent)
IMPORT_C void | HandleDMgrEventL | ( | RHttpDownload & | aDownload, |
| THttpDownloadEvent | aEvent |
| ) | |
This method is a call back function used by the download manager to indicate the completion/failure of the download started. LinkActivatedWithShow function
- Since
- 3.0
Parameters
RHttpDownload & aDownload | |
THttpDownloadEvent aEvent | |
IsAllowMove()
IMPORT_C TBool | IsAllowMove | ( | ) | const [protected] |
This method is used in Save operation to decide whether move action should be performed.
- Since
- 3.0
IsDownloadNeededL(const TDesC &)
This method is called by LinkActivated(WithShow), FetchImage This checks whether the uri passed is a local image file or a remote image file or not an image file.
- Since
- 3.0
IsFileFullPathAvailable()
IMPORT_C TBool | IsFileFullPathAvailable | ( | ) | const [protected] |
This method is used check whether content file's full-path is available.
- Since
- 3.0
IsGzipContent(const RFile &)
TBool
| IsGzipContent | ( | const RFile & | aFileHandle | ) | const |
Checks whether the file is a GZipped content
Parameters
const RFile & aFileHandle | File handle to the SVG content |
IsSavingDone()
IMPORT_C TBool | IsSavingDone | ( | ) | [virtual] |
LaunchDownloadedFileL(const TDesC &, TBool, TBool)
IMPORT_C void | LaunchDownloadedFileL | ( | const TDesC & | aFileName, |
| TBool | aIsEmbedded, |
| TBool | aAllowSave |
| ) | const [protected] |
This method is called by HandleDMgrEventL This makes use of Document Handler to launch the file.
- Since
- 3.0
LaunchWaitNoteL(TInt, TBool, const TDesC &)
void | LaunchWaitNoteL | ( | TInt | aResourceId, |
| TBool | aVisibilityDelayOff, |
| const TDesC & | aFileName |
| ) | [protected] |
This method is used to launch wait dialog while save operation is going on.
- Since
- 3.0
LinkActivated(const TDesC &)
IMPORT_C TBool | LinkActivated | ( | const TDesC & | aUri | ) | [virtual] |
LinkActivatedL(const TDesC &)
IMPORT_C void | LinkActivatedL | ( | const TDesC & | aUri | ) | |
This method is called by LinkActivated. If this function leaves, it is trapped by the linkActivated function
- Since
- 3.0
LinkActivatedWithShow(const TDesC &, const TDesC &)
IMPORT_C TBool | LinkActivatedWithShow | ( | const TDesC & | aUri, |
| const TDesC & | aShow |
| ) | [virtual] |
LinkActivatedWithShowL(const TDesC &, const TDesC &)
IMPORT_C void | LinkActivatedWithShowL | ( | const TDesC & | aUri, |
| const TDesC & | aShow |
| ) | |
This method is called by LinkActivatedWithShow. If this function leaves, it is trapped by the LinkActivatedWithShow function
- Since
- 3.0
NewFetchImageData(const TDesC &)
IMPORT_C TInt | NewFetchImageData | ( | const TDesC & | aUri | ) | |
NewL(CSVGTUIDialog *, RFile *, const TDesC &, TBool, TBool, TBool)
Two-phased constructor. aAppDialog: Pointer to the SVGT Dialog RFile* aFileHdlPtr: File handle to the content. const TDesC& filename: Filepath. TBool aIsFileFullPathAvailable: Flag to indicate if content's fullpath is available. TBool aCanSaveContent, TBool aShouldMoveContent.
NewL(CSVGTUIDialog *, RFile *)
Two-phased constructor. aAppDialog: Pointer to the SVGT Dialog RFile* aFileHdlPtr: File handle to the content.
- Since
- 3.0
NewLC(CSVGTUIDialog *, RFile *, const TDesC &, TBool, TBool, TBool)
Two-phased constructor. aAppDialog: Pointer to the SVGT Dialog RFile* aFileHdlPtr: File handle to the content. const TDesC& aFilename: Filepath. TBool aIsFileFullPathAvailable: Flag to indicate if content's fullpath is available. TBool aCanSaveContent, TBool aShouldMoveContent.
NewLC(CSVGTUIDialog *, RFile *)
Two-phased constructor. aAppDialog: Pointer to the SVGT Dialog RFile* aFileHdlPtr: File handle to the content.
- Since
- 3.0
SVGTPositionChanged(TInt)
IMPORT_C void | SVGTPositionChanged | ( | TInt | aPosition | ) | [virtual] |
From MSVGTUISaveListener. This function is called when buffering or saving position is changed.
- Since
- 3.0
SVGTSavingDoneL(TInt)
IMPORT_C void | SVGTSavingDoneL | ( | TInt | aError | ) | [virtual] |
From MSVGTUISaveListener. Called when saving is finished.
- Since
- 3.0
SaveContentL(RFile &, const TDesC &, TDes &, TBool)
void | SaveContentL | ( | RFile & | aSrcFileHandle, |
| const TDesC & | aSrcFileName, |
| TDes & | aDstFileName, |
| TBool | aMoveFlag |
| ) | |
Helper function for DoSaveL
SaveSvgTextContentL(const RFile &, TDes &)
void | SaveSvgTextContentL | ( | const RFile & | aSrcFileHandle, |
| TDes & | aTempFileName |
| ) | |
This function saves the SVG content into the private directory
Parameters
const RFile & aSrcFileHandle | |
TDes & aTempFileName | |
SetDownloadMenu(TBool)
IMPORT_C void | SetDownloadMenu | ( | TBool | aAddDownloadMenu | ) | |
This function is called by the application to enable/disable the downloads menu in the options menu
- Since
- 3.0
Parameters
TBool aAddDownloadMenu | enable/disable the downloads menu |
StartDownloadingImageL(const TDesC &, RFs &, RFile &, TBool, TBool, TBool)
This method is called by LinkActivated(WithShow),FetchImage functions If this function leaves, it is trapped by the Called function
- Since
- 3.0
Member Enumerations Documentation
Enum TDownloadNeeded
Enumerators
ELocalImageFile | |
ERemoteImageFile | |
ENotAnImageFile | |
Enum TWaitNoteState
Enumerators
ESaveFileWait = 1 | |
EDownloadImageWait | |
Member Data Documentation
CSVGTUIDialog * iAppDialog
TBool
iCanSaveContent
TBool
| iCanSaveContent | [private] |
CDownloadMgrUiDownloadsList * iDMgrDownloadsList
CDownloadMgrUiDownloadsList * | iDMgrDownloadsList | [private] |
CDownloadMgrUiLibRegistry * iDMgrUiReg
CDownloadMgrUiLibRegistry * | iDMgrUiReg | [private] |
CDownloadMgrUiUserInteractions * iDMgrUserInteractions
CDownloadMgrUiUserInteractions * | iDMgrUserInteractions | [private] |
TBool
iDeleteOrigFile
TBool
| iDeleteOrigFile | [private] |
CDocumentHandler * iDocHandler
CDocumentHandler * | iDocHandler | [private] |
TBool
iDownloadDone
TBool
| iDownloadDone | [private] |
TBool
iDownloadInProgress
TBool
| iDownloadInProgress | [private] |
TDblQueIter< CSVGTViewerAppDownloads > iDownloadIter
TBool
iDownloadMenuEnabled
TBool
| iDownloadMenuEnabled | [private] |
RHttpDownloadMgr iDownloadMgr
RHttpDownloadMgr | iDownloadMgr | [private] |
TDblQue< CSVGTViewerAppDownloads > iDownloads
CSVGTFileManager * iFileManager
CSVGTFileManager * | iFileManager | [private] |
TBool
iIsFullFilePathValid
TBool
| iIsFullFilePathValid | [private] |
TBool
iIsOverwriteCase
TBool
| iIsOverwriteCase | [private] |
CEikProgressInfo * iProgressInfo
CEikProgressInfo * | iProgressInfo | [private] |
TInt
iResourceOffset
TInt
| iResourceOffset | [private] |
TBool
iSavingDone
TBool
| iSavingDone | [private] |
TBool
iShouldMoveContent
TBool
| iShouldMoveContent | [private] |
HBufC * iSvgDstFileName
HBufC * | iSvgDstFileName | [private] |
RFile * iSvgFileId
RFile * | iSvgFileId | [private] |
HBufC * iSvgFileName
HBufC * | iSvgFileName | [private] |
TBool
iSynchronousDownloadStopped
TBool
| iSynchronousDownloadStopped | [private] |
HBufC * iTempFileName
HBufC * | iTempFileName | [private] |
TBool
iTempFileUsed
TBool
| iTempFileUsed | [private] |
CActiveSchedulerWait
iWait
CAknProgressDialog * iWaitNote
TWaitNoteState
iWaitNoteState
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.