CImageTransformPlugin Class Reference

#include <icl/imagetransformplugin.h>

Link against: imagetransform.lib

class CImageTransformPlugin : public CBase, public CBase

Inherits from

Detailed Description

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

Constructor & Destructor Documentation

CImageTransformPlugin ( )

IMPORT_CCImageTransformPlugin()[protected]

Constructor for this class.

~CImageTransformPlugin ( )

IMPORT_C~CImageTransformPlugin()

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

Member Function Documentation

CancelTransform ( )

voidCancelTransform()[protected, pure virtual]

Cancel the image transform 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.

DestData ( )

IMPORT_C HBufC8 *&DestData()const [protected]

Gets the destination descriptor

Return Value
A reference to a pointer to be used for storing the destination image. The pointer is owned by the client app and is null to start with
Panic Codes
EImageWrongTypeThe destination is not a descriptor

DestFilename ( )

IMPORT_C const TDesC &DestFilename()const [protected]

Gets the destination file name

Return Value
The destination file name
Panic Codes
EImageWrongTypeThe destination is not a file

DestIsData ( )

IMPORT_C TBoolDestIsData()const [protected]

Return whether the destination image is to be stored as data

Return Value
ETrue if the destination image is to be stored as data

DestIsFilename ( )

IMPORT_C TBoolDestIsFilename()const [protected]

Return whether the destination image is to be stored in a file

Return Value
ETrue If the destination image is to be stored in a file

DestinationSizeInPixels ( )

IMPORT_C const TSize &DestinationSizeInPixels()const [protected]

Gets the requested size of the destination image

Return Value
The destination image size

Extension ( )

IMPORT_C CImageTransformPluginExtension *Extension()const [protected, virtual]

When a plugin extension has been implemented, this function should be implemented by the plugin writer to enable the client access to the extension

Return Value
A pointer to a fully constructed CImageTransformPluginExtension NULL, if there is no extension to this plugin

Extension ( TUid, TInt & )

IMPORT_C CImageTransformPluginExtension *Extension(TUidaExtensionUid,
TInt &aError
)const [virtual]

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
aExtensionUidUid of the required extension
aErrorSystem wide error
Return Value
A pointer to a fully constructed CImageTransformPluginExtension NULL, if there is no extension to this plugin

MaintainAspectRatio ( )

IMPORT_C TBoolMaintainAspectRatio()const [protected]

Return whether the client wishes to maintain the source image's aspect ratio

Return Value
ETrue if the aspect ratio is to be maintained

OpenL ( )

voidOpenL()[protected, pure virtual]

Initialise the plugin and check the image transform settings.

This is called by the ImageTransform framework when the client app calls CImageTransform::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 KErrNotSupported.

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

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

Leave Codes
KErrUnsupportedThe plugin decoder doesn not support the request transformation

Options ( )

IMPORT_C TUintOptions()const [protected]

Gets the options requested by the client

Return Value
The options requested by the client

PreserveImageData ( )

IMPORT_C TBoolPreserveImageData()const [protected]

Return whether the client wishes to attempt to maintain the original image data

Return Value
ETrue if an attempt should be made to preserve the original image data

SourceData ( )

IMPORT_C const TDesC8 &SourceData()const [protected]

Gets the source descriptor

Return Value
A reference to the source descriptor
Panic Codes
EImageWrongTypeThe source is not a descriptor

SourceFilename ( )

IMPORT_C const TDesC &SourceFilename()const [protected]

Gets the source file name

Return Value
The source file name
Panic Codes
EImageWrongTypeThe source is not a file

SourceImageSubType ( )

IMPORT_C const TUidSourceImageSubType()const [protected]

Gets the source image's subtype

Return Value
The UID of the source type KNullUid if not defined

SourceImageType ( )

IMPORT_C const TUidSourceImageType()const [protected]

Gets the source image's type

Return Value
The UID of the source type KNullUid if not defined

SourceIsData ( )

IMPORT_C TBoolSourceIsData()const [protected]

Return whether the source is data

Return Value
ETrue if the source image is stored as data

SourceIsFilename ( )

IMPORT_C TBoolSourceIsFilename()const [protected]

Return whether the source is a file

Return Value
ETrue if the source image is stored in a file

SourceMimeType ( )

IMPORT_C const TDesC8 &SourceMimeType()const [protected]

Gets the source image's MIME type

Return Value
A reference to the source image's MIME type KNullDesC8 if not defined

SourceRect ( TRect & )

IMPORT_C TBoolSourceRect(TRect &aRect)const [protected]

Gets the source image's clipping region

Parameters
aRectThe source image's clipping region
Return Value
ETrue if a clipping region has been defined

Transform ( TRequestStatus & )

voidTransform(TRequestStatus &aStatus)[protected, pure virtual]

Initiate the image transform operation

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

Parameters
aStatusThe client's request status. On completion contains an error code. KErrNone if image was transformed successfully,