williamr@2: /*
williamr@2: * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
williamr@2: * All rights reserved.
williamr@2: * This component and the accompanying materials are made available
williamr@2: * 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
williamr@2: * which accompanies this distribution, and is available
williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2: *
williamr@2: * Initial Contributors:
williamr@2: * Nokia Corporation - initial contribution.
williamr@2: *
williamr@2: * Contributors:
williamr@2: *
williamr@2: * Description:  Static class to call combined common file dialogs
williamr@2: *
williamr@2: */
williamr@2: 
williamr@2: 
williamr@2: 
williamr@2: #ifndef AKNCOMMONDIALOGSDYNMEM_H
williamr@2: #define AKNCOMMONDIALOGSDYNMEM_H
williamr@2: 
williamr@2: 
williamr@2: #include <CAknCommonDialogsBase.h>
williamr@2: 
williamr@2: class MAknMemorySelectionObserver;
williamr@2: class MAknFileSelectionObserver;
williamr@2: class MAknFileFilter;
williamr@2: 
williamr@2: 
williamr@2: /**
williamr@2:  *  New version of AknCommonDialogs class suporting dynamic drives such as
williamr@2:  *  remote drive. Use this instead of now deprecated old AknCommonDialogs.
williamr@2:  *
williamr@2:  *  A simple facade class that consists of static functions that launch UI
williamr@2:  *  components in a sequence. First, memory selection component is launched and
williamr@2:  *  then file/directory selection component. In save and move dialogs directory
williamr@2:  *  selection may not be shown if there are no subdirectories to choose from.
williamr@2:  *  In save dialog, finally filename prompt component is launched.
williamr@2:  *
williamr@2:  *  All methods have an obligatory resource ID parameter for memory selection
williamr@2:  *  because it contains the paths for both memories (Phone&MMC) (LOCATION
williamr@2:  *  structs). New TMemoryTypes functionality allows defining dynamic memories
williamr@2:  *  to be used.
williamr@2:  *
williamr@2:  *  If set, an observer is queried just before exiting the dialog.
williamr@2:  *  At this point the application can either reject or accept user's selection.
williamr@2:  *  Every dialog returns a boolean value which tells if user has selected
williamr@2:  *  something or not.
williamr@2:  *
williamr@2:  *  @lib CommonDialogs.lib
williamr@2:  *  @since S60 3.2
williamr@2:  */
williamr@2: NONSHARABLE_CLASS( AknCommonDialogsDynMem )
williamr@2:     {
williamr@2: 
williamr@2: public:
williamr@2: 
williamr@2:     /**
williamr@2:      * Bit flag definition of the memory types that will  be listed by the
williamr@2:      * dialog. These are used in the new functions to include for example
williamr@2:      * remote drives. In case new media types are added in the future, the
williamr@2:      * types can be added to the end of this enumeration.
williamr@2:      *
williamr@2:      * Application logic and UI specification is mainly interested in
williamr@2:      * division between 'phone memory' and 'MMC' with the latest addition of
williamr@2:      * 'remote drives'. In Symbian OS level this is somewhat more
williamr@2:      * complicated because these do not map directly to any drive or memory
williamr@2:      * type. For example try defining the drive letter for remote drive.
williamr@2:      *
williamr@2:      * Basically TMediaType could be used but the types may vary in the same
williamr@2:      * drive and application logic mostly understands only division between
williamr@2:      * 'phone' and 'MMC' memory - these do not map to TMediaType directly.
williamr@2:      * This the reasoning for this new enumeration.
williamr@2:      *
williamr@2:      * Uses binary flagging.
williamr@2:      *
williamr@2:      * Use for example 'EMemoryTypePhone|EMemoryTypeMMC|EMemoryTypeRemote' to
williamr@2:      * have phone memory, MMC and remote drives included.
williamr@2:      *
williamr@2:      * Notice: 0 value means no media included. Only
williamr@2:      * EMemoryTypePhone|EMemoryTypeMMC for legacy applications and
williamr@2:      * EMemoryTypePhone|EMemoryTypeMMC|EMemoryTypeRemote for new remote
williamr@2:      * drives-aware applications are supported for the time being.
williamr@2:      * Use EMemoryTypePhone|EMemoryTypeInternalMassStorage|EMemoryMMCExternal
williamr@2:      * |EMemoryTypeRemote for multiple drive support. And EMemoryTypeMMC will
williamr@2:      * be deprecated.
williamr@2:      */
williamr@2:     enum TMemoryTypes
williamr@2:         {
williamr@2:        /**
williamr@2:         * EMemoryTypePhone
williamr@2:         * Device memory drive inside phone
williamr@2:         *
williamr@2:         * There might be multiple device memory drives because of multiple
williamr@2:         * partitions.
williamr@2:         */
williamr@2:         EMemoryTypePhone        = 0x00000001,
williamr@2: 
williamr@2:        /**
williamr@2:         * @Deprecated It will be mapped to
williamr@2:         *             EMemoryTypeInternalMassStorage|EMemoryMMCExternal
williamr@2:         *             internally.
williamr@2:         *
williamr@2:         * EMemoryTypeMMC
williamr@2:         * Standard external removable memory card drive
williamr@2:         *
williamr@2:         * There might be multiple removable MMC drives because of
williamr@2:         * multiple partitions.
williamr@2:         */
williamr@2:         EMemoryTypeMMC          = 0x00000002,
williamr@2: 
williamr@2:        /**
williamr@2:         * EMemoryTypeRemote
williamr@2:         * Remote drive
williamr@2:         *
williamr@2:         * There might be multiple remote drives.
williamr@2:         */
williamr@2:         EMemoryTypeRemote       = 0x00000004,
williamr@2: 
williamr@2:        /**
williamr@2:         * EMemoryTypeInternalMassStorage
williamr@2:         * Internal mass storage, like internal MMC, hard disk, flash, etc.
williamr@2:         *
williamr@2:         * There might be multiple internal disk drives
williamr@2:         */
williamr@2:         EMemoryTypeInternalMassStorage  = 0x00000008,
williamr@2: 
williamr@2:        /**
williamr@2:         * EMemoryTypeMMCExternal
williamr@2:         * Removable external memory card
williamr@2:         *
williamr@2:         */
williamr@2:         EMemoryTypeMMCExternal = 0x00000010
williamr@2: 
williamr@2:         };
williamr@2: 
williamr@2: public:
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFilter Filter is asked if a directory entry can be shown in
williamr@2:      *        list. Ownership is not transferred.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileFilter* aFilter,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionTitle A custom title for file selection dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches move dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDirectory Full path of the folder that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunMoveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDirectory,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches move dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDirectory Full path of the folder that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFilter Filter is asked if a directory entry can be shown in
williamr@2:      *        list. Ownership is not transferred.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunMoveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDirectory,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileFilter* aFilter,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches move dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDirectory Full path of the folder that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionTitle A custom title for directory selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunMoveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDirectory,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches move dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDirectory Full path of the folder that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection
williamr@2:      *        dialog
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunMoveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDirectory,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches save dialog which does not run folder
williamr@2:      * selection dialog at all. Instead the resulting path will be
williamr@2:      * constructed from the root and default folder read from resources and
williamr@2:      * from the file name given by the user.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSaveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches save dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFilter Filter is asked if a directory entry can be shown in
williamr@2:      *        list. Ownership is not transferred.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      */
williamr@2:      IMPORT_C static TBool RunSaveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileFilter* aFilter,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches save dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionTitle Custom title for file selection dialog.
williamr@2:      * @param aFileNamePromptTitle Custom title for filename prompt dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSaveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         const TDesC& aFileNamePromptTitle,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches save dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSaveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches save dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileNamePromptTitle Custom title for filename prompt dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSaveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         const TDesC& aFileNamePromptTitle,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches save dialog. No file selection dialog
williamr@2:      * for directory selection is displayed.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog. The folders in which the file will be saved should be
williamr@2:      *        given in this resource.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSaveDlgNoDirectorySelectionLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:      /**
williamr@2:      * A static method that launches save dialog. No file selection dialog
williamr@2:      * for directory selection is displayed.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog. The folders in which the file will be saved should be
williamr@2:      *        given in this resource.
williamr@2:      * @param aFileNamePromptTitle Custom title for filename prompt dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSaveDlgNoDirectorySelectionLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         const TDesC& aFileNamePromptTitle,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches copy dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDirectory Full path of the folder that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunCopyDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDirectory,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches copy dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDirectory Full path of the folder that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFilter Filter is asked if a directory entry can be shown in
williamr@2:      *        list. Ownership is not transferred.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse.
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunCopyDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDirectory,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileFilter* aFilter,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches copy dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDirectory Full path of the folder that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection
williamr@2:      *        dialog
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunCopyDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDirectory,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:      /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      * @since 3.2
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFilter Filter is asked if a directory entry can be shown in
williamr@2:      *        list. Ownership is not transferred.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      * @since 3.2
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         MAknFileFilter* aFilter,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionTitle A custom title for file selection dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      * @since 3.2
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user
williamr@2:      *        selects is stored to this descriptor.
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection
williamr@2:      *        dialog.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify user's
williamr@2:      *        selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse.
williamr@2:      * @since 3.2
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches file selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFileName Full path and filename of the file that user selects is
williamr@2:      *        stored to this descriptor.
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection dialog.
williamr@2:      * @param aFileSelectionTitle Custom title for file selection dialog.
williamr@2:      * @param aFilter Filter asked if a directory entry can be shown in list.
williamr@2:      * @param aObserver An observer which is asked to verify user's selection.
williamr@2:      * @return Returns ETrue if user selects a file, otherwise EFalse
williamr@2:      * @since 3.2
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFileName,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         MAknFileFilter* aFilter = NULL,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches save dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aDefaultFileName Full path + the filename that user enters
williamr@2:      *        is stored to this descriptor. The descriptor may contain text
williamr@2:      *        that is used as default filename, for example "Attachment".
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection dialog.
williamr@2:      * @param aFileSelectionTitle Custom title for file selection dialog.
williamr@2:      * @param aFilter Filter asked if a directory entry can be shown in list.
williamr@2:      * @param aObserver An observer which is asked, if set, to verify the
williamr@2:      *        filename that user types.
williamr@2:      * @return Returns ETrue if user accepts or enters a filename, otherwise
williamr@2:      *         EFalse.
williamr@2:      * @since 3.2
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunSaveDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aDefaultFileName,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         MAknFileFilter* aFilter = NULL,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches folder selection dialog.
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes.
williamr@2:      * @param aFolder Full path of the folder that user selects is stored to
williamr@2:      *        this descriptor.
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection dialog.
williamr@2:      * @param aFileSelectionTitle Custom title for file selection dialog.
williamr@2:      * @param aFilter Filter is asked if a directory entry can be shown in
williamr@2:      *        list.
williamr@2:      * @param aObserver An observer which is asked to verify user's selection.
williamr@2:      * @return Returns ETrue if user selects a folder, otherwise EFalse
williamr@2:      * @since 3.2
williamr@2:      */
williamr@2:     IMPORT_C static TBool RunFolderSelectDlgLD(
williamr@2:         TInt aIncludedMedias,
williamr@2:         TDes& aFolder,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         MAknFileFilter* aFilter = NULL,
williamr@2:         MAknFileSelectionObserver* aObserver = NULL );
williamr@2: 
williamr@2: private:
williamr@2: 
williamr@2:     /**
williamr@2:      * A static method that launches UI components in a sequence.
williamr@2:      * @param aType Defines what type of dialog is shown.
williamr@2:      * @param aFileName A reference to a descriptor. Usage depends on the
williamr@2:      *        dialog type.
williamr@2:      * @param aMemorySelectionResourceId A resource id for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aNoFileSelectionDialog, if ETrue and aType is ECFDDialogType-
williamr@2:      *        Save, no file selection dialog is launched, instead the file
williamr@2:      *        will be saved in the default folder given in the resource
williamr@2:      *        structure referred by aMemorySelectionResourceId.
williamr@2:      * @param aFileSelectionResourceId A resource id for file selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileNamePromptResourceId A resource id for filename prompt
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionTitle Custom title for file selection.
williamr@2:      * @param aFileNamePromptTitle Custom title for filename prompt dialog.
williamr@2:      * @param aFileFilter Filter is asked if a directory entry can be shown
williamr@2:      *        in list.
williamr@2:      * @param aMemorySelectionObserver An observer for memory selection
williamr@2:      *        dialog.
williamr@2:      * @param aFileSelectionObserver An observer for file selection dialog.
williamr@2:      * @param aFileNamePromptObserver An observer for filename prompt
williamr@2:      *        dialog.
williamr@2:      * @param aStartFolder User defined folder to start browsing in file
williamr@2:      *        selection
williamr@2:      * @param aIncludedMedias defines which medias are included in the
williamr@2:      *        dialog. See TMemoryTypes
williamr@2:      * @return Returns a boolean value that depends on the case.
williamr@2:      */
williamr@2:     static TBool RunL(
williamr@2:         TCommonDialogType aType,
williamr@2:         TDes& aFileName,
williamr@2:         TInt aMemorySelectionResourceId,
williamr@2:         TBool aNoFileSelectionDialog,
williamr@2:         TInt aFileSelectionResourceId,
williamr@2:         TInt aFileNamePromptResourceId,
williamr@2:         const TDesC& aFileSelectionTitle,
williamr@2:         const TDesC& aFileNamePromptTitle,
williamr@2:         MAknFileFilter* aFileFilter,
williamr@2:         MAknMemorySelectionObserver* aMemorySelectionObserver,
williamr@2:         MAknFileSelectionObserver* aFileSelectionObserver,
williamr@2:         MAknFileSelectionObserver* aFileNamePromptObserver,
williamr@2:         const TDesC& aStartFolder,
williamr@2:         TInt aIncludedMedias );
williamr@2: 
williamr@2:     };
williamr@2: 
williamr@2: #endif // AKNCOMMONDIALOGSDYNMEM_H