harvesterplugins/file/fastfindfileserverplugin/src/fastfindfileserverplugin.cpp
changeset 0 ccd0fd43f247
child 2 208a4ba3894c
equal deleted inserted replaced
-1:000000000000 0:ccd0fd43f247
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Monitors file creations, modifications and deletions.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <f32pluginutils.h>
       
    19 #include "fastfindfileserverplugin.h"
       
    20 #include "harvesterlog.h"
       
    21 
       
    22 _LIT( KFastFindFileServerPlugin, "CPixFileServerPlugin" );
       
    23 
       
    24 //-----------------------------------------------------------------------------
       
    25 // CFastFindFileServerPlugin implementation
       
    26 //-----------------------------------------------------------------------------
       
    27 //
       
    28 CFastFindFileServerPlugin::CFastFindFileServerPlugin()
       
    29 : iFormatDriveNumber( -1 )
       
    30 	{
       
    31 	WRITELOG( "CFastFindFileServerPlugin::CFastFindFileServerPlugin()" );
       
    32 	}
       
    33 	
       
    34 //-----------------------------------------------------------------------------
       
    35 // 
       
    36 //-----------------------------------------------------------------------------
       
    37 //
       
    38 CFastFindFileServerPlugin::~CFastFindFileServerPlugin()
       
    39     {
       
    40     WRITELOG( "CFastFindFileServerPlugin::~CFastFindFileServerPlugin()" );
       
    41     
       
    42     TRAP_IGNORE( DisableL() );
       
    43     iFsSession.Close();
       
    44     
       
    45     iCreatedFiles.ResetAndDestroy();
       
    46     iCreatedFiles.Close();
       
    47     
       
    48     iPaths.ResetAndDestroy();
       
    49     iPaths.Close();
       
    50     
       
    51     iIgnorePaths.ResetAndDestroy();
       
    52     iIgnorePaths.Close();
       
    53         
       
    54     iQueue.ResetAndDestroy();
       
    55     iQueue.Close();
       
    56     }
       
    57     
       
    58 //-----------------------------------------------------------------------------
       
    59 // 
       
    60 //-----------------------------------------------------------------------------
       
    61 //
       
    62 CFastFindFileServerPlugin* CFastFindFileServerPlugin::NewL()
       
    63     {
       
    64     WRITELOG( "CFastFindFileServerPlugin::NewL()" );
       
    65     return new (ELeave) CFastFindFileServerPlugin;
       
    66     }
       
    67 
       
    68 //-----------------------------------------------------------------------------
       
    69 // 
       
    70 //-----------------------------------------------------------------------------
       
    71 //
       
    72 void CFastFindFileServerPlugin::InitialiseL()
       
    73     {
       
    74     WRITELOG( "CFastFindFileServerPlugin::InitializeL()" );
       
    75     User::LeaveIfError( iFsSession.Connect() );
       
    76     }
       
    77     
       
    78 //-----------------------------------------------------------------------------
       
    79 // 
       
    80 //-----------------------------------------------------------------------------
       
    81 //
       
    82 void CFastFindFileServerPlugin::EnableL()
       
    83     {
       
    84     WRITELOG( "CFastFindFileServerPlugin::EnableL()" );
       
    85     User::LeaveIfError( RegisterIntercept(EFsFileCreate, EPostIntercept) );
       
    86     User::LeaveIfError( RegisterIntercept(EFsFileRename, EPostIntercept) );
       
    87     User::LeaveIfError( RegisterIntercept(EFsRename, EPostIntercept) );
       
    88     User::LeaveIfError( RegisterIntercept(EFsDelete, EPostIntercept) );
       
    89 //    User::LeaveIfError( RegisterIntercept(EFsFileReplace, EPostIntercept) );
       
    90     User::LeaveIfError( RegisterIntercept(EFsReplace, EPostIntercept) );
       
    91 //    User::LeaveIfError( RegisterIntercept(EFsFileModified, EPostIntercept) );
       
    92     User::LeaveIfError( RegisterIntercept(EFsFileSetModified, EPostIntercept) );
       
    93     User::LeaveIfError( RegisterIntercept(EFsFileSubClose, EPostIntercept) );
       
    94 	// format events
       
    95 	User::LeaveIfError( RegisterIntercept(EFsFormatSubClose, EPostIntercept) );
       
    96 	User::LeaveIfError( RegisterIntercept(EFsFormatOpen, EPostIntercept) );
       
    97 
       
    98 #ifdef _DEBUG_EVENTS
       
    99     RegisterDebugEventsL();
       
   100 #endif
       
   101     }
       
   102     
       
   103 //-----------------------------------------------------------------------------
       
   104 // 
       
   105 //-----------------------------------------------------------------------------
       
   106 //
       
   107 void CFastFindFileServerPlugin::DisableL()
       
   108     {
       
   109     WRITELOG( "CFastFindFileServerPlugin::DisableL()" );
       
   110     User::LeaveIfError( UnregisterIntercept(EFsFileCreate, EPrePostIntercept) );
       
   111     User::LeaveIfError( UnregisterIntercept(EFsFileRename, EPrePostIntercept) );
       
   112     User::LeaveIfError( UnregisterIntercept(EFsRename, EPrePostIntercept) );
       
   113     User::LeaveIfError( UnregisterIntercept(EFsDelete, EPrePostIntercept) );
       
   114 //    User::LeaveIfError( UnregisterIntercept(EFsFileReplace, EPrePostIntercept) );
       
   115     User::LeaveIfError( UnregisterIntercept(EFsReplace, EPrePostIntercept) );
       
   116 //    User::LeaveIfError( UnregisterIntercept(EFsFileModified, EPrePostIntercept) );
       
   117     User::LeaveIfError( UnregisterIntercept(EFsFileSetModified, EPrePostIntercept) );
       
   118     User::LeaveIfError( UnregisterIntercept(EFsFileSubClose, EPrePostIntercept) );
       
   119 	// format events
       
   120 	User::LeaveIfError( UnregisterIntercept(EFsFormatSubClose, EPostIntercept) );
       
   121 	User::LeaveIfError( UnregisterIntercept(EFsFormatOpen, EPostIntercept) );
       
   122 
       
   123 #ifdef _DEBUG_EVENTS
       
   124     UnregisterDebugEventsL();
       
   125 #endif
       
   126     }
       
   127     
       
   128 
       
   129 //-----------------------------------------------------------------------------
       
   130 // AddConnection
       
   131 //-----------------------------------------------------------------------------
       
   132 //
       
   133 void CFastFindFileServerPlugin::AddConnection()
       
   134     {
       
   135     WRITELOG( "CFastFindFileServerPlugin::AddConnection()" );
       
   136     
       
   137     ++iConnectionCount;
       
   138     }
       
   139 
       
   140 //-----------------------------------------------------------------------------
       
   141 // RemoveConnection
       
   142 //-----------------------------------------------------------------------------
       
   143 //
       
   144 void CFastFindFileServerPlugin::RemoveConnection()
       
   145     {
       
   146     WRITELOG( "CFastFindFileServerPlugin::RemoveConnection()" );
       
   147     
       
   148     --iConnectionCount;
       
   149 
       
   150     // remove notification request if this was last connection
       
   151     if ( iConnectionCount <= 0 )
       
   152         {
       
   153         WRITELOG( "CFastFindFileServerPlugin::RemoveConnection() last connection" );
       
   154 
       
   155         iNotification = NULL;
       
   156         }
       
   157     }
       
   158 
       
   159 //-----------------------------------------------------------------------------
       
   160 // 
       
   161 //-----------------------------------------------------------------------------
       
   162 //
       
   163 TInt CFastFindFileServerPlugin::DoRequestL( TFsPluginRequest& aRequest )
       
   164 	{
       
   165 	TInt err = KErrNone;
       
   166 	TInt function = aRequest.Function();
       
   167 	const TBool formatFunction = function == EFsFormatOpen || function == EFsFormatSubClose;
       
   168 
       
   169 #ifdef _DEBUG_EVENTS
       
   170     PrintDebugEvents( function );
       
   171 #endif
       
   172 
       
   173     if ( function == EFsFileSubClose && iCreatedFiles.Count() == 0 )
       
   174         {
       
   175         return KErrNone;
       
   176         }
       
   177 
       
   178     WRITELOG1( "----- CFastFindFileServerPlugin::DoRequestL() - plugin function: %d -----", function );
       
   179 
       
   180     TFileName fileName;
       
   181     fileName.Zero();
       
   182     TFileName newFileName;
       
   183     newFileName.Zero();
       
   184 
       
   185 	if ( !formatFunction )
       
   186 		{
       
   187 		GetName( &aRequest, fileName );
       
   188 		WRITELOG1( "CFastFindFileServerPlugin::DoRequestL() - fileName: %S", &fileName );
       
   189 		}
       
   190 
       
   191     // get process id
       
   192 	TUid processId = { 0 };
       
   193 
       
   194     /*RThread clientThread;
       
   195     RProcess clientProcess;
       
   196     err = aRequest.Message().Client( clientThread, EOwnerThread );
       
   197     if ( err == KErrNone )
       
   198         {
       
   199         err = clientThread.Process( clientProcess );
       
   200         if ( err == KErrNone )
       
   201             {
       
   202             processId = clientProcess.Identity();
       
   203             }
       
   204         }
       
   205     clientProcess.Close();
       
   206     clientThread.Close();*/
       
   207 
       
   208 	processId = aRequest.Message().Identity();
       
   209 
       
   210     // if rename, check destination path
       
   211     if ( function == EFsRename || function == EFsFileRename || function == EFsReplace )
       
   212         {
       
   213         GetNewName( &aRequest, newFileName );
       
   214         WRITELOG1( "CFastFindFileServerPlugin::DoRequestL() - newFileName: %S", &newFileName );
       
   215         if ( !CheckPath(newFileName) )
       
   216             {
       
   217             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - path not supported" );
       
   218             return KErrNone;
       
   219             }
       
   220         if ( !CheckAttribs(newFileName) )
       
   221             {
       
   222             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - attribute check failed" );
       
   223             return KErrNone;
       
   224             }
       
   225         }
       
   226     else if ( !formatFunction )
       
   227         {
       
   228         if ( !CheckPath(fileName) )
       
   229             {
       
   230             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - path not supported" );
       
   231             return KErrNone;
       
   232             }
       
   233 
       
   234         if ( !CheckAttribs(fileName) )
       
   235             {
       
   236             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - attribute check failed" );
       
   237             return KErrNone;
       
   238             }
       
   239         }
       
   240 
       
   241     TInt fileEventType = EFastFindFileUnknown;
       
   242     TInt drvNumber = aRequest.DriveNumber();
       
   243 
       
   244     WRITELOG1( "CFastFindFileServerPlugin::DoRequestL() - drive number: %d", drvNumber );
       
   245 
       
   246     switch( function )
       
   247         {
       
   248         case EFsFileCreate:
       
   249             {
       
   250             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - EFsFileCreate" );
       
   251 
       
   252             TFileName* fn = new (ELeave) TFileName;
       
   253             fn->Zero();
       
   254             fn->Copy( fileName );
       
   255             iCreatedFiles.Append( fn );
       
   256             User::LeaveIfError( UnregisterIntercept(EFsFileSetModified, EPrePostIntercept) );
       
   257             return KErrNone;
       
   258             }
       
   259 
       
   260         case EFsFileSubClose:
       
   261             {
       
   262             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - EFsFileSubClose" );
       
   263 
       
   264             TBool found = EFalse;
       
   265             for ( TInt i = 0; i < iCreatedFiles.Count(); i++ )
       
   266                 {
       
   267                 TFileName* fn = iCreatedFiles[i];
       
   268                 if ( fn->CompareC(fileName,1,NULL) == 0 )
       
   269                     {
       
   270                     fileEventType = EFastFindFileCreated;
       
   271                     delete fn;
       
   272                     fn = NULL;
       
   273                     iCreatedFiles.Remove( i );
       
   274                     found = ETrue;
       
   275                     User::LeaveIfError( RegisterIntercept(EFsFileSetModified, EPostIntercept) );
       
   276                     }
       
   277                 }
       
   278 
       
   279             if ( !found )
       
   280                 {
       
   281                 return KErrNone;
       
   282                 }
       
   283             }
       
   284             break;
       
   285 
       
   286         case EFsRename:
       
   287             {
       
   288             WRITELOG1( "CFastFindFileServerPlugin::DoRequestL() - EFsRenamed, new file: %S", &newFileName );
       
   289             fileEventType = EFastFindFileRenamed;
       
   290             }
       
   291             break;
       
   292 
       
   293         case EFsFileRename:
       
   294             WRITELOG1( "CFastFindFileServerPlugin::DoRequestL() - EFsFileRenamed, new file: %S", &newFileName );
       
   295             fileEventType = EFastFindFileRenamed;
       
   296             break;
       
   297 
       
   298         case EFsFileSetModified:
       
   299             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - EFsFileModified" );
       
   300             fileEventType = EFastFindFileModified;
       
   301             break;
       
   302 
       
   303         case EFsReplace:
       
   304             WRITELOG1( "CFastFindFileServerPlugin::DoRequestL() - EFsReplace, new file: %S", &newFileName );
       
   305             fileEventType = EFastFindFileReplaced;
       
   306             break;
       
   307 
       
   308         case EFsDelete:
       
   309             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - EFsDelete" );
       
   310             fileEventType = EFastFindFileDeleted;
       
   311             break;
       
   312 
       
   313 		case EFsFormatOpen:
       
   314 			WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - EFsFormatOpen" );
       
   315 			// get the drive letter
       
   316 			iFormatDriveNumber = drvNumber;
       
   317 			fileEventType = EFastFindDriveFormatted;
       
   318 			processId.iUid = 0;
       
   319 			//return KErrNone;
       
   320 			break;
       
   321 
       
   322 		case EFsFormatSubClose:
       
   323 			WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - EFsFormatSubClose" );
       
   324 			if ( iFormatDriveNumber < 0 )
       
   325 				{
       
   326 				return KErrNone;
       
   327 				}
       
   328 			drvNumber = iFormatDriveNumber;
       
   329 			iFormatDriveNumber = -1;
       
   330 			fileEventType = EFastFindDriveFormatted;
       
   331 			if ( processId.iUid == 0 )
       
   332 				{
       
   333 				processId.iUid = 1;
       
   334 				}
       
   335 			break;
       
   336 
       
   337         default:
       
   338             WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - Unknown function" );
       
   339             return KErrNone;
       
   340         }
       
   341 
       
   342     if ( iNotification )
       
   343         {
       
   344         WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - iNotification found" );
       
   345         TFastFindFSPStatusPckg clientStatusBuf;
       
   346         TFastFindFSPStatus& clientStatus = clientStatusBuf();
       
   347         clientStatus.iDriveNumber = drvNumber;
       
   348         clientStatus.iFileName.Copy( fileName );
       
   349         if ( newFileName.Length() > 0 )
       
   350             {
       
   351             clientStatus.iNewFileName.Copy( newFileName );
       
   352             }
       
   353         clientStatus.iFileEventType = fileEventType;
       
   354         clientStatus.iProcessId = processId;
       
   355 
       
   356         TRAP( err, iNotification->WriteParam1L(clientStatusBuf) );
       
   357         iNotification->Complete( err );
       
   358         iNotification = NULL;
       
   359         WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - iNotification complete" );
       
   360         }
       
   361     else // no notification ready, put in the queue
       
   362         {
       
   363         WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - iNotification not found. Put in the queue" );
       
   364 
       
   365         TFastFindFSPStatus* clientStatus = new (ELeave) TFastFindFSPStatus;
       
   366         clientStatus->iDriveNumber = drvNumber;
       
   367         clientStatus->iFileName.Copy( fileName );
       
   368         if ( newFileName.Length() > 0 )
       
   369             {
       
   370             clientStatus->iNewFileName.Copy( newFileName );
       
   371             }
       
   372         clientStatus->iFileEventType = fileEventType;
       
   373         clientStatus->iProcessId = processId;
       
   374 
       
   375         iQueue.Append( clientStatus ); // owenership is transferred
       
   376         err = KErrNone;
       
   377         WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - added to queue" );
       
   378         }
       
   379 
       
   380     WRITELOG( "CFastFindFileServerPlugin::DoRequestL() - return" );
       
   381     return err;
       
   382     }
       
   383 
       
   384 //-----------------------------------------------------------------------------
       
   385 // CFastFindFileServerPluginConn implementation
       
   386 //-----------------------------------------------------------------------------
       
   387 class CFastFindFileServerPluginConn : public CFsPluginConn
       
   388     {
       
   389     public:
       
   390         static CFastFindFileServerPluginConn* NewL( CFastFindFileServerPlugin& aPlugin );
       
   391         virtual ~CFastFindFileServerPluginConn();
       
   392 
       
   393         virtual TInt DoControl( CFsPluginConnRequest& aRequest );
       
   394         virtual void DoRequest( CFsPluginConnRequest& aRequest );
       
   395         virtual void DoCancel( TInt aReqMask );
       
   396 
       
   397     private:
       
   398         CFastFindFileServerPluginConn( CFastFindFileServerPlugin& aPlugin );
       
   399 
       
   400         CFastFindFileServerPlugin& iPlugin;
       
   401 
       
   402         RMessage2* iMessage;
       
   403     };
       
   404     
       
   405 /**
       
   406 * Leaving New function for the plugin
       
   407 * @internalComponent
       
   408 */
       
   409 CFastFindFileServerPluginConn* CFastFindFileServerPluginConn::NewL( 
       
   410 		CFastFindFileServerPlugin& aPlugin )
       
   411     {
       
   412     WRITELOG( "CFastFindFileServerPluginConn::NewL()" );
       
   413     return new (ELeave) CFastFindFileServerPluginConn( aPlugin );
       
   414     }
       
   415 
       
   416 
       
   417 /**
       
   418 * Constructor for the plugin
       
   419 * @internalComponent
       
   420 */
       
   421 CFastFindFileServerPluginConn::CFastFindFileServerPluginConn(
       
   422                CFastFindFileServerPlugin& aPlugin )
       
   423   : iPlugin( aPlugin )
       
   424     {
       
   425     WRITELOG( "CFastFindFileServerPluginConn::CFastFindFileServerPluginConn()" );
       
   426 
       
   427     iPlugin.AddConnection();
       
   428     }
       
   429 
       
   430 
       
   431 /**
       
   432 * The destructor for the test virus scanner hook.
       
   433 * @internalComponent
       
   434 */
       
   435 CFastFindFileServerPluginConn::~CFastFindFileServerPluginConn()
       
   436     {
       
   437     WRITELOG( "CFastFindFileServerPluginConn::~CFastFindFileServerPluginConn()" );
       
   438 
       
   439     iPlugin.RemoveConnection();
       
   440     }
       
   441 
       
   442 //-----------------------------------------------------------------------------
       
   443 // 
       
   444 //-----------------------------------------------------------------------------
       
   445 //
       
   446 TInt CFastFindFileServerPluginConn::DoControl( CFsPluginConnRequest& aRequest )
       
   447     {
       
   448     WRITELOG( "CFastFindFileServerPluginConn::DoControl()" );
       
   449     TInt err = KErrNotSupported;
       
   450     
       
   451     CFastFindFileServerPlugin& myPlugin = *(CFastFindFileServerPlugin*)Plugin();
       
   452     
       
   453     switch( aRequest.Function() )
       
   454         {
       
   455         case EFastFindFSPOpEnable:
       
   456             {
       
   457             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - EFastFindFSPOpEnable" );
       
   458             TRAP( err, myPlugin.EnableL() );
       
   459             break;
       
   460             }
       
   461         
       
   462         case EFastFindFSPOpDisable:
       
   463             {
       
   464             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - EFastFindFSPOpDisable" );
       
   465             TRAP( err, myPlugin.DisableL() );
       
   466             break;
       
   467             }
       
   468         
       
   469         default:
       
   470             {
       
   471             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - Unknown Control" );
       
   472             break;            
       
   473             }
       
   474         }
       
   475 
       
   476     return err;
       
   477     }
       
   478     
       
   479 
       
   480 //-----------------------------------------------------------------------------
       
   481 // 
       
   482 //-----------------------------------------------------------------------------
       
   483 //
       
   484 void CFastFindFileServerPluginConn::DoRequest( CFsPluginConnRequest& aRequest )
       
   485     {
       
   486     WRITELOG( "CFastFindFileServerPluginConn::DoRequest()" );
       
   487     CFastFindFileServerPlugin& myPlugin = *(CFastFindFileServerPlugin*)Plugin();
       
   488     
       
   489     switch( aRequest.Function() )
       
   490         {
       
   491         case EFastFindFSPOpRegisterNotification:
       
   492             {
       
   493             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - EFastFindFSPOpRegisterNotification" );
       
   494             TInt err = myPlugin.RegisterNotification( aRequest );
       
   495             
       
   496             if ( err != KErrNone )
       
   497                 {
       
   498                 aRequest.Complete( err );
       
   499                 }
       
   500             break;
       
   501             }
       
   502             
       
   503         case EFastFindFSPOpAddNotificationPath:
       
   504             {
       
   505             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - EFastFindFSPOpAddNotificationPath" );
       
   506             TInt err = myPlugin.AddNotificationPath( aRequest );
       
   507             aRequest.Complete( err );
       
   508             break;
       
   509             }
       
   510             
       
   511         case EFastFindFSPOpRemoveNotificationPath:
       
   512             {
       
   513             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - EFastFindFSPOpRemoveNotificationPath" );
       
   514             TInt err = myPlugin.RemoveNotificationPath( aRequest );
       
   515             aRequest.Complete( err );
       
   516             break;
       
   517             }
       
   518             
       
   519         case EFastFindFSPOpAddIgnorePath:
       
   520             {
       
   521             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - EFastFindFSPOpAddIgnorePath" );
       
   522             TInt err = myPlugin.AddIgnorePath( aRequest );
       
   523             aRequest.Complete( err );
       
   524             break;
       
   525             }
       
   526             
       
   527         case EFastFindFSPOpRemoveIgnorePath:
       
   528             {
       
   529             WRITELOG( "CFastFindFileServerPluginConn::DoControl() - EFastFindFSPOpRemoveIgnorePath" );
       
   530             TInt err = myPlugin.RemoveIgnorePath( aRequest );
       
   531             aRequest.Complete( err );
       
   532             break;
       
   533             }
       
   534         }
       
   535     }
       
   536 
       
   537 //-----------------------------------------------------------------------------
       
   538 // 
       
   539 //-----------------------------------------------------------------------------
       
   540 //
       
   541 void CFastFindFileServerPluginConn::DoCancel( TInt /*aReqMask*/ )
       
   542     {
       
   543     WRITELOG( "CFastFindFileServerPluginConn::DoCancel()" );
       
   544     iRequestQue.DoCancelAll( KErrCancel );
       
   545     }
       
   546     
       
   547 //-----------------------------------------------------------------------------
       
   548 // 
       
   549 //-----------------------------------------------------------------------------
       
   550 //
       
   551 CFsPluginConn* CFastFindFileServerPlugin::NewPluginConnL()
       
   552     {
       
   553     WRITELOG( "CFastFindFileServerPluginConn::NewPluginConnL()" );
       
   554     return CFastFindFileServerPluginConn::NewL( *this );
       
   555     }
       
   556     
       
   557 //-----------------------------------------------------------------------------
       
   558 // 
       
   559 //-----------------------------------------------------------------------------
       
   560 //
       
   561 TInt CFastFindFileServerPlugin::RegisterNotification( CFsPluginConnRequest& aRequest )
       
   562     {
       
   563     WRITELOG( "CFastFindFileServerPlugin::RegisterNotification()" );
       
   564     
       
   565     if ( iNotification )
       
   566         {
       
   567         return KErrInUse;
       
   568         }
       
   569     
       
   570     iNotification = &aRequest;
       
   571     
       
   572     if ( iQueue.Count() > 0 )
       
   573         {
       
   574         WRITELOG( "CFastFindFileServerPlugin::RegisterNotification() - item in queue" );
       
   575         
       
   576         TFastFindFSPStatus* queueStatus = iQueue[0];
       
   577         
       
   578         TFastFindFSPStatusPckg pckg;
       
   579         TFastFindFSPStatus& status = pckg();
       
   580         
       
   581         status.iDriveNumber = queueStatus->iDriveNumber;
       
   582         status.iFileEventType = queueStatus->iFileEventType;
       
   583         status.iFileName.Copy( queueStatus->iFileName );
       
   584         status.iNewFileName.Copy( queueStatus->iNewFileName );
       
   585         status.iProcessId = queueStatus->iProcessId;
       
   586         
       
   587         TRAPD( err, iNotification->WriteParam1L(pckg) );
       
   588         iNotification->Complete( err );
       
   589         iNotification = NULL;
       
   590         
       
   591         delete queueStatus;
       
   592         queueStatus = NULL;
       
   593         iQueue.Remove( 0 );
       
   594         }
       
   595     
       
   596     return KErrNone;
       
   597     }
       
   598     
       
   599 //-----------------------------------------------------------------------------
       
   600 // 
       
   601 //-----------------------------------------------------------------------------
       
   602 //
       
   603 TInt CFastFindFileServerPlugin::AddNotificationPath( CFsPluginConnRequest& aRequest )
       
   604     {
       
   605     WRITELOG( "CFastFindFileServerPlugin::AddNotificationPath()" );
       
   606     TInt err = KErrNone;
       
   607     
       
   608     TFastFindFSPStatusPckg pckg;
       
   609     TRAP( err, aRequest.ReadParam1L(pckg) );
       
   610     
       
   611     if ( err != KErrNone )
       
   612         {
       
   613         return err;
       
   614         }
       
   615     
       
   616     TFastFindFSPStatus& status = pckg();
       
   617     
       
   618     if ( status.iFileName.Length() > 0 )
       
   619         {
       
   620         // check if already exists
       
   621         for ( TInt i = 0; i < iPaths.Count(); i++ )
       
   622             {
       
   623             TFileName* tf = iPaths[i];
       
   624             if ( tf->Compare(status.iFileName) == 0 )
       
   625                 {
       
   626                 return KErrNone;
       
   627                 }
       
   628             }
       
   629 
       
   630         WRITELOG1( "CFastFindFileServerPlugin::AddNotificationPath() - add path: %S", &status.iFileName );
       
   631         TFileName* fn = new  TFileName;
       
   632         
       
   633         if ( fn )
       
   634             {
       
   635             fn->Copy( status.iFileName );
       
   636             iPaths.Append( fn );
       
   637             }
       
   638         else
       
   639         	{
       
   640         	err = KErrNoMemory;
       
   641         	}
       
   642         }
       
   643     else
       
   644         {
       
   645         err = KErrNotFound;
       
   646         }
       
   647         
       
   648     return err;
       
   649     }
       
   650     
       
   651 //-----------------------------------------------------------------------------
       
   652 // 
       
   653 //-----------------------------------------------------------------------------
       
   654 //
       
   655 TInt CFastFindFileServerPlugin::RemoveNotificationPath( CFsPluginConnRequest& aRequest )
       
   656     {
       
   657     WRITELOG( "CFastFindFileServerPlugin::RemoveNotificationPath()" );
       
   658     TInt err = KErrNone;
       
   659     
       
   660     TFastFindFSPStatusPckg pckg;
       
   661     TRAP( err, aRequest.ReadParam1L(pckg) );
       
   662     
       
   663     if ( err != KErrNone )
       
   664         {
       
   665         return err;
       
   666         }
       
   667     
       
   668     TFastFindFSPStatus& status = pckg();
       
   669     
       
   670     if ( status.iFileName.Length() > 0 )
       
   671         {
       
   672         // check if already exist
       
   673         if ( iPaths.Count() > 0 )
       
   674             {
       
   675             for ( TInt i = 0; i < iPaths.Count(); i++ )
       
   676                 {
       
   677                 TFileName* tf = iPaths[i];
       
   678                 if ( tf->Compare(status.iFileName) == 0 )
       
   679                     {
       
   680                     WRITELOG1( "CFastFindFileServerPlugin::RemoveNotificationPath() - remove path: %S", &status.iFileName );
       
   681                     delete tf;
       
   682                     tf = NULL;
       
   683                     iPaths.Remove( i );
       
   684                     }
       
   685                 }
       
   686             }
       
   687         }
       
   688     else
       
   689         {
       
   690         err = KErrNotFound;
       
   691         }
       
   692         
       
   693     return err;
       
   694     }
       
   695     
       
   696 //-----------------------------------------------------------------------------
       
   697 // 
       
   698 //-----------------------------------------------------------------------------
       
   699 //
       
   700 TInt CFastFindFileServerPlugin::AddIgnorePath( CFsPluginConnRequest& aRequest )
       
   701     {
       
   702     WRITELOG( "CFastFindFileServerPlugin::AddIgnorePath()" );
       
   703     TInt err = KErrNone;
       
   704     
       
   705     TFastFindFSPStatusPckg pckg;
       
   706     TRAP( err, aRequest.ReadParam1L(pckg) );
       
   707     
       
   708     if ( err != KErrNone )
       
   709         {
       
   710         return err;
       
   711         }
       
   712     
       
   713     TFastFindFSPStatus& status = pckg();
       
   714     
       
   715     if ( status.iFileName.Length() > 0 )
       
   716         {
       
   717         // check if already exist
       
   718         if ( iIgnorePaths.Count() > 0 )
       
   719             {
       
   720             for ( TInt i = 0; i < iIgnorePaths.Count(); i++ )
       
   721                 {
       
   722                 TFileName* tf = iIgnorePaths[i];
       
   723                 if( tf->Compare(status.iFileName) == 0 )
       
   724                     {
       
   725                     return KErrNone;
       
   726                     }
       
   727                 }
       
   728             }
       
   729             
       
   730         WRITELOG1( "CFastFindFileServerPlugin::AddIgnorePath() - add path: %S", &status.iFileName );
       
   731         TFileName* fn = new TFileName;
       
   732         
       
   733         if ( fn )
       
   734             {
       
   735             fn->Copy( status.iFileName );
       
   736             iIgnorePaths.Append( fn ); // ownership is transferred
       
   737             }
       
   738         else
       
   739         	{
       
   740         	err = KErrNoMemory;
       
   741         	}
       
   742         }
       
   743     else
       
   744         {
       
   745         err = KErrNotFound;
       
   746         }
       
   747         
       
   748     return err;
       
   749     }
       
   750     
       
   751 //-----------------------------------------------------------------------------
       
   752 // 
       
   753 //-----------------------------------------------------------------------------
       
   754 //
       
   755 TInt CFastFindFileServerPlugin::RemoveIgnorePath( CFsPluginConnRequest& aRequest )
       
   756     {
       
   757     WRITELOG( "CFastFindFileServerPlugin::RemoveIgnorePath()" );
       
   758     TInt err = KErrNone;
       
   759     
       
   760     TFastFindFSPStatusPckg pckg;
       
   761     TRAP( err, aRequest.ReadParam1L(pckg) );
       
   762     
       
   763     if ( err != KErrNone )
       
   764         {
       
   765         return err;
       
   766         }
       
   767     
       
   768     TFastFindFSPStatus& status = pckg();
       
   769     
       
   770     if ( status.iFileName.Length() > 0 )
       
   771         {
       
   772         // check if already exist
       
   773         if ( iIgnorePaths.Count() > 0 )
       
   774             {
       
   775             for ( TInt i = 0; i < iIgnorePaths.Count(); i++ )
       
   776                 {
       
   777                 TFileName* tf = iIgnorePaths[i];
       
   778                 if ( tf->Compare(status.iFileName) == 0 )
       
   779                     {
       
   780                     WRITELOG1( "CFastFindFileServerPlugin::RemoveIgnorePath() - remove path: %S", &status.iFileName );
       
   781                     delete tf;
       
   782                     tf = NULL;
       
   783                     iIgnorePaths.Remove( i );
       
   784                     }
       
   785                 }
       
   786             }
       
   787         }
       
   788     else
       
   789         {
       
   790         err = KErrNotFound;
       
   791         }
       
   792         
       
   793     return err;
       
   794     }
       
   795     
       
   796 //-----------------------------------------------------------------------------
       
   797 // 
       
   798 //-----------------------------------------------------------------------------
       
   799 //
       
   800 TBool CFastFindFileServerPlugin::CheckPath( TFileName& aFileName )
       
   801     {
       
   802     // check if ignored pathlist
       
   803     if ( iIgnorePaths.Count() > 0 )
       
   804         {
       
   805         for ( TInt i = 0; i < iIgnorePaths.Count(); i++ )
       
   806             {    
       
   807             TFileName* pathName = iIgnorePaths[i];
       
   808             pathName->LowerCase();
       
   809             TFileName tempFileName;
       
   810             tempFileName.Copy( aFileName );
       
   811             tempFileName.LowerCase();
       
   812             // WRITELOG1("CFastFindFileServerPlugin::CheckPath() - search ignore path: %S", pathName);
       
   813             if ( tempFileName.Find(*pathName) != KErrNotFound )
       
   814                 {
       
   815                 // WRITELOG( "CFastFindFileServerPlugin::CheckPath() - is ignore path" );
       
   816                 return EFalse;
       
   817                 }
       
   818             }
       
   819         }
       
   820     
       
   821     // check if notification path
       
   822     if ( iPaths.Count() > 0 )
       
   823         {
       
   824         for ( TInt i = 0; i < iPaths.Count(); i++ )
       
   825             {    
       
   826             TFileName* pathName = iPaths[i];
       
   827             pathName->LowerCase();
       
   828             TFileName tempFileName;
       
   829             tempFileName.Copy( aFileName );
       
   830             tempFileName.LowerCase();
       
   831             //WRITELOG1("CFastFindFileServerPlugin::CheckPath() - search path: %S", &pathName);
       
   832             if ( tempFileName.Find(*pathName) != KErrNotFound )
       
   833                 {
       
   834                 //WRITELOG( "CFastFindFileServerPlugin::CheckPath() - path found" );
       
   835                 return ETrue;
       
   836                 }
       
   837             }
       
   838         }
       
   839     else
       
   840         {
       
   841         // WRITELOG( "CFastFindFileServerPlugin::CheckPath() - no notification paths" );
       
   842         return ETrue;
       
   843         }
       
   844             
       
   845     return EFalse;
       
   846     }
       
   847     
       
   848 //-----------------------------------------------------------------------------
       
   849 // CFastFindFileServerPlugin::CheckAttribs()
       
   850 //-----------------------------------------------------------------------------
       
   851 //
       
   852 TBool CFastFindFileServerPlugin::CheckAttribs( TFileName& aFileName )
       
   853     {
       
   854     TParse parse;
       
   855     parse.Set( aFileName, NULL, NULL );
       
   856     TPath path( parse.DriveAndPath() );
       
   857     
       
   858     TUint att = 0;
       
   859     
       
   860     // check if path is hidden or system path
       
   861     TInt err = iFsSession.Att( path, att );
       
   862     if ( err == KErrNone )
       
   863         {
       
   864         if ( att & KEntryAttHidden || att & KEntryAttSystem )
       
   865             {
       
   866             return EFalse;
       
   867             }
       
   868         }
       
   869         
       
   870     // or is the file hidden or system file
       
   871     att = 0;
       
   872     err = iFsSession.Att( aFileName, att );
       
   873     if ( err == KErrNone )
       
   874         {
       
   875         if ( att & KEntryAttHidden || att & KEntryAttSystem )
       
   876             {
       
   877             return EFalse;
       
   878             }
       
   879         }
       
   880         
       
   881     return ETrue;
       
   882     }
       
   883     
       
   884 //-----------------------------------------------------------------------------
       
   885 // CFastFindFileServerPluginFactory implementation
       
   886 //-----------------------------------------------------------------------------
       
   887 //
       
   888 class CFastFindFileServerPluginFactory : public CFsPluginFactory
       
   889     {
       
   890     public:
       
   891         CFastFindFileServerPluginFactory();
       
   892         virtual TInt Install();            
       
   893         virtual CFsPlugin* NewPluginL();
       
   894         virtual TInt UniquePosition();
       
   895     };
       
   896     
       
   897 // Constructor for the plugin factory
       
   898 // @internalComponent
       
   899 CFastFindFileServerPluginFactory::CFastFindFileServerPluginFactory()
       
   900     {
       
   901     WRITELOG( "CFastFindFileServerPluginFactory::CFastFindFileServerPluginFactory()" );
       
   902     }
       
   903 
       
   904 // Install function for the plugin factory
       
   905 // @internalComponent
       
   906 TInt CFastFindFileServerPluginFactory::Install()
       
   907     {
       
   908     WRITELOG( "CFastFindFileServerPluginFactory::Install()" );
       
   909     iSupportedDrives = KPluginAutoAttach;
       
   910     
       
   911     return( SetName(&KFastFindFileServerPlugin) );
       
   912     }
       
   913 
       
   914 // @internalComponent
       
   915 TInt CFastFindFileServerPluginFactory::UniquePosition()
       
   916     {
       
   917     WRITELOG( "CFastFindFileServerPluginFactory::UniquePosition()" );
       
   918     return( KFastFindFSPluginPosition );
       
   919     }
       
   920 
       
   921 // Plugin factory function
       
   922 // @internalComponent
       
   923 CFsPlugin* CFastFindFileServerPluginFactory::NewPluginL()
       
   924     {
       
   925     WRITELOG( "CFastFindFileServerPluginFactory::NewPluginL()" );
       
   926     return CFastFindFileServerPlugin::NewL();
       
   927     }
       
   928 
       
   929 // Create a new Plugin
       
   930 // @internalComponent
       
   931 extern "C"
       
   932     {
       
   933     EXPORT_C CFsPluginFactory* CreateFileSystem()
       
   934         {
       
   935         WRITELOG( "CFastFindFileServerPluginFactory::CreateFileSystem" );
       
   936         return( new CFastFindFileServerPluginFactory() );
       
   937         }
       
   938     }
       
   939 
       
   940 #ifdef _DEBUG_EVENTS
       
   941 
       
   942 //-----------------------------------------------------------------------------
       
   943 // 
       
   944 //-----------------------------------------------------------------------------
       
   945 //
       
   946 void CFastFindFileServerPlugin::RegisterDebugEventsL()
       
   947     {
       
   948     User::LeaveIfError( RegisterIntercept( EFsFileDuplicate, EPreIntercept) );
       
   949     User::LeaveIfError( RegisterIntercept( EFsFileCreate, EPreIntercept) );
       
   950     User::LeaveIfError( RegisterIntercept( EFsFileWrite, EPreIntercept) );
       
   951     User::LeaveIfError( RegisterIntercept( EFsFileFlush, EPreIntercept) );
       
   952     User::LeaveIfError( RegisterIntercept( EFsFileSetAtt, EPreIntercept) );
       
   953     User::LeaveIfError( RegisterIntercept( EFsFileChangeMode, EPreIntercept) );
       
   954     User::LeaveIfError( RegisterIntercept( EFsDelete, EPreIntercept) );
       
   955     User::LeaveIfError( RegisterIntercept( EFsFileAdopt, EPreIntercept) );
       
   956     User::LeaveIfError( RegisterIntercept( EFsFileReplace, EPreIntercept) );
       
   957     User::LeaveIfError( RegisterIntercept( EFsFileLock, EPreIntercept) );
       
   958     User::LeaveIfError( RegisterIntercept( EFsFileSize, EPreIntercept) );
       
   959     User::LeaveIfError( RegisterIntercept( EFsFileRename, EPreIntercept) );
       
   960     User::LeaveIfError( RegisterIntercept( EFsRename, EPreIntercept) );
       
   961     User::LeaveIfError( RegisterIntercept( EFsFileOpen, EPreIntercept) );
       
   962     User::LeaveIfError( RegisterIntercept( EFsFileTemp,    EPreIntercept) );
       
   963     User::LeaveIfError( RegisterIntercept( EFsFileUnLock, EPreIntercept) );
       
   964     User::LeaveIfError( RegisterIntercept( EFsFileSetSize, EPreIntercept) );
       
   965     User::LeaveIfError( RegisterIntercept( EFsFileDrive, EPreIntercept) );
       
   966     User::LeaveIfError( RegisterIntercept( EFsReplace, EPreIntercept) );
       
   967     User::LeaveIfError( RegisterIntercept( EFsFileSubClose, EPreIntercept) );
       
   968     User::LeaveIfError( RegisterIntercept( EFsFileRead, EPreIntercept) );
       
   969     User::LeaveIfError( RegisterIntercept( EFsFileSeek, EPreIntercept) );
       
   970     User::LeaveIfError( RegisterIntercept( EFsFileAtt, EPreIntercept) );
       
   971     User::LeaveIfError( RegisterIntercept( EFsFileSet, EPreIntercept) );
       
   972     User::LeaveIfError( RegisterIntercept( EFsFileName, EPreIntercept) );
       
   973     User::LeaveIfError( RegisterIntercept( EFsDirOpen, EPreIntercept) );
       
   974     }
       
   975     
       
   976 //-----------------------------------------------------------------------------
       
   977 // 
       
   978 //-----------------------------------------------------------------------------
       
   979 //
       
   980 void CFastFindFileServerPlugin::UnregisterDebugEventsL()
       
   981     {
       
   982     User::LeaveIfError( UnregisterIntercept( EFsFileDuplicate, EPrePostIntercept) );
       
   983     User::LeaveIfError( UnregisterIntercept( EFsFileCreate, EPrePostIntercept) );
       
   984     User::LeaveIfError( UnregisterIntercept( EFsFileWrite, EPrePostIntercept) );
       
   985     User::LeaveIfError( UnregisterIntercept( EFsFileFlush, EPrePostIntercept) );
       
   986     User::LeaveIfError( UnregisterIntercept( EFsFileSetAtt, EPrePostIntercept) );
       
   987     User::LeaveIfError( UnregisterIntercept( EFsFileChangeMode, EPrePostIntercept) );
       
   988     User::LeaveIfError( UnregisterIntercept( EFsDelete, EPrePostIntercept) );
       
   989     User::LeaveIfError( UnregisterIntercept( EFsFileAdopt, EPrePostIntercept) );
       
   990     User::LeaveIfError( UnregisterIntercept( EFsFileReplace, EPrePostIntercept) );
       
   991     User::LeaveIfError( UnregisterIntercept( EFsFileLock, EPrePostIntercept) );
       
   992     User::LeaveIfError( UnregisterIntercept( EFsFileSize, EPrePostIntercept) );
       
   993     User::LeaveIfError( UnregisterIntercept( EFsFileRename, EPrePostIntercept) );
       
   994     User::LeaveIfError( UnregisterIntercept( EFsRename, EPrePostIntercept) );
       
   995     User::LeaveIfError( UnregisterIntercept( EFsFileOpen, EPrePostIntercept) );
       
   996     User::LeaveIfError( UnregisterIntercept( EFsFileTemp, EPrePostIntercept) );
       
   997     User::LeaveIfError( UnregisterIntercept( EFsFileUnLock, EPrePostIntercept) );
       
   998     User::LeaveIfError( UnregisterIntercept( EFsFileSetSize, EPrePostIntercept) );
       
   999     User::LeaveIfError( UnregisterIntercept( EFsFileDrive, EPrePostIntercept) );
       
  1000     User::LeaveIfError( UnregisterIntercept( EFsReplace, EPrePostIntercept) );
       
  1001     User::LeaveIfError( UnregisterIntercept( EFsFileSubClose, EPrePostIntercept) );
       
  1002     User::LeaveIfError( UnregisterIntercept( EFsFileRead, EPrePostIntercept) );
       
  1003     User::LeaveIfError( UnregisterIntercept( EFsFileSeek, EPrePostIntercept) );
       
  1004     User::LeaveIfError( UnregisterIntercept( EFsFileAtt, EPrePostIntercept) );
       
  1005     User::LeaveIfError( UnregisterIntercept( EFsFileSet, EPrePostIntercept) );
       
  1006     User::LeaveIfError( UnregisterIntercept( EFsFileName, EPrePostIntercept) );
       
  1007     User::LeaveIfError( UnregisterIntercept( EFsDirOpen, EPrePostIntercept) );
       
  1008     }
       
  1009     
       
  1010 //-----------------------------------------------------------------------------
       
  1011 // 
       
  1012 //-----------------------------------------------------------------------------
       
  1013 //
       
  1014 void CFastFindFileServerPlugin::PrintDebugEvents( TInt aFunction )
       
  1015     {
       
  1016     switch ( aFunction )
       
  1017         {
       
  1018         case EFsFileDuplicate:
       
  1019             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileDuplicate" );
       
  1020             break;
       
  1021             
       
  1022         case EFsFileCreate:
       
  1023             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileCreate" );
       
  1024             break;
       
  1025         case EFsFileWrite:
       
  1026             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileWrite" );
       
  1027             break;
       
  1028         case EFsFileFlush:
       
  1029             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileFlush" );
       
  1030             break;
       
  1031         case EFsFileSetAtt:
       
  1032             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileSetAtt" );
       
  1033             break;
       
  1034         case EFsFileChangeMode:
       
  1035             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileChangeMode" );
       
  1036             break;    
       
  1037         case EFsDelete:
       
  1038             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsDelete" );
       
  1039             break;    
       
  1040         case EFsFileAdopt:
       
  1041             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileAdopt" );
       
  1042             break;    
       
  1043         case EFsFileReplace:
       
  1044             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileReplace" );
       
  1045             break;    
       
  1046         case EFsFileLock:
       
  1047             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileLock" );
       
  1048             break;    
       
  1049         case EFsFileSize:
       
  1050             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileSize" );
       
  1051             break;    
       
  1052         case EFsFileModified:
       
  1053             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileModified" );
       
  1054             break;    
       
  1055         case EFsFileRename:
       
  1056             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileRename" );
       
  1057             break;    
       
  1058         case EFsRename:
       
  1059             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsRename" );
       
  1060             break;    
       
  1061         case EFsFileOpen:
       
  1062             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileOpen" );
       
  1063             break;    
       
  1064         case EFsFileTemp:
       
  1065             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileTemp" );
       
  1066             break;    
       
  1067         case EFsFileUnLock:
       
  1068             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileUnLock" );
       
  1069             break;    
       
  1070         case EFsFileSetSize:
       
  1071             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileSetSize" );
       
  1072             break;    
       
  1073         case EFsFileSetModified:
       
  1074             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileSetModified" );
       
  1075             break;
       
  1076         case EFsFileDrive:
       
  1077             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileDrive" );
       
  1078             break;    
       
  1079         case EFsReplace:
       
  1080             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsReplace" );
       
  1081             break;    
       
  1082         case EFsFileSubClose:
       
  1083             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileSubClose" );
       
  1084             break;    
       
  1085         case EFsFileRead:
       
  1086             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileRead" );
       
  1087             break;
       
  1088         case EFsFileSeek:
       
  1089             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileSeek" );
       
  1090             break;    
       
  1091         case EFsFileAtt:
       
  1092             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileAtt" );
       
  1093             break;    
       
  1094         case EFsFileSet:
       
  1095             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileSet" );
       
  1096             break;    
       
  1097         case EFsFileName:
       
  1098             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsFileName" );
       
  1099             break;    
       
  1100         case EFsDirOpen:
       
  1101             WRITELOG( "CFastFindFileServerPlugin::PrintDebugEvents() - EFsDirOpen" );
       
  1102             break;    
       
  1103         default:
       
  1104         break;
       
  1105         }
       
  1106     }
       
  1107 #endif
       
  1108 
       
  1109 //#ifdef _FORCEDEBUG
       
  1110 //#undef _DEBUG
       
  1111 //#undef _FORCEDEBUG
       
  1112 //#endif