diff -r 12c456ceeff2 -r 5253a20d2a1e emailuis/emailui/inc/FreestyleEmailDownloadInformationMediator.h --- a/emailuis/emailui/inc/FreestyleEmailDownloadInformationMediator.h Thu Jan 07 12:38:38 2010 +0200 +++ b/emailuis/emailui/inc/FreestyleEmailDownloadInformationMediator.h Mon Jan 18 20:08:26 2010 +0200 @@ -209,6 +209,7 @@ { MFSEmailDownloadInformationObserver* iObserver; TFSMailMsgId iMessageId; + TBool iDeleted; }; class TDownload @@ -261,12 +262,28 @@ * @param aCompletedCount How many attachments were succesfully downloaded. */ void LaunchDownloadCompleteNoteL( const TPartData& aPart, TInt aCompletedCount ); - + /** * Notify all the registered observers about a download event. */ void NotifyObserversL( const TFSProgress& aEvent, const TPartData& aPart ); - + + /** + * Notify all the registered observers for a particular message part about a download event. + */ + void NotifyPartObserversL( const TFSProgress& aEvent, const TPartData& aPart ); + + /** + * Removes deleted observers from the observer array. + */ + void CleanUpObservers(); + + /** + * Safely removes an entry from the observer array in case notifications + * are currently in process. + */ + void RemoveObserver( TInt aIdx ); + /** * Updates the entry in iDownloadCountArray according a progress event and gets a copy of * its data. The original entry may be removed from the array as a result. @@ -324,6 +341,13 @@ // has there been any downloads since program started TBool iDownloadsStarted; + + // counter indicating how many observer notification operations are + // currently in progress + TInt iNotificationsInProgress; + + // have any observers been deleted during notification + TBool iObserverDeleted; }; #endif // FSEMAILDOWNLOADINFORMATIONMEDIATOR_H