CAknMemorySelectionDialog Class Reference

API published in: S60 2nd Ed

Link against: commondialogs.lib

Capability Information

Required Capabilities

None


#include <caknmemoryselectiondialog.h>

Inherits CAknCommonDialogsBase.

Inherited by CAknMemorySelectionSettingPage.


Detailed Description

A class that launches a pop-up dialog for memory selection.

Public Types

enum   TMemory { EPhoneMemory = 0, EMemoryCard, EMemoryCount }
  : This only works with fixed C: and E: drives. More...

Public Member Functions

virtual IMPORT_C  ~CAknMemorySelectionDialog ()
IMPORT_C void  SetObserver (MAknMemorySelectionObserver *aObserver)
  Sets an observer which is asked if the selected item can be selected.
IMPORT_C void  SetTitleL (const TDesC &aText)
  Sets title for the dialog.
IMPORT_C void  SetLeftSoftkeyL (const TDesC &aText)
  Sets the text used for left softkey.
IMPORT_C void  SetRightSoftkeyL (const TDesC &aText)
  Sets the text used for right softkey.
IMPORT_C void  GetItem (TInt aIndex, TDes &aItem)
  Gets an item from memory selection dialog at specified index.
IMPORT_C void  GetMemories (TMemory aSelectedMemory, TDes *aRootPath, TDes *aDefaultFolder)
  Gets the location paths of a memory.
virtual IMPORT_C TReturnKey  ExecuteL (TMemory &aSelectedMemory)
  Executes the memory selection dialog.
virtual IMPORT_C TReturnKey  ExecuteL (TMemory &aSelectedMemory, TDes *aRootPath, TDes *aDefaultFolder)
  Executes the memory selection dialog.
TInt  NumberOfItems () const
  Returns the number of items in list box array.
TInt  GetDrivePaths (TInt aLbxIndex, TDes *aRootPath, TDes *aDefaultFolder)
  Maps drive paths according to selected listbox item.

Static Public Member Functions

static IMPORT_C CAknMemorySelectionDialog NewL (TCommonDialogType aDialogType, TBool aShowUnavailableDrives)
  Static constructor.
static IMPORT_C CAknMemorySelectionDialog NewL (TCommonDialogType aDialogType, TInt aResourceId, TBool aShowUnavailableDrives)
  Static constructor.
static IMPORT_C CAknMemorySelectionDialog NewL (TCommonDialogType aDialogType, TInt aResourceId, TBool aShowUnavailableDrives, TInt aIncludedMedias)
  Static constructor.
static IMPORT_C TBool  RunDlgLD (TMemory &aSelectedMemory, MAknMemorySelectionObserver *aObserver=NULL)
  A static method that launches a memory selection dialog.
static IMPORT_C TBool  RunDlgLD (TMemory &aSelectedMemory, const TDesC &aTitle, MAknMemorySelectionObserver *aObserver=NULL)
  A static method that launches a memory selection dialog.
static IMPORT_C TBool  RunDlgLD (TMemory &aSelectedMemory, TInt aResourceId, TDes *aRootPath=NULL, TDes *aDefaultFolder=NULL, MAknMemorySelectionObserver *aObserver=NULL)
  A static method that launches a memory selection dialog.

Protected Member Functions

  CAknMemorySelectionDialog (TCommonDialogType aDialogType)
virtual void  ConstructFromResourceL (TInt aResourceId, TBool aShowUnavailableDrives)
  Constructs class from resource.
virtual void  ConstructFromResourceL (TInt aResourceId, TBool aShowUnavailableDrives, TInt aIncludedMedias)
  Constructs class from resource.

Protected Attributes

TCommonDialogType  iDialogType
CAknMemorySelectionModel *  iModel
CAknMemorySelectionEventHandler *  iEventHandler
MAknMemorySelectionObserver iObserver
HBufC *  iTitle
HBufC *  iLeftSoftkey
HBufC *  iRightSoftkey
CDesCArrayFlat  iRootPathArray
CDesCArrayFlat  iDefaultFolderArray
TBool  iDynamicDrivesEnabled
TInt  iIncludedMedias

Member Enumeration Documentation

enum CAknMemorySelectionDialog::TMemory
 

: This only works with fixed C: and E: drives.

Enumerations for memory items in listbox .

