|
1 /* |
|
2 * Copyright (c) 2006 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: MuiuDynamicSettingsItemFinder.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUIUDYNAMICSETTINGSITEMFINDER_H |
|
21 #define MUIUDYNAMICSETTINGSITEMFINDER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <muiuflags.h> |
|
26 #include "MuiuDynamicSettingItemBase.h" |
|
27 #include "MuiuDynamicSettingsItemFinderInterface.h" |
|
28 |
|
29 // CONSTANTS |
|
30 // MACROS |
|
31 // DATA TYPES |
|
32 // FUNCTION PROTOTYPES |
|
33 // FORWARD DECLARATIONS |
|
34 class CMuiuSettingBase; |
|
35 class MMuiuDynamicSettingsItemFinderInterface; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * ?one_line_short_description. |
|
41 * ?other_description_lines |
|
42 * |
|
43 * @lib ?library |
|
44 * @since S60 3.0 |
|
45 */ |
|
46 class CMuiuDynamicSettingsItemFinder : public CBase |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 * @since S60 |
|
53 */ |
|
54 ~CMuiuDynamicSettingsItemFinder(); |
|
55 |
|
56 /** |
|
57 * |
|
58 * @since S60 |
|
59 */ |
|
60 static CMuiuDynamicSettingsItemFinder* NewL( |
|
61 MMuiuDynamicSettingsItemFinderInterface& aObserver ); |
|
62 |
|
63 /** |
|
64 * |
|
65 * @since S60 |
|
66 */ |
|
67 static CMuiuDynamicSettingsItemFinder* NewLC( |
|
68 MMuiuDynamicSettingsItemFinderInterface& aObserver ); |
|
69 |
|
70 |
|
71 public: // New functions |
|
72 |
|
73 /** |
|
74 * Set method to member iSearchFlags |
|
75 * @since S60 3.0 |
|
76 * @param aSearchFlags, Sets value of iSearchFlags |
|
77 */ |
|
78 void SetSearchFlags( const TMuiuFlags& aSearchFlags ); |
|
79 |
|
80 /** |
|
81 * Get function for member iSearchFlags |
|
82 * @since S60 3.0 |
|
83 * @return value of iSearchFlags |
|
84 */ |
|
85 TMuiuFlags SearchFlags() const; |
|
86 |
|
87 /** |
|
88 * |
|
89 * @since S60 3.0 |
|
90 */ |
|
91 void StartSearchL( |
|
92 CMuiuDynSetItemArray& aItemArray, |
|
93 const TUid& aId ); |
|
94 |
|
95 /** |
|
96 * |
|
97 * @since S60 3.0 |
|
98 */ |
|
99 void StartSearchL( |
|
100 CMuiuDynSetItemArray& aItemArray, |
|
101 const TInt aItem ); |
|
102 |
|
103 /** |
|
104 * Get function for member iFinderArray |
|
105 * @since S60 3.0 |
|
106 * @return value of iFinderArray |
|
107 */ |
|
108 CMuiuDynFinderItemArray* FinderArray() const; |
|
109 |
|
110 /** |
|
111 * Gets the copy of finder array and saves it to stack |
|
112 * @since S60 3.0 |
|
113 * @return value of iFinderArray |
|
114 */ |
|
115 CMuiuDynFinderItemArray* FinderArrayLC() const; |
|
116 |
|
117 public: // Functions from base classes |
|
118 |
|
119 protected: // New virtual functions |
|
120 protected: // New functions |
|
121 protected: // Functions from base classes |
|
122 |
|
123 private: // Constructors |
|
124 |
|
125 /** |
|
126 * |
|
127 * @since S60 |
|
128 */ |
|
129 CMuiuDynamicSettingsItemFinder( |
|
130 MMuiuDynamicSettingsItemFinderInterface& aObserver ); |
|
131 |
|
132 /** |
|
133 * |
|
134 * @since S60 |
|
135 */ |
|
136 void ConstructL(); |
|
137 |
|
138 private: // New virtual functions |
|
139 private: // New functions |
|
140 |
|
141 /** |
|
142 * |
|
143 * @since S60 3.0 |
|
144 */ |
|
145 void InitializeSearchL( const TInt aNth ); |
|
146 |
|
147 /** |
|
148 * |
|
149 * @since S60 3.0 |
|
150 */ |
|
151 void FinalizeSearchL(); |
|
152 |
|
153 /** |
|
154 * |
|
155 * @since S60 3.0 |
|
156 */ |
|
157 TBool ContinueSearch( |
|
158 const TInt aCurrentItem, |
|
159 const TInt aMaxItems ); |
|
160 |
|
161 /** |
|
162 * |
|
163 * @since S60 3.0 |
|
164 */ |
|
165 TBool SearchingItem(); |
|
166 |
|
167 /** |
|
168 * |
|
169 * @since S60 3.0 |
|
170 */ |
|
171 void ItemToArrayL(); |
|
172 |
|
173 /** |
|
174 * |
|
175 * @since S60 3.0 |
|
176 */ |
|
177 void ItemCheckL( const TUid& aId ); |
|
178 |
|
179 /** |
|
180 * |
|
181 * @since S60 3.0 |
|
182 */ |
|
183 void ItemCheckL(); |
|
184 |
|
185 /** |
|
186 * |
|
187 * @since S60 3.0 |
|
188 */ |
|
189 TBool ItemSubArrayCheck(); |
|
190 |
|
191 /** |
|
192 * |
|
193 * @since S60 3.0 |
|
194 */ |
|
195 TBool ContinueSubSearch(); |
|
196 |
|
197 /** |
|
198 * |
|
199 * @since S60 3.0 |
|
200 */ |
|
201 void DoIdSearchSubArraysL( const TUid& aId ); |
|
202 |
|
203 /** |
|
204 * |
|
205 * @since S60 3.0 |
|
206 */ |
|
207 void DoIndexSearchSubArraysL(); |
|
208 |
|
209 /** |
|
210 * |
|
211 * @since S60 3.0 |
|
212 */ |
|
213 void DoEndSearch(); |
|
214 |
|
215 /** |
|
216 * |
|
217 * @since S60 3.0 |
|
218 */ |
|
219 void DoIdSearchL( |
|
220 CMuiuDynSetItemArray& aItemArray, |
|
221 const TUid& aId ); |
|
222 |
|
223 /** |
|
224 * |
|
225 * @since S60 3.0 |
|
226 */ |
|
227 void DoIndexSearchL( CMuiuDynSetItemArray& aItemArray ); |
|
228 |
|
229 /** |
|
230 * |
|
231 * @since S60 3.0 |
|
232 */ |
|
233 void SearchIdFromTreeL( |
|
234 CMuiuDynSetItemArray& aItemArray, |
|
235 const TUid& aId ); |
|
236 |
|
237 /** |
|
238 * |
|
239 * @since S60 3.0 |
|
240 */ |
|
241 void SearchIndexFromTreeL( |
|
242 CMuiuDynSetItemArray& aItemArray ); |
|
243 |
|
244 /** |
|
245 * |
|
246 * @since S60 3.0 |
|
247 */ |
|
248 TBool IsHidden(); |
|
249 |
|
250 /** |
|
251 * |
|
252 * @since S60 3.0 |
|
253 */ |
|
254 void SearchShouldStop(); |
|
255 |
|
256 private: // Functions from base classes |
|
257 |
|
258 public: // Data |
|
259 |
|
260 enum TMuiuDynFinderFlags |
|
261 { |
|
262 // Following flags are for set up the search |
|
263 |
|
264 // When enabled, user defined check is made |
|
265 EFinderCustomCheck = 0, |
|
266 // Includes subfolders in search |
|
267 EFinderSearchSubFolders, |
|
268 // Overrides the item spesific tests for one round |
|
269 EFinderOverrideChecks, |
|
270 // Hidden items will not be included into the search |
|
271 EFinderDoHideCheck, |
|
272 // Searches for resources instead of item |
|
273 EFinderResourceSearch, |
|
274 // Goes through whole array regardless of hits |
|
275 EFinderSearchAll, |
|
276 // Keeps the last search result in memory |
|
277 EFinderKeepLastResult, |
|
278 // Searches items that doesn't match the set |
|
279 EFinderExlusiveSearch, |
|
280 // The result tree's ownership is moved to client |
|
281 EFinderMoveOwnership, |
|
282 |
|
283 // Following flags are mainly for internal use |
|
284 EFinderItemFound = 16, |
|
285 EFinderItemFindError, |
|
286 EFinderExit |
|
287 }; |
|
288 |
|
289 protected: // Data |
|
290 private: // Data |
|
291 |
|
292 // |
|
293 MMuiuDynamicSettingsItemFinderInterface& iObserver; |
|
294 // Flags to control the finder |
|
295 TMuiuFlags iSearchFlags; |
|
296 // |
|
297 CMuiuDynSetItemArray* iSubArrays; |
|
298 // |
|
299 CMuiuSettingBase* iTempItem; |
|
300 // |
|
301 TInt iSearchItem; |
|
302 // Current item index, used for passing forward |
|
303 TInt iCurrentItem; |
|
304 // |
|
305 CMuiuDynFinderItemArray* iFinderArray; |
|
306 }; |
|
307 |
|
308 #endif // MUIUDYNAMICSETTINGSITEMFINDER_H |
|
309 |
|
310 // End of File |