Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <mmfdatabuffer.h>
Link against: mmfserverbaseclasses.lib

Class CMMFDataBuffer

class CMMFDataBuffer : public CMMFBuffer;

Description

This class is an abstract class for databuffers that can be presented in the form of a descriptor. A constructor is provided which instantiates a CMMFDescriptorBuffer buffer by default.

Derivation

Members

Defined in CMMFDataBuffer:

Inherited from CBase:

Inherited from CMMFBuffer:

See also:


Construction and destruction


NewL()

IMPORT_C static CMMFDataBuffer* NewL();

Description

Method to instantiate a CMMFDataBuffer defaults to a CMMFDescriptorBuffer to maintain buffer compatiblity with MFAD ie. instantiating a CMMFDataBuffer defaults to creating a CMMFDescriptorBuffer. This NewL creates a CMMFDescriptorBuffer with a default size of 32 bytes.

Return value

CMMFDataBuffer *

A pointer to a new CMMFDescriptorBuffer.


NewL(TInt)

IMPORT_C static CMMFDataBuffer* NewL(TInt aMaxBufferSize);

Description

Method to instantiate a CMMFDataBuffer defaults to a CMMFDescriptorBuffer by default to maintain buffer compatiblity with MFAD ie. instantiating a CMMFDataBuffer defaults to creating a CMMFDescriptorBuffer. This NewL creates a CMMFDescriptorBuffer with a size of aMaxBufferSize bytes.

Parameters

TInt aMaxBufferSize

The size in bytes of the descriptor buffer to be created.

Return value

CMMFDataBuffer *

A pointer to a new CMMFDescriptorBuffer.


~CMMFDataBuffer()

inline virtual ~CMMFDataBuffer();

Description

Destructor.


CMMFDataBuffer(TUid)

protected: inline CMMFDataBuffer(TUid aType);

Description

Protected constructor.

Parameters

TUid aType

[Top]


Member functions


Data()

virtual TDes8& Data()=0;

Description

Returns a reference to the data contained in the buffer (non const version).

This is a virtual function that each derived class must implement.

Return value

TDes8 &

A reference to the buffer.


Data()const

virtual const TDesC8& Data() const=0;

Description

Returns a reference to the data contained in the buffer (const version).

This is a virtual function that each derived class must implement.

Return value

const TDesC8 &

A reference to the buffer.


BufferSize()const

virtual TUint BufferSize() const=0;

Description

Returns the buffer size, in bytes.

This is a virtual function that each derived class must implement.

Return value

TUint

The buffer size in bytes.


SetRequestSizeL(TInt)

virtual void SetRequestSizeL(TInt aSize)=0;

Description

Sets the request size.

Used where a component, such as a data source, may not be able to write to the entire maximum length of the buffer (variable bit rate codecs for example).

This is a virtual function that each derived class must implement.

Parameters

TInt aSize

The requested size, in bytes.