Enumerator:
EPhoneMemory 
EMemoryCard 
EMemoryCount 

Constructor & Destructor Documentation

virtual IMPORT_C CAknMemorySelectionDialog::~CAknMemorySelectionDialog  )  [virtual]
 
CAknMemorySelectionDialog::CAknMemorySelectionDialog TCommonDialogType  aDialogType  )  [protected]
 

Member Function Documentation

virtual void CAknMemorySelectionDialog::ConstructFromResourceL TInt  aResourceId,
TBool  aShowUnavailableDrives,
TInt  aIncludedMedias
[protected, virtual]
 

Constructs class from resource.

Parameters:
aResourceId  ID of the resource. Can be zero.
aShowUnavailableDrives  Defines whether unavailable or corrupted drives are shown in memory selection list or not.
aIncludedMedias  bit flag definition of which medias are included in the dialog. See TMemoryTypes.
virtual void CAknMemorySelectionDialog::ConstructFromResourceL TInt  aResourceId,
TBool  aShowUnavailableDrives
[protected, virtual]
 

Constructs class from resource.

Parameters:
aResourceId  ID of the resource. Can be zero.
aShowUnavailableDrives  Defines whether unavailable or corrupted drives are shown in memory selection list or not.
virtual IMPORT_C TReturnKey CAknMemorySelectionDialog::ExecuteL TMemory aSelectedMemory,
TDes *  aRootPath,
TDes *  aDefaultFolder
[virtual]
 

Executes the memory selection dialog.

Virtual to allow derivation.

Parameters:
aSelectedMemory  A reference to a memory (TMemory). If one of the memories is selected, the selected memory is stored to the parameter.
aRootPath  A pointer to a descriptor where the root path of the selected memory is stored.
aDefaultFolder  A pointer to a descriptor where the default folder of the selected memory is stored.
Returns:
Returns true if user has selected an item and false if user hits cancel.
virtual IMPORT_C TReturnKey CAknMemorySelectionDialog::ExecuteL TMemory aSelectedMemory  )  [virtual]
 

Executes the memory selection dialog.

Virtual to allow derivation.

Parameters:
aSelectedMemory  A reference to a memory (TMemory). If one of the memories is selected, the selected memory is stored to the parameter.
Returns:
Returns true if user has selected an item and false if user hits cancel.
TInt CAknMemorySelectionDialog::GetDrivePaths TInt  aLbxIndex,
TDes *  aRootPath,
TDes *  aDefaultFolder
 

Maps drive paths according to selected listbox item.

This function is valid for dynamic drives. The prerequisite for this function is that iRootPathArray and additionally iDefaultFolderArray indexes map correctly to iModel's listbox items.

Parameters:
aLbxIndex  Index to the selected listbox item.
aRootPath  A pointer to a descriptor where the root path of the selected drive will be stored. Must have KMaxFileName space. Set to NULL to ignore.
aDefaultFolder  A pointer to a descriptor where the default folder of the selected drive will be stored. Must have KMaxFileNamespace. Set to NULL to ignore.
Returns:
Return error code KErrNone The drive is found in internal drive list KErrNotFound The drive is not visible to user or does not exist
IMPORT_C void CAknMemorySelectionDialog::GetItem TInt  aIndex,
TDes &  aItem
 

Gets an item from memory selection dialog at specified index.

Parameters:
aIndex  Index to the item in the memory selection list.
aItem  A reference to a descriptor where the item is stored.
IMPORT_C void CAknMemorySelectionDialog::GetMemories TMemory  aSelectedMemory,
TDes *  aRootPath,
TDes *  aDefaultFolder
 

Gets the location paths of a memory.

Parameters:
aSelectedMemory  The memory that was selected.
aRootPath  A pointer to a descriptor where the root path of the selected memory is stored. Must have KMaxFileName space. Set to NULL to ignore.
aDefaultFolder  A pointer to a descriptor where the default folder of the selected memory is stored. Must have KMaxFileName space. Set to NULL to ignore.
static IMPORT_C CAknMemorySelectionDialog* CAknMemorySelectionDialog::NewL TCommonDialogType  aDialogType,
TInt  aResourceId,
TBool  aShowUnavailableDrives,
TInt  aIncludedMedias
[static]
 

Static constructor.

