Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: smsuact.h
Link against: smsu.lib

Class CSmsuActiveBase

class CSmsuActiveBase : public CActive

Support

Supported from 7.0

Description

Bae class for SMS active objects.

Derivation

CActiveThe core class of the active object abstraction
CBaseBase class for all classes to be instantiated on the heap
CSmsuActiveBaseBae class for SMS active objects

Defined in CSmsuActiveBase:
CSmsuActiveBase(), Complete(), CompleteMyself(), ConstructTimeoutL(), DoComplete(), DoRunL(), Queue(), RunError(), RunL(), TimedSetActive(), iReport, iSmsuTimeout, ~CSmsuActiveBase()

Inherited from CActive:
Cancel(), Deque(), DoCancel(), EPriorityHigh, EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, IsActive(), IsAdded(), Priority(), SetActive(), SetPriority(), TPriority, iActive, iLink, iStatus

Inherited from CBase:
operator new()


Construction and destruction


CSmsuActiveBase()

protected: CSmsuActiveBase(TInt aPriority);

Description

Constructor.

Parameters

TInt aPriority

Active object priority


~CSmsuActiveBase()

~CSmsuActiveBase();

Description

Destructor.

[Top]


Member functions


Complete()

protected: virtual void Complete(TInt aStatus);

Description

Object use complete.

This is called at the end of the RunL(), if the RunL() has not reset the object to be active.

If an observer has been set (see Queue()), DoComplete() is called, and that observer is signalled with the object status.

Parameters

TInt aStatus

Active object status word


CompleteMyself()

protected: void CompleteMyself(TInt aStatus, TBool aSetActive=ETrue);

Description

Signals this object.

Parameters

TInt aStatus

Status code with which to signal the object

TBool aSetActive=ETrue

True to set the object to be active


TimedSetActive()

protected: void TimedSetActive(const TTimeIntervalMicroSeconds32& aTimeIntervalMicroSeconds32);

Description

Activates the object, and sets it to be completed after a specified time.

Parameters

const TTimeIntervalMicroSeconds32& aTimeIntervalMicroSeconds32

Time after which to complete the object


ConstructTimeoutL()

protected: void ConstructTimeoutL();

Description

Constructs a timer.

This is required before use of TimedSetActive().


Queue()

protected: void Queue(TRequestStatus& aStatus);

Description

Sets an asynchronous observer to which to report completion of this object.

Parameters

TRequestStatus& aStatus

Asynchronous status word of the observer


RunError()

protected: TInt RunError(TInt aError);

Description

Handles leaves occurring in the RunL() function.

It calls Complete().

Parameters

TInt aError

RunL() leave code

Return value

TInt

KErrNone


DoRunL()

protected: virtual void DoRunL()=0;

Description

Implements derived-class specified RunL() behaviour.

This is called from RunL().


DoComplete()

protected: inline virtual void DoComplete(TInt&);

Description

Implements derived-class specified Complete() behaviour.

This is called from Complete().

Parameters

TInt&

Active object status word


RunL()

protected: void RunL();

Description

Handles the object’s request completion event.

If a timer has been set with TimedSetActive(), this is cancelled. DoRunL() is then called. If, after this, the object is not active, Complete() is called.

[Top]


Member data


iSmsuTimeout

protected: CSmsuTimeout* iSmsuTimeout;

Description

Timer, to be activated by TimedSetActive().


iReport

protected: TRequestStatus* iReport;

Description

Observer, set by Queue().