TimeoutFactory Class Reference

class TimeoutFactory

Factory for creating MTimeoutManager instance(s).

TimeoutFactory is not a class that can be instantiated! It only declares static methods, and only publicly available method (NewL) is the one that creates an instance of a timeout manager and returns a reference to the interface class (MTimeoutManager).

Public Member Functions
IMPORT_C MTimeoutManager *NewL(TUint, TAny *, TInt)
Private Member Functions
IMPORT_C voidCancel(RTimeout &)
IMPORT_C TBoolIsActive(const RTimeout &)

Member Functions Documentation

Cancel(RTimeout &)

IMPORT_C voidCancel(RTimeout &aLink)[private, static]

Cancels timeout, if active.

This is safe to call, even if handle is inactive.

Parameters

RTimeout & aLinkThe timeout handle

IsActive(const RTimeout &)

IMPORT_C TBoolIsActive(const RTimeout &aLink)[private, static]

Tests if a timeout is active on specified handle.

Parameters

const RTimeout & aLinkThe timeout handle

NewL(TUint, TAny *, TInt)

IMPORT_C MTimeoutManager *NewL(TUintaUnit = 1,
TAny *aPtr = 0,
TIntaPriority = 0
)[static]

Create a new instance of timeout manager.

aUnit specifies the unit of the aTime parameter for the timeout setting as fractions of a second. Valid range is [1..1000000]. aPtr is additional parameter which is passed to each Expired() call. aPriority is used for the CActive instantiation.

The chosen unit also contrains the maximum time that can be specified with the manager. The time corresponding the KMaxTUint units in seconds is:
maxtime = KMaxTUint / unit
leave
KErrArgument, if aUnit is invalid
leave
Other system wide reasons, if creation fails.

Parameters

TUint aUnit = 1The unit in fractions of a second (1/aUnit sec).
TAny * aPtr = 0The ptr parameter for every callback (TimeoutCallback) generated by this manager.
TInt aPriority = 0The CActive priority value for the timeout manager.