1 caknmemoryselectionsettingpage.h |
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Setting page used to selection target memory. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_AKNMEMORYSELECTIONSETTINGPAGE_H |
|
21 #define C_AKNMEMORYSELECTIONSETTINGPAGE_H |
|
22 |
|
23 |
|
24 #include <CAknMemorySelectionDialog.h> |
|
25 |
|
26 class MAknMemorySelectionObserver; |
|
27 |
|
28 /** |
|
29 * A class that launches a popup setting page for memory selection. |
|
30 * |
|
31 * @lib CommonDialogs.lib |
|
32 * @since S60 1.2 |
|
33 */ |
|
34 NONSHARABLE_CLASS(CAknMemorySelectionSettingPage) |
|
35 : public CAknMemorySelectionDialog |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 // Constructors and destructors |
|
41 |
|
42 /** |
|
43 * Static constructor. Loads default settings. |
|
44 * @return Returns a pointer to an instance of itself. |
|
45 */ |
|
46 IMPORT_C static CAknMemorySelectionSettingPage* NewL(); |
|
47 |
|
48 /** |
|
49 * Static constructor. |
|
50 * @param aResourceId A resource id (MEMORYSELECTIONDIALOG). |
|
51 * @return Returns a pointer to an instance of itself. |
|
52 */ |
|
53 IMPORT_C static CAknMemorySelectionSettingPage* NewL( TInt aResourceId ); |
|
54 |
|
55 IMPORT_C ~CAknMemorySelectionSettingPage(); |
|
56 |
|
57 // New functions |
|
58 |
|
59 /** |
|
60 * Executes the memory selection setting page. |
|
61 * |
|
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. |
|
67 */ |
|
68 IMPORT_C TReturnKey ExecuteL( TMemory& aSelectedMemory ); |
|
69 |
|
70 |
|
71 /** |
|
72 * Executes the memory selection setting page. |
|
73 * |
|
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. |
|
83 */ |
|
84 IMPORT_C TReturnKey ExecuteL( |
|
85 TMemory& aSelectedMemory, TDes* aRootPath, TDes* aDefaultFolder ); |
|
86 |
|
87 /** |
|
88 * Static methods for launching memory selection dialog |
|
89 * Parameters & return value are descibed in method RunL |
|
90 */ |
|
91 |
|
92 IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory, |
|
93 MAknMemorySelectionObserver* aObserver = NULL ); |
|
94 |
|
95 IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory, |
|
96 const TDesC& aTitle, |
|
97 MAknMemorySelectionObserver* aObserver = NULL ); |
|
98 |
|
99 IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory, |
|
100 TInt aResourceId, |
|
101 TDes* aRootPath = NULL, TDes* aDefaultFolder = NULL, |
|
102 MAknMemorySelectionObserver* aObserver = NULL ); |
|
103 |
|
104 private: |
|
105 |
|
106 // Constructors and destructors |
|
107 |
|
108 CAknMemorySelectionSettingPage(); |
|
109 |
|
110 // New functions |
|
111 |
|
112 /** |
|
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. |
|
116 * |
|
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. |
|
126 */ |
|
127 static TBool RunL( |
|
128 TInt aResourceId, |
|
129 TMemory& aSelectedMemory, |
|
130 const TDesC& aTitle, |
|
131 TDes* aRootPath, |
|
132 TDes* aDefaultFolder, |
|
133 MAknMemorySelectionObserver* aObserver ); |
|
134 |
|
135 }; |
|
136 |
|
137 #endif // C_AKNMEMORYSELECTIONSETTINGPAGE_H |