#include <mmf/server/mmfdatabuffer.h>
Link against: mmfserverbaseclasses.lib
class CMMFTransferBuffer : public CMMFDataBuffer |
Public Member Functions | |
---|---|
~CMMFTransferBuffer() | |
virtual TUint | BufferSize() |
virtual TDes8 & | Data() |
virtual const TDesC8 & | Data() |
IMPORT_C void | MapOutBuffer() |
IMPORT_C CMMFTransferBuffer * | NewL(RTransferWindow &, TUint) |
virtual void | SetPosition(TUint) |
virtual void | SetRequestSizeL(TInt) |
IMPORT_C RTransferWindow & | TransferWindow() |
IMPORT_C TInt | UpdateTransferWindow(RTransferWindow &, TUint) |
Inherited Attributes | |
---|---|
CMMFBuffer::iFrameNumber | |
CMMFBuffer::iLastBuffer | |
CMMFBuffer::iPosition | |
CMMFBuffer::iRequestSize | |
CMMFBuffer::iStatus | |
CMMFBuffer::iTimeToPlay | |
CMMFBuffer::iType |
IMPORT_C | ~CMMFTransferBuffer | ( | ) |
CMMFTransferBuffer destructor
Destructor maps out RTransferBuffer and closes RTransferWindow.
TUint | BufferSize | ( | ) | const [virtual] |
Reimplemented from CMMFDataBuffer::BufferSize()const
Returns the actual data size (ie. not the max length) of the data contained in the CMMFTransferBuffer.
TDes8 & | Data | ( | ) | [virtual] |
Reimplemented from CMMFDataBuffer::Data()
Returns a descriptor to the data contained in the CMMFTransferBuffer.
const TDesC8 & | Data | ( | ) | const [virtual] |
Reimplemented from CMMFDataBuffer::Data()const
Returns a descriptor to the data contained in the CMMFTransferBuffer.
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.
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 | |
---|---|
aTransferWindow | This is a valid RTransferWindow that has an RTransferBuffer mapped in. |
aDataLength | 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. |
void | SetPosition | ( | TUint | aPosition | ) | [virtual] |
Reimplemented from CMMFBuffer::SetPosition(TUint)
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 | |
---|---|
aPosition | The position. |
void | SetRequestSizeL | ( | TInt | aSize | ) | [virtual] |
Reimplemented from CMMFDataBuffer::SetRequestSizeL(TInt)
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 | |
---|---|
aSize | The request size. |
IMPORT_C RTransferWindow & | TransferWindow | ( | ) |
This function is not supported under EKA2.
Returns a reference to the transfer window currently used by the CMMFtransferBuffer.
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 | |
---|---|
aTransferWindow | The RTransferWindow to update - can be a new RTransferWindow or the same RTransferWindow with a new RTransferBuffer mapped in. |
aDataLength | The length of the data. |