harvesterplugins/file/src/cfilemonitor.cpp
changeset 2 208a4ba3894c
parent 0 ccd0fd43f247
child 26 367228f82b66
equal deleted inserted replaced
0:ccd0fd43f247 2:208a4ba3894c
    20 #include <pathinfo.h>
    20 #include <pathinfo.h>
    21 
    21 
    22 #include "cfilemonitor.h"
    22 #include "cfilemonitor.h"
    23 #include "cfolderrenamedharvester.h"
    23 #include "cfolderrenamedharvester.h"
    24 #include "harvesterserverlogger.h"
    24 #include "harvesterserverlogger.h"
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "cfilemonitorTraces.h"
       
    28 #endif
       
    29 
    25 
    30 
    26 // -----------------------------------------------------------------------------
    31 // -----------------------------------------------------------------------------
    27 // CFileMonitor::NewL
    32 // CFileMonitor::NewL
    28 // -----------------------------------------------------------------------------
    33 // -----------------------------------------------------------------------------
    29 //
    34 //
    42 //
    47 //
    43 CFileMonitor::CFileMonitor( CFilePlugin& aFilePlugin, RFs* aFsSession ) :
    48 CFileMonitor::CFileMonitor( CFilePlugin& aFilePlugin, RFs* aFsSession ) :
    44                             CActive(CActive::EPriorityStandard),
    49                             CActive(CActive::EPriorityStandard),
    45                             iFilePlugin( aFilePlugin )
    50                             iFilePlugin( aFilePlugin )
    46     {
    51     {
       
    52     OstTraceFunctionEntry0( CFILEMONITOR_CFILEMONITOR_ENTRY );
    47     CPIXLOGSTRING("ENTER CFileMonitor::CFileMonitor");
    53     CPIXLOGSTRING("ENTER CFileMonitor::CFileMonitor");
    48     CActiveScheduler::Add(this);
    54     CActiveScheduler::Add(this);
    49     iFsSession = aFsSession;
    55     iFsSession = aFsSession;
    50     CPIXLOGSTRING("END CFileMonitor::CFileMonitor");
    56     CPIXLOGSTRING("END CFileMonitor::CFileMonitor");
       
    57     OstTraceFunctionExit0( CFILEMONITOR_CFILEMONITOR_EXIT );
    51     }
    58     }
    52 
    59 
    53 // -----------------------------------------------------------------------------
    60 // -----------------------------------------------------------------------------
    54 // CFileMonitor::~CFileMonitor
    61 // CFileMonitor::~CFileMonitor
    55 // -----------------------------------------------------------------------------
    62 // -----------------------------------------------------------------------------
    77 // CFileMonitor::RunError
    84 // CFileMonitor::RunError
    78 // -----------------------------------------------------------------------------
    85 // -----------------------------------------------------------------------------
    79 //
    86 //
    80 TInt CFileMonitor::RunError( TInt aError )
    87 TInt CFileMonitor::RunError( TInt aError )
    81 	{
    88 	{
       
    89 	OstTrace1( TRACE_NORMAL, CFILEMONITOR_RUNERROR, "CFileMonitor::RunError;aError=%d", aError );
    82 	CPIXLOGSTRING2( "CFileMonitor::RunError %d", aError );
    90 	CPIXLOGSTRING2( "CFileMonitor::RunError %d", aError );
    83 	return KErrNone;
    91 	return KErrNone;
    84 	}
    92 	}
    85 
    93 
    86 // -----------------------------------------------------------------------------
    94 // -----------------------------------------------------------------------------
    96 // CFileMonitor::RunL
   104 // CFileMonitor::RunL
    97 // -----------------------------------------------------------------------------
   105 // -----------------------------------------------------------------------------
    98 //	
   106 //	
    99 void CFileMonitor::RunL()
   107 void CFileMonitor::RunL()
   100     {
   108     {
       
   109     OstTraceFunctionEntry0( CFILEMONITOR_RUNL_ENTRY );
   101     CPIXLOGSTRING("ENTER CFileMonitor::RunL");
   110     CPIXLOGSTRING("ENTER CFileMonitor::RunL");
   102     Deque();
   111     Deque();
   103     CActiveScheduler::Add( this );
   112     CActiveScheduler::Add( this );
   104     
   113     
   105     /*
   114     /*
   116     /*
   125     /*
   117     * IMPORTANT:
   126     * IMPORTANT:
   118     * Rename of whole directory happens as change to every file in dir.
   127     * Rename of whole directory happens as change to every file in dir.
   119     * We get an event of every file in dir.
   128     * We get an event of every file in dir.
   120     */
   129     */
       
   130     OstTrace1( TRACE_NORMAL, DUP1_CFILEMONITOR_RUNL, "CFileMonitor::RunL;status.iFileEventType=%d", status.iFileEventType );
   121     CPIXLOGSTRING2("CFileMonitor::RunL, status.iFileEventType: %i", status.iFileEventType );    
   131     CPIXLOGSTRING2("CFileMonitor::RunL, status.iFileEventType: %i", status.iFileEventType );    
   122     switch(status.iFileEventType)
   132     switch(status.iFileEventType)
   123 		{
   133 		{
   124 		case EFastFindFileCreated:
   134 		case EFastFindFileCreated:
   125 			{
   135 			{
       
   136 			OstTraceExt1( TRACE_NORMAL, DUP4_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileCreated old=%S", fileNameOld );
   126 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileCreated old = %S", &fileNameOld);
   137 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileCreated old = %S", &fileNameOld);
       
   138 			OstTraceExt1( TRACE_NORMAL, DUP2_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileCreated new=%S", fileNameNew );
   127 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileCreated new = %S", &fileNameNew);
   139 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileCreated new = %S", &fileNameNew);
   128             // File creation (for example over PC suite) gives fileNameOld as the created files, fileNameOld is empty.
   140             // File creation (for example over PC suite) gives fileNameOld as the created files, fileNameOld is empty.			
   129             iFilePlugin.CreateFileIndexItemL(fileNameOld, ECPixAddAction);
   141             iFilePlugin.CreateContentIndexItemL(fileNameOld, ECPixAddAction);
       
   142             iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixAddAction, false);
   130 			}
   143 			}
   131 		break;
   144 		break;
   132 		
   145 		
   133 		case EFastFindFileModified:
   146 		case EFastFindFileModified:
   134 			{
   147 			{
   140 			
   153 			
   141 			// Decided to block the CPiXHarvesterServer thread rather than introduce 
   154 			// Decided to block the CPiXHarvesterServer thread rather than introduce 
   142 			// new active object state into the CFileMonitor.
   155 			// new active object state into the CFileMonitor.
   143 			User::After(50000); // 0.05 seconds
   156 			User::After(50000); // 0.05 seconds
   144 			
   157 			
       
   158 			OstTraceExt1( TRACE_NORMAL, DUP3_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileModified old=%S", fileNameOld );
   145 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileModified old = %S", &fileNameOld);
   159 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileModified old = %S", &fileNameOld);
       
   160 			OstTraceExt1( TRACE_NORMAL, DUP5_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileModified new=%S", fileNameNew );
   146 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileModified new = %S", &fileNameNew);
   161 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileModified new = %S", &fileNameNew);
   147 			// File copy, fileNameOld contains the file name, fileNameNew is empty
   162 			// File copy, fileNameOld contains the file name, fileNameNew is empty
   148 			iFilePlugin.CreateFileIndexItemL(fileNameOld, ECPixUpdateAction);
   163 			iFilePlugin.CreateContentIndexItemL(fileNameOld, ECPixUpdateAction);
       
   164 			iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixUpdateAction, false);
   149 			}
   165 			}
   150 		break;
   166 		break;
   151 		
   167 		
   152 		case EFastFindFileRenamed:
   168 		case EFastFindFileRenamed:
   153 			{
   169 			{
       
   170 			OstTraceExt1( TRACE_NORMAL, DUP6_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileRenamed old=%S", fileNameOld );
   154 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileRenamed old = %S", &fileNameOld);
   171 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileRenamed old = %S", &fileNameOld);
       
   172 			OstTraceExt1( TRACE_NORMAL, DUP7_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileRenamed new=%S", fileNameNew );
   155 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileRenamed new = %S", &fileNameNew);
   173 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileRenamed new = %S", &fileNameNew);
   156 			TEntry entry; 
   174 			TEntry entry; 
   157 			if ( iFsSession->Entry( fileNameNew, entry ) == KErrNone ) 
   175 			if ( iFsSession->Entry( fileNameNew, entry ) == KErrNone ) 
   158 				{
   176 				{
   159 				if ( !entry.IsDir() )
   177 				if ( !entry.IsDir() )
   160 					{
   178 					{
   161 					if (fileNameOld.Length()>0 && fileNameOld.Compare(fileNameNew)!=0)
   179 					if (fileNameOld.Length()>0 && fileNameOld.Compare(fileNameNew)!=0)
   162 						{
   180 						{
   163 						iFilePlugin.CreateFileIndexItemL(fileNameOld, ECPixRemoveAction);
   181 						iFilePlugin.CreateContentIndexItemL(fileNameOld, ECPixRemoveAction);
       
   182 						iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixRemoveAction, false);
   164 						}
   183 						}
   165 					iFilePlugin.CreateFileIndexItemL(fileNameNew, ECPixUpdateAction);
   184 					iFilePlugin.CreateContentIndexItemL(fileNameNew, ECPixUpdateAction);
       
   185 					iFilePlugin.CreateFolderFileIndexItemL(fileNameNew, ECPixUpdateAction, false);
   166 					}
   186 					}
   167 				else
   187 				else
   168 					{
   188 					{
   169 					iFolderRenamedHarvester->StartL(fileNameOld, fileNameNew);
   189 					iFolderRenamedHarvester->StartL(fileNameOld, fileNameNew);
   170 					}
   190 					}
   172 			}
   192 			}
   173 		break;
   193 		break;
   174 		
   194 		
   175 		case EFastFindFileReplaced:
   195 		case EFastFindFileReplaced:
   176 			{
   196 			{
       
   197 			OstTraceExt1( TRACE_NORMAL, DUP8_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileReplaced old=%S", fileNameOld );
   177 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileReplaced old = %S", &fileNameOld);
   198 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileReplaced old = %S", &fileNameOld);
       
   199 			OstTraceExt1( TRACE_NORMAL, DUP9_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileReplaced new=%S", fileNameNew );
   178 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileReplaced new = %S", &fileNameNew);
   200 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileReplaced new = %S", &fileNameNew);
   179 			// File rename (funnily), fileNameOld contains the old file name, fileNameNew the new name
   201 			// File rename (funnily), fileNameOld contains the old file name, fileNameNew the new name
   180 			if (fileNameOld.Length()>0 && fileNameOld.Compare(fileNameNew)!=0)
   202 			if (fileNameOld.Length()>0 && fileNameOld.Compare(fileNameNew)!=0)
   181 				iFilePlugin.CreateFileIndexItemL(fileNameOld, ECPixRemoveAction);
   203 			    {
   182 			iFilePlugin.CreateFileIndexItemL(fileNameNew, ECPixUpdateAction);
   204 				iFilePlugin.CreateContentIndexItemL(fileNameOld, ECPixRemoveAction);
       
   205 				iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixRemoveAction, false);
       
   206 			    }
       
   207 			iFilePlugin.CreateContentIndexItemL(fileNameNew, ECPixUpdateAction);
       
   208 			iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixUpdateAction, false);
   183 			}
   209 			}
   184 		break;
   210 		break;
   185 				
   211 				
   186 		case EFastFindFileDeleted:
   212 		case EFastFindFileDeleted:
   187 			{
   213 			{
       
   214 			OstTraceExt1( TRACE_NORMAL, DUP10_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileDeleted old=%S", fileNameOld );
   188 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileDeleted old = %S", &fileNameOld);
   215 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileDeleted old = %S", &fileNameOld);
       
   216 			OstTraceExt1( TRACE_NORMAL, DUP11_CFILEMONITOR_RUNL, "CFileMonitor::RunL;EFastFindFileDeleted new=%S", fileNameNew );
   189 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileDeleted new = %S", &fileNameNew);
   217 			CPIXLOGSTRING2("CFileMonitor::RunL, EFastFindFileDeleted new = %S", &fileNameNew);
   190 			// File delete, fileNameOld contains the name of the deleted file
   218 			// File delete, fileNameOld contains the name of the deleted file
   191 			iFilePlugin.CreateFileIndexItemL(fileNameOld, ECPixRemoveAction);
   219 			iFilePlugin.CreateContentIndexItemL(fileNameOld, ECPixRemoveAction);
   192 			}
   220 			iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixRemoveAction, false);
   193 		break;
   221 			}
   194 
   222 		break;
       
   223 		
       
   224 		case EFastFindDirCreated:
       
   225             {
       
   226             iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixAddAction);
       
   227             }
       
   228             break;
       
   229 
       
   230 		case EFastFindDirDeleted:
       
   231             {
       
   232             iFilePlugin.CreateFolderFileIndexItemL(fileNameOld, ECPixRemoveAction);
       
   233             }
       
   234             break;
   195 		default:
   235 		default:
   196 			{
   236 			{
       
   237 			OstTraceExt1( TRACE_NORMAL, DUP12_CFILEMONITOR_RUNL, "CFileMonitor::RunL;unknown event old=%S", fileNameOld );
   197 			CPIXLOGSTRING2("CFileMonitor::RunL, unknown event old = %S", &fileNameOld);
   238 			CPIXLOGSTRING2("CFileMonitor::RunL, unknown event old = %S", &fileNameOld);
       
   239 			OstTraceExt1( TRACE_NORMAL, DUP13_CFILEMONITOR_RUNL, "CFileMonitor::RunL;unknown event new=%S", fileNameNew );
   198 			CPIXLOGSTRING2("CFileMonitor::RunL, unknown event new = %S", &fileNameNew);
   240 			CPIXLOGSTRING2("CFileMonitor::RunL, unknown event new = %S", &fileNameNew);
   199 			}
   241 			}
   200 		break;
   242 		break;
   201 		}
   243 		}
   202     ResetStatus();
   244     ResetStatus();
   203     iEngine.RegisterNotification(iPckg, iStatus);
   245     iEngine.RegisterNotification(iPckg, iStatus);
   204     CPIXLOGSTRING("END CFileMonitor::RunL");
   246     CPIXLOGSTRING("END CFileMonitor::RunL");
   205     SetActive();
   247     OstTraceFunctionExit0( CFILEMONITOR_RUNL_EXIT );
       
   248     SetActive();    
   206     }
   249     }
   207 
   250 
   208 // -----------------------------------------------------------------------------
   251 // -----------------------------------------------------------------------------
   209 // CFileMonitor::StartMonitoring
   252 // CFileMonitor::StartMonitoring
   210 // -----------------------------------------------------------------------------
   253 // -----------------------------------------------------------------------------
   211 //
   254 //
   212 TBool CFileMonitor::StartMonitoring()
   255 TBool CFileMonitor::StartMonitoring()
   213 	{
   256 	{
   214 	CPIXLOGSTRING("ENTER CFileMonitor::StartMonitoring")
   257 	OstTraceFunctionEntry0( CFILEMONITOR_STARTMONITORING_ENTRY );
       
   258 	CPIXLOGSTRING("ENTER CFileMonitor::StartMonitoring");
   215     
   259     
   216     if ( !IsActive() )
   260     if ( !IsActive() )
   217 		{
   261 		{
   218 		CPIXLOGSTRING("CFileMonitor::StartMonitoring - IF ")
   262 		OstTrace0( TRACE_NORMAL, CFILEMONITOR_STARTMONITORING, "CFileMonitor::StartMonitoring - IF" );
       
   263 		CPIXLOGSTRING("CFileMonitor::StartMonitoring - IF ");
   219 		iEngine.Enable();
   264 		iEngine.Enable();
   220 		ResetStatus();
   265 		ResetStatus();
   221 	    iEngine.RegisterNotification( iPckg, iStatus );
   266 	    iEngine.RegisterNotification( iPckg, iStatus );
   222 	    SetActive();
   267 	    SetActive();
   223 		}
   268 		}
   224     
   269     
   225 	CPIXLOGSTRING("END CFileMonitor::StartMonitoring");	
   270 	CPIXLOGSTRING("END CFileMonitor::StartMonitoring");	
   226 		
   271 		
       
   272 	OstTraceFunctionExit0( CFILEMONITOR_STARTMONITORING_EXIT );
   227 	return ETrue;
   273 	return ETrue;
   228 	}
   274 	}
   229 
   275 
   230 // ---------------------------------------------------------------------------
   276 // ---------------------------------------------------------------------------
   231 // CFileMonitor::ResetStatus
   277 // CFileMonitor::ResetStatus
   232 // ---------------------------------------------------------------------------
   278 // ---------------------------------------------------------------------------
   233 //
   279 //
   234 void CFileMonitor::ResetStatus()
   280 void CFileMonitor::ResetStatus()
   235     {
   281     {
       
   282     OstTrace0( TRACE_NORMAL, CFILEMONITOR_RESETSTATUS, "CFileMonitor::ResetStatus" );
   236     CPIXLOGSTRING( "CFileMonitor::ResetStatus" );
   283     CPIXLOGSTRING( "CFileMonitor::ResetStatus" );
   237     
   284     
   238     TFastFindFSPStatus& status = iPckg();
   285     TFastFindFSPStatus& status = iPckg();
   239     
   286     
   240     status.iDriveNumber = 0;
   287     status.iDriveNumber = 0;
   248 // CFileMonitor::Initialize
   295 // CFileMonitor::Initialize
   249 // -----------------------------------------------------------------------------
   296 // -----------------------------------------------------------------------------
   250 //	
   297 //	
   251 TInt CFileMonitor::Initialize()
   298 TInt CFileMonitor::Initialize()
   252     {
   299     {
       
   300     OstTraceFunctionEntry0( CFILEMONITOR_INITIALIZE_ENTRY );
   253     CPIXLOGSTRING("ENTER CFileMonitor::Initialize");
   301     CPIXLOGSTRING("ENTER CFileMonitor::Initialize");
   254     TInt err = OpenEngine();
   302     TInt err = OpenEngine();
       
   303     OstTrace1( TRACE_NORMAL, CFILEMONITOR_INITIALIZE, "CFileMonitor::Initialize;OpenEngine=%d", err );
   255     CPIXLOGSTRING2("CFileMonitor::Initialize - OpenEngine: %i", err );
   304     CPIXLOGSTRING2("CFileMonitor::Initialize - OpenEngine: %i", err );
   256 	if ( err != KErrNone )
   305 	if ( err != KErrNone )
   257 		{
   306 		{
       
   307 		OstTrace0( TRACE_NORMAL, DUP1_CFILEMONITOR_INITIALIZE, "CFileMonitor::Initialize if( err != KErrNone )" );
   258 		CPIXLOGSTRING("CFileMonitor::Initialize if( err != KErrNone ) ");
   308 		CPIXLOGSTRING("CFileMonitor::Initialize if( err != KErrNone ) ");
       
   309 		OstTraceFunctionExit0( CFILEMONITOR_INITIALIZE_EXIT );
   259 		return err;
   310 		return err;
   260 		}
   311 		}
   261 	
   312 	
   262 	CPIXLOGSTRING("END CFileMonitor::Initialize");
   313 	CPIXLOGSTRING("END CFileMonitor::Initialize");
       
   314 	OstTraceFunctionExit0( DUP1_CFILEMONITOR_INITIALIZE_EXIT );
   263 	return err;
   315 	return err;
   264     }
   316     }
   265 
   317 
   266 // -----------------------------------------------------------------------------
   318 // -----------------------------------------------------------------------------
   267 // CFileMonitor::Release
   319 // CFileMonitor::Release
   296     User::LeaveIfError( RFs::DriveToChar( aDriveNumber, chr ) );
   348     User::LeaveIfError( RFs::DriveToChar( aDriveNumber, chr ) );
   297 
   349 
   298     notificationPath.Append( chr );
   350     notificationPath.Append( chr );
   299     notificationPath.Append( KExcludePathSystem );
   351     notificationPath.Append( KExcludePathSystem );
   300     iEngine.AddIgnorePath( notificationPath );
   352     iEngine.AddIgnorePath( notificationPath );
       
   353 	OstTraceExt1( TRACE_NORMAL, CFILEMONITOR_ADDNOTIFICATIONPATHSL, "CFileMonitor::AddNotificationPathsL;AddIgnorePath=%S", notificationPath );
   301 	CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddIgnorePath: %S", &notificationPath );
   354 	CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddIgnorePath: %S", &notificationPath );
   302 
   355 
   303     notificationPath.Zero();
   356     notificationPath.Zero();
   304 
   357 
   305     // As index databases are located under \\Private\\ path,
   358     // As index databases are located under \\Private\\ path,
   306     // this ignore path will mean index databases are also ignored.
   359     // this ignore path will mean index databases are also ignored.
   307     notificationPath.Append( chr );
   360     notificationPath.Append( chr );
   308     notificationPath.Append( KExcludePathPrivate );
   361     notificationPath.Append( KExcludePathPrivate );
   309     iEngine.AddIgnorePath( notificationPath );
   362     iEngine.AddIgnorePath( notificationPath );
       
   363     OstTraceExt1( TRACE_NORMAL, DUP1_CFILEMONITOR_ADDNOTIFICATIONPATHSL, "CFileMonitor::AddNotificationPathsL;AddIgnorePath=%S", notificationPath );
   310     CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddIgnorePath: %S", &notificationPath );
   364     CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddIgnorePath: %S", &notificationPath );
   311 
   365 
   312     notificationPath.Zero();
   366     notificationPath.Zero();
   313 
   367 
   314     // Maps data must not be indexed
   368     // Maps data must not be indexed
   315     notificationPath.Append( chr );
   369     notificationPath.Append( chr );
   316     notificationPath.Append( KExcludePathMapsCities );
   370     notificationPath.Append( KExcludePathMapsCities );
   317     iEngine.AddIgnorePath( notificationPath );
   371     iEngine.AddIgnorePath( notificationPath );
       
   372     OstTraceExt1( TRACE_NORMAL, DUP2_CFILEMONITOR_ADDNOTIFICATIONPATHSL, "CFileMonitor::AddNotificationPathsL;AddIgnorePath=%S", notificationPath );
   318     CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddIgnorePath: %S", &notificationPath );
   373     CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddIgnorePath: %S", &notificationPath );
   319 
   374 
   320     notificationPath.Zero();
   375     notificationPath.Zero();
   321 
   376 
   322     User::LeaveIfError( PathInfo::GetRootPath( notificationPath, aDriveNumber ) );
   377     User::LeaveIfError( PathInfo::GetRootPath( notificationPath, aDriveNumber ) );
   323     iEngine.AddNotificationPath( notificationPath );
   378     iEngine.AddNotificationPath( notificationPath );
       
   379     OstTraceExt1( TRACE_NORMAL, DUP3_CFILEMONITOR_ADDNOTIFICATIONPATHSL, "CFileMonitor::AddNotificationPathsL;AddIgnorePath=%S", notificationPath );
   324     CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddNotificationPath: %S", &notificationPath );
   380     CPIXLOGSTRING2("CFileMonitor::AddNotificationPathsL - AddNotificationPath: %S", &notificationPath );
   325     }
   381     }
   326 
   382 
   327 // -----------------------------------------------------------------------------
   383 // -----------------------------------------------------------------------------
   328 // CFileMonitor::RemoveNotificationPaths
   384 // CFileMonitor::RemoveNotificationPaths
   335     RFs::DriveToChar( aDriveNumber, chr );
   391     RFs::DriveToChar( aDriveNumber, chr );
   336 
   392 
   337     ignorePath.Append( chr );
   393     ignorePath.Append( chr );
   338     ignorePath.Append( KExcludePathSystem );
   394     ignorePath.Append( KExcludePathSystem );
   339     iEngine.RemoveIgnorePath( ignorePath );
   395     iEngine.RemoveIgnorePath( ignorePath );
       
   396     OstTraceExt1( TRACE_NORMAL, CFILEMONITOR_REMOVENOTIFICATIONPATHS, "CFileMonitor::RemoveNotificationPaths;RemoveIgnorePath=%S", ignorePath );
   340     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveIgnorePath: %S", &ignorePath );
   397     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveIgnorePath: %S", &ignorePath );
   341 
   398 
   342     ignorePath.Zero();
   399     ignorePath.Zero();
   343 
   400 
   344     // As index databases are located under \\Private\\ path,
   401     // As index databases are located under \\Private\\ path,
   345     // this ignore path will mean index databases are also ignored.
   402     // this ignore path will mean index databases are also ignored.
   346     ignorePath.Append( chr );
   403     ignorePath.Append( chr );
   347     ignorePath.Append( KExcludePathPrivate );
   404     ignorePath.Append( KExcludePathPrivate );
   348     iEngine.RemoveIgnorePath( ignorePath );
   405     iEngine.RemoveIgnorePath( ignorePath );
       
   406     OstTraceExt1( TRACE_NORMAL, DUP1_CFILEMONITOR_REMOVENOTIFICATIONPATHS, "CFileMonitor::RemoveNotificationPaths;RemoveIgnorePath=%S", ignorePath );
   349     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveIgnorePath: %S", &ignorePath );
   407     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveIgnorePath: %S", &ignorePath );
   350 
   408 
   351     ignorePath.Zero();
   409     ignorePath.Zero();
   352 
   410 
   353     // Maps
   411     // Maps
   354     ignorePath.Append( chr );
   412     ignorePath.Append( chr );
   355     ignorePath.Append( KExcludePathMapsCities );
   413     ignorePath.Append( KExcludePathMapsCities );
   356     iEngine.RemoveIgnorePath( ignorePath );
   414     iEngine.RemoveIgnorePath( ignorePath );
       
   415     OstTraceExt1( TRACE_NORMAL, DUP2_CFILEMONITOR_REMOVENOTIFICATIONPATHS, "CFileMonitor::RemoveNotificationPaths;RemoveIgnorePath=%S", ignorePath );
   357     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveIgnorePath: %S", &ignorePath );
   416     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveIgnorePath: %S", &ignorePath );
   358 
   417 
   359     ignorePath.Zero();
   418     ignorePath.Zero();
   360 
   419 
   361     PathInfo::GetRootPath( ignorePath, aDriveNumber );
   420     PathInfo::GetRootPath( ignorePath, aDriveNumber );
   362     iEngine.RemoveNotificationPath( ignorePath );
   421     iEngine.RemoveNotificationPath( ignorePath );
       
   422     OstTraceExt1( TRACE_NORMAL, DUP3_CFILEMONITOR_REMOVENOTIFICATIONPATHS, "CFileMonitor::RemoveNotificationPaths;RemoveIgnorePath=%S", ignorePath );
   363     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveNotificationPath: %S", &ignorePath );
   423     CPIXLOGSTRING2("CFileMonitor::RemoveNotificationPaths - RemoveNotificationPath: %S", &ignorePath );
   364     }
   424     }
   365 
   425 
   366 // -----------------------------------------------------------------------------
   426 // -----------------------------------------------------------------------------
   367 // CFileMonitor::Enable
   427 // CFileMonitor::Enable