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 void Cancel ( RTimeout &)
IMPORT_C TBool IsActive (const RTimeout &)

Member Functions Documentation

Cancel(RTimeout &)

IMPORT_C void Cancel ( RTimeout & aLink ) [private, static]

Cancels timeout, if active.

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

Parameters

RTimeout & aLink The timeout handle

IsActive(const RTimeout &)

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

Tests if a timeout is active on specified handle.

Parameters

const RTimeout & aLink The timeout handle

NewL(TUint, TAny *, TInt)

IMPORT_C MTimeoutManager * NewL ( TUint aUnit = 1,
TAny * aPtr = 0,
TInt aPriority = 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 = 1 The unit in fractions of a second (1/aUnit sec).
TAny * aPtr = 0 The ptr parameter for every callback (TimeoutCallback) generated by this manager.
TInt aPriority = 0 The CActive priority value for the timeout manager.