S60 3rd Edition API Reference: caknmemoryselectiondialog.h Source File

caknmemoryselectiondialog.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : CAknMemorySelectionDialog.h
00004 *  Part of     : Common File Dialogs / CommonDialogs.dll
00005 *  Interface   : ?Interface_category, ?Interface_name
00006 *  Description : ?Description
00007 *  Version     : ?Version
00008 *
00009 *  Copyright (c) 2002-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef CAKNMEMORYSELECTIONDIALOG_H
00022 #define CAKNMEMORYSELECTIONDIALOG_H
00023 
00024 // INCLUDES
00025 #include <CAknCommonDialogsBase.h>
00026 #include <badesca.h> // CDesCArray
00027 
00028 // FORWARD DECLARATIONS
00029 class CAknMemorySelectionModel;
00030 class CAknMemorySelectionEventHandler;
00031 class MAknMemorySelectionObserver;
00032 
00033 
00034 //  CLASS DEFINITION
00041 NONSHARABLE_CLASS(CAknMemorySelectionDialog) : public CAknCommonDialogsBase
00042         {
00043         public:         // Enumerations
00044 
00049                 enum TMemory
00050                         {
00051                         EPhoneMemory = 0,   // C:
00052                         EMemoryCard,        // E:
00053                         EMemoryCount        // must remain last one
00054                         };
00055 
00056         public:         // Constructors and destructors
00057 
00066                 IMPORT_C static CAknMemorySelectionDialog* NewL(
00067                         TCommonDialogType aDialogType,
00068                         TBool aShowUnavailableDrives );
00069                 
00070                 
00080                 IMPORT_C static CAknMemorySelectionDialog* NewL(
00081                         TCommonDialogType aDialogType,
00082                         TInt aResourceId,
00083                         TBool aShowUnavailableDrives );
00084                         
00085 
00086                 IMPORT_C virtual ~CAknMemorySelectionDialog();
00087 
00088         public:         // New functions
00089 
00094                 IMPORT_C void SetObserver( MAknMemorySelectionObserver* aObserver );
00095 
00100                 IMPORT_C void SetTitleL( const TDesC& aText );
00101 
00106                 IMPORT_C void SetLeftSoftkeyL( const TDesC& aText );
00107 
00112                 IMPORT_C void SetRightSoftkeyL( const TDesC& aText );
00113 
00119                 IMPORT_C void GetItem( TInt aIndex, TDes& aItem );
00120 
00135                 IMPORT_C void GetMemories( TMemory aSelectedMemory,
00136                                                TDes* aRootPath, 
00137                                                TDes* aDefaultFolder );
00138 
00147                 IMPORT_C virtual TReturnKey ExecuteL( TMemory& aSelectedMemory );
00148 
00161                 IMPORT_C virtual TReturnKey ExecuteL( 
00162                     TMemory& aSelectedMemory,
00163                         TDes* aRootPath, TDes* aDefaultFolder );
00164 
00169                 IMPORT_C static TBool RunDlgLD( 
00170                     TMemory& aSelectedMemory,
00171                         MAknMemorySelectionObserver* aObserver = NULL );
00172 
00177                 IMPORT_C static TBool RunDlgLD( 
00178                     TMemory& aSelectedMemory,
00179                         const TDesC& aTitle,
00180                         MAknMemorySelectionObserver* aObserver = NULL );
00181 
00186                 IMPORT_C static TBool RunDlgLD( 
00187                     TMemory& aSelectedMemory,
00188                         TInt aResourceId,
00189                         TDes* aRootPath = NULL, TDes* aDefaultFolder = NULL,
00190                         MAknMemorySelectionObserver* aObserver = NULL );
00191 
00197                 TInt NumberOfItems() const;
00198 
00199         protected:      // Constructors and destructors
00200 
00201                 CAknMemorySelectionDialog( TCommonDialogType aDialogType );
00202 
00209                 virtual void ConstructFromResourceL(
00210                         TInt aResourceId,
00211                         TBool aShowUnavailableDrives );
00212 
00213                         
00214         private:        //  New functions
00215 
00230                 static TBool RunL(
00231                         TInt aResourceId,
00232                         TMemory& aSelectedMemory,
00233                         TDes* aRootPath,
00234                         TDes* aDefaultFolder,
00235                         const TDesC& aTitle,
00236                         MAknMemorySelectionObserver* aObserver );
00237 
00241                 void SetResourceId( TInt& aResourceId, TCommonDialogType aDialogType ) const;
00242 
00246                 void ReadFromResourceL( TInt aResourceId );
00247         
00248     
00249         protected:      // Data
00250 
00251                 // Own: Dialog type
00252                 TCommonDialogType iDialogType;
00253 
00254                 // Own: Model
00255                 CAknMemorySelectionModel* iModel;
00256                 
00257                 // Own: Event handler
00258                 CAknMemorySelectionEventHandler* iEventHandler;
00259 
00260                 // Ref: Observer
00261                 MAknMemorySelectionObserver* iObserver;
00262 
00263                 // Own: Title
00264                 HBufC* iTitle;
00265                 
00266                 // Own: Left softkey text
00267                 HBufC* iLeftSoftkey;
00268 
00269                 // Own: Right softkey text
00270                 HBufC* iRightSoftkey;
00271 
00272                 // Own: Root path array
00273                 // iDynamicDrivesEnabled indicates the content of this array.
00274                 CDesCArrayFlat iRootPathArray;
00275 
00276                 // Own: Default folder array
00277                 CDesCArrayFlat iDefaultFolderArray;
00278                 
00279         };
00280 
00281 // CAKNMEMORYSELECTIONDIALOG_H
00282 #endif
00283 
00284 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top