harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp
changeset 21 50bf9db68373
parent 20 6dfc5f825351
child 40 910a23996aa0
child 54 a3cc46f37772
equal deleted inserted replaced
20:6dfc5f825351 21:50bf9db68373
    70 	WRITELOG( "CMMCMountTaskAO::~CMMCMountTaskAO" );
    70 	WRITELOG( "CMMCMountTaskAO::~CMMCMountTaskAO" );
    71 	Cancel();
    71 	Cancel();
    72 	iFs.Close();
    72 	iFs.Close();
    73 	
    73 	
    74 	iMountDataQueue.ResetAndDestroy();
    74 	iMountDataQueue.ResetAndDestroy();
       
    75 	iMountDataQueue.Close();
    75 	iEntryArray.ResetAndDestroy();
    76 	iEntryArray.ResetAndDestroy();
       
    77 	iEntryArray.Close();
    76 	iHarvestEntryArray.ResetAndDestroy();
    78 	iHarvestEntryArray.ResetAndDestroy();
       
    79 	iHarvestEntryArray.Close();
    77 	
    80 	
    78 	delete iMdeSession;
    81 	delete iMdeSession;
    79   
    82   
    80 	Deinitialize();
    83 	Deinitialize();
    81 	
    84 	
   124 		{
   127 		{
   125 		if ( iMountData->iDrivePath.Compare( aMountData.iDrivePath ) == 0 )
   128 		if ( iMountData->iDrivePath.Compare( aMountData.iDrivePath ) == 0 )
   126 			{
   129 			{
   127 			Cancel();
   130 			Cancel();
   128 			Deinitialize();
   131 			Deinitialize();
   129 			iNextRequest = ERequestIdle;
       
   130 			}
   132 			}
   131 		}
   133 		}
   132 		
   134 		
   133 	iMountDataQueue.Append( &aMountData );
   135 	iMountDataQueue.Append( &aMountData );
   134 	SetNextRequest( ERequestStartTask );
   136 	SetNextRequest( ERequestStartTask );
   186 					SetNextRequest( ERequestFormat );
   188 					SetNextRequest( ERequestFormat );
   187 					}
   189 					}
   188 				}
   190 				}
   189 			else
   191 			else
   190 				{
   192 				{
   191 			    SetPriority( KHarvesterCustomImportantPriority );
       
   192 				SetNextRequest( ERequestIdle );
   193 				SetNextRequest( ERequestIdle );
   193 				iMountDataQueue.Compress();
   194 				iMountDataQueue.Compress();
   194 				}
   195 				}
   195 			}
   196 			}
   196 		break;
   197 		break;
   347 		case ERequestCleanup:
   348 		case ERequestCleanup:
   348 			{
   349 			{
   349 			WRITELOG( "CMMCMountTaskAO::RunL - ERequestCleanup" );
   350 			WRITELOG( "CMMCMountTaskAO::RunL - ERequestCleanup" );
   350 			TBool present = (iMountData->iMountType == TMountData::EMount);
   351 			TBool present = (iMountData->iMountType == TMountData::EMount);
   351 			iMdeSession->SetMediaL( iMountData->iMediaID, iMountData->iDrivePath[0], present );
   352 			iMdeSession->SetMediaL( iMountData->iMediaID, iMountData->iDrivePath[0], present );
   352 			SetPriority( KHarvesterCustomImportantPriority );
       
   353 			Deinitialize();
   353 			Deinitialize();
   354 			SetNextRequest( ERequestStartTask );
   354 			SetNextRequest( ERequestStartTask );
   355 			}
   355 			}
   356 		break;
   356 		break;
   357 		
   357