CImageFrame Class Reference

class CImageFrame : public CBase

CImageFrame class exposes an API for accessing binary image data in a uniform way. It is implemented as a wrapper around TDes8 or RChunk objects.

Inherits from

Public Member Functions
~CImageFrame()
IMPORT_C TDes8 &Data()
IMPORT_C const TDesC8 &Data()
IMPORT_C RChunk &DataChunk()
IMPORT_C TIntDataOffset()
IMPORT_C const TFrameFormatBase &FrameFormat()
IMPORT_C const TFrameLayoutBase &FrameLayout()
IMPORT_C const TSize &FrameSizeInPixels()
IMPORT_C TBoolIsChunk()
IMPORT_C TIntMaxBufferSize()
IMPORT_C CImageFrame *NewL(const TDes8 &, TInt)
IMPORT_C CImageFrame *NewL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
IMPORT_C CImageFrame *NewL(const RChunk *, TInt, TInt)
IMPORT_C CImageFrame *NewL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
IMPORT_C voidSetFrameFormatL(const TFrameFormatBase &)
IMPORT_C voidSetFrameLayoutL(const TFrameLayoutBase &)
IMPORT_C voidSetFrameSizeInPixels(const TSize &)
Protected Member Functions
CImageFrame()
IMPORT_C voidConstructL(const TDes8 &, TInt)
IMPORT_C voidConstructL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
IMPORT_C voidConstructL(const RChunk *, TInt, TInt)
IMPORT_C voidConstructL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
Private Member Functions
IMPORT_C voidReserved1()
IMPORT_C voidReserved2()
IMPORT_C voidReserved3()
IMPORT_C voidReserved4()
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()
Private Attributes
CBody *iBody

Constructor & Destructor Documentation

CImageFrame()

IMPORT_CCImageFrame()[protected]

Constructor for the CImageFrame class.

~CImageFrame()

IMPORT_C~CImageFrame()

Destructor for the CImageFrame class.

Member Functions Documentation

ConstructL(const TDes8 &, TInt)

IMPORT_C voidConstructL(const TDes8 &aBuffer,
TIntaMaxBufferSize
)[protected]

Function used to initialise a CImageFrame object encapsulating a descriptor.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const TDes8 & aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.

ConstructL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)

IMPORT_C voidConstructL(const TDes8 &aBuffer,
TIntaMaxBufferSize,
const TSize &aFrameSize,
const TFrameFormatBase &aFrameFormat,
const TFrameLayoutBase &aFrameLayout
)[protected]

Function used to initialise a CImageFrame object encapsulating a descriptor.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const TDes8 & aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.
const TSize & aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
const TFrameFormatBase & aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
const TFrameLayoutBase & aFrameLayoutA reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object.

ConstructL(const RChunk *, TInt, TInt)

IMPORT_C voidConstructL(const RChunk *aBuffer,
TIntaMaxBufferSize,
TIntaDataOffset
)[protected]

Function used to initialise a CImageFrame object encapsulating a chunk.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const RChunk * aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.
TInt aDataOffsetThe offset in bytes at which the data for this frame starts from the chunk start.

ConstructL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)

IMPORT_C voidConstructL(const RChunk *aBuffer,
TIntaMaxBufferSize,
TIntaDataOffset,
const TSize &aFrameSize,
const TFrameFormatBase &aFrameFormat,
const TFrameLayoutBase &aFrameLayout
)[protected]

Function used to initialise a CImageFrame object encapsulating a chunk.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const RChunk * aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.
TInt aDataOffsetThe offset in bytes at which the data for this frame starts from the chunk start.
const TSize & aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
const TFrameFormatBase & aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
const TFrameLayoutBase & aFrameLayoutA reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object.

Data()

IMPORT_C TDes8 &Data()[virtual]

Provides a writeable TDes8 reference to the data buffer. The reference can be used for reading and writing the data.

Data()

IMPORT_C const TDesC8 &Data()const [virtual]

Provides a TDesC8 reference to the data buffer. The reference can only be used for reading the data.

DataChunk()

IMPORT_C RChunk &DataChunk()[virtual]

Returns a reference to the chunk encapsulated by the CImageFrame object.

Note:

The function will panic if the object does not encapsulate an RChunk. Before calling this function call IsChunk() to check if the CImageFrame object encapsulates a chunk.

panic
EInvalidValue if the CImageFrame object does not encapsulate an RChunk.

