CMTPHandleAllocator Class Reference

class CMTPHandleAllocator : public CBase

Defines the handle allocator which centralize the allocation of object handles

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

CMTPHandleAllocator(CMTPObjectStore &)

CMTPHandleAllocator(CMTPObjectStore &aObjectStore)[private]

Standard C++ constructor

Parameters

CMTPObjectStore & aObjectStore

~CMTPHandleAllocator()

~CMTPHandleAllocator()

destructor

Member Functions Documentation

AppendHandleBlockL(TUint, TUint, TInt)

TBool AppendHandleBlockL(TUintaDataProviderId,
TUintaNextID,
TIntaSpace
)

Parameters

TUint aDataProviderId
TUint aNextID
TInt aSpace

ConstructL()

voidConstructL()[private]

Second-phase construction

ExtendArrayL(TUint)

voidExtendArrayL(TUintaDataProviderId)[private]

Extends the array to handle more data providers. DP IDs are allocated sequentially, so this way the array never needs to be much larger than necessary. This must only be called if the array size needs to be increased.

Parameters

TUint aDataProviderIdthe array must be sized to fit this data provider ID

NewL(CMTPObjectStore &)

CMTPHandleAllocator *NewL(CMTPObjectStore &aObjectStore)[static]

Two-phase object construction

Parameters

CMTPObjectStore & aObjectStore

NextIDFromPoolL(TUint)

TUint32 NextIDFromPoolL(TUintaDataProviderId)[private]

Parameters

TUint aDataProviderId

NextIdL(TUint)

TUint32 NextIdL(TUintaDataProviderId)
Get the next object identifier (Handle) for the specified data provider.
leave
KErrOverFlow if the object identifier has been exhausted for the data provider

Parameters

TUint aDataProviderIdThe Id of the data provider

NextPOUIDL()

TInt64 NextPOUIDL()

SetIdL(TUint32, TInt64)

voidSetIdL(TUint32aHandleID,
TInt64aPOUID
)

Initialize the allocator for this DP. This must be called if and only if the DP uses persistent objects, and some persistent objects exist in the object store, so that later allocations do not duplicate earlier object IDs. If it is called, it must therefore be called before any new objects are allocated for this DP.

Parameters

TUint32 aHandleID
TInt64 aPOUID

Member Data Documentation

RPointerArray< CDPHandleCache > iNextIDPool

RPointerArray< CDPHandleCache >iNextIDPool[private]

RArray< TUint > iNextIds

RArray< TUint >iNextIds[private]

TInt64 iNextPOUID

TInt64 iNextPOUID[private]

CMTPObjectStore & iObjectStore

CMTPObjectStore &iObjectStore[private]