00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef C_AKNMEMORYSELECTIONDIALOGMULTIDRIVE_H
00022 #define C_AKNMEMORYSELECTIONDIALOGMULTIDRIVE_H
00023
00024 #include <CAknCommonDialogsBase.h>
00025 #include <badesca.h>
00026 #include <f32file.h>
00027
00028 class CAknMemorySelectionModelMultiDrive;
00029 class CAknMemorySelectionEventHandler;
00030 class MAknMemorySelectionObserver;
00031 class TDriveInfo;
00032 class CAknIconArray;
00033
00043 NONSHARABLE_CLASS( CAknMemorySelectionDialogMultiDrive )
00044 : public CAknCommonDialogsBase
00045 {
00046 public:
00047
00048
00049
00050
00061 IMPORT_C static CAknMemorySelectionDialogMultiDrive* NewL(
00062 TCommonDialogType aDialogType,
00063 TBool aShowUnavailableDrives );
00064
00065
00078 IMPORT_C static CAknMemorySelectionDialogMultiDrive* NewL(
00079 TCommonDialogType aDialogType,
00080 TInt aResourceId,
00081 TBool aShowUnavailableDrives );
00082
00097 IMPORT_C static CAknMemorySelectionDialogMultiDrive* NewL(
00098 TCommonDialogType aDialogType,
00099 TInt aResourceId,
00100 TBool aShowUnavailableDrives,
00101 TInt aIncludedMedias );
00102
00103 IMPORT_C virtual ~CAknMemorySelectionDialogMultiDrive();
00104
00105
00106
00113 IMPORT_C void SetTitleL( const TDesC& aText );
00114
00121 IMPORT_C void SetLeftSoftkeyL( const TDesC& aText );
00122
00128 IMPORT_C void SetRightSoftkeyL( const TDesC& aText );
00129
00137 IMPORT_C void GetItem( TInt aIndex, TDes& aItem );
00138
00139
00150 IMPORT_C virtual TReturnKey ExecuteL( TDriveNumber& aSelectedDrive );
00151
00166 IMPORT_C virtual TReturnKey ExecuteL(
00167 TDriveNumber& aSelectedDrive,
00168 TDes* aRootPath, TDes* aDefaultFolder );
00169
00176 IMPORT_C static TBool RunDlgLD( TDriveNumber& aSelectedDrive );
00177
00185 IMPORT_C static TBool RunDlgLD(
00186 TDriveNumber& aSelectedDrive, const TDesC& aTitle );
00187
00194 IMPORT_C static TBool RunDlgLD(
00195 TDriveNumber& aSelectedDrive,
00196 TInt aResourceId,
00197 TDes* aRootPath = NULL,
00198 TDes* aDefaultFolder = NULL );
00199
00206 TInt NumberOfItems() const;
00207
00225 TInt GetDrivePaths( TDriveNumber aDrive,
00226 TDes* aRootPath,
00227 TDes* aDefaultFolder );
00228
00248 TInt GetDrivePaths( TInt aLbxIndex,
00249 TDes* aRootPath,
00250 TDes* aDefaultFolder );
00251
00281 IMPORT_C TInt AddDrivePathsL( const TDesC& aRootPath,
00282 const TDesC& aDefaultFolder );
00283
00293 IMPORT_C TInt FindIndexByDrive( const TDriveNumber& aDrive );
00294
00301 TDriveNumber FindDriveByIndex( const TInt aIndex );
00302
00309 TBool HasUnavailbleMMC();
00310
00311 protected:
00312
00313
00314
00315 CAknMemorySelectionDialogMultiDrive( TCommonDialogType aDialogType );
00316
00324 virtual void ConstructFromResourceL(
00325 TInt aResourceId,
00326 TBool aShowUnavailableDrives );
00327
00337 virtual void ConstructFromResourceL(
00338 TInt aResourceId,
00339 TBool aShowUnavailableDrives,
00340 TInt aIncludedMedias );
00341
00342 private:
00343
00344
00345
00361 static TBool RunL(
00362 TInt aResourceId,
00363 TDriveNumber& aSelectedDrive,
00364 TDes* aRootPath,
00365 TDes* aDefaultFolder,
00366 const TDesC& aTitle );
00367
00371 void SetResourceId( TInt& aResourceId, TCommonDialogType aDialogType )
00372 const;
00373
00377 void ReadFromResourceL( TInt aResourceId );
00378
00384 void LoadIconsL( CAknIconArray* aIconArray, TBool aDoubleStyle );
00385
00392 void GetSystemDrivesL();
00393
00394 protected:
00395
00396
00397
00398
00399 TCommonDialogType iDialogType;
00400
00401
00402 CAknMemorySelectionModelMultiDrive* iModel;
00403
00404
00405 CAknMemorySelectionEventHandler* iEventHandler;
00406
00407
00408 HBufC* iTitle;
00409
00410
00411 HBufC* iLeftSoftkey;
00412
00413
00414 HBufC* iRightSoftkey;
00415
00416
00417
00418 CDesCArrayFlat iRootPathArray;
00419
00420
00421 CDesCArrayFlat iDefaultFolderArray;
00422
00423
00424
00425
00426
00427 TBool iDynamicDrivesEnabled;
00428
00432 TInt iIncludedMedias;
00433
00434 };
00435
00436 #endif // C_AKNMEMORYSELECTIONDIALOGMULTIDRIVE_H