#include <icl/imagedisplayplugin.h>
Link against: imagedisplay.lib
class CImageDisplayPlugin : public CBase, public CBase |
Protected Attributes | |
---|---|
CImageDisplay::RImageSizeArray | iImageSizes |
Public Member Enumerations | |
---|---|
enum | TImageSourceType { EImgSrcNotDefined, EImgSrcFileName, EImgSrcFileHandle, EImgSrcDescriptor } |
enum | TPluginStatus { EStatusNoMoreToDecode, EStatusBusy, EStatusPaused, EStatusFrameReady, ..., EStatusEraseOutputContents } |
Public Member Functions | |
---|---|
~CImageDisplayPlugin() |
This is the plugin API for the Image Display framework Intended for use by plugin writers only.
CImageDisplay::RImageSizeArray | iImageSizes | [protected] |
An array containing the sizes of the images.
Data source type definitions for plug-ins
Enumerator | Value | Description |
---|---|---|
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 |
Defines an ImageDisplay plug-in status flag values
Enumerator | Value | Description |
---|---|---|
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 |
IMPORT_C | CImageDisplayPlugin | ( | ) | [protected] |
Exported default constructor
Constructor for the CImageDisplayPlugin class.
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.
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 | |
---|---|
aBitmap | a pointer to the bitmap that contains decoding result |
aStatus | the plugin status that should be combination of the TPluginStatus set |
aUpdatedArea | a rectangle within the aBitmap that was updated during the latest operation |
aError | error code of latest operation |
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
IMPORT_C void | CancelCallback | ( | ) | [protected] |
A plug-in should use this function to cancel callback to a client if it is stil pending
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
IMPORT_C TDisplayMode | DisplayMode | ( | ) | const [protected] |
returns a requested by an API client display mode for an image being decoded Return the display mode
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 | |
---|---|
aIFaceUid | a request extension Uid |
aIFacePtr | a reference to the pointer that should be given extension interface pointer on success |
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 | |
---|---|
aBitmap | a reference to bitmap pointer |
aMask | a reference to bitmap pointer, a plug-in may return NULL if no mask is available |
IMPORT_C TUint | ImageStatus | ( | ) | const [protected, virtual] |
A plug-in that supports source image status checking has to override this function
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
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 Codes | |
---|---|
KErrArgument | Some of the configuration parameters are invalid |
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
void | Pause | ( | ) | [protected, pure virtual] |
Pause image decoding
This is a virtual function that each individual plugin must implement.
void | Play | ( | ) | [protected, pure virtual] |
Initiate the image display operation
This is a virtual function that each individual plugin must implement.
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.
IMPORT_C const TDesC8 & | SourceData | ( | ) | const [protected] |
Panic Codes | |
---|---|
ImageDisplay | 4 EImageWrongType if image data source is of type other than the descriptor |
EImageWrongType | The source is not a descriptor |
IMPORT_C const TDesC & | SourceDataId | ( | ) | const [protected] |
returns requested content data Id that should be used to open content
IMPORT_C ContentAccess::TIntent | SourceDataIntent | ( | ) | const [protected] |
returns an intent that is requested by client for opening the image source
IMPORT_C RFile & | SourceFileHandle | ( | ) | const [protected] |
Panic Codes | |
---|---|
ImageDisplay | 4 EImageWrongType if image data source is of type other than the file handle |
EImageWrongType | The source is not a file |
IMPORT_C const TDesC & | SourceFilename | ( | ) | const [protected] |
Panic Codes | |
---|---|
ImageDisplay | 4 EImageWrongType if image data source is of type other than the file name |
EImageWrongType | The source is not a file |
IMPORT_C const TUid | SourceImageSubType | ( | ) | const [protected] |
returns a global image subtype or KNullUid if not defined Gets the source image's subtype
IMPORT_C const TUid | SourceImageType | ( | ) | const [protected] |
returns a global image type Gets the source image's type
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
returns a requested by an API client source clipping rect Gets the source image's clipping region
Parameters | |
---|---|
aRect | The source image's clipping region |
IMPORT_C TImageSourceType | SourceType | ( | ) | const [protected] |
returns an image datasource type Return whether the source is data
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.
IMPORT_C TBool | ValidBitmap | ( | ) | const [protected, virtual] |
A plug-in that supports target bitmap status checkig has to override this function