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.

Public Member Functions
RCommsBufPond()
IMPORT_C RCommsBuf *Alloc(TInt, TInt, TInt)
IMPORT_C TCommsBufAllocatorAllocator()
IMPORT_C TIntBytesAvailable()
IMPORT_C TIntBytesAvailable(TInt)
IMPORT_C RCommsBuf *FromHandle(TInt)
TBool IsNull()
IMPORT_C TIntLargestBufSize()
IMPORT_C TIntNextBufSize(TInt)
IMPORT_C TIntStore(TPondTransferBuf &)
Private Member Functions
RCommsBufPond(MCommsBufPondIntf *)
IMPORT_C voidCancelRequest(RCommsBufAsyncRequest &)
CSystemSharedBufPond &Pond()
IMPORT_C voidStartRequest(RCommsBufAsyncRequest &)
Protected Attributes
MCommsBufPondIntf *iPondImpl

Constructor & Destructor Documentation

RCommsBufPond()

IMPORT_CRCommsBufPond()

The constructor

RCommsBufPond(MCommsBufPondIntf *)

RCommsBufPond(MCommsBufPondIntf *aPondImpl)[private, inline]

Parameters

MCommsBufPondIntf * aPondImpl

Member Functions Documentation

Alloc(TInt, TInt, TInt)

IMPORT_C RCommsBuf *Alloc(TIntaSize,
TIntaMinBufSize,
TIntaMaxBufSize
)

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 aSizeThe requested total size
TInt aMinBufSizeThe size that the allocated buffer can have
TInt aMaxBufSize

Allocator()

IMPORT_C TCommsBufAllocatorAllocator()

Returns a handle to the allocator

BytesAvailable()

IMPORT_C TIntBytesAvailable()const

Returns the total bytes available in the available pools

BytesAvailable(TInt)

IMPORT_C TIntBytesAvailable(TIntaSize)const

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

Parameters

TInt aSize

CancelRequest(RCommsBufAsyncRequest &)

IMPORT_C voidCancelRequest(RCommsBufAsyncRequest &aRequest)[private]

Cancel the issued request

Parameters

RCommsBufAsyncRequest & aRequestA request

FromHandle(TInt)

IMPORT_C RCommsBuf *FromHandle(TIntaHandle)

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 TIntLargestBufSize()const

Larget buffer size available in the available pools

NextBufSize(TInt)

IMPORT_C TIntNextBufSize(TIntaSize)const

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

Parameters

TInt aSize

Pond()

CSystemSharedBufPond &Pond()const [private]

StartRequest(RCommsBufAsyncRequest &)

IMPORT_C voidStartRequest(RCommsBufAsyncRequest &aRequest)[private]

Issue an asynchronous request to create a RCommsBufChain

Parameters

RCommsBufAsyncRequest & aRequestA new request

Store(TPondTransferBuf &)

IMPORT_C TIntStore(TPondTransferBuf &aStore)const

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

Parameters

TPondTransferBuf & aStoreDescriptor in to which the pond structure will be flattened

Member Data Documentation

MCommsBufPondIntf * iPondImpl

MCommsBufPondIntf *iPondImpl[protected]