phonebookui/Phonebook2/UIControls/src/CPbk2ThumbnailManager.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 3 04ab22b956c2
child 9 0d28c1c5b6dd
equal deleted inserted replaced
5:81f8547efd4f 6:e8e3147d53eb
   353 // CPbk2ThumbnailManager::~CPbk2ThumbnailManager()
   353 // CPbk2ThumbnailManager::~CPbk2ThumbnailManager()
   354 // --------------------------------------------------------------------------
   354 // --------------------------------------------------------------------------
   355 //
   355 //
   356 CPbk2ThumbnailManager::~CPbk2ThumbnailManager()
   356 CPbk2ThumbnailManager::~CPbk2ThumbnailManager()
   357 	{
   357 	{
       
   358     if( iView )
       
   359         {
       
   360         iView->RemoveObserver(*this );
       
   361         iView->RemoveStackObserver( *this ); 
       
   362         }    
       
   363     
   358 	delete iInProgressItemToBeRemoved;
   364 	delete iInProgressItemToBeRemoved;
   359 	delete iThumbOperation;
   365 	delete iThumbOperation;
   360     delete iManager;
   366     delete iManager;
   361     delete iRetrieveOperation;
   367     delete iRetrieveOperation;
   362     delete iStoreContact;
   368     delete iStoreContact;
   588 // CPbk2ThumbnailManager::SetContactViewL()
   594 // CPbk2ThumbnailManager::SetContactViewL()
   589 // --------------------------------------------------------------------------
   595 // --------------------------------------------------------------------------
   590 //
   596 //
   591 void CPbk2ThumbnailManager::SetContactViewL( MPbk2FilteredViewStack* aView )
   597 void CPbk2ThumbnailManager::SetContactViewL( MPbk2FilteredViewStack* aView )
   592     {
   598     {
       
   599     if( iView )
       
   600         {
       
   601         iView->RemoveObserver(*this );
       
   602         iView->RemoveStackObserver( *this ); 
       
   603         }    
       
   604     
   593     iView = aView;
   605     iView = aView;
   594     if( iView )
   606     if( iView )
   595         {
   607         {
   596         iView->AddObserverL( *this );
   608         iView->AddObserverL( *this );
   597         iView->AddStackObserverL( *this );
   609         iView->AddStackObserverL( *this );
   857 		}
   869 		}
   858 	
   870 	
   859 	// contact has no image or error occured, move to next contact
   871 	// contact has no image or error occured, move to next contact
   860 	if( err )
   872 	if( err )
   861 		{
   873 		{
   862 		if ( iLoadingQueue.Count() )
   874 		if ( !iInProgressItemToBeRemoved && iLoadingQueue.Count() )
   863 		    {
   875 		    {
   864             if( iObserver )
   876             if( iObserver )
   865                 {
   877                 {
   866                 //inform observer
   878                 //inform observer
   867                 iObserver->ThumbnailLoadingComplete( KErrNotFound, iLoadingQueue[ KStartIndex ]->GetListboxIndex() );
   879                 iObserver->ThumbnailLoadingComplete( KErrNotFound, iLoadingQueue[ KStartIndex ]->GetListboxIndex() );