2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Static class to call combined common file dialogs.
19 #ifndef AKNCOMMONDIALOGS_H
20 #define AKNCOMMONDIALOGS_H
23 #include <CAknCommonDialogsBase.h>
25 // FORWARD DECLARATIONS
26 class MAknMemorySelectionObserver;
27 class MAknFileSelectionObserver;
32 * DEPRECATED: Use AknCommonDialogsDynMem instead. This class is only used as a
33 * proxy to the new implementation class to maintain backwards compatibility.
35 * A class that consists of static functions that launch UI components in a
36 * sequence. First, memory selection component is launched and then
37 * 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.
41 * All methods have an obligatory resource ID parameter for memory selection
42 * because it contains the paths for both memories (Phone&MMC) (LOCATION structs).
43 * If set, an observer is queried just before exiting the dialog.
44 * At this point the application can either reject or accept user's selection.
45 * Every dialog returns a boolean value which tells if user has selected something
48 * @lib CommonDialogs.lib
51 class AknCommonDialogs
57 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
59 * A static method that launches file selection dialog.
60 * @param aFileName Full path and filename of the file that user
61 * selects is stored to this descriptor.
62 * @param aMemorySelectionResourceId A resource id for memory selection
64 * @param aObserver An observer which is asked, if set, to verify user's
66 * @return Returns ETrue if user selects a file, otherwise EFalse.
68 IMPORT_C static TBool RunSelectDlgLD(
70 TInt aMemorySelectionResourceId,
71 MAknFileSelectionObserver* aObserver = NULL );
74 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
76 * A static method that launches file selection dialog.
77 * @param aFileName Full path and filename of the file that user
78 * selects is stored to this descriptor.
79 * @param aMemorySelectionResourceId A resource id for memory selection
81 * @param aFilter Filter is asked if a directory entry can be shown in
82 * list. Ownership is not transferred.
83 * @param aObserver An observer which is asked, if set, to verify user's
85 * @return Returns ETrue if user selects a file, otherwise EFalse.
87 IMPORT_C static TBool RunSelectDlgLD(
89 TInt aMemorySelectionResourceId,
90 MAknFileFilter* aFilter,
91 MAknFileSelectionObserver* aObserver = NULL );
94 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
96 * A static method that launches file selection dialog.
97 * @param aFileName Full path and filename of the file that user
98 * selects is stored to this descriptor.
99 * @param aMemorySelectionResourceId A resource id for memory selection
101 * @param aFileSelectionTitle A custom title for file selection dialog.
102 * @param aObserver An observer which is asked, if set, to verify user's
104 * @return Returns ETrue if user selects a file, otherwise EFalse.
106 IMPORT_C static TBool RunSelectDlgLD(
108 TInt aMemorySelectionResourceId,
109 const TDesC& aFileSelectionTitle,
110 MAknFileSelectionObserver* aObserver = NULL );
113 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
115 * A static method that launches file selection dialog.
116 * @param aFileName Full path and filename of the file that user
117 * selects is stored to this descriptor.
118 * @param aMemorySelectionResourceId A resource id for memory selection
120 * @param aFileSelectionResourceId A resource id for file selection
122 * @param aObserver An observer which is asked, if set, to verify user's
124 * @return Returns ETrue if user selects a file, otherwise EFalse.
126 IMPORT_C static TBool RunSelectDlgLD(
128 TInt aMemorySelectionResourceId,
129 TInt aFileSelectionResourceId,
130 MAknFileSelectionObserver* aObserver = NULL );
133 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
135 * A static method that launches move dialog.
136 * @param aDirectory Full path of the folder that user
137 * selects is stored to this descriptor.
138 * @param aMemorySelectionResourceId A resource id for memory selection
140 * @param aObserver An observer which is asked, if set, to verify user's
142 * @return Returns ETrue if user selects a folder, otherwise EFalse.
144 IMPORT_C static TBool RunMoveDlgLD(
146 TInt aMemorySelectionResourceId,
147 MAknFileSelectionObserver* aObserver = NULL );
150 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
152 * A static method that launches move dialog.
153 * @param aDirectory Full path of the folder that user
154 * selects is stored to this descriptor.
155 * @param aMemorySelectionResourceId A resource id for memory selection
157 * @param aFilter Filter is asked if a directory entry can be shown in
158 * list. Ownership is not transferred.
159 * @param aObserver An observer which is asked, if set, to verify user's
161 * @return Returns ETrue if user selects a folder, otherwise EFalse.
163 IMPORT_C static TBool RunMoveDlgLD(
165 TInt aMemorySelectionResourceId,
166 MAknFileFilter* aFilter,
167 MAknFileSelectionObserver* aObserver = NULL );
170 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
172 * A static method that launches move dialog.
173 * @param aDirectory Full path of the folder that user
174 * selects is stored to this descriptor.
175 * @param aMemorySelectionResourceId A resource id for memory selection
177 * @param aFileSelectionTitle A custom title for directory selection
179 * @param aObserver An observer which is asked, if set, to verify user's
181 * @return Returns ETrue if user selects a folder, otherwise EFalse
183 IMPORT_C static TBool RunMoveDlgLD(
185 TInt aMemorySelectionResourceId,
186 const TDesC& aFileSelectionTitle,
187 MAknFileSelectionObserver* aObserver = NULL );
190 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
192 * A static method that launches move dialog.
193 * @param aDirectory Full path of the folder that user
194 * selects is stored to this descriptor.
195 * @param aMemorySelectionResourceId A resource id for memory selection
197 * @param aFileSelectionResourceId A resource id for file selection
199 * @param aObserver An observer which is asked, if set, to verify user's
201 * @return Returns ETrue if user selects a folder, otherwise EFalse
203 IMPORT_C static TBool RunMoveDlgLD(
205 TInt aMemorySelectionResourceId,
206 TInt aFileSelectionResourceId,
207 MAknFileSelectionObserver* aObserver = NULL );
210 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
212 * A static method that launches save dialog which does not run folder
213 * selection dialog at all. Instead the resulting path will be
214 * constructed from the root and default folder read from resources and
215 * from the file name given by the user.
216 * @param aDefaultFileName Full path + the filename that user enters
217 * is stored to this descriptor. The descriptor may contain text
218 * that is used as default filename, for example "Attachment".
219 * @param aMemorySelectionResourceId A resource id for memory selection
221 * @param aObserver An observer which is asked, if set, to verify the
222 * filename that user types.
223 * @return Returns ETrue if user accepts or enters a filename, otherwise
226 IMPORT_C static TBool RunSaveDlgLD(
227 TDes& aDefaultFileName,
228 TInt aMemorySelectionResourceId,
229 MAknFileSelectionObserver* aObserver = NULL );
232 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
234 * A static method that launches save dialog.
235 * @param aDefaultFileName Full path + the filename that user enters
236 * is stored to this descriptor. The descriptor may contain text
237 * that is used as default filename, for example "Attachment".
238 * @param aMemorySelectionResourceId A resource id for memory selection
240 * @param aFilter Filter is asked if a directory entry can be shown in
241 * list. Ownership is not transferred.
242 * @param aObserver An observer which is asked, if set, to verify the
243 * filename that user types.
244 * @return Returns ETrue if user accepts or enters a filename, otherwise
247 IMPORT_C static TBool RunSaveDlgLD(
248 TDes& aDefaultFileName,
249 TInt aMemorySelectionResourceId,
250 MAknFileFilter* aFilter,
251 MAknFileSelectionObserver* aObserver = NULL );
254 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
256 * A static method that launches save dialog.
257 * @param aDefaultFileName Full path + the filename that user enters
258 * is stored to this descriptor. The descriptor may contain text
259 * that is used as default filename, for example "Attachment".
260 * @param aMemorySelectionResourceId A resource id for memory selection
262 * @param aFileSelectionTitle Custom title for file selection dialog.
263 * @param aFileNamePromptTitle Custom title for filename prompt dialog.
264 * @param aObserver An observer which is asked, if set, to verify the
265 * filename that user types.
266 * @return Returns ETrue if user accepts or enters a filename, otherwise
269 IMPORT_C static TBool RunSaveDlgLD(
270 TDes& aDefaultFileName,
271 TInt aMemorySelectionResourceId,
272 const TDesC& aFileSelectionTitle,
273 const TDesC& aFileNamePromptTitle,
274 MAknFileSelectionObserver* aObserver = NULL );
277 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
279 * A static method that launches save dialog.
280 * @param aDefaultFileName Full path + the filename that user enters
281 * is stored to this descriptor. The descriptor may contain text
282 * that is used as default filename, for example "Attachment".
283 * @param aMemorySelectionResourceId A resource id for memory selection
285 * @param aFileSelectionResourceId A resource id for file selection
287 * @param aObserver An observer which is asked, if set, to verify the
288 * filename that user types.
289 * @return Returns ETrue if user accepts or enters a filename, otherwise
292 IMPORT_C static TBool RunSaveDlgLD(
293 TDes& aDefaultFileName,
294 TInt aMemorySelectionResourceId,
295 TInt aFileSelectionResourceId,
296 MAknFileSelectionObserver* aObserver = NULL );
299 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
301 * A static method that launches save dialog.
302 * @param aDefaultFileName Full path + the filename that user enters
303 * is stored to this descriptor. The descriptor may contain text
304 * that is used as default filename, for example "Attachment".
305 * @param aMemorySelectionResourceId A resource id for memory selection
307 * @param aFileSelectionResourceId A resource id for file selection
309 * @param aFileNamePromptTitle Custom title for filename prompt dialog.
310 * @param aObserver An observer which is asked, if set, to verify the
311 * filename that user types.
312 * @return Returns ETrue if user accepts or enters a filename, otherwise
315 IMPORT_C static TBool RunSaveDlgLD(
316 TDes& aDefaultFileName,
317 TInt aMemorySelectionResourceId,
318 TInt aFileSelectionResourceId,
319 const TDesC& aFileNamePromptTitle,
320 MAknFileSelectionObserver* aObserver = NULL );
323 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
325 * A static method that launches save dialog. No file selection dialog
326 * for directory selection is displayed.
327 * @param aDefaultFileName Full path + the filename that user enters
328 * is stored to this descriptor. The descriptor may contain text
329 * that is used as default filename, for example "Attachment".
330 * @param aMemorySelectionResourceId A resource id for memory selection
331 * dialog. The folders in which the file will be saved should be
332 * given in this resource.
333 * @param aObserver An observer which is asked, if set, to verify the
334 * filename that user types.
335 * @return Returns ETrue if user accepts or enters a filename, otherwise
338 IMPORT_C static TBool RunSaveDlgNoDirectorySelectionLD(
339 TDes& aDefaultFileName,
340 TInt aMemorySelectionResourceId,
341 MAknFileSelectionObserver* aObserver = NULL );
344 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
346 * A static method that launches save dialog. No file selection dialog
347 * for directory selection is displayed.
348 * @param aDefaultFileName Full path + the filename that user enters
349 * is stored to this descriptor. The descriptor may contain text
350 * that is used as default filename, for example "Attachment".
351 * @param aMemorySelectionResourceId A resource id for memory selection
352 * dialog. The folders in which the file will be saved should be
353 * given in this resource.
354 * @param aFileNamePromptTitle Custom title for filename prompt dialog.
355 * @param aObserver An observer which is asked, if set, to verify the
356 * filename that user types.
357 * @return Returns ETrue if user accepts or enters a filename, otherwise
360 IMPORT_C static TBool RunSaveDlgNoDirectorySelectionLD(
361 TDes& aDefaultFileName,
362 TInt aMemorySelectionResourceId,
363 const TDesC& aFileNamePromptTitle,
364 MAknFileSelectionObserver* aObserver = NULL );
367 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
369 * A static method that launches copy dialog.
370 * @param aDirectory Full path of the folder that user
371 * selects is stored to this descriptor.
372 * @param aMemorySelectionResourceId A resource id for memory selection
374 * @param aObserver An observer which is asked, if set, to verify user's
376 * @return Returns ETrue if user selects a folder, otherwise EFalse.
378 IMPORT_C static TBool RunCopyDlgLD(
380 TInt aMemorySelectionResourceId,
381 MAknFileSelectionObserver* aObserver = NULL );
384 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
386 * A static method that launches copy dialog.
387 * @param aDirectory Full path of the folder that user
388 * selects is stored to this descriptor.
389 * @param aMemorySelectionResourceId A resource id for memory selection
391 * @param aFilter Filter is asked if a directory entry can be shown in
392 * list. Ownership is not transferred.
393 * @param aObserver An observer which is asked, if set, to verify user's
395 * @return Returns ETrue if user selects a folder, otherwise EFalse.
397 IMPORT_C static TBool RunCopyDlgLD(
399 TInt aMemorySelectionResourceId,
400 MAknFileFilter* aFilter,
401 MAknFileSelectionObserver* aObserver = NULL );
404 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
406 * A static method that launches copy dialog.
407 * @param aDirectory Full path of the folder that user
408 * selects is stored to this descriptor.
409 * @param aMemorySelectionResourceId A resource id for memory selection
411 * @param aFileSelectionResourceId A resource id for file selection
413 * @param aObserver An observer which is asked, if set, to verify user's
415 * @return Returns ETrue if user selects a folder, otherwise EFalse
417 IMPORT_C static TBool RunCopyDlgLD(
419 TInt aMemorySelectionResourceId,
420 TInt aFileSelectionResourceId,
421 MAknFileSelectionObserver* aObserver = NULL );
424 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
426 * A static method that launches file selection dialog.
427 * @param aFileName Full path and filename of the file that user
428 * selects is stored to this descriptor.
429 * @param aStartFolder User defined folder to start browsing in file selection
430 * @param aMemorySelectionResourceId A resource id for memory selection
432 * @param aObserver An observer which is asked, if set, to verify user's
434 * @return Returns ETrue if user selects a file, otherwise EFalse.
437 IMPORT_C static TBool RunSelectDlgLD(
439 const TDesC& aStartFolder,
440 TInt aMemorySelectionResourceId,
441 MAknFileSelectionObserver* aObserver = NULL );
444 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
446 * A static method that launches file selection dialog.
447 * @param aFileName Full path and filename of the file that user
448 * selects is stored to this descriptor.
449 * @param aStartFolder User defined folder to start browsing in file selection
450 * @param aMemorySelectionResourceId A resource id for memory selection
452 * @param aFilter Filter is asked if a directory entry can be shown in
453 * list. Ownership is not transferred.
454 * @param aObserver An observer which is asked, if set, to verify user's
456 * @return Returns ETrue if user selects a file, otherwise EFalse.
459 IMPORT_C static TBool RunSelectDlgLD(
461 const TDesC& aStartFolder,
462 TInt aMemorySelectionResourceId,
463 MAknFileFilter* aFilter,
464 MAknFileSelectionObserver* aObserver = NULL );
467 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
469 * A static method that launches file selection dialog.
470 * @param aFileName Full path and filename of the file that user
471 * selects is stored to this descriptor.
472 * @param aStartFolder User defined folder to start browsing in file selection
473 * @param aMemorySelectionResourceId A resource id for memory selection
475 * @param aFileSelectionTitle A custom title for file selection dialog.
476 * @param aObserver An observer which is asked, if set, to verify user's
478 * @return Returns ETrue if user selects a file, otherwise EFalse.
481 IMPORT_C static TBool RunSelectDlgLD(
483 const TDesC& aStartFolder,
484 TInt aMemorySelectionResourceId,
485 const TDesC& aFileSelectionTitle,
486 MAknFileSelectionObserver* aObserver = NULL );
489 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
491 * A static method that launches file selection dialog.
492 * @param aFileName Full path and filename of the file that user
493 * selects is stored to this descriptor.
494 * @param aStartFolder User defined folder to start browsing in file selection
495 * @param aMemorySelectionResourceId A resource id for memory selection
497 * @param aFileSelectionResourceId A resource id for file selection
499 * @param aObserver An observer which is asked, if set, to verify user's
501 * @return Returns ETrue if user selects a file, otherwise EFalse.
504 IMPORT_C static TBool RunSelectDlgLD(
506 const TDesC& aStartFolder,
507 TInt aMemorySelectionResourceId,
508 TInt aFileSelectionResourceId,
509 MAknFileSelectionObserver* aObserver = NULL );
512 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
514 * A static method that launches file selection dialog.
515 * @param aFileName Full path and filename of the file that user selects is
516 * stored to this descriptor.
517 * @param aStartFolder User defined folder to start browsing in file selection.
518 * @param aMemorySelectionResourceId A resource id for memory selection dialog.
519 * @param aFileSelectionResourceId A resource id for file selection dialog.
520 * @param aFileSelectionTitle Custom title for file selection dialog.
521 * @param aFilter Filter asked if a directory entry can be shown in list.
522 * @param aObserver An observer which is asked to verify user's selection.
523 * @return Returns ETrue if user selects a file, otherwise EFalse
526 IMPORT_C static TBool RunSelectDlgLD(
528 const TDesC& aStartFolder,
529 TInt aMemorySelectionResourceId,
530 TInt aFileSelectionResourceId,
531 const TDesC& aFileSelectionTitle,
532 MAknFileFilter* aFilter = NULL,
533 MAknFileSelectionObserver* aObserver = NULL );
536 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
538 * A static method that launches save dialog.
539 * @param aDefaultFileName Full path + the filename that user enters
540 * is stored to this descriptor. The descriptor may contain text
541 * that is used as default filename, for example "Attachment".
542 * @param aStartFolder User defined folder to start browsing in file selection.
543 * @param aMemorySelectionResourceId A resource id for memory selection dialog.
544 * @param aFileSelectionResourceId A resource id for file selection dialog.
545 * @param aFileSelectionTitle Custom title for file selection dialog.
546 * @param aFilter Filter asked if a directory entry can be shown in list.
547 * @param aObserver An observer which is asked, if set, to verify the
548 * filename that user types.
549 * @return Returns ETrue if user accepts or enters a filename, otherwise
553 IMPORT_C static TBool RunSaveDlgLD(
554 TDes& aDefaultFileName,
555 const TDesC& aStartFolder,
556 TInt aMemorySelectionResourceId,
557 TInt aFileSelectionResourceId,
558 const TDesC& aFileSelectionTitle,
559 MAknFileFilter* aFilter = NULL,
560 MAknFileSelectionObserver* aObserver = NULL );
563 * DEPRECATED: Use AknCommonDialogsDynMem funcions instead.
565 * A static method that launches folder selection dialog.
566 * @param aFolder Full path of the folder that user selects is stored to this
568 * @param aStartFolder User defined folder to start browsing in file selection.
569 * @param aMemorySelectionResourceId A resource id for memory selection dialog.
570 * @param aFileSelectionResourceId A resource id for file selection dialog.
571 * @param aFileSelectionTitle Custom title for file selection dialog.
572 * @param aFilter Filter is asked if a directory entry can be shown in list.
573 * @param aObserver An observer which is asked to verify user's selection.
574 * @return Returns ETrue if user selects a folder, otherwise EFalse
577 IMPORT_C static TBool RunFolderSelectDlgLD(
579 const TDesC& aStartFolder,
580 TInt aMemorySelectionResourceId,
581 TInt aFileSelectionResourceId,
582 const TDesC& aFileSelectionTitle,
583 MAknFileFilter* aFilter = NULL,
584 MAknFileSelectionObserver* aObserver = NULL );
588 #endif // AKNCOMMONDIALOGS_H