MSvgRequestObserver Class Reference

class MSvgRequestObserver

This interface is the callback mechanism for the SVG Engine to communicate to interested clients and to request for external data, such as images. The callbacks will be active when the methods of this interace are implemented and the pointer to the implementation object is passed in as the second parameter of the 'ConstructL' method of the CSvgEngineInterface. A 'null' value may be passed-in if the callbacks are to be ignored.

SVGEngine.lib
Since
1.0

Member Functions Documentation

FetchFont(const TDesC &, RFs &, RFile &)

TInt FetchFont ( const TDesC & aUri,
RFs & aSession,
RFile & aFileHandle
) [pure virtual]

This method is called to retrieve the file handle of an svg font file. This file must be SVG 1.1 .svg file. When the engine comes acrossed a font-family name that it doesnt know it will request "fontfamilyname".svg file through this method. The client can either provide the svg file or the engine will default to system text.

The usage of this method is exactly the same as the FetchImage method above

Since
1.0

Parameters

const TDesC & aUri
RFs & aSession
RFile & aFileHandle

FetchImage(const TDesC &, RFs &, RFile &)

TInt FetchImage ( const TDesC & aUri,
RFs & aSession,
RFile & aFileHandle
) [pure virtual]

This method is called to retrieve the file handle of an image name. The session ( RFs ) object passed in is guaranteed to be connected, so the client must NOT call aSession.Connect().

The implementation for the client of this method is usually if not always: TInt X::FetchImage( const TDesC& aFilename, RFs& aSession, RFile& aFileHandle ) { // Check for "http", get data from remote site, save to disk // Get absolute path to aFilename: absolutepath return aFileHandle.Open( aSession, absolutepath, EFileRead ); }

Note: Use EFileShareReadersOnly to prevent file locking.

The API AssignImageData() can be used to avoid block the parsing thread due this method taking too long to return. This is accomplished by returning a non-KErrNone value (i.e. KErrNotFound), and storing the URI parameter. The image data then could be assigned the the URI in another thread/Active-Object.

Since
1.0

Parameters

const TDesC & aUri
RFs & aSession
RFile & aFileHandle

ScriptCall(const TDesC &, CSvgElementImpl *)

TBool ScriptCall ( const TDesC & aScript,
CSvgElementImpl * aCallerElement
) [pure virtual]

This method is for future extension, in which an external script engine could be used to evaluate a script description.

Since
1.0

Parameters

const TDesC & aScript
CSvgElementImpl * aCallerElement

UpdatePresentation(const TInt32 &)

void UpdatePresentation ( const TInt32 & aNoOfAnimation ) [pure virtual]
This Method updates the presentation status
Since
1.0

Parameters

const TInt32 & aNoOfAnimation

UpdateScreen()

void UpdateScreen ( ) [pure virtual]

This method is called by the SVG Engine when all data for a certain step, such as animation frame, have been updated. This usually means the off-screen image (passed in to 'ConstructL' of CSvgEngineInterface) has been updated. The client usually redraws the image onto the screen.

Since
1.0