Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <ImageDisplayPlugin.h>
Link against: imagedisplay.lib
This item is not part of the S60 5th Edition SDK

Class CImageDisplayPlugin

class CImageDisplayPlugin : public CBase;

Description

This is the plugin API for the Image Display framework Intended for use by plugin writers only.

Derivation

Members

Defined in CImageDisplayPlugin:

Inherited from CBase:


Construction and destruction


~CImageDisplayPlugin()

IMPORT_C ~CImageDisplayPlugin();

Description

Virtual destructor. Current implementation will call the REComSession::DestroyedImplementation(TUid) to finalize destruction of the ECom plugin


CImageDisplayPlugin()

protected: IMPORT_C CImageDisplayPlugin();

Description

Exported default constructor

[Top]


Member functions


OpenL()

protected: virtual void OpenL()=0;

Description

Initialise the plugin and check the image display settings.

This is called by the ImageDisplay framework when the client app calls CImageDisplay::SetupL().

The plugin should check the validity of the source image and all other settings set by the client API. If any of these is unsupported then it should leave with KErrArgument

A plugin implementing CImageDisplayPluginExtension to allow extension of the client API should initialise it here.

This is a virtual function that each individual plugin must implement.

Leave codes

KErrArgument

Some of the configuration parameters are invalid


Play()

protected: virtual void Play()=0;

Description

Initiate the image display operation

This is a virtual function that each individual plugin must implement.


Pause()

protected: virtual void Pause()=0;

Description

Pause image decoding

This is a virtual function that each individual plugin must implement.


StopPlay()

protected: virtual void StopPlay()=0;

Description

Cancel the image display operation May be called by the framework even when there is no outstanding request.

This is a virtual function that each individual plugin must implement.


RecommendedImageSizes()const

protected: virtual const CImageDisplay::RImageSizeArray& RecommendedImageSizes() const=0;

Description

Should return an array of recommended image sizes i.e. sizes which would be processed faster This is a virtual function that each individual plugin must implement.

Return value

const RArray &

a reference to the array of recommended image sizes


SourceType()const

protected: IMPORT_C TImageSourceType SourceType() const;

Description

returns an image datasource type

Return value

CImageDisplayPlugin::TImageSourceType

TImageSourceType


SourceFilename()const

protected: IMPORT_C const TDesC& SourceFilename() const;

Description

returns an image source file name

Return value

const TDesC16 &

const TDesC& a reference to read-only descriptor

Panic codes

ImageDisplay

4 EImageWrongType if image data source is of type other than the file name


SourceFileHandle()const

protected: IMPORT_C RFile& SourceFileHandle() const;

Description

returns an image source file handle

Return value

RFile &

const RFile& a reference to a file handle

Panic codes

ImageDisplay

4 EImageWrongType if image data source is of type other than the file handle


SourceData()const

protected: IMPORT_C const TDesC8& SourceData() const;

Description

returns an image source descriptor

Return value

const TDesC8 &

const TDesC8& a reference to a 8 bit descriptor

Panic codes

ImageDisplay

4 EImageWrongType if image data source is of type other than the descriptor


SourceDataIntent()const

protected: IMPORT_C ContentAccess::TIntent SourceDataIntent() const;

Description

returns an intent that is requested by client for opening the image source

Return value

ContentAccess::TIntent

ContentAccess::TIntent a desired intent value


SourceDataId()const

protected: IMPORT_C const TDesC& SourceDataId() const;

Description

returns requested content data Id that should be used to open content

Return value

const TDesC16 &

const TDesC& a desired data unique Id


SourceMimeType()const

protected: IMPORT_C const TDesC8& SourceMimeType() const;

Description

returns an image source MIME type or KNullDesC8 if not defined

Return value

const TDesC8 &

const TDesC8& a reference to a 8 bit descriptor


SourceImageType()const

protected: IMPORT_C const TUid SourceImageType() const;

Description

returns a global image type

Return value

const TUid

const TUid an image type Uid


SourceImageSubType()const

protected: IMPORT_C const TUid SourceImageSubType() const;

Description

returns a global image subtype or KNullUid if not defined

Return value

const TUid

const TUid an image subtype Uid


SourceRect(TRect &)const

protected: IMPORT_C TBool SourceRect(TRect &aRect) const;

Description

returns a requested by an API client source clipping rect

Parameters

TRect &aRect

a reference to source clipping rect which is valid only if return value is ETrue

Return value

TBool

ETrue if clipping rect was defined by client


DestinationSizeInPixels()const

protected: IMPORT_C const TSize& DestinationSizeInPixels() const;

Description

returns a requested by an API client destination image size

Return value

const TSize &

const TSize - requested image size in pixels


Options()const

protected: IMPORT_C TUint Options() const;

Description

returns a requested by an API client image options e.g. combination of the TImageOptions

Return value

TUint

TUint - requested image option set


MaintainAspectRatio()const

protected: IMPORT_C TBool MaintainAspectRatio() const;

Description

returns ETrue if an API client requested to preserve source image aspect ratio

