CImageFrame Class Reference

#include <imageframe.h>

class CImageFrame : public CBase

Inherits from

  • CImageFrame
    Public Member Functions
    ~CImageFrame()
    virtual IMPORT_C TDes8 &Data()
    virtual IMPORT_C const TDesC8 &Data()
    virtual IMPORT_C RChunk &DataChunk()
    virtual IMPORT_C TIntDataOffset()
    virtual IMPORT_C const TFrameFormatBase &FrameFormat()
    virtual IMPORT_C const TFrameLayoutBase &FrameLayout()
    virtual IMPORT_C const TSize &FrameSizeInPixels()
    virtual IMPORT_C TBoolIsChunk()
    virtual 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 &)
    virtual IMPORT_C voidSetFrameFormatL(const TFrameFormatBase &)
    virtual IMPORT_C voidSetFrameLayoutL(const TFrameLayoutBase &)
    virtual 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 &)
    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()

    Detailed Description

    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.

    Constructor & Destructor Documentation

    CImageFrame ( )

    IMPORT_CCImageFrame()[protected]

    Constructor for the CImageFrame class.

    ~CImageFrame ( )

    IMPORT_C~CImageFrame()

    Destructor for the CImageFrame class.

    Member Function 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.
    ParameterDescription
    aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
    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.
    ParameterDescription
    aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
    aMaxBufferSizeThe maximum space in bytes reserved for this frame.
    aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
    aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
    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.
    ParameterDescription
    aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
    aMaxBufferSizeThe maximum space in bytes reserved for this frame.
    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.
    ParameterDescription
    aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
    aMaxBufferSizeThe maximum space in bytes reserved for this frame.
    aDataOffsetThe offset in bytes at which the data for this frame starts from the chunk start.
    aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
    aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
    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.

    Returns: A writeable TDes8 reference to the data buffer.

    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.

    Returns: A TDesC8 reference to the data buffer for reading only.

    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.

    Returns: A reference to the chunk.

    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.

    Returns: The offset at which the data for this frame starts in bytes.

    FrameFormat ( )

    IMPORT_C const TFrameFormatBase &FrameFormat()const [virtual]

    Returns the format of the CImageFrame object.

    Returns: A reference to a TFrameFormatBase object that describes the format of the CImageFrame object.

    FrameLayout ( )

    IMPORT_C const TFrameLayoutBase &FrameLayout()const [virtual]

    Returns the memory layout of the CImageFrame object.

    Returns: A reference to a TFrameLayoutBase object that describes 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.

    Returns: The image size in pixels.

    IsChunk ( )

    IMPORT_C TBoolIsChunk()const [virtual]

    Returns whether CImageFrame object encapsulates a chunk.

    Returns: ETrue if the CImageFrame object uses a chunk, otherwise EFalse.

    MaxBufferSize ( )

    IMPORT_C TIntMaxBufferSize()const [virtual]

    Returns the maximum space reserved for this frame.

    Returns: The maximum space in bytes 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.
    ParameterDescription
    aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
    aMaxBufferSizeThe maximum space in bytes reserved for this frame.

    Returns: A pointer to the newly created CImageFrame object.

    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.
    ParameterDescription
    aBufferA reference to the TDes8 object encapsulated by the CImageFrame object.
    aMaxBufferSizeThe maximum space in bytes reserved for this frame.
    aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
    aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
    aFrameLayoutA reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object.

    Returns: A pointer to the newly created 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.
    ParameterDescription
    aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
    aMaxBufferSizeThe maximum space in bytes reserved for this frame.
    aDataOffsetThe offset in bytes at which the data for this frame starts.

    Returns: A pointer to the newly created CImageFrame object.

    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.
    ParameterDescription
    aBufferA pointer to the RChunk object encapsulated by the CImageFrame object.
    aMaxBufferSizeThe maximum space in bytes reserved for this frame.
    aDataOffsetThe offset in bytes at which the data for this frame starts from the chunk start.
    aFrameSizeA reference to a TSize object that defines the frame size in pixels of the CImageFrame object.
    aFrameFormatA reference to a TFrameFormatBase object that defines the format of the CImageFrame object.
    aFrameLayoutA reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object.

    Returns: A pointer to the newly created CImageFrame object.

    SetFrameFormatL ( const TFrameFormatBase & )

    IMPORT_C voidSetFrameFormatL(const TFrameFormatBase &aFormat)[virtual]

    Sets the format of the CImageFrame object.

    leave
    KErrNoMemory
    ParameterDescription
    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
    ParameterDescription
    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.
    ParameterDescription
    aFrameSizeA reference to a TSize object used to set the image size (in pixels) for the CImageFrame object.