CImageEncoderPriv Class Reference

class CImageEncoderPriv : public CActive

Inherits from

Public Member Functions
~CImageEncoderPriv ()
TBool AmInThread ()
void BodyHandleCustomSyncL ( TInt )
void BodyInitCustomAsyncL ( TInt )
void BodyNotifyComplete ()
void Cleanup ()
void Convert ( RThread &, TRequestStatus *, const CFbsBitmap &, const CFrameImageData *)
void CreatePluginL ()
TInt CurrentImageSizeL ()
void CustomAsync ( RThread &, TRequestStatus *, TInt )
void CustomSyncL ( TInt )
TBufPtr8 & DestinationData ()
void DoCancel ()
void DoConvert ()
CImageEncoder::TOptions EncoderOptions ()
void FinishConvertL ()
const TSize & FrameInfoOverallSizeInPixels ()
void GetExtensionL ( TUid , MImageConvExtension *&)
void HandleProcessFrameResult ( TInt , TFrameState )
CImageWriteCodec * ImageWriteCodec ()
TUid ImplementationUid ()
void InitConvertL ()
CImageEncoderPriv * NewL ( CImageEncodeConstruct *, MImageEncoderPrivSupport *)
CImageEncoderPlugin * Plugin ()
TInt & Position ()
void RegisterClientRequestStatus ( RThread &, TRequestStatus *)
void RequestComplete ( TInt )
void RequestInitL ()
void SelfComplete ( TInt )
void SetDataL ( HBufC8 *&, const CImageEncoder::TOptions )
void SetFileL ( RFs &, const TDesC &, const CImageEncoder::TOptions )
void SetFileL ( RFile &, const CImageEncoder::TOptions )
void SetImageWriteCodec ( CImageWriteCodec *)
void SetSelfPending ()
void SetThumbnail ( TBool )
TBool ShouldAbort ()
const CFbsBitmap & Source ()
void StartActivity ()
TInt & StartPosition ()
TBool ValidSource ()
void WriteDataL ( TInt , const TDesC8 &)
void WriteDataPositionIncL ( TInt , const TDesC8 &)
Private Member Functions
CImageEncoderPriv ( CImageEncodeConstruct *, MImageEncoderPrivSupport *)
void RunL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
Inherited Enumerations
CActive:TPriority
Private Attributes
CImageEncodeConstruct * iConstruct
TRequestStatus * iConvStatus
TBool iConvertStarted
HBufC8 ** iDestination
HBufC8 * iDstBuffer
TBufPtr8 iDstDes
RFile iFile
TFileName iFileName
HBufC8 * iFinalDstBuffer
TFrameInfo iFrameInfo
RFs * iFs
TBool iHeaderWritten
TImageParameterData iImageParameterData
CImageWriteCodec * iImageWriteCodec
TBool iLastBuffer
CImageEncoder::TOptions iOptions
CImageEncoderPlugin * iPlugin
TInt iPosition
RThread * iRequestThread
const CFbsBitmap * iSource
TInt iStartPosition
MImageEncoderPrivSupport * iSupport
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CImageEncoderPriv(CImageEncodeConstruct *, MImageEncoderPrivSupport *)

CImageEncoderPriv ( CImageEncodeConstruct * aConstruct,
MImageEncoderPrivSupport * aSupport
) [private]

Parameters

CImageEncodeConstruct * aConstruct
MImageEncoderPrivSupport * aSupport

~CImageEncoderPriv()

~CImageEncoderPriv ( ) [virtual]

Member Functions Documentation

AmInThread()

TBool AmInThread ( ) const

Indicate if running in a separate thread

BodyHandleCustomSyncL(TInt)

void BodyHandleCustomSyncL ( TInt aParam ) [inline]

Default version of HandleCustomSyncL - always leaves with KErrNotSupported

Parameters

TInt aParam

BodyInitCustomAsyncL(TInt)

void BodyInitCustomAsyncL ( TInt aParam ) [inline]

Default version of InitCustomAsyncL - always leaves with KErrNotSupported

Parameters

TInt aParam

BodyNotifyComplete()

void BodyNotifyComplete ( ) [inline]

Default version of NotifyComplete - NO-OP

Cleanup()

void Cleanup ( )

Convert(RThread &, TRequestStatus *, const CFbsBitmap &, const CFrameImageData *)

