2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
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
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Setting page used to selection target memory.
20 #ifndef C_AKNMEMORYSELECTIONSETTINGPAGE_H
21 #define C_AKNMEMORYSELECTIONSETTINGPAGE_H
24 #include <CAknMemorySelectionDialog.h>
26 class MAknMemorySelectionObserver;
29 * A class that launches a popup setting page for memory selection.
31 * @lib CommonDialogs.lib
34 NONSHARABLE_CLASS(CAknMemorySelectionSettingPage)
35 : public CAknMemorySelectionDialog
40 // Constructors and destructors
43 * Static constructor. Loads default settings.
44 * @return Returns a pointer to an instance of itself.
46 IMPORT_C static CAknMemorySelectionSettingPage* NewL();
50 * @param aResourceId A resource id (MEMORYSELECTIONDIALOG).
51 * @return Returns a pointer to an instance of itself.
53 IMPORT_C static CAknMemorySelectionSettingPage* NewL( TInt aResourceId );
55 IMPORT_C ~CAknMemorySelectionSettingPage();
60 * Executes the memory selection setting page.
62 * @param aSelectedMemory A reference to a memory (TMemory).
63 * If one of the memories is selected, the selected memory is
64 * stored to the parameter.
65 * @return Returns true if user has selected an item and false
66 * if user hits cancel.
68 IMPORT_C TReturnKey ExecuteL( TMemory& aSelectedMemory );
72 * Executes the memory selection setting page.
74 * @param aSelectedMemory A reference to a memory (TMemory).
75 * If one of the memories is selected, the selected memory is
76 * stored to the parameter.
77 * @param aRootPath A pointer to a descriptor where the root path
78 * of the selected memory is stored.
79 * @param aDefaultFolder A pointer to a descriptor where the default folder
80 * of the selected memory is stored.
81 * @return Returns true if user has selected an item and false
82 * if user hits cancel.
84 IMPORT_C TReturnKey ExecuteL(
85 TMemory& aSelectedMemory, TDes* aRootPath, TDes* aDefaultFolder );
88 * Static methods for launching memory selection dialog
89 * Parameters & return value are descibed in method RunL
92 IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory,
93 MAknMemorySelectionObserver* aObserver = NULL );
95 IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory,
97 MAknMemorySelectionObserver* aObserver = NULL );
99 IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory,
101 TDes* aRootPath = NULL, TDes* aDefaultFolder = NULL,
102 MAknMemorySelectionObserver* aObserver = NULL );
106 // Constructors and destructors
108 CAknMemorySelectionSettingPage();
113 * A static method for launching a memory selection setting page.
114 * Creates, constructs, runs and deletes a memory selection dialog with
115 * different parameters.
117 * @param aResourceId An id of a resource.
118 * @param aSelectedMemory A reference to a memory described in ExecuteL.
119 * @param aTitle A title for memory selection dialog.
120 * @param aRootPath A pointer to a descriptor where the root path
121 * of the selected memory is stored.
122 * @param aDefaultFolder A pointer to a descriptor where the default folder
123 * of the selected memory is stored.
124 * @param aObserver An observer which is asked if the selected item
125 * can be selected. Implemented in application.
129 TMemory& aSelectedMemory,
132 TDes* aDefaultFolder,
133 MAknMemorySelectionObserver* aObserver );
137 #endif // C_AKNMEMORYSELECTIONSETTINGPAGE_H