00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef C_AKNMEMORYSELECTIONDIALOG_H
00021 #define C_AKNMEMORYSELECTIONDIALOG_H
00022
00023 #include <CAknCommonDialogsBase.h>
00024 #include <badesca.h>
00025
00026 class CAknMemorySelectionModel;
00027 class CAknMemorySelectionEventHandler;
00028 class MAknMemorySelectionObserver;
00029 class TDriveInfo;
00030 class CAknIconArray;
00031
00038 NONSHARABLE_CLASS(CAknMemorySelectionDialog) : public CAknCommonDialogsBase
00039 {
00040
00041 public:
00042
00043
00048 enum TMemory
00049 {
00050 EPhoneMemory = 0,
00051 EMemoryCard,
00052 EMemoryCount
00053 };
00054
00055
00056
00067 IMPORT_C static CAknMemorySelectionDialog* NewL(
00068 TCommonDialogType aDialogType,
00069 TBool aShowUnavailableDrives );
00070
00071
00083 IMPORT_C static CAknMemorySelectionDialog* NewL(
00084 TCommonDialogType aDialogType,
00085 TInt aResourceId,
00086 TBool aShowUnavailableDrives );
00087
00101 IMPORT_C static CAknMemorySelectionDialog* NewL(
00102 TCommonDialogType aDialogType,
00103 TInt aResourceId,
00104 TBool aShowUnavailableDrives,
00105 TInt aIncludedMedias );
00106
00107 IMPORT_C virtual ~CAknMemorySelectionDialog();
00108
00109
00110
00116 IMPORT_C void SetObserver( MAknMemorySelectionObserver* aObserver );
00117
00123 IMPORT_C void SetTitleL( const TDesC& aText );
00124
00130 IMPORT_C void SetLeftSoftkeyL( const TDesC& aText );
00131
00137 IMPORT_C void SetRightSoftkeyL( const TDesC& aText );
00138
00145 IMPORT_C void GetItem( TInt aIndex, TDes& aItem );
00146
00158 IMPORT_C void GetMemories( TMemory aSelectedMemory,
00159 TDes* aRootPath,
00160 TDes* aDefaultFolder );
00161
00171 IMPORT_C virtual TReturnKey ExecuteL( TMemory& aSelectedMemory );
00172
00186 IMPORT_C virtual TReturnKey ExecuteL(
00187 TMemory& aSelectedMemory,
00188 TDes* aRootPath, TDes* aDefaultFolder );
00189
00194 IMPORT_C static TBool RunDlgLD(
00195 TMemory& aSelectedMemory,
00196 MAknMemorySelectionObserver* aObserver = NULL );
00197
00202 IMPORT_C static TBool RunDlgLD(
00203 TMemory& aSelectedMemory,
00204 const TDesC& aTitle,
00205 MAknMemorySelectionObserver* aObserver = NULL );
00206
00211 IMPORT_C static TBool RunDlgLD(
00212 TMemory& aSelectedMemory,
00213 TInt aResourceId,
00214 TDes* aRootPath = NULL, TDes* aDefaultFolder = NULL,
00215 MAknMemorySelectionObserver* aObserver = NULL );
00216
00223 TInt NumberOfItems() const;
00224
00244 TInt GetDrivePaths( TInt aLbxIndex,
00245 TDes* aRootPath,
00246 TDes* aDefaultFolder );
00247
00248 protected:
00249
00250
00251
00252 CAknMemorySelectionDialog( TCommonDialogType aDialogType );
00253
00261 virtual void ConstructFromResourceL(
00262 TInt aResourceId,
00263 TBool aShowUnavailableDrives );
00264
00274 virtual void ConstructFromResourceL(
00275 TInt aResourceId,
00276 TBool aShowUnavailableDrives,
00277 TInt aIncludedMedias );
00278
00279 private:
00280
00281
00282
00298 static TBool RunL(
00299 TInt aResourceId,
00300 TMemory& aSelectedMemory,
00301 TDes* aRootPath,
00302 TDes* aDefaultFolder,
00303 const TDesC& aTitle,
00304 MAknMemorySelectionObserver* aObserver );
00305
00306
00310 void SetResourceId( TInt& aResourceId, TCommonDialogType aDialogType )
00311 const;
00312
00319 void ReadFromResourceL( TInt aResourceId, TBool aResourceDefined );
00320
00326 void LoadIconsL( CAknIconArray* aIconArray, TBool aDoubleStyle );
00327
00331 void GetSystemPathsL();
00332
00333 protected:
00334
00335
00336 TCommonDialogType iDialogType;
00337
00338
00339 CAknMemorySelectionModel* iModel;
00340
00341
00342 CAknMemorySelectionEventHandler* iEventHandler;
00343
00344
00345 MAknMemorySelectionObserver* iObserver;
00346
00347
00348 HBufC* iTitle;
00349
00350
00351 HBufC* iLeftSoftkey;
00352
00353
00354 HBufC* iRightSoftkey;
00355
00356
00357
00358 CDesCArrayFlat iRootPathArray;
00359
00360
00361 CDesCArrayFlat iDefaultFolderArray;
00362
00363
00364
00365
00366
00367 TBool iDynamicDrivesEnabled;
00368
00369 TInt iIncludedMedias;
00370 };
00371
00372
00373 #endif