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