CImageTransformPlugin Class Reference

class CImageTransformPlugin : public CBase

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

Inherits from

Constructor & Destructor Documentation

CImageTransformPlugin()

IMPORT_C CImageTransformPlugin ( ) [protected]

Constructor for this class.

~CImageTransformPlugin()

IMPORT_C ~CImageTransformPlugin ( )

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

Member Functions Documentation

CancelTransform()

void CancelTransform ( ) [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

panic
EImageWrongType The destination is not a descriptor

DestFilename()

IMPORT_C const TDesC & DestFilename ( ) const [protected]

Gets the destination file name

panic
EImageWrongType The destination is not a file

DestIsData()

IMPORT_C TBool DestIsData ( ) const [protected]

Return whether the destination image is to be stored as data

DestIsFilename()

IMPORT_C TBool DestIsFilename ( ) const [protected]

Return whether 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

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

Extension(TUid, TInt &)

IMPORT_C CImageTransformPluginExtension * Extension ( TUid aExtensionUid,
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

TUid aExtensionUid Uid of the required extension
TInt & aError System wide error

MaintainAspectRatio()

IMPORT_C TBool MaintainAspectRatio ( ) const [protected]

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

NewL(TUid, CImageTransformFramework &)

IMPORT_C CImageTransformPlugin * NewL ( TUid aImplementationUid,
CImageTransformFramework & aFramework
) [private, static]

The function NewL constructs a CImageTransformPlugin-derived ECOM plugin.

leave
KErrNotFound If the plugin could not be found

Parameters

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

OpenL()

void OpenL ( ) [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
KErrUnsupported The plugin decoder doesn not support the request transformation

Options()

IMPORT_C TUint Options ( ) const [protected]

Gets the options requested by the client

PreserveImageData()

IMPORT_C TBool PreserveImageData ( ) const [protected]

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

ReservedVirtual1()

IMPORT_C void ReservedVirtual1 ( ) [private, virtual]

Reserved for future-proofing

ReservedVirtual2()

IMPORT_C void ReservedVirtual2 ( ) [private, virtual]

Reserved for future-proofing

ReservedVirtual3()

IMPORT_C void ReservedVirtual3 ( ) [private, virtual]

Reserved for future-proofing

SourceData()

IMPORT_C const TDesC8 & SourceData ( ) const [protected]

Gets the source descriptor

panic
EImageWrongType The source is not a descriptor

SourceFilename()

IMPORT_C const TDesC & SourceFilename ( ) const [protected]

Gets the source file name

panic
EImageWrongType The source is not a file

SourceImageSubType()

IMPORT_C const TUid SourceImageSubType ( ) const [protected]

Gets the source image's subtype

SourceImageType()

IMPORT_C const TUid SourceImageType ( ) const [protected]

Gets the source image's type

SourceIsData()

IMPORT_C TBool SourceIsData ( ) const [protected]

Return whether the source is data

SourceIsFilename()

IMPORT_C TBool SourceIsFilename ( ) const [protected]

Return whether the source is a file

SourceMimeType()

IMPORT_C const TDesC8 & SourceMimeType ( ) const [protected]

Gets the source image's MIME type

SourceRect(TRect &)

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

Gets the source image's clipping region

Parameters

TRect & aRect The source image's clipping region

Transform(TRequestStatus &)

void Transform ( TRequestStatus & aStatus ) [protected, pure virtual]

Initiate the image transform operation

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

Parameters

TRequestStatus & aStatus The client's request status. On completion contains an error code. KErrNone if image was transformed successfully,

Member Data Documentation

CImageTransformFramework * iFramework

CImageTransformFramework * iFramework [private]