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