Parameters:
aDialogType  Defines the type of the dialog in order to read correct default settings for title and softkeys from resource.
aResourceId  A resource id (MEMORYSELECTIONDIALOG).
aShowUnavailableDrives  Defines whether unavailable or corrupted drives are shown in memory selection list or not.
aIncludedMedias  bit flag definition of which medias are included in the dialog. See TMemoryTypes.
Returns:
Returns a pointer to an instance of itself.
static IMPORT_C CAknMemorySelectionDialog* CAknMemorySelectionDialog::NewL TCommonDialogType  aDialogType,
TInt  aResourceId,
TBool  aShowUnavailableDrives
[static]
 

Static constructor.

Parameters:
aDialogType  Defines the type of the dialog in order to read correct default settings for title and softkeys from resource.
aResourceId  A resource id (MEMORYSELECTIONDIALOG).
aShowUnavailableDrives  Defines whether unavailable or corrupted drives are shown in memory selection list or not.
Returns:
Returns a pointer to an instance of itself.
static IMPORT_C CAknMemorySelectionDialog* CAknMemorySelectionDialog::NewL TCommonDialogType  aDialogType,
TBool  aShowUnavailableDrives
[static]
 

Static constructor.

Parameters:
aDialogType  Defines the type of the dialog in order to read correct default settings for title and softkeys from resource.
aShowUnavailableDrives  Defines whether unavailable or corrupted drives are shown in memory selection list or not.
Returns:
Returns a pointer to an instance of itself.
TInt CAknMemorySelectionDialog::NumberOfItems  )  const
 

Returns the number of items in list box array.

Not exported, for CFD internal use only.

Returns:
Returns the number of items in list box array.
static IMPORT_C TBool CAknMemorySelectionDialog::RunDlgLD TMemory aSelectedMemory,
TInt  aResourceId,
TDes *  aRootPath = NULL,
TDes *  aDefaultFolder = NULL,
MAknMemorySelectionObserver aObserver = NULL
[static]
 

A static method that launches a memory selection dialog.

See also:
RunL()
static IMPORT_C TBool CAknMemorySelectionDialog::RunDlgLD TMemory aSelectedMemory,
const TDesC &  aTitle,
MAknMemorySelectionObserver aObserver = NULL
[static]
 

A static method that launches a memory selection dialog.

See also:
RunL()
static IMPORT_C TBool CAknMemorySelectionDialog::RunDlgLD TMemory aSelectedMemory,
MAknMemorySelectionObserver aObserver = NULL
[static]
 

A static method that launches a memory selection dialog.

See also:
RunL()
IMPORT_C void CAknMemorySelectionDialog::SetLeftSoftkeyL const TDesC &  aText  ) 
 

Sets the text used for left softkey.

Parameters:
aText  The text used for left softkey.
IMPORT_C void CAknMemorySelectionDialog::SetObserver MAknMemorySelectionObserver aObserver  ) 
 

Sets an observer which is asked if the selected item can be selected.

Parameters:
aObserver  A pointer to an observer.
IMPORT_C void CAknMemorySelectionDialog::SetRightSoftkeyL const TDesC &  aText  ) 
 

Sets the text used for right softkey.

Parameters:
aText  The text used for right softkey.
IMPORT_C void CAknMemorySelectionDialog::SetTitleL const TDesC &  aText  ) 
 

Sets title for the dialog.

Parameters:
aText  Title text.

Field Documentation

CDesCArrayFlat CAknMemorySelectionDialog::iDefaultFolderArray [protected]
 
TCommonDialogType CAknMemorySelectionDialog::iDialogType [protected]
 
TBool CAknMemorySelectionDialog::iDynamicDrivesEnabled [protected]
 
CAknMemorySelectionEventHandler* CAknMemorySelectionDialog::iEventHandler [protected]
 
TInt CAknMemorySelectionDialog::iIncludedMedias [protected]
 
HBufC* CAknMemorySelectionDialog::iLeftSoftkey [protected]
 
CAknMemorySelectionModel* CAknMemorySelectionDialog::iModel [protected]
 
MAknMemorySelectionObserver* CAknMemorySelectionDialog::iObserver [protected]
 
HBufC* CAknMemorySelectionDialog::iRightSoftkey [protected]
 
CDesCArrayFlat CAknMemorySelectionDialog::iRootPathArray [protected]
 
HBufC* CAknMemorySelectionDialog::iTitle [protected]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top