Return value

TBool

TBool - requested aspect ratio flag


DisplayMode()const

protected: IMPORT_C TDisplayMode DisplayMode() const;

Description

returns a requested by an API client display mode for an image being decoded

Return value

TDisplayMode

TDisplayMode - requested display mode


ExtensionInterface(TUid,TAny *&)

protected: IMPORT_C virtual TInt ExtensionInterface(TUid aIFaceUid, TAny *&aIFacePtr);

Description

A plug-in that supports an extension interface has to override this function

Parameters

TUid aIFaceUid

a request extension Uid

TAny *&aIFacePtr

a reference to the pointer that should be given extension interface pointer on success

Return value

TInt

KErrNotSupported if requested extension is not supported otherwise KErrNone


GetBitmap(const CFbsBitmap *&,const CFbsBitmap *&)const

protected: IMPORT_C virtual void GetBitmap(const CFbsBitmap *&aBitmap, const CFbsBitmap *&aMask) const;

Description

A plug-in that supports image mask getting has to override this function

Parameters

const CFbsBitmap *&aBitmap

a reference to bitmap pointer

const CFbsBitmap *&aMask

a reference to bitmap pointer, a plug-in may return NULL if no mask is available


ValidBitmap()const

protected: IMPORT_C virtual TBool ValidBitmap() const;

Description

A plug-in that supports target bitmap status checkig has to override this function

Return value

TBool

TBool - ETrue if subsequent call to the CImageDisplayPlugin::GetBitmap(const CFbsBitmap *&,const CFbsBitmap *&)const able to return valid bitmaps


ImageStatus()const

protected: IMPORT_C virtual TUint ImageStatus() const;

Description

A plug-in that supports source image status checking has to override this function

Return value

TUint

TUint - set of the TImageStatus flags


NumFrames(TInt &)const

protected: IMPORT_C virtual TInt NumFrames(TInt &aNumFrames) const;

Description

A plug-in that supports getting of source image number of frames has to override this function

Parameters

TInt &aNumFrames

Number of frames in the source image

Return value

TInt

TInt - KErrNone if aNumFrames contains a valid number of frames


CallbackIsRunning()const

protected: IMPORT_C TBool CallbackIsRunning() const;

Description

A plug-in may use this function to determine if a previuos callback function to an API client has been completed

Return value

TBool

ETrue if callback has not been completed yet


AsyncCallbackImageReady(const CFbsBitmap *,TUint,const TRect &,TInt)

protected: IMPORT_C void AsyncCallbackImageReady(const CFbsBitmap *aBitmap, TUint aStatus, const TRect &aUpdatedArea, TInt aError);

Description

A plug-in should use this function to pass information asinchronously to an API client. This function is asinchronous.

Parameters

const CFbsBitmap *aBitmap

a pointer to the bitmap that contains decoding result

TUint aStatus

the plugin status that should be combination of the TPluginStatus set

const TRect &aUpdatedArea

a rectangle within the aBitmap that was updated during the latest operation

TInt aError

error code of latest operation


CancelCallback()

protected: IMPORT_C void CancelCallback();

Description

A plug-in should use this function to cancel callback to a client if it is stil pending


ReservedVirtual1()

private: IMPORT_C virtual void ReservedVirtual1();

Description

Reserved. Not for public use


ReservedVirtual2()

private: IMPORT_C virtual void ReservedVirtual2();

Description

Reserved. Not for public use


ReservedVirtual3()

private: IMPORT_C virtual void ReservedVirtual3();

Description

Reserved. Not for public use


ReservedVirtual4()

private: IMPORT_C virtual void ReservedVirtual4();

Description

Reserved. Not for public use

[Top]


Member enumerations


Enum TImageSourceType

TImageSourceType

Description

Data source type definitions for plug-ins

EImgSrcNotDefined

Undefined. Plug-in won't be given this value

EImgSrcFileName

The datasource is a file name

EImgSrcFileHandle

The datasource is a file handle

EImgSrcDescriptor

The datasource is a descriptor


Enum TPluginStatus

TPluginStatus

Description

Defines an ImageDisplay plug-in status flag values

EStatusNoMoreToDecode

A plug-in has nothing more to decode; also must be set also on fatal error contidition

EStatusBusy

The next frame is not ready yet, bitmap may contain distorted image

EStatusPaused

Image decoding is paused i.e. call CImageDisplayPlugin::Play() to continue (if EStatusNoMoreToDecode is not set)

EStatusFrameReady

The next frame has been already decoded

EStatusDisplayThisFrameIndefinetely

May be set after image decode completion i.e. when EStatusNoMoreToDecode is set

EStatusPartialFrame

May be set if the image format supports progressive decoding; indicates that a bitmap contains roughtly decoded image

EStatusEraseOutputContents

May be set in case when a plug-in asks to invalidate previous frame contents

[Top]


Member data


iImageSizes

protected: CImageDisplay::RImageSizeArray iImageSizes;

Description

An array containing the sizes of the images.