harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp
changeset 1 acef663c1218
parent 0 c53acadfccc6
child 14 646a02f170b9
equal deleted inserted replaced
0:c53acadfccc6 1:acef663c1218
    69 		}
    69 		}
    70 	}
    70 	}
    71 
    71 
    72 void CRenameItem::HandleFileEventsL(CFileEventHandlerAO &aCFileEventHandlerAO)
    72 void CRenameItem::HandleFileEventsL(CFileEventHandlerAO &aCFileEventHandlerAO)
    73 	{
    73 	{
    74 	TInt count = iFileEvents.Count();
    74 	const TInt count = iFileEvents.Count();
    75 	for (TInt i = 0; i < count; i++)
    75 	for (TInt i = 0; i < count; i++)
    76 		{
    76 		{
    77 		aCFileEventHandlerAO.HandleNotificationL(* (iFileEvents[i]));
    77 		aCFileEventHandlerAO.HandleNotificationL(* (iFileEvents[i]));
    78 		}
    78 		}
    79 	iFileEvents.ResetAndDestroy();
    79 	iFileEvents.ResetAndDestroy();
   182     }
   182     }
   183 
   183 
   184 void CFolderRenamer::RenameL(const TDesC &aOldName, const TDesC &aNewName)
   184 void CFolderRenamer::RenameL(const TDesC &aOldName, const TDesC &aNewName)
   185 	{
   185 	{
   186     //There comes multiple events for single rename, drop these 
   186     //There comes multiple events for single rename, drop these 
   187 	TInt count = iRenamedFolders.Count();
   187 	const TInt count = iRenamedFolders.Count();
   188 	for (TInt i = 0; i < count; i++)
   188 	for (TInt i = 0; i < count; i++)
   189 		{
   189 		{
   190 		if ( iRenamedFolders[i]->OldName().CompareF(aOldName) == 0 && 
   190 		if ( iRenamedFolders[i]->OldName().CompareF(aOldName) == 0 && 
   191 				iRenamedFolders[i]->NewName().CompareF(aNewName) == 0 )
   191 				iRenamedFolders[i]->NewName().CompareF(aNewName) == 0 )
   192 			{
   192 			{