Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: agmcallb.h
Link against: agnmodel.lib

Class MAgnProgressCallBack

MAgnProgressCallBack

Support

Supported from 5.0

Description

Provides information about the progress of prolonged agenda model operations, and about how the operation terminated.

An MAgnProgressCallBack object is usually specified when the client requests an activity such as merging, tidying or save as, which might take some time to complete and needs to be updated on its progress and completion state. See for example CAgnIndexedModel::MergeL().

As the model is carrying out the operation, it calls Progress() with aPercentageCompleted set to the amount of the operation that has been carried out so far. Note that when the operation is complete, Progress() is not called with aPercentageCompleted set to 100. Instead the Completed() method is called. Note also that if the operation completes quickly, for instance when opening a small file, then Progress() will probably not be called. If on return, aError is anything other than KErrNone then something went wrong during the operation.

Defined in MAgnProgressCallBack:
Completed(), Progress()


Callback information


Completed()

virtual void Completed(TInt aError = KErrNone) = 0;

Description

Called when the operation completes. The argument indicates how the operation completed.

Parameters

TInt aError = KErrNone

Indicates how the operation completed. KErrNone if successful, otherwise one of the system error codes.


Progress()

virtual void Progress(TInt aPercentageCompleted) = 0;

Description

Called by the agenda model during prolonged operations such as merging and tidying, to indicate how much of the operation has been completed. Note that this function is not called when the operation is complete, with aPercentageCompleted set to 100; instead the Completed() method is called. The frequency with which this function is called is indicated by a callback frequency parameter — see for instance CAgnIndexedModel::MergeL().

Parameters

TInt aPercentageCompleted

The percentage of the task that has been completed.