RCommsBufPond Class Reference

class RCommsBufPond

The RCommsBufPond represents a collection of RShPools. Each pool in the pond has a different size of buffer. The pond is responsible for creating, allocating and freeing these pools.

Constructor & Destructor Documentation

RCommsBufPond()

IMPORT_C RCommsBufPond ( )

The constructor

RCommsBufPond(MCommsBufPondIntf *)

RCommsBufPond ( MCommsBufPondIntf * aPondImpl ) [private, inline]

Parameters

MCommsBufPondIntf * aPondImpl

Member Functions Documentation

Alloc(TInt, TInt, TInt)

IMPORT_C RCommsBuf * Alloc ( TInt aSize,
TInt aMinBufSize,
TInt aMaxBufSize
)

Allocates memory for a RCommsBuf object. More than one buffer may be allocated and linked, if the requested buffer size doesn't directly satisfy with the configured buffer sizes

Parameters

TInt aSize The requested total size
TInt aMinBufSize The size that the allocated buffer can have
TInt aMaxBufSize

Allocator()

IMPORT_C TCommsBufAllocator Allocator ( )

Returns a handle to the allocator

BytesAvailable()

IMPORT_C TInt BytesAvailable ( ) const

Returns the total bytes available in the available pools

BytesAvailable(TInt)

IMPORT_C TInt BytesAvailable ( TInt aSize ) const

Returns the total bytes available in a pool with a given size.

Parameters

TInt aSize

CancelRequest(RCommsBufAsyncRequest &)

IMPORT_C void CancelRequest ( RCommsBufAsyncRequest & aRequest ) [private]

Cancel the issued request

Parameters

RCommsBufAsyncRequest & aRequest A request

FromHandle(TInt)

IMPORT_C RCommsBuf * FromHandle ( TInt aHandle )

Constructs the RCommsBuf from the supplied handle

TInt aHandle RShBuf handle

Parameters

TInt aHandle

IsNull()

TBool IsNull ( ) const [inline]

Check whether the pond is opened and is valid

LargestBufSize()

IMPORT_C TInt LargestBufSize ( ) const

Larget buffer size available in the available pools

NextBufSize(TInt)

IMPORT_C TInt NextBufSize ( TInt aSize ) const

Returns the buffer size that is greater than the given size.

Parameters

TInt aSize

Pond()

CSystemSharedBufPond & Pond ( ) const [private]

StartRequest(RCommsBufAsyncRequest &)

IMPORT_C void StartRequest ( RCommsBufAsyncRequest & aRequest ) [private]

Issue an asynchronous request to create a RCommsBufChain

Parameters

RCommsBufAsyncRequest & aRequest A new request

Store(TPondTransferBuf &)

IMPORT_C TInt Store ( TPondTransferBuf & aStore ) const

Writes flattened pond structure to a descriptor for transfer to a commsbufs aware driver

Parameters

TPondTransferBuf & aStore Descriptor in to which the pond structure will be flattened

Member Data Documentation

MCommsBufPondIntf * iPondImpl

MCommsBufPondIntf * iPondImpl [protected]