RShPool Class Reference

class RShPool : public RHandleBase

A handle to a pool of buffers.

Pools can be created by either user-side or kernel-side components.

Upon receiving a pool handle the recipient must map either whole or part of the pool memory into its address space.

When finished with the pool, the recipient must Close() it: this invalidates the handle. Any further attempt to use it will panic the thread.

All pools are reference-counted and will only disappear after all users have closed them.

These handles are process-relative.

Inherits from

Constructor & Destructor Documentation

RShPool()

IMPORT_C RShPool ( )

Member Functions Documentation

CancelFreeSpaceNotification(TRequestStatus &)

IMPORT_C void CancelFreeSpaceNotification ( TRequestStatus & aStatus )

Cancels a free space notification request.

The status request completes with KErrCancel.

Parameters

TRequestStatus & aStatus The status request whose notification is to be cancelled.

CancelLowSpaceNotification(TRequestStatus &)

IMPORT_C void CancelLowSpaceNotification ( TRequestStatus & aStatus )

Cancels a low space notification request.

The status request completes with KErrCancel.

Parameters

TRequestStatus & aStatus The status request whose notification is to be cancelled.

Create(const TShPoolCreateInfo &, TUint)

IMPORT_C TInt Create ( const TShPoolCreateInfo & aBufInfo,
TUint aFlags
)

Creates a pool of buffers with the required attributes and maps the memory to this process. The RShPool object is changed by this call (iHandle is set).

TShPoolCreateInfo TShPoolClientFlags

Parameters

const TShPoolCreateInfo & aBufInfo A structure describing the parameters of the pool to be created. See TShPoolCreateInfo.
TUint aFlags Flags to modify the behaviour of the handle. This should be a bit-wise OR of values from TShPoolHandleFlags.

FreeCount()

IMPORT_C TUint FreeCount ( ) const

GetInfo(TShPoolInfo &)

IMPORT_C void GetInfo ( TShPoolInfo & aInfo ) const

Retrieves information about the pool.

Parameters

TShPoolInfo & aInfo returns pool info.

RequestFreeSpaceNotification(TUint, TRequestStatus &)

IMPORT_C void RequestFreeSpaceNotification ( TUint aFreeBuffers,
TRequestStatus & aStatus
)

Requests a notification when the number of free buffers in the pool rises to the level specified.

Parameters

TUint aFreeBuffers Specifies the number of free buffers that will trigger completion of the notification.
TRequestStatus & aStatus Status request to be completed when the condition is met.

RequestLowSpaceNotification(TUint, TRequestStatus &)

IMPORT_C void RequestLowSpaceNotification ( TUint aFreeBuffers,
TRequestStatus & aStatus
)

Requests a notification when the number of free buffers in the pool falls to the level specified.

Parameters

TUint aFreeBuffers Specifies the number of free buffers that will trigger completion of the notification.
TRequestStatus & aStatus Status request to be completed when the condition is met.

SetBufferWindow(TInt, TBool)

IMPORT_C TInt SetBufferWindow ( TInt aCount,
TBool aAutoMap
)

Specifies how many buffers of a page-aligned pool this process will require concurrent access to.

This determines how much of the process's address space will be allocated for buffers of this pool.

Pre-condition
the pool's buffers must be page-aligned

Parameters

TInt aCount Specifies the number of buffers to map into the process's virtual address space (-1 specifies that all buffers will be mapped).
TBool aAutoMap ETrue specifies that an allocated or received buffer will be automatically mapped into the process's address space.