terminalsecurity/server/inc/TcFileScan.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2000 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: Implementation of terminalsecurity components
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _TC_FILESCAN_HEADER_
       
    20 #define _TC_FILESCAN_HEADER_
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <f32file.h>
       
    25 
       
    26 
       
    27 class CTcFileScan : public CBase
       
    28 {
       
    29 public: 
       
    30 		
       
    31 		static CTcFileScan* NewL();
       
    32 		~CTcFileScan();
       
    33    
       
    34 
       
    35 	void                FileScanL                   ( const TDesC8 &aFileName,
       
    36 	                                                  TBool aRecursive );
       
    37 
       
    38     HBufC8*             GetCopyOfResultsL           ( );
       
    39 
       
    40 private:
       
    41 	CTcFileScan();
       
    42 
       
    43 private:
       
    44 	void                ScanDirectoryL              ( RFs& aFileSession,
       
    45 	                                                  const TDesC &aDirectory,
       
    46 	                                                  TBool aRecursive );
       
    47 	                                                  	                                                  
       
    48 	void                BeginAddFileToResultsL      ( const TDesC &aFileName, TBool aIsDir, TInt aFiles );
       
    49 	
       
    50 	void                EndAddFileToResultsL        ( TBool aIsDir, TInt aFiles );
       
    51 	
       
    52     void                AddDriveToResultsL          ( const TDesC& aDriveName );
       
    53 	
       
    54     TInt                FilesInDirectoryL           ( RFs& aFs, TDesC &aDirectory );
       
    55     
       
    56     HBufC*              CreateScanPathNameL         ( const TDesC &aDirectory,
       
    57                                                       const TDesC &aSubDirectory,
       
    58                                                       const TDesC& aAsterisk );
       
    59    
       
    60     void                GetDriveListL               () ;
       
    61 
       
    62 private:
       
    63     CBufFlat*           iFileScanResults;
       
    64     TInt                iRecurseLevel;
       
    65 	TBuf8<20>           iTabString;
       
    66 };
       
    67 
       
    68 #endif //_TC_FILESCAN_HEADER_