|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Server common implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CFILESCAN_H |
|
20 #define CFILESCAN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // CONSTANTS |
|
26 // MACROS |
|
27 // DATA TYPES |
|
28 // FUNCTION PROTOTYPES |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 // CLASS DECLARATION |
|
32 class RFs; |
|
33 class CDcfRepSrv; |
|
34 class CDir; |
|
35 class CSearchLeaf; |
|
36 /** |
|
37 * CFileScan |
|
38 * |
|
39 * @lib DcfRepSrv.exe |
|
40 * @since 3.0 |
|
41 */ |
|
42 class CFileScan : public CActive |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CFileScan* NewL( RFs& aFs ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CFileScan(); |
|
55 |
|
56 public: // New functions |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 /** |
|
62 * |
|
63 * SearchContent |
|
64 * |
|
65 * Function starts the active objects to search protected file through whole file system |
|
66 * |
|
67 * @since 2.5 |
|
68 * @return KErrNone if correctly done |
|
69 */ |
|
70 TInt SearchContent(CDcfRepSrv* aServer); |
|
71 |
|
72 |
|
73 public: // Functions from base classes |
|
74 |
|
75 /** |
|
76 * |
|
77 * From CActive |
|
78 * |
|
79 * DoCancel |
|
80 * |
|
81 * Function is called by Cancel() and set all status to initial status. |
|
82 * |
|
83 * @since 2.5 |
|
84 */ |
|
85 void DoCancel(); |
|
86 |
|
87 /** |
|
88 * |
|
89 * From CActive |
|
90 * |
|
91 * DoCancel |
|
92 * |
|
93 * Function is called when the request is completed |
|
94 * |
|
95 * @since 2.5 |
|
96 */ |
|
97 void RunL(); |
|
98 |
|
99 protected: // New functions |
|
100 protected: // Functions from base classes |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CFileScan( RFs& aFs ); |
|
107 |
|
108 /** |
|
109 * By default Symbian 2nd phase constructor is private. |
|
110 */ |
|
111 void ConstructL(); |
|
112 |
|
113 TInt SearchDrive(); |
|
114 |
|
115 TInt SearchFolder( CDir*& aFolderList ); |
|
116 |
|
117 TInt SearchFile( CDir*& aFileList ); |
|
118 |
|
119 TInt SearchNext(); |
|
120 |
|
121 TInt CheckDrive(); |
|
122 |
|
123 TInt CheckFolder(); |
|
124 |
|
125 TInt IsProtected( const TDesC& aFileName , TBool& aIsDCF ); |
|
126 |
|
127 TInt ToNextLeaf(); |
|
128 |
|
129 TInt UpFolder(); |
|
130 |
|
131 void CleanInternal(); |
|
132 |
|
133 CSearchLeaf* GetRootLeaf(); |
|
134 |
|
135 public: // Data |
|
136 |
|
137 protected: // Data |
|
138 |
|
139 private: // Data |
|
140 CDcfRepSrv* iServer; //server |
|
141 RFs* iFs; |
|
142 TFileName iLastPosition; |
|
143 CSearchLeaf* iCurrentLeaf; |
|
144 TBool iSearching; |
|
145 TBool iDeeper; |
|
146 |
|
147 |
|
148 public: // Friend classes |
|
149 //?friend_class_declaration; |
|
150 protected: // Friend classes |
|
151 //?friend_class_declaration; |
|
152 private: // Friend classes |
|
153 //?friend_class_declaration; |
|
154 |
|
155 }; |
|
156 |
|
157 |
|
158 |
|
159 #endif // CFILESCAN_H |
|
160 |
|
161 // End of File |