|
1 /* |
|
2 * Copyright (c) 2002-2007 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: Static class to call combined common file dialogs |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef AKNCOMMONDIALOGSDYNMEM_H |
|
21 #define AKNCOMMONDIALOGSDYNMEM_H |
|
22 |
|
23 |
|
24 #include <CAknCommonDialogsBase.h> |
|
25 |
|
26 class MAknMemorySelectionObserver; |
|
27 class MAknFileSelectionObserver; |
|
28 class MAknFileFilter; |
|
29 |
|
30 |
|
31 /** |
|
32 * New version of AknCommonDialogs class suporting dynamic drives such as |
|
33 * remote drive. Use this instead of now deprecated old AknCommonDialogs. |
|
34 * |
|
35 * A simple facade class that consists of static functions that launch UI |
|
36 * components in a sequence. First, memory selection component is launched and |
|
37 * then file/directory selection component. In save and move dialogs directory |
|
38 * selection may not be shown if there are no subdirectories to choose from. |
|
39 * In save dialog, finally filename prompt component is launched. |
|
40 * |
|
41 * All methods have an obligatory resource ID parameter for memory selection |
|
42 * because it contains the paths for both memories (Phone&MMC) (LOCATION |
|
43 * structs). New TMemoryTypes functionality allows defining dynamic memories |
|
44 * to be used. |
|
45 * |
|
46 * If set, an observer is queried just before exiting the dialog. |
|
47 * At this point the application can either reject or accept user's selection. |
|
48 * Every dialog returns a boolean value which tells if user has selected |
|
49 * something or not. |
|
50 * |
|
51 * @lib CommonDialogs.lib |
|
52 * @since S60 3.2 |
|
53 */ |
|
54 NONSHARABLE_CLASS( AknCommonDialogsDynMem ) |
|
55 { |
|
56 |
|
57 public: |
|
58 |
|
59 /** |
|
60 * Bit flag definition of the memory types that will be listed by the |
|
61 * dialog. These are used in the new functions to include for example |
|
62 * remote drives. In case new media types are added in the future, the |
|
63 * types can be added to the end of this enumeration. |
|
64 * |
|
65 * Application logic and UI specification is mainly interested in |
|
66 * division between 'phone memory' and 'MMC' with the latest addition of |
|
67 * 'remote drives'. In Symbian OS level this is somewhat more |
|
68 * complicated because these do not map directly to any drive or memory |
|
69 * type. For example try defining the drive letter for remote drive. |
|
70 * |
|
71 * Basically TMediaType could be used but the types may vary in the same |
|
72 * drive and application logic mostly understands only division between |
|
73 * 'phone' and 'MMC' memory - these do not map to TMediaType directly. |
|
74 * This the reasoning for this new enumeration. |
|
75 * |
|
76 * Uses binary flagging. |
|
77 * |
|
78 * Use for example 'EMemoryTypePhone|EMemoryTypeMMC|EMemoryTypeRemote' to |
|
79 * have phone memory, MMC and remote drives included. |
|
80 * |
|
81 * Notice: 0 value means no media included. Only |
|
82 * EMemoryTypePhone|EMemoryTypeMMC for legacy applications and |
|
83 * EMemoryTypePhone|EMemoryTypeMMC|EMemoryTypeRemote for new remote |
|
84 * drives-aware applications are supported for the time being. |
|
85 * Use EMemoryTypePhone|EMemoryTypeInternalMassStorage|EMemoryMMCExternal |
|
86 * |EMemoryTypeRemote for multiple drive support. And EMemoryTypeMMC will |
|
87 * be deprecated. |
|
88 */ |
|
89 enum TMemoryTypes |
|
90 { |
|
91 /** |
|
92 * EMemoryTypePhone |
|
93 * Device memory drive inside phone |
|
94 * |
|
95 * There might be multiple device memory drives because of multiple |
|
96 * partitions. |
|
97 */ |
|
98 EMemoryTypePhone = 0x00000001, |
|
99 |
|
100 /** |
|
101 * @Deprecated It will be mapped to |
|
102 * EMemoryTypeInternalMassStorage|EMemoryMMCExternal |
|
103 * internally. |
|
104 * |
|
105 * EMemoryTypeMMC |
|
106 * Standard external removable memory card drive |
|
107 * |
|
108 * There might be multiple removable MMC drives because of |
|
109 * multiple partitions. |
|
110 */ |
|
111 EMemoryTypeMMC = 0x00000002, |
|
112 |
|
113 /** |
|
114 * EMemoryTypeRemote |
|
115 * Remote drive |
|
116 * |
|
117 * There might be multiple remote drives. |
|
118 */ |
|
119 EMemoryTypeRemote = 0x00000004, |
|
120 |
|
121 /** |
|
122 * EMemoryTypeInternalMassStorage |
|
123 * Internal mass storage, like internal MMC, hard disk, flash, etc. |
|
124 * |
|
125 * There might be multiple internal disk drives |
|
126 */ |
|
127 EMemoryTypeInternalMassStorage = 0x00000008, |
|
128 |
|
129 /** |
|
130 * EMemoryTypeMMCExternal |
|
131 * Removable external memory card |
|
132 * |
|
133 */ |
|
134 EMemoryTypeMMCExternal = 0x00000010 |
|
135 |
|
136 }; |
|
137 |
|
138 public: |
|
139 |
|
140 /** |
|
141 * A static method that launches file selection dialog. |
|
142 * @param aIncludedMedias defines which medias are included in the |
|
143 * dialog. See TMemoryTypes. |
|
144 * @param aFileName Full path and filename of the file that user |
|
145 * selects is stored to this descriptor. |
|
146 * @param aMemorySelectionResourceId A resource id for memory selection |
|
147 * dialog. |
|
148 * @param aObserver An observer which is asked, if set, to verify user's |
|
149 * selection. |
|
150 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
151 */ |
|
152 IMPORT_C static TBool RunSelectDlgLD( |
|
153 TInt aIncludedMedias, |
|
154 TDes& aFileName, |
|
155 TInt aMemorySelectionResourceId, |
|
156 MAknFileSelectionObserver* aObserver = NULL ); |
|
157 |
|
158 /** |
|
159 * A static method that launches file selection dialog. |
|
160 * @param aIncludedMedias defines which medias are included in the |
|
161 * dialog. See TMemoryTypes. |
|
162 * @param aFileName Full path and filename of the file that user |
|
163 * selects is stored to this descriptor. |
|
164 * @param aMemorySelectionResourceId A resource id for memory selection |
|
165 * dialog. |
|
166 * @param aFilter Filter is asked if a directory entry can be shown in |
|
167 * list. Ownership is not transferred. |
|
168 * @param aObserver An observer which is asked, if set, to verify user's |
|
169 * selection. |
|
170 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
171 */ |
|
172 IMPORT_C static TBool RunSelectDlgLD( |
|
173 TInt aIncludedMedias, |
|
174 TDes& aFileName, |
|
175 TInt aMemorySelectionResourceId, |
|
176 MAknFileFilter* aFilter, |
|
177 MAknFileSelectionObserver* aObserver = NULL ); |
|
178 |
|
179 /** |
|
180 * A static method that launches file selection dialog. |
|
181 * @param aIncludedMedias defines which medias are included in the |
|
182 * dialog. See TMemoryTypes. |
|
183 * @param aFileName Full path and filename of the file that user |
|
184 * selects is stored to this descriptor. |
|
185 * @param aMemorySelectionResourceId A resource id for memory selection |
|
186 * dialog. |
|
187 * @param aFileSelectionTitle A custom title for file selection dialog. |
|
188 * @param aObserver An observer which is asked, if set, to verify user's |
|
189 * selection. |
|
190 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
191 */ |
|
192 IMPORT_C static TBool RunSelectDlgLD( |
|
193 TInt aIncludedMedias, |
|
194 TDes& aFileName, |
|
195 TInt aMemorySelectionResourceId, |
|
196 const TDesC& aFileSelectionTitle, |
|
197 MAknFileSelectionObserver* aObserver = NULL ); |
|
198 |
|
199 /** |
|
200 * A static method that launches file selection dialog. |
|
201 * @param aIncludedMedias defines which medias are included in the |
|
202 * dialog. See TMemoryTypes. |
|
203 * @param aFileName Full path and filename of the file that user |
|
204 * selects is stored to this descriptor. |
|
205 * @param aMemorySelectionResourceId A resource id for memory selection |
|
206 * dialog. |
|
207 * @param aFileSelectionResourceId A resource id for file selection |
|
208 * dialog. |
|
209 * @param aObserver An observer which is asked, if set, to verify user's |
|
210 * selection. |
|
211 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
212 */ |
|
213 IMPORT_C static TBool RunSelectDlgLD( |
|
214 TInt aIncludedMedias, |
|
215 TDes& aFileName, |
|
216 TInt aMemorySelectionResourceId, |
|
217 TInt aFileSelectionResourceId, |
|
218 MAknFileSelectionObserver* aObserver = NULL ); |
|
219 |
|
220 /** |
|
221 * A static method that launches move dialog. |
|
222 * @param aIncludedMedias defines which medias are included in the |
|
223 * dialog. See TMemoryTypes. |
|
224 * @param aDirectory Full path of the folder that user |
|
225 * selects is stored to this descriptor. |
|
226 * @param aMemorySelectionResourceId A resource id for memory selection |
|
227 * dialog. |
|
228 * @param aObserver An observer which is asked, if set, to verify user's |
|
229 * selection. |
|
230 * @return Returns ETrue if user selects a folder, otherwise EFalse. |
|
231 */ |
|
232 IMPORT_C static TBool RunMoveDlgLD( |
|
233 TInt aIncludedMedias, |
|
234 TDes& aDirectory, |
|
235 TInt aMemorySelectionResourceId, |
|
236 MAknFileSelectionObserver* aObserver = NULL ); |
|
237 |
|
238 /** |
|
239 * A static method that launches move dialog. |
|
240 * @param aIncludedMedias defines which medias are included in the |
|
241 * dialog. See TMemoryTypes. |
|
242 * @param aDirectory Full path of the folder that user |
|
243 * selects is stored to this descriptor. |
|
244 * @param aMemorySelectionResourceId A resource id for memory selection |
|
245 * dialog. |
|
246 * @param aFilter Filter is asked if a directory entry can be shown in |
|
247 * list. Ownership is not transferred. |
|
248 * @param aObserver An observer which is asked, if set, to verify user's |
|
249 * selection. |
|
250 * @return Returns ETrue if user selects a folder, otherwise EFalse. |
|
251 */ |
|
252 IMPORT_C static TBool RunMoveDlgLD( |
|
253 TInt aIncludedMedias, |
|
254 TDes& aDirectory, |
|
255 TInt aMemorySelectionResourceId, |
|
256 MAknFileFilter* aFilter, |
|
257 MAknFileSelectionObserver* aObserver = NULL ); |
|
258 |
|
259 /** |
|
260 * A static method that launches move dialog. |
|
261 * @param aIncludedMedias defines which medias are included in the |
|
262 * dialog. See TMemoryTypes. |
|
263 * @param aDirectory Full path of the folder that user |
|
264 * selects is stored to this descriptor. |
|
265 * @param aMemorySelectionResourceId A resource id for memory selection |
|
266 * dialog. |
|
267 * @param aFileSelectionTitle A custom title for directory selection |
|
268 * dialog. |
|
269 * @param aObserver An observer which is asked, if set, to verify user's |
|
270 * selection. |
|
271 * @return Returns ETrue if user selects a folder, otherwise EFalse |
|
272 */ |
|
273 IMPORT_C static TBool RunMoveDlgLD( |
|
274 TInt aIncludedMedias, |
|
275 TDes& aDirectory, |
|
276 TInt aMemorySelectionResourceId, |
|
277 const TDesC& aFileSelectionTitle, |
|
278 MAknFileSelectionObserver* aObserver = NULL ); |
|
279 |
|
280 /** |
|
281 * A static method that launches move dialog. |
|
282 * @param aIncludedMedias defines which medias are included in the |
|
283 * dialog. See TMemoryTypes. |
|
284 * @param aDirectory Full path of the folder that user |
|
285 * selects is stored to this descriptor. |
|
286 * @param aMemorySelectionResourceId A resource id for memory selection |
|
287 * dialog |
|
288 * @param aFileSelectionResourceId A resource id for file selection |
|
289 * dialog |
|
290 * @param aObserver An observer which is asked, if set, to verify user's |
|
291 * selection. |
|
292 * @return Returns ETrue if user selects a folder, otherwise EFalse |
|
293 */ |
|
294 IMPORT_C static TBool RunMoveDlgLD( |
|
295 TInt aIncludedMedias, |
|
296 TDes& aDirectory, |
|
297 TInt aMemorySelectionResourceId, |
|
298 TInt aFileSelectionResourceId, |
|
299 MAknFileSelectionObserver* aObserver = NULL ); |
|
300 |
|
301 /** |
|
302 * A static method that launches save dialog which does not run folder |
|
303 * selection dialog at all. Instead the resulting path will be |
|
304 * constructed from the root and default folder read from resources and |
|
305 * from the file name given by the user. |
|
306 * @param aIncludedMedias defines which medias are included in the |
|
307 * dialog. See TMemoryTypes. |
|
308 * @param aDefaultFileName Full path + the filename that user enters |
|
309 * is stored to this descriptor. The descriptor may contain text |
|
310 * that is used as default filename, for example "Attachment". |
|
311 * @param aMemorySelectionResourceId A resource id for memory selection |
|
312 * dialog. |
|
313 * @param aObserver An observer which is asked, if set, to verify the |
|
314 * filename that user types. |
|
315 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
316 * EFalse. |
|
317 */ |
|
318 IMPORT_C static TBool RunSaveDlgLD( |
|
319 TInt aIncludedMedias, |
|
320 TDes& aDefaultFileName, |
|
321 TInt aMemorySelectionResourceId, |
|
322 MAknFileSelectionObserver* aObserver = NULL ); |
|
323 |
|
324 /** |
|
325 * A static method that launches save dialog. |
|
326 * @param aIncludedMedias defines which medias are included in the |
|
327 * dialog. See TMemoryTypes. |
|
328 * @param aDefaultFileName Full path + the filename that user enters |
|
329 * is stored to this descriptor. The descriptor may contain text |
|
330 * that is used as default filename, for example "Attachment". |
|
331 * @param aMemorySelectionResourceId A resource id for memory selection |
|
332 * dialog. |
|
333 * @param aFilter Filter is asked if a directory entry can be shown in |
|
334 * list. Ownership is not transferred. |
|
335 * @param aObserver An observer which is asked, if set, to verify the |
|
336 * filename that user types. |
|
337 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
338 * EFalse. |
|
339 */ |
|
340 IMPORT_C static TBool RunSaveDlgLD( |
|
341 TInt aIncludedMedias, |
|
342 TDes& aDefaultFileName, |
|
343 TInt aMemorySelectionResourceId, |
|
344 MAknFileFilter* aFilter, |
|
345 MAknFileSelectionObserver* aObserver = NULL ); |
|
346 |
|
347 /** |
|
348 * A static method that launches save dialog. |
|
349 * @param aIncludedMedias defines which medias are included in the |
|
350 * dialog. See TMemoryTypes. |
|
351 * @param aDefaultFileName Full path + the filename that user enters |
|
352 * is stored to this descriptor. The descriptor may contain text |
|
353 * that is used as default filename, for example "Attachment". |
|
354 * @param aMemorySelectionResourceId A resource id for memory selection |
|
355 * dialog. |
|
356 * @param aFileSelectionTitle Custom title for file selection dialog. |
|
357 * @param aFileNamePromptTitle Custom title for filename prompt dialog. |
|
358 * @param aObserver An observer which is asked, if set, to verify the |
|
359 * filename that user types. |
|
360 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
361 * EFalse. |
|
362 */ |
|
363 IMPORT_C static TBool RunSaveDlgLD( |
|
364 TInt aIncludedMedias, |
|
365 TDes& aDefaultFileName, |
|
366 TInt aMemorySelectionResourceId, |
|
367 const TDesC& aFileSelectionTitle, |
|
368 const TDesC& aFileNamePromptTitle, |
|
369 MAknFileSelectionObserver* aObserver = NULL ); |
|
370 |
|
371 /** |
|
372 * A static method that launches save dialog. |
|
373 * @param aIncludedMedias defines which medias are included in the |
|
374 * dialog. See TMemoryTypes. |
|
375 * @param aDefaultFileName Full path + the filename that user enters |
|
376 * is stored to this descriptor. The descriptor may contain text |
|
377 * that is used as default filename, for example "Attachment". |
|
378 * @param aMemorySelectionResourceId A resource id for memory selection |
|
379 * dialog. |
|
380 * @param aFileSelectionResourceId A resource id for file selection |
|
381 * dialog. |
|
382 * @param aObserver An observer which is asked, if set, to verify the |
|
383 * filename that user types. |
|
384 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
385 * EFalse. |
|
386 */ |
|
387 IMPORT_C static TBool RunSaveDlgLD( |
|
388 TInt aIncludedMedias, |
|
389 TDes& aDefaultFileName, |
|
390 TInt aMemorySelectionResourceId, |
|
391 TInt aFileSelectionResourceId, |
|
392 MAknFileSelectionObserver* aObserver = NULL ); |
|
393 |
|
394 /** |
|
395 * A static method that launches save dialog. |
|
396 * @param aIncludedMedias defines which medias are included in the |
|
397 * dialog. See TMemoryTypes. |
|
398 * @param aDefaultFileName Full path + the filename that user enters |
|
399 * is stored to this descriptor. The descriptor may contain text |
|
400 * that is used as default filename, for example "Attachment". |
|
401 * @param aMemorySelectionResourceId A resource id for memory selection |
|
402 * dialog. |
|
403 * @param aFileSelectionResourceId A resource id for file selection |
|
404 * dialog. |
|
405 * @param aFileNamePromptTitle Custom title for filename prompt dialog. |
|
406 * @param aObserver An observer which is asked, if set, to verify the |
|
407 * filename that user types. |
|
408 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
409 * EFalse. |
|
410 */ |
|
411 IMPORT_C static TBool RunSaveDlgLD( |
|
412 TInt aIncludedMedias, |
|
413 TDes& aDefaultFileName, |
|
414 TInt aMemorySelectionResourceId, |
|
415 TInt aFileSelectionResourceId, |
|
416 const TDesC& aFileNamePromptTitle, |
|
417 MAknFileSelectionObserver* aObserver = NULL ); |
|
418 |
|
419 /** |
|
420 * A static method that launches save dialog. No file selection dialog |
|
421 * for directory selection is displayed. |
|
422 * @param aIncludedMedias defines which medias are included in the |
|
423 * dialog. See TMemoryTypes. |
|
424 * @param aDefaultFileName Full path + the filename that user enters |
|
425 * is stored to this descriptor. The descriptor may contain text |
|
426 * that is used as default filename, for example "Attachment". |
|
427 * @param aMemorySelectionResourceId A resource id for memory selection |
|
428 * dialog. The folders in which the file will be saved should be |
|
429 * given in this resource. |
|
430 * @param aObserver An observer which is asked, if set, to verify the |
|
431 * filename that user types. |
|
432 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
433 * EFalse. |
|
434 */ |
|
435 IMPORT_C static TBool RunSaveDlgNoDirectorySelectionLD( |
|
436 TInt aIncludedMedias, |
|
437 TDes& aDefaultFileName, |
|
438 TInt aMemorySelectionResourceId, |
|
439 MAknFileSelectionObserver* aObserver = NULL ); |
|
440 |
|
441 /** |
|
442 * A static method that launches save dialog. No file selection dialog |
|
443 * for directory selection is displayed. |
|
444 * @param aIncludedMedias defines which medias are included in the |
|
445 * dialog. See TMemoryTypes. |
|
446 * @param aDefaultFileName Full path + the filename that user enters |
|
447 * is stored to this descriptor. The descriptor may contain text |
|
448 * that is used as default filename, for example "Attachment". |
|
449 * @param aMemorySelectionResourceId A resource id for memory selection |
|
450 * dialog. The folders in which the file will be saved should be |
|
451 * given in this resource. |
|
452 * @param aFileNamePromptTitle Custom title for filename prompt dialog. |
|
453 * @param aObserver An observer which is asked, if set, to verify the |
|
454 * filename that user types. |
|
455 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
456 * EFalse. |
|
457 */ |
|
458 IMPORT_C static TBool RunSaveDlgNoDirectorySelectionLD( |
|
459 TInt aIncludedMedias, |
|
460 TDes& aDefaultFileName, |
|
461 TInt aMemorySelectionResourceId, |
|
462 const TDesC& aFileNamePromptTitle, |
|
463 MAknFileSelectionObserver* aObserver = NULL ); |
|
464 |
|
465 /** |
|
466 * A static method that launches copy dialog. |
|
467 * @param aIncludedMedias defines which medias are included in the |
|
468 * dialog. See TMemoryTypes. |
|
469 * @param aDirectory Full path of the folder that user |
|
470 * selects is stored to this descriptor. |
|
471 * @param aMemorySelectionResourceId A resource id for memory selection |
|
472 * dialog. |
|
473 * @param aObserver An observer which is asked, if set, to verify user's |
|
474 * selection. |
|
475 * @return Returns ETrue if user selects a folder, otherwise EFalse. |
|
476 */ |
|
477 IMPORT_C static TBool RunCopyDlgLD( |
|
478 TInt aIncludedMedias, |
|
479 TDes& aDirectory, |
|
480 TInt aMemorySelectionResourceId, |
|
481 MAknFileSelectionObserver* aObserver = NULL ); |
|
482 |
|
483 |
|
484 /** |
|
485 * A static method that launches copy dialog. |
|
486 * @param aIncludedMedias defines which medias are included in the |
|
487 * dialog. See TMemoryTypes. |
|
488 * @param aDirectory Full path of the folder that user |
|
489 * selects is stored to this descriptor. |
|
490 * @param aMemorySelectionResourceId A resource id for memory selection |
|
491 * dialog. |
|
492 * @param aFilter Filter is asked if a directory entry can be shown in |
|
493 * list. Ownership is not transferred. |
|
494 * @param aObserver An observer which is asked, if set, to verify user's |
|
495 * selection. |
|
496 * @return Returns ETrue if user selects a folder, otherwise EFalse. |
|
497 */ |
|
498 IMPORT_C static TBool RunCopyDlgLD( |
|
499 TInt aIncludedMedias, |
|
500 TDes& aDirectory, |
|
501 TInt aMemorySelectionResourceId, |
|
502 MAknFileFilter* aFilter, |
|
503 MAknFileSelectionObserver* aObserver = NULL ); |
|
504 |
|
505 /** |
|
506 * A static method that launches copy dialog. |
|
507 * @param aIncludedMedias defines which medias are included in the |
|
508 * dialog. See TMemoryTypes. |
|
509 * @param aDirectory Full path of the folder that user |
|
510 * selects is stored to this descriptor. |
|
511 * @param aMemorySelectionResourceId A resource id for memory selection |
|
512 * dialog |
|
513 * @param aFileSelectionResourceId A resource id for file selection |
|
514 * dialog |
|
515 * @param aObserver An observer which is asked, if set, to verify user's |
|
516 * selection. |
|
517 * @return Returns ETrue if user selects a folder, otherwise EFalse |
|
518 */ |
|
519 IMPORT_C static TBool RunCopyDlgLD( |
|
520 TInt aIncludedMedias, |
|
521 TDes& aDirectory, |
|
522 TInt aMemorySelectionResourceId, |
|
523 TInt aFileSelectionResourceId, |
|
524 MAknFileSelectionObserver* aObserver = NULL ); |
|
525 |
|
526 /** |
|
527 * A static method that launches file selection dialog. |
|
528 * @param aIncludedMedias defines which medias are included in the |
|
529 * dialog. See TMemoryTypes. |
|
530 * @param aFileName Full path and filename of the file that user |
|
531 * selects is stored to this descriptor. |
|
532 * @param aStartFolder User defined folder to start browsing in file |
|
533 * selection. |
|
534 * @param aMemorySelectionResourceId A resource id for memory selection |
|
535 * dialog. |
|
536 * @param aObserver An observer which is asked, if set, to verify user's |
|
537 * selection. |
|
538 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
539 * @since 3.2 |
|
540 */ |
|
541 IMPORT_C static TBool RunSelectDlgLD( |
|
542 TInt aIncludedMedias, |
|
543 TDes& aFileName, |
|
544 const TDesC& aStartFolder, |
|
545 TInt aMemorySelectionResourceId, |
|
546 MAknFileSelectionObserver* aObserver = NULL ); |
|
547 |
|
548 /** |
|
549 * A static method that launches file selection dialog. |
|
550 * @param aIncludedMedias defines which medias are included in the |
|
551 * dialog. See TMemoryTypes. |
|
552 * @param aFileName Full path and filename of the file that user |
|
553 * selects is stored to this descriptor. |
|
554 * @param aStartFolder User defined folder to start browsing in file |
|
555 * selection |
|
556 * @param aMemorySelectionResourceId A resource id for memory selection |
|
557 * dialog. |
|
558 * @param aFilter Filter is asked if a directory entry can be shown in |
|
559 * list. Ownership is not transferred. |
|
560 * @param aObserver An observer which is asked, if set, to verify user's |
|
561 * selection. |
|
562 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
563 * @since 3.2 |
|
564 */ |
|
565 IMPORT_C static TBool RunSelectDlgLD( |
|
566 TInt aIncludedMedias, |
|
567 TDes& aFileName, |
|
568 const TDesC& aStartFolder, |
|
569 TInt aMemorySelectionResourceId, |
|
570 MAknFileFilter* aFilter, |
|
571 MAknFileSelectionObserver* aObserver = NULL ); |
|
572 |
|
573 /** |
|
574 * A static method that launches file selection dialog. |
|
575 * @param aIncludedMedias defines which medias are included in the |
|
576 * dialog. See TMemoryTypes. |
|
577 * @param aFileName Full path and filename of the file that user |
|
578 * selects is stored to this descriptor. |
|
579 * @param aStartFolder User defined folder to start browsing in file |
|
580 * selection |
|
581 * @param aMemorySelectionResourceId A resource id for memory selection |
|
582 * dialog. |
|
583 * @param aFileSelectionTitle A custom title for file selection dialog. |
|
584 * @param aObserver An observer which is asked, if set, to verify user's |
|
585 * selection. |
|
586 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
587 * @since 3.2 |
|
588 */ |
|
589 IMPORT_C static TBool RunSelectDlgLD( |
|
590 TInt aIncludedMedias, |
|
591 TDes& aFileName, |
|
592 const TDesC& aStartFolder, |
|
593 TInt aMemorySelectionResourceId, |
|
594 const TDesC& aFileSelectionTitle, |
|
595 MAknFileSelectionObserver* aObserver = NULL ); |
|
596 |
|
597 /** |
|
598 * A static method that launches file selection dialog. |
|
599 * @param aIncludedMedias defines which medias are included in the |
|
600 * dialog. See TMemoryTypes. |
|
601 * @param aFileName Full path and filename of the file that user |
|
602 * selects is stored to this descriptor. |
|
603 * @param aStartFolder User defined folder to start browsing in file |
|
604 * selection |
|
605 * @param aMemorySelectionResourceId A resource id for memory selection |
|
606 * dialog. |
|
607 * @param aFileSelectionResourceId A resource id for file selection |
|
608 * dialog. |
|
609 * @param aObserver An observer which is asked, if set, to verify user's |
|
610 * selection. |
|
611 * @return Returns ETrue if user selects a file, otherwise EFalse. |
|
612 * @since 3.2 |
|
613 */ |
|
614 IMPORT_C static TBool RunSelectDlgLD( |
|
615 TInt aIncludedMedias, |
|
616 TDes& aFileName, |
|
617 const TDesC& aStartFolder, |
|
618 TInt aMemorySelectionResourceId, |
|
619 TInt aFileSelectionResourceId, |
|
620 MAknFileSelectionObserver* aObserver = NULL ); |
|
621 |
|
622 /** |
|
623 * A static method that launches file selection dialog. |
|
624 * @param aIncludedMedias defines which medias are included in the |
|
625 * dialog. See TMemoryTypes. |
|
626 * @param aFileName Full path and filename of the file that user selects is |
|
627 * stored to this descriptor. |
|
628 * @param aStartFolder User defined folder to start browsing in file |
|
629 * selection. |
|
630 * @param aMemorySelectionResourceId A resource id for memory selection |
|
631 * dialog. |
|
632 * @param aFileSelectionResourceId A resource id for file selection dialog. |
|
633 * @param aFileSelectionTitle Custom title for file selection dialog. |
|
634 * @param aFilter Filter asked if a directory entry can be shown in list. |
|
635 * @param aObserver An observer which is asked to verify user's selection. |
|
636 * @return Returns ETrue if user selects a file, otherwise EFalse |
|
637 * @since 3.2 |
|
638 */ |
|
639 IMPORT_C static TBool RunSelectDlgLD( |
|
640 TInt aIncludedMedias, |
|
641 TDes& aFileName, |
|
642 const TDesC& aStartFolder, |
|
643 TInt aMemorySelectionResourceId, |
|
644 TInt aFileSelectionResourceId, |
|
645 const TDesC& aFileSelectionTitle, |
|
646 MAknFileFilter* aFilter = NULL, |
|
647 MAknFileSelectionObserver* aObserver = NULL ); |
|
648 |
|
649 /** |
|
650 * A static method that launches save dialog. |
|
651 * @param aIncludedMedias defines which medias are included in the |
|
652 * dialog. See TMemoryTypes. |
|
653 * @param aDefaultFileName Full path + the filename that user enters |
|
654 * is stored to this descriptor. The descriptor may contain text |
|
655 * that is used as default filename, for example "Attachment". |
|
656 * @param aStartFolder User defined folder to start browsing in file |
|
657 * selection. |
|
658 * @param aMemorySelectionResourceId A resource id for memory selection |
|
659 * dialog. |
|
660 * @param aFileSelectionResourceId A resource id for file selection dialog. |
|
661 * @param aFileSelectionTitle Custom title for file selection dialog. |
|
662 * @param aFilter Filter asked if a directory entry can be shown in list. |
|
663 * @param aObserver An observer which is asked, if set, to verify the |
|
664 * filename that user types. |
|
665 * @return Returns ETrue if user accepts or enters a filename, otherwise |
|
666 * EFalse. |
|
667 * @since 3.2 |
|
668 */ |
|
669 IMPORT_C static TBool RunSaveDlgLD( |
|
670 TInt aIncludedMedias, |
|
671 TDes& aDefaultFileName, |
|
672 const TDesC& aStartFolder, |
|
673 TInt aMemorySelectionResourceId, |
|
674 TInt aFileSelectionResourceId, |
|
675 const TDesC& aFileSelectionTitle, |
|
676 MAknFileFilter* aFilter = NULL, |
|
677 MAknFileSelectionObserver* aObserver = NULL ); |
|
678 |
|
679 /** |
|
680 * A static method that launches folder selection dialog. |
|
681 * @param aIncludedMedias defines which medias are included in the |
|
682 * dialog. See TMemoryTypes. |
|
683 * @param aFolder Full path of the folder that user selects is stored to |
|
684 * this descriptor. |
|
685 * @param aStartFolder User defined folder to start browsing in file |
|
686 * selection. |
|
687 * @param aMemorySelectionResourceId A resource id for memory selection |
|
688 * dialog. |
|
689 * @param aFileSelectionResourceId A resource id for file selection dialog. |
|
690 * @param aFileSelectionTitle Custom title for file selection dialog. |
|
691 * @param aFilter Filter is asked if a directory entry can be shown in |
|
692 * list. |
|
693 * @param aObserver An observer which is asked to verify user's selection. |
|
694 * @return Returns ETrue if user selects a folder, otherwise EFalse |
|
695 * @since 3.2 |
|
696 */ |
|
697 IMPORT_C static TBool RunFolderSelectDlgLD( |
|
698 TInt aIncludedMedias, |
|
699 TDes& aFolder, |
|
700 const TDesC& aStartFolder, |
|
701 TInt aMemorySelectionResourceId, |
|
702 TInt aFileSelectionResourceId, |
|
703 const TDesC& aFileSelectionTitle, |
|
704 MAknFileFilter* aFilter = NULL, |
|
705 MAknFileSelectionObserver* aObserver = NULL ); |
|
706 |
|
707 private: |
|
708 |
|
709 /** |
|
710 * A static method that launches UI components in a sequence. |
|
711 * @param aType Defines what type of dialog is shown. |
|
712 * @param aFileName A reference to a descriptor. Usage depends on the |
|
713 * dialog type. |
|
714 * @param aMemorySelectionResourceId A resource id for memory selection |
|
715 * dialog. |
|
716 * @param aNoFileSelectionDialog, if ETrue and aType is ECFDDialogType- |
|
717 * Save, no file selection dialog is launched, instead the file |
|
718 * will be saved in the default folder given in the resource |
|
719 * structure referred by aMemorySelectionResourceId. |
|
720 * @param aFileSelectionResourceId A resource id for file selection |
|
721 * dialog. |
|
722 * @param aFileNamePromptResourceId A resource id for filename prompt |
|
723 * dialog. |
|
724 * @param aFileSelectionTitle Custom title for file selection. |
|
725 * @param aFileNamePromptTitle Custom title for filename prompt dialog. |
|
726 * @param aFileFilter Filter is asked if a directory entry can be shown |
|
727 * in list. |
|
728 * @param aMemorySelectionObserver An observer for memory selection |
|
729 * dialog. |
|
730 * @param aFileSelectionObserver An observer for file selection dialog. |
|
731 * @param aFileNamePromptObserver An observer for filename prompt |
|
732 * dialog. |
|
733 * @param aStartFolder User defined folder to start browsing in file |
|
734 * selection |
|
735 * @param aIncludedMedias defines which medias are included in the |
|
736 * dialog. See TMemoryTypes |
|
737 * @return Returns a boolean value that depends on the case. |
|
738 */ |
|
739 static TBool RunL( |
|
740 TCommonDialogType aType, |
|
741 TDes& aFileName, |
|
742 TInt aMemorySelectionResourceId, |
|
743 TBool aNoFileSelectionDialog, |
|
744 TInt aFileSelectionResourceId, |
|
745 TInt aFileNamePromptResourceId, |
|
746 const TDesC& aFileSelectionTitle, |
|
747 const TDesC& aFileNamePromptTitle, |
|
748 MAknFileFilter* aFileFilter, |
|
749 MAknMemorySelectionObserver* aMemorySelectionObserver, |
|
750 MAknFileSelectionObserver* aFileSelectionObserver, |
|
751 MAknFileSelectionObserver* aFileNamePromptObserver, |
|
752 const TDesC& aStartFolder, |
|
753 TInt aIncludedMedias ); |
|
754 |
|
755 }; |
|
756 |
|
757 #endif // AKNCOMMONDIALOGSDYNMEM_H |