DataOffset()

IMPORT_C TIntDataOffset()const [virtual]

Returns the offset at which the data for this frame starts. For CImageFrame objects encapsulating descriptors the offset is zero.

FrameFormat()

IMPORT_C const TFrameFormatBase &FrameFormat()const [virtual]

Returns the format of the CImageFrame object.

FrameLayout()

IMPORT_C const TFrameLayoutBase &FrameLayout()const [virtual]

Returns the memory layout of the CImageFrame object.

FrameSizeInPixels()

IMPORT_C const TSize &FrameSizeInPixels()const [virtual]

Returns the size in pixels of the image the CImageFrame refers to.

IsChunk()

IMPORT_C TBoolIsChunk()const [virtual]

Returns whether CImageFrame object encapsulates a chunk.

MaxBufferSize()

IMPORT_C TIntMaxBufferSize()const [virtual]

Returns the maximum space reserved for this frame.

NewL(const TDes8 &, TInt)

IMPORT_C CImageFrame *NewL(const TDes8 &aBuffer,
TIntaMaxBufferSize
)[static]

Factory function used to create a CImageFrame object encapsulating a descriptor.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const TDes8 & aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.

NewL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)

IMPORT_C CImageFrame *NewL(const TDes8 &aBuffer,
TIntaMaxBufferSize,
const TSize &aFrameSize,
const TFrameFormatBase &aFrameFormat,
const TFrameLayoutBase &aFrameLayout
)[static]

Factory function used to create a CImageFrame object encapsulating a descriptor.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const TDes8 & aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.
const TSize & aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
const TFrameFormatBase & aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
const TFrameLayoutBase & aFrameLayoutA reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object.

NewL(const RChunk *, TInt, TInt)

IMPORT_C CImageFrame *NewL(const RChunk *aBuffer,
TIntaMaxBufferSize,
TIntaDataOffset
)[static]

Factory function used to create a CImageFrame object encapsulating a chunk.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const RChunk * aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.
TInt aDataOffsetThe offset in bytes at which the data for this frame starts.

NewL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)

IMPORT_C CImageFrame *NewL(const RChunk *aBuffer,
TIntaMaxBufferSize,
TIntaDataOffset,
const TSize &aFrameSize,
const TFrameFormatBase &aFrameFormat,
const TFrameLayoutBase &aFrameLayout
)[static]

Factory function used to create a CImageFrame object encapsulating a chunk.

leave
KErrArgument
leave
KErrNoMemory or other system wide error code.

Parameters

const RChunk * aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
TInt aMaxBufferSizeThe maximum space in bytes reserved for this frame.
TInt aDataOffsetThe offset in bytes at which the data for this frame starts from the chunk start.
const TSize & aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
const TFrameFormatBase & aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
const TFrameLayoutBase & aFrameLayoutA reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object.

Reserved1()

IMPORT_C voidReserved1()[private, virtual]

Reserved2()

IMPORT_C voidReserved2()[private, virtual]

Reserved3()

IMPORT_C voidReserved3()[private, virtual]

Reserved4()

IMPORT_C voidReserved4()[private, virtual]

SetFrameFormatL(const TFrameFormatBase &)

IMPORT_C voidSetFrameFormatL(const TFrameFormatBase &aFormat)[virtual]

Sets the format of the CImageFrame object.

leave
KErrNoMemory

Parameters

const TFrameFormatBase & aFormatA reference to a TFrameFormatBase object that is used to set the format of the CImageFrame.

SetFrameLayoutL(const TFrameLayoutBase &)

IMPORT_C voidSetFrameLayoutL(const TFrameLayoutBase &aFrameLayout)[virtual]

Sets the layout of the CImageFrame object.

leave
KErrNoMemory

Parameters

const TFrameLayoutBase & aFrameLayoutA reference to a TFrameLayoutBase object that is used to set the memory layout of the CImageFrame object.

SetFrameSizeInPixels(const TSize &)

IMPORT_C voidSetFrameSizeInPixels(const TSize &aFrameSize)[virtual]

Sets the size in pixels of the image CImageFrame refers to.

panic
EInvalidValue if the framesize value is invalid.

Parameters

const TSize & aFrameSizeA reference to a TSize object used to set the image size (in pixels) for the CImageFrame object.

Member Data Documentation

CBody * iBody

CBody *iBody[private]