|
1 /* |
|
2 * Copyright (c) 2007-2008 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 "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Delete folder command |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef MMFOLDERCOMMANDDELETE_H |
|
23 #define MMFOLDERCOMMANDDELETE_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <AknProgressDialog.h> // for MProgressDialogCallback |
|
27 #include "mmfoldercommand.h" |
|
28 |
|
29 class CAknWaitDialog; |
|
30 |
|
31 /** |
|
32 * Class representing remove folder operations. |
|
33 * @since S60 v5.0 |
|
34 */ |
|
35 |
|
36 /** |
|
37 * CMmFolderCommandDelete is a class inherits from CMmFolderCommand. |
|
38 * It's responsible for handling command removing folder from MCS. Plugin |
|
39 * supports MMDeleteFolderCommand command. It displays confirmation dialog, |
|
40 * removes item from MCS and displays notification with operation summary. |
|
41 * |
|
42 * @lib mmfolderuiextensionplugin.lib |
|
43 * @since S60 5.0 |
|
44 * @ingroup group_mmfolderuiextensionplugin |
|
45 */ |
|
46 NONSHARABLE_CLASS( CMmFolderCommandDelete ): |
|
47 public CMmFolderCommand, |
|
48 public MProgressDialogCallback |
|
49 { |
|
50 public: |
|
51 |
|
52 /** |
|
53 * Instantiates an object of this type. |
|
54 * @return Instance of the CMmFolderCommandDelete class. |
|
55 */ |
|
56 static CMmFolderCommandDelete* NewL(); |
|
57 |
|
58 /** |
|
59 * Virtual C++ Destructor. |
|
60 */ |
|
61 ~CMmFolderCommandDelete(); |
|
62 |
|
63 protected: |
|
64 /** |
|
65 * Performs add folder operation. |
|
66 * @param aEventParamList Parameters for operations. |
|
67 */ |
|
68 void ExecuteActionL( CLiwGenericParamList* aEventParamList ); |
|
69 |
|
70 /** |
|
71 * Handles notifications caused by an asynchronous Execute*CmdL call |
|
72 * or an event. |
|
73 * @param aCmdId The service command associated to the event. |
|
74 * @param aEventId Occured event, see LiwCommon.hrh. |
|
75 * @param aEventParamList Event parameters, if any, as defined per |
|
76 * each event. |
|
77 * @param aInParamList Input parameters, if any, given in the |
|
78 * related HandleCommmandL. |
|
79 * @return Error code for the callback. |
|
80 */ |
|
81 TInt HandleNotifyL( TInt aCmdId, TInt aEventId, |
|
82 CLiwGenericParamList& aEventParamList, |
|
83 const CLiwGenericParamList& aInParamList ); |
|
84 |
|
85 /** |
|
86 * Default C++ constructor. |
|
87 */ |
|
88 CMmFolderCommandDelete(); |
|
89 |
|
90 /** |
|
91 * Second phase Symbian constructor. |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 /** |
|
96 * Displays confirmation dialog. |
|
97 * @param aFolderName Name of the folder. |
|
98 */ |
|
99 TBool DeleteQueryL( const TDesC& aFolderName ); |
|
100 |
|
101 /** |
|
102 * Moves focus before delete. |
|
103 */ |
|
104 void MoveFocusBeforeDeleteL(); |
|
105 |
|
106 /** |
|
107 * Starts wait dialog with progress bar. |
|
108 * @param aLabel Wait dialog content. |
|
109 */ |
|
110 void StartWaitDialogL( const TDesC& aLabel ); |
|
111 |
|
112 /** |
|
113 * Stops wait dialog with progress bar. |
|
114 */ |
|
115 void StopWaitDialogL(); |
|
116 |
|
117 /** |
|
118 * Removes item from mcs. |
|
119 * @param aId Id in MCS. |
|
120 * @param aFolderName Name of the folder. |
|
121 */ |
|
122 void DeleteItemFromMcsL( TInt aId, const TDesC& aFolderName ); |
|
123 |
|
124 /** |
|
125 * Starts uninstallation process. |
|
126 * @param aId Id in MCS. |
|
127 */ |
|
128 void UninstallL( TInt aId ); |
|
129 |
|
130 /** |
|
131 * Gets application package UID. |
|
132 * @param aUid UID of the application. |
|
133 * @return Application package UID. |
|
134 */ |
|
135 TUid GetSisPackageUidL( TUid aUid ); |
|
136 |
|
137 /** |
|
138 * Checks wheather item is a midlet. |
|
139 * @param aUid UID of the item. |
|
140 * @return ETrue if item is a midlet, otherwise EFalse. |
|
141 */ |
|
142 TBool IsMidletL( TUid aUid ); |
|
143 |
|
144 |
|
145 private: |
|
146 |
|
147 /** |
|
148 * Callback method from MProgressDialogCallback interface. |
|
149 * Gets called when a dialog is dismissed. |
|
150 * @param aButtonId Id of the pushed button. |
|
151 */ |
|
152 void DialogDismissedL( TInt aButtonId ); |
|
153 |
|
154 protected: |
|
155 |
|
156 /** |
|
157 * Own. |
|
158 * Pointer to wait dialog. |
|
159 */ |
|
160 CAknWaitDialog* iWaitDialog; |
|
161 }; |
|
162 |
|
163 |
|
164 /** |
|
165 * Class representing remove suite operations. |
|
166 * @since S60 v5.0 |
|
167 */ |
|
168 |
|
169 /** |
|
170 * CMmFolderDeleteSuite is a class deriving from CMmFolderCommandDelete. |
|
171 * It's responsible for handling command removing a suite from MCS. |
|
172 * |
|
173 * @since S60 5.0 |
|
174 * @ingroup group_mmfolderuiextensionplugin |
|
175 */ |
|
176 NONSHARABLE_CLASS( CMmFolderDeleteSuite ) : public CMmFolderCommandDelete |
|
177 { |
|
178 public: |
|
179 |
|
180 /** |
|
181 * Virtual C++ Destructor. |
|
182 */ |
|
183 ~CMmFolderDeleteSuite(); |
|
184 |
|
185 /** |
|
186 * Instantiates an object of this type. |
|
187 * @return Instance of the CMmFolderDeleteSuite class. |
|
188 */ |
|
189 static CMmFolderDeleteSuite* NewL(); |
|
190 |
|
191 private: |
|
192 |
|
193 /** |
|
194 * Performs add folder operation. |
|
195 * @param aEventParamList Parameters for operations. |
|
196 */ |
|
197 void ExecuteActionL( CLiwGenericParamList* aEventParamList ); |
|
198 |
|
199 /** |
|
200 * Default C++ constructor. |
|
201 */ |
|
202 CMmFolderDeleteSuite(); |
|
203 |
|
204 /** |
|
205 * Second phase Symbian constructor. |
|
206 */ |
|
207 void ConstructL(); |
|
208 |
|
209 }; |
|
210 |
|
211 |
|
212 /** |
|
213 * Class representing remove application operations. |
|
214 * @since S60 v5.0 |
|
215 */ |
|
216 |
|
217 /** |
|
218 * CMmFolderDeleteApp is a class deriving from CMmFolderCommandDelete. |
|
219 * It's responsible for handling command removing an application from MCS. |
|
220 * |
|
221 * @since S60 5.0 |
|
222 * @ingroup group_mmfolderuiextensionplugin |
|
223 */ |
|
224 NONSHARABLE_CLASS( CMmFolderDeleteApp ) : public CMmFolderCommandDelete |
|
225 { |
|
226 public: |
|
227 |
|
228 /** |
|
229 * Instantiates an object of this type. |
|
230 * @return Instance of the CMmFolderDeleteApp class. |
|
231 */ |
|
232 static CMmFolderDeleteApp* NewL(); |
|
233 |
|
234 /** |
|
235 * Virtual C++ Destructor. |
|
236 */ |
|
237 ~CMmFolderDeleteApp(); |
|
238 |
|
239 |
|
240 private: |
|
241 |
|
242 /** |
|
243 * Performs add folder operation. |
|
244 * @param aEventParamList Parameters for operations. |
|
245 */ |
|
246 void ExecuteActionL( CLiwGenericParamList* aEventParamList ); |
|
247 |
|
248 /** |
|
249 * Default C++ constructor. |
|
250 */ |
|
251 CMmFolderDeleteApp(); |
|
252 |
|
253 /** |
|
254 * Second phase Symbian constructor. |
|
255 */ |
|
256 void ConstructL(); |
|
257 |
|
258 }; |
|
259 |
|
260 |
|
261 #endif /*MMFOLDERCOMMANDDELETE_H*/ |
|
262 |
|
263 // End of file |