void Convert ( RThread & aRequestThread,
TRequestStatus * aRequestStatus,
const CFbsBitmap & aSource,
const CFrameImageData * aFrameImageData
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus
const CFbsBitmap & aSource
const CFrameImageData * aFrameImageData

CreatePluginL()

void CreatePluginL ( )

CurrentImageSizeL()

TInt CurrentImageSizeL ( ) const

CustomAsync(RThread &, TRequestStatus *, TInt)

void CustomAsync ( RThread & aRequestThread,
TRequestStatus * aRequestStatus,
TInt aParam
)

Plugin is interrogated with InitCustomAsyncL. If this works, then set internal Convert() cycle going

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus
TInt aParam

CustomSyncL(TInt)

void CustomSyncL ( TInt aParam )

Passes on CustomSyncL to plugin

Parameters

TInt aParam

DestinationData()

TBufPtr8 & DestinationData ( )

DoCancel()

void DoCancel ( ) [virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

DoConvert()

void DoConvert ( )

EncoderOptions()

CImageEncoder::TOptions EncoderOptions ( ) const [inline]

FinishConvertL()

void FinishConvertL ( )

FrameInfoOverallSizeInPixels()

const TSize & FrameInfoOverallSizeInPixels ( ) const [inline]

GetExtensionL(TUid, MImageConvExtension *&)

void GetExtensionL ( TUid aExtUid,
MImageConvExtension *& aExtPtr
)

Parameters

TUid aExtUid
MImageConvExtension *& aExtPtr

HandleProcessFrameResult(TInt, TFrameState)

void HandleProcessFrameResult ( TInt aErrCode,
TFrameState aCodecState
)

Parameters

TInt aErrCode
TFrameState aCodecState

ImageWriteCodec()

CImageWriteCodec * ImageWriteCodec ( ) const [inline]

ImplementationUid()

TUid ImplementationUid ( ) const

InitConvertL()

void InitConvertL ( )

NewL(CImageEncodeConstruct *, MImageEncoderPrivSupport *)

CImageEncoderPriv * NewL ( CImageEncodeConstruct * aConstruct,
MImageEncoderPrivSupport * aSupport
) [static]

Parameters

CImageEncodeConstruct * aConstruct
MImageEncoderPrivSupport * aSupport

Plugin()

CImageEncoderPlugin * Plugin ( ) const [inline]

Position()

TInt & Position ( ) [inline]

RegisterClientRequestStatus(RThread &, TRequestStatus *)

void RegisterClientRequestStatus ( RThread & aRequestThread,
TRequestStatus * aRequestStatus
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus

RequestComplete(TInt)

void RequestComplete ( TInt aReason )

Parameters

TInt aReason

RequestInitL()

void RequestInitL ( )

RunL()

void RunL ( ) [private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

SelfComplete(TInt)

void SelfComplete ( TInt aReason )

Parameters

TInt aReason

SetDataL(HBufC8 *&, const CImageEncoder::TOptions)

void SetDataL ( HBufC8 *& aDestinationData,
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone
)

Parameters

HBufC8 *& aDestinationData
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone

SetFileL(RFs &, const TDesC &, const CImageEncoder::TOptions)

void SetFileL ( RFs & aFs,
const TDesC & aDestinationFilename,
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone
)

Parameters

RFs & aFs
const TDesC & aDestinationFilename
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone

SetFileL(RFile &, const CImageEncoder::TOptions)

void SetFileL ( RFile & aFile,
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone
)

Parameters

RFile & aFile
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone

SetImageWriteCodec(CImageWriteCodec *)

void SetImageWriteCodec ( CImageWriteCodec * aImageWriteCodec ) [inline]

Parameters

CImageWriteCodec * aImageWriteCodec

SetSelfPending()

void SetSelfPending ( )

SetThumbnail(TBool)

void SetThumbnail ( TBool aDoGenerateThumbnail )

Parameters

TBool aDoGenerateThumbnail

ShouldAbort()

TBool ShouldAbort ( ) const

Indicate if a decode should abort early (ie. following a Cancel). Always false unless in a thread.

Source()

const CFbsBitmap & Source ( ) const [inline]

StartActivity()

void StartActivity ( )

StartPosition()

TInt & StartPosition ( ) [inline]

ValidSource()

TBool ValidSource ( ) const [inline]

WriteDataL(TInt, const TDesC8 &)

void WriteDataL ( TInt aPosition,
const TDesC8 & aDes
)

Parameters

TInt aPosition
const TDesC8 & aDes

WriteDataPositionIncL(TInt, const TDesC8 &)

void WriteDataPositionIncL ( TInt aPosition,
const TDesC8 & aDes
)

Parameters

TInt aPosition
const TDesC8 & aDes

Member Data Documentation

CImageEncodeConstruct * iConstruct

CImageEncodeConstruct * iConstruct [private]

TRequestStatus * iConvStatus

TRequestStatus * iConvStatus [private]

TBool iConvertStarted

TBool iConvertStarted [private]

HBufC8 ** iDestination

HBufC8 ** iDestination [private]

HBufC8 * iDstBuffer

HBufC8 * iDstBuffer [private]

TBufPtr8 iDstDes

TBufPtr8 iDstDes [private]

RFile iFile

RFile iFile [private]

TFileName iFileName

TFileName iFileName [private]

HBufC8 * iFinalDstBuffer

HBufC8 * iFinalDstBuffer [private]

TFrameInfo iFrameInfo

TFrameInfo iFrameInfo [private]

RFs * iFs

RFs * iFs [private]

TBool iHeaderWritten

TBool iHeaderWritten [private]

TImageParameterData iImageParameterData

TImageParameterData iImageParameterData [private]

CImageWriteCodec * iImageWriteCodec

CImageWriteCodec * iImageWriteCodec [private]

TBool iLastBuffer

TBool iLastBuffer [private]

CImageEncoder::TOptions iOptions

CImageEncoder::TOptions iOptions [private]

CImageEncoderPlugin * iPlugin

CImageEncoderPlugin * iPlugin [private]

TInt iPosition

TInt iPosition [private]

RThread * iRequestThread

RThread * iRequestThread [private]

const CFbsBitmap * iSource

const CFbsBitmap * iSource [private]

TInt iStartPosition

TInt iStartPosition [private]

MImageEncoderPrivSupport * iSupport

MImageEncoderPrivSupport * iSupport [private]