plugins/contacts/symbian/contactsmodel/cntplsql/inc/cntfilesearch.h
changeset 0 876b1a06bc25
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @internalComponent
       
    24  @released
       
    25 */
       
    26 
       
    27 
       
    28 #ifndef __CNTFILESEARCH_H__
       
    29 #define __CNTFILESEARCH_H__ 
       
    30 
       
    31 #include <e32base.h>
       
    32 #include <badesca.h>
       
    33 #include <f32file.h>
       
    34 
       
    35 
       
    36 class RFs;
       
    37 class CDir;
       
    38 
       
    39 
       
    40 /**
       
    41 The CCntFileScanner class is used to scan the Contacts Model private directories
       
    42 for database files.  This has to be done in the server since the users of the
       
    43 Contacts Model do not have access to the private directory.
       
    44 */
       
    45 NONSHARABLE_CLASS(CCntFileScanner) : public CBase
       
    46 	{
       
    47 public:
       
    48 	static CDesCArray* ListFilesL(RFs& aFs, TDriveUnit* aDriveUnit = NULL);
       
    49 
       
    50 private:
       
    51 	CCntFileScanner(RFs& aFs);
       
    52 	~CCntFileScanner();
       
    53 
       
    54 	CDesCArray* ScanLD(TDriveUnit* aDriveUnit = NULL);
       
    55 	void GenerateRootDirsL();
       
    56 	void AddDirL(TDriveUnit& aDriveUnit);
       
    57 	void ScanForFilesL(CDesCArray& aArray);
       
    58 	void ScanDirectoryL(const TDesC& aDirPath, CDesCArray& aArray);
       
    59 	void AppendFileNamesL(const CDir& aFileSet, const TDesC& aDirPath, CDesCArray& aArray) const;
       
    60 
       
    61 private:
       
    62 	RFs& iFs;
       
    63 	CDesCArray* iDirStack;
       
    64 	TFileName iPath;
       
    65 	};
       
    66 
       
    67 
       
    68 #endif // __CNTFILESEARCH_H__