CImageDisplayPlugin Class Reference

class CImageDisplayPlugin : public CBase

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

Inherits from

Public Member Functions
~CImageDisplayPlugin ()
Protected Member Functions
CImageDisplayPlugin ()
IMPORT_C void AsyncCallbackImageReady (const CFbsBitmap *, TUint , const TRect &, TInt )
IMPORT_C TBool CallbackIsRunning ()
IMPORT_C void CancelCallback ()
IMPORT_C const TSize & DestinationSizeInPixels ()
IMPORT_C TDisplayMode DisplayMode ()
IMPORT_C TInt ExtensionInterface ( TUid , TAny *&)
IMPORT_C void GetBitmap (const CFbsBitmap *&, const CFbsBitmap *&)
IMPORT_C TUint ImageStatus ()
IMPORT_C TBool MaintainAspectRatio ()
IMPORT_C TInt NumFrames ( TInt &)
void OpenL ()
IMPORT_C TUint Options ()
void Pause ()
void Play ()
const CImageDisplay::RImageSizeArray & RecommendedImageSizes ()
IMPORT_C const TDesC8 & SourceData ()
IMPORT_C const TDesC & SourceDataId ()
IMPORT_C ContentAccess::TIntent SourceDataIntent ()
IMPORT_C RFile & SourceFileHandle ()
IMPORT_C const TDesC & SourceFilename ()
IMPORT_C const TUid SourceImageSubType ()
IMPORT_C const TUid SourceImageType ()
IMPORT_C const TDesC8 & SourceMimeType ()
IMPORT_C TBool SourceRect ( TRect &)
IMPORT_C TImageSourceType SourceType ()
void StopPlay ()
IMPORT_C TBool ValidBitmap ()
Private Member Functions
TInt AsyncCbGate ( TAny *)
TInt AsyncCbGate ()
void ConstructL ( CImageDisplayFramework &, TUid )
IMPORT_C CImageDisplayPlugin * NewL ( TUid , CImageDisplayFramework &)
IMPORT_C void ReservedVirtual1 ()
IMPORT_C void ReservedVirtual2 ()
IMPORT_C void ReservedVirtual3 ()
IMPORT_C void ReservedVirtual4 ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TImageSourceType { EImgSrcNotDefined  = 0, EImgSrcFileName , EImgSrcFileHandle , EImgSrcDescriptor }
enum TPluginStatus {
EStatusNoMoreToDecode  = 0x00000001, EStatusBusy  = 0x00000002, EStatusPaused  = 0x00000004, EStatusFrameReady  = 0x00000008, EStatusDisplayThisFrameIndefinetely  = 0x00000010, EStatusPartialFrame  = 0x00000020, EStatusEraseOutputContents  = 0x00000040
}
Protected Attributes
CImageDisplay::RImageSizeArray iImageSizes
Private Attributes
CImageDisplayPluginBody * iBody
CImageDisplayFramework * iFramework
TUid iInstanceUid
TAny * iReserved1

Constructor & Destructor Documentation

CImageDisplayPlugin()

IMPORT_C CImageDisplayPlugin ( ) [protected]

Exported default constructor

Constructor for the CImageDisplayPlugin class.

~CImageDisplayPlugin()

IMPORT_C ~CImageDisplayPlugin ( )

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

This is the destructor for the CImageDisplayPlugin and is responsible for deallocating all resources.

Member Functions Documentation

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

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

A plug-in should use this function to pass information asinchronously to an API client. This function is asinchronous. Callback to the client application, via the ImageDisplay framework

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

AsyncCbGate(TAny *)

TInt AsyncCbGate ( TAny * aPtr ) [private, static]

Parameters

TAny * aPtr

AsyncCbGate()

TInt AsyncCbGate ( ) [private, inline]

CallbackIsRunning()

IMPORT_C TBool CallbackIsRunning ( ) const [protected]

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

CancelCallback()

IMPORT_C void CancelCallback ( ) [protected]

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

ConstructL(CImageDisplayFramework &, TUid)

void ConstructL ( CImageDisplayFramework & aFramework,
TUid aInstanceUid
) [private, inline]

Parameters

CImageDisplayFramework & aFramework
TUid aInstanceUid

DestinationSizeInPixels()

IMPORT_C const TSize & DestinationSizeInPixels ( ) const [protected]

returns a requested by an API client destination image size Gets the requested size of the destination image

DisplayMode()

IMPORT_C TDisplayMode DisplayMode ( ) const [protected]

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

ExtensionInterface(TUid, TAny *&)

IMPORT_C TInt ExtensionInterface ( TUid aIFaceUid,
TAny *& aIFacePtr
) [protected, virtual]

A plug-in that supports an extension interface has to override this function When a plugin extension has been implemented, this function should be implemented by the plugin writer to enable the client access to the extension

Parameters

TUid aIFaceUid a request extension Uid
TAny *& aIFacePtr a reference to the pointer that should be given extension interface pointer on success

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

IMPORT_C void GetBitmap ( const CFbsBitmap *& aBitmap,
const CFbsBitmap *& aMask
) const [protected, virtual]

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

ImageStatus()

IMPORT_C TUint ImageStatus ( ) const [protected, virtual]

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

MaintainAspectRatio()

IMPORT_C TBool MaintainAspectRatio ( ) const [protected]

returns ETrue if an API client requested to preserve source image aspect ratio Return whether the client wishes to maintain the source image's aspect ratio

NewL(TUid, CImageDisplayFramework &)

IMPORT_C CImageDisplayPlugin * NewL ( TUid aImplementationUid,
CImageDisplayFramework & aFramework
) [private, static]

not for public use

The function NewL constructs a CImageDisplayPlugin-derived ECOM plugin.

leave
KErrNotFound If the plugin could not be found

Parameters

TUid aImplementationUid The ECOM implementation UID of the plugin
CImageDisplayFramework & aFramework A reference to the CImageDisplayFramework object that is creating this object

NumFrames(TInt &)

IMPORT_C TInt NumFrames ( TInt & aNumFrames ) const [protected, virtual]

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

OpenL()

void OpenL ( ) [protected, pure virtual]

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
KErrArgument Some of the configuration parameters are invalid

Options()

IMPORT_C TUint Options ( ) const [protected]

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

Pause()

void Pause ( ) [protected, pure virtual]

Pause image decoding

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

Play()

void Play ( ) [protected, pure virtual]

Initiate the image display operation

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

RecommendedImageSizes()

const CImageDisplay::RImageSizeArray & RecommendedImageSizes ( ) const [protected, pure virtual]

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.

ReservedVirtual1()

IMPORT_C void ReservedVirtual1 ( ) [private, virtual]

Reserved. Not for public use

ReservedVirtual2()

IMPORT_C void ReservedVirtual2 ( ) [private, virtual]

Reserved. Not for public use

ReservedVirtual3()

IMPORT_C void ReservedVirtual3 ( ) [private, virtual]

Reserved. Not for public use

ReservedVirtual4()

IMPORT_C void ReservedVirtual4 ( ) [private, virtual]

Reserved. Not for public use

SourceData()

IMPORT_C const TDesC8 & SourceData ( ) const [protected]
returns an image source descriptor
panic
ImageDisplay 4 EImageWrongType if image data source is of type other than the descriptor
Gets the source descriptor
panic
EImageWrongType The source is not a descriptor

SourceDataId()

IMPORT_C const TDesC & SourceDataId ( ) const [protected]

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

SourceDataIntent()

IMPORT_C ContentAccess::TIntent SourceDataIntent ( ) const [protected]

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

SourceFileHandle()

IMPORT_C RFile & SourceFileHandle ( ) const [protected]
returns an image source file handle
panic
ImageDisplay 4 EImageWrongType if image data source is of type other than the file handle
Gets the source file name
panic
EImageWrongType The source is not a file

SourceFilename()

IMPORT_C const TDesC & SourceFilename ( ) const [protected]
returns an image source file name
panic
ImageDisplay 4 EImageWrongType if image data source is of type other than the file name
Gets the source file name
panic
EImageWrongType The source is not a file

SourceImageSubType()

IMPORT_C const TUid SourceImageSubType ( ) const [protected]

returns a global image subtype or KNullUid if not defined Gets the source image's subtype

SourceImageType()

IMPORT_C const TUid SourceImageType ( ) const [protected]

returns a global image type Gets the source image's type

SourceMimeType()

IMPORT_C const TDesC8 & SourceMimeType ( ) const [protected]

returns an image source MIME type or KNullDesC8 if not defined Gets the source image's MIME type

SourceRect(TRect &)

IMPORT_C TBool SourceRect ( TRect & aRect ) const [protected]

returns a requested by an API client source clipping rect Gets the source image's clipping region

Parameters

TRect & aRect The source image's clipping region

SourceType()

IMPORT_C TImageSourceType SourceType ( ) const [protected]

returns an image datasource type Return whether the source is data

StopPlay()

void StopPlay ( ) [protected, pure virtual]

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.

ValidBitmap()

IMPORT_C TBool ValidBitmap ( ) const [protected, virtual]

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

Member Enumerations Documentation

Enum TImageSourceType

Data source type definitions for plug-ins

Enumerators

EImgSrcNotDefined = 0

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

Defines an ImageDisplay plug-in status flag values

Enumerators

EStatusNoMoreToDecode = 0x00000001

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

EStatusBusy = 0x00000002

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

EStatusPaused = 0x00000004

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

EStatusFrameReady = 0x00000008

The next frame has been already decoded

EStatusDisplayThisFrameIndefinetely = 0x00000010

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

EStatusPartialFrame = 0x00000020

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

EStatusEraseOutputContents = 0x00000040

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

Member Data Documentation

CImageDisplayPluginBody * iBody

CImageDisplayPluginBody * iBody [private]

CImageDisplayFramework * iFramework

CImageDisplayFramework * iFramework [private]

CImageDisplay::RImageSizeArray iImageSizes

CImageDisplay::RImageSizeArray iImageSizes [protected]

An array containing the sizes of the images.

TUid iInstanceUid

TUid iInstanceUid [private]

TAny * iReserved1

TAny * iReserved1 [private]

Future proofing not for public use