harvester/monitorplugins/mmcplugin/src/mmcmonitorao.cpp
branchRCL_3
changeset 22 29d87345eaeb
parent 21 85f623e1ef41
equal deleted inserted replaced
21:85f623e1ef41 22:29d87345eaeb
   122 		{
   122 		{
   123 		StartNotify();
   123 		StartNotify();
   124 		return;
   124 		return;
   125 		}
   125 		}
   126 
   126 
       
   127 	StartNotify();
       
   128 	
   127 	iPreviousDriveList.Zero();
   129 	iPreviousDriveList.Zero();
   128 	iPreviousDriveList.Copy( iDriveList );
   130 	iPreviousDriveList.Copy( iDriveList );
   129 
   131 
   130 	BuildDriveList();
   132 	BuildDriveList();
   131 
   133 
   136 	CompareDriveLists();
   138 	CompareDriveLists();
   137 
   139 
   138 #ifdef _DEBUG
   140 #ifdef _DEBUG
   139 	PrintAllLists();
   141 	PrintAllLists();
   140 #endif
   142 #endif
   141 
       
   142 	StartNotify();
       
   143 	}
   143 	}
   144 
   144 
   145 #ifdef _DEBUG
   145 #ifdef _DEBUG
   146 TInt CMMCMonitorAO::RunError( TInt aError )
   146 TInt CMMCMonitorAO::RunError( TInt aError )
   147 #else
   147 #else
   159 	WRITELOG( "CMMCMonitorAO::DoCancel" ); // DEBUG INFO
   159 	WRITELOG( "CMMCMonitorAO::DoCancel" ); // DEBUG INFO
   160 	
   160 	
   161 	iFs.NotifyChangeCancel( iStatus );
   161 	iFs.NotifyChangeCancel( iStatus );
   162 	}
   162 	}
   163 
   163 
   164 CMMCMonitorAO::CMMCMonitorAO() : CActive( KHarvesterPriorityMonitorPlugin ),
   164 CMMCMonitorAO::CMMCMonitorAO() : CActive( KHarvesterServerHighPriority ),
   165     iObserver( NULL )
   165     iObserver( NULL )
   166 	{
   166 	{
   167 	}
   167 	}
   168 
   168 
   169 void CMMCMonitorAO::BuildDriveList()
   169 void CMMCMonitorAO::BuildDriveList()
   281 
   281 
   282 		if ( iDriveList[i] > KDriveAbsent && iPreviousDriveList[i] > KDriveAbsent )
   282 		if ( iDriveList[i] > KDriveAbsent && iPreviousDriveList[i] > KDriveAbsent )
   283 			{
   283 			{
   284 			if ( iMediaIdList[i] != mediaId )
   284 			if ( iMediaIdList[i] != mediaId )
   285 				{
   285 				{
   286 				WRITELOG3( "CMMCMonitorAO::CompareDriveLists media changed %d, old=%d, new=%d", i, iMediaIdList[i], mediaId ); // DEBUG INFO
   286 				WRITELOG3( "CMMCMonitorAO::CompareDriveLists media changed %d, old=%u, new=%u", i, iMediaIdList[i], mediaId ); // DEBUG INFO
   287 				// skip mount events if mediaId is 0
   287 				// skip mount events if mediaId is 0
   288 				if ( iMediaIdList[i] != 0 )
   288 				if ( iMediaIdList[i] != 0 )
   289 					{
   289 					{
   290 					iObserver->MountEvent( chr, iMediaIdList[i], EDismounted );
   290 					iObserver->MountEvent( chr, iMediaIdList[i], EDismounted );
   291 					}
   291 					}