diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-1BD987D8-B018-51B7-80B2-4E1988841BC2.dita --- a/Symbian3/PDK/Source/GUID-1BD987D8-B018-51B7-80B2-4E1988841BC2.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-1BD987D8-B018-51B7-80B2-4E1988841BC2.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,41 +1,41 @@ - - - - - -How -to cancel requestsThis document describes how to cancel a previously scheduled request. -

The CActive class provides the Cancel() member -function to cancel an active object’s request.

-

If no request has been issued, Cancel() does nothing, -otherwise it calls DoCancel(). This is a pure virtual function -that must be provided by derived classes and which handles specific cancellation -as required by the service provider. Cancel() then waits -for the completion of that request and sets the active request flag to false.

-

The service provider must guarantee that the cancellation operation completes -in a very short period of time.

-

For example, a specialized timer active object, derived from CTimer which -is derived from CActive, might implement this as:

-void CTimedMessenger::DoCancel() - { - // Base class - CTimer::DoCancel(); - // Reset variable - needed if the object is later re-activated - iTicksDone = 0; - ... - } -

Note that an active object's destructor should ensure that any outstanding -requests are cancelled. If the class implements a DoCancel() function, then -the destructor must call the Cancel() member function. For -example:

-CTimedMessenger::~CTimedMessenger() - { - Cancel(); - } + + + + + +How +to cancel requestsThis document describes how to cancel a previously scheduled request. +

The CActive class provides the Cancel() member +function to cancel an active object’s request.

+

If no request has been issued, Cancel() does nothing, +otherwise it calls DoCancel(). This is a pure virtual function +that must be provided by derived classes and which handles specific cancellation +as required by the service provider. Cancel() then waits +for the completion of that request and sets the active request flag to false.

+

The service provider must guarantee that the cancellation operation completes +in a very short period of time.

+

For example, a specialized timer active object, derived from CTimer which +is derived from CActive, might implement this as:

+void CTimedMessenger::DoCancel() + { + // Base class + CTimer::DoCancel(); + // Reset variable - needed if the object is later re-activated + iTicksDone = 0; + ... + } +

Note that an active object's destructor should ensure that any outstanding +requests are cancelled. If the class implements a DoCancel() function, then +the destructor must call the Cancel() member function. For +example:

+CTimedMessenger::~CTimedMessenger() + { + Cancel(); + }
\ No newline at end of file