The API uses two types of callback interfaces: change notifications, and progress/completion notifications.
The MCalChangeCallBack interface is implemented to monitor changes to calendar entries, such as the addition, deletion, and update of entries.
Call CCalSession::StartChangeNotification() to request change notifications. The following requests notifications of all changes for entries between 1 Jan 2005 and 1 Jan 2006.
// set up notification of all changes on all entries in 2005 TTime startTime(TDateTime(2005, EJanuary, 0, 0, 0, 0, 0)); // start time TTime endTime(startTime + TTimeIntervalYears(1)); // end time // assume this object implements MCalChangeCallBack session->StartChangeNotification(this, EChangeEntryAll, ETrue, startTime, endTime);
The observer's implementation of MCalChangeCallBack::CalChangeNotification() is called whenever a change to the calendar entries occurs that matches the specified criteria.
You can disable a change notification by using CCalSession::StopChangeNotification().
The MCalProgressCallBack interface is used for monitoring the progress and completion of asynchronous tasks, such as the addition, deletion or updating of a calendar entry carried out on the entry view or instance view. MCalProgressCallBack::Progress() reports the percentage completion of the current task. MCalProgressCallBack::Completed() is called when the current task is completed.