CMMFTransferBuffer Class Reference

class CMMFTransferBuffer : public CMMFDataBuffer

Inherits from

Public Member Functions
~CMMFTransferBuffer ()
TUint BufferSize ()
TDes8 & Data ()
const TDesC8 & Data ()
IMPORT_C void MapOutBuffer ()
IMPORT_C CMMFTransferBuffer * NewL ( RTransferWindow &, TUint )
void SetPosition ( TUint )
void SetRequestSizeL ( TInt )
IMPORT_C RTransferWindow & TransferWindow ()
IMPORT_C TInt UpdateTransferWindow ( RTransferWindow &, TUint )
Private Member Functions
CMMFTransferBuffer ()
void ConstructL ( RTransferWindow &, TUint )
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()
CMMFBuffer::CMMFBuffer(TUid)
CMMFBuffer::FrameNumber()const
CMMFBuffer::IsFileServerSafe(TUid)
CMMFBuffer::IsSupportedDataBuffer(TUid)
CMMFBuffer::LastBuffer()const
CMMFBuffer::NextFrame()
CMMFBuffer::Position()const
CMMFBuffer::RequestSize()const
CMMFBuffer::SetFrameNumber(TUint)
CMMFBuffer::SetLastBuffer(TBool)
CMMFBuffer::SetStatus(TBufferStatus)
CMMFBuffer::SetTimeToPlay(TTimeIntervalMicroSeconds)
CMMFBuffer::Status()
CMMFBuffer::TimeToPlay()const
CMMFBuffer::Type()const
CMMFBuffer::~CMMFBuffer()
CMMFDataBuffer::CMMFDataBuffer(TUid)
CMMFDataBuffer::NewL()
CMMFDataBuffer::NewL(TInt)
CMMFDataBuffer::~CMMFDataBuffer()
Private Attributes
TPtr8 iPtr
RTransferWindow iTransferWindow
TBool iTransferWindowMappedInOK
Inherited Attributes
CMMFBuffer::iFrameNumber
CMMFBuffer::iLastBuffer
CMMFBuffer::iPosition
CMMFBuffer::iRequestSize
CMMFBuffer::iStatus
CMMFBuffer::iTimeToPlay
CMMFBuffer::iType

Constructor & Destructor Documentation

CMMFTransferBuffer()

CMMFTransferBuffer ( ) [private, inline]

Private constructor.

~CMMFTransferBuffer()

IMPORT_C ~CMMFTransferBuffer ( )

CMMFTransferBuffer destructor

Destructor maps out RTransferBuffer and closes RTransferWindow .

Member Functions Documentation

BufferSize()

TUint BufferSize ( ) const [virtual]

Returns the actual data size (ie. not the max length) of the data contained in the CMMFTransferBuffer .

ConstructL(RTransferWindow &, TUint)

void ConstructL ( RTransferWindow & aTransferWindow,
TUint aDataLength
) [private]

This method is not supported under EKA2.

Internal ConstructL.

Note this method checks if a transfer buffer has been mapped in and will leave with KErrNotReady if the RTransferWindow does not have a mapped in RTransferBuffer.

Parameters

RTransferWindow & aTransferWindow This is a reference to a valid RTransferWindow that has an RTransferBuffer mapped in.
TUint aDataLength The length of the data.

Data()

TDes8 & Data ( ) [virtual]

Returns a descriptor to the data contained in the CMMFTransferBuffer .

Data()

const TDesC8 & Data ( ) const [virtual]

Returns a descriptor to the data contained in the CMMFTransferBuffer .

MapOutBuffer()

IMPORT_C void MapOutBuffer ( )

Maps the buffer out of the transfer window.

This method should be called in preference to calling MapOutBuffer directly on the RtransferWindow so that the CMMFTransferBuffer knows that it is no longer available.

NewL(RTransferWindow &, TUint)

IMPORT_C CMMFTransferBuffer * NewL ( RTransferWindow & aTransferWindow,
TUint aDataLength = 0
) [static]

This function is not supported under EKA2.

Method to instantiate a CMMFTransferBuffer . This NewL creates a CMMFTransferBuffer .

Parameters

RTransferWindow & aTransferWindow This is a valid RTransferWindow that has an RTransferBuffer mapped in.
TUint aDataLength = 0 This parameter sets the length of the actual data present in the transferbuffer. This is because the length of actual data may be less than the length of the mapped in transfer buffer.

SetPosition(TUint)

void SetPosition ( TUint aPosition ) [virtual]

Sets the position.

This method is used by components (eg codecs) which read data from a buffer and wish to store a read position marker for further reads.

Note: The position cannot exceed the size of the actual data not the max length.

Parameters

TUint aPosition The position.

SetRequestSizeL(TInt)

void SetRequestSizeL ( TInt aSize ) [virtual]

Sets the request size.

This function is used in cases where a component (eg. a data source) may not be able or be desirable to write to the entire max length of the buffer (eg. variable bit rate codecs). In this case, the SetRequestSizeL can be set which can be read by the RequestSize() function in the component so that it knows to only write data upto the request size and not fill the buffer up to its max length.

Parameters

TInt aSize The request size.

TransferWindow()

IMPORT_C RTransferWindow & TransferWindow ( )

This function is not supported under EKA2.

Returns a reference to the transfer window currently used by the CMMFtransferBuffer.

UpdateTransferWindow(RTransferWindow &, TUint)

IMPORT_C TInt UpdateTransferWindow ( RTransferWindow & aTransferWindow,
TUint aDataLength = 0
)

This method is not supported under EKA2.

Modifies the CMMFTransferBuffer by updating the RTransferWindow .

This method is used if the same CMMFTransferBuffer is used throughout eg. if a single CMMFTransferBuffer is created upfront but a different transfer window (or the same transfer window with a different buffer mapped in is used). That is the same CMMFTransferBuffer but the actrual buffer may be different.

Note: If the updated RTransferWindow is new, then the old buffer must be mapped out first by a call to CMMFTransferBuffer::MapOutBuffer() and the RtransferWindow handle closed outside the CMMFTransferBuffer .

Parameters

RTransferWindow & aTransferWindow The RTransferWindow to update - can be a new RTransferWindow or the same RTransferWindow with a new RTransferBuffer mapped in.
TUint aDataLength = 0 The length of the data.

Member Data Documentation

TPtr8 iPtr

TPtr8 iPtr [private]

RTransferWindow iTransferWindow

RTransferWindow iTransferWindow [private]

TBool iTransferWindowMappedInOK

TBool iTransferWindowMappedInOK [private]