author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 21:55:16 +0300 | |
branch | RCL_3 |
changeset 31 | 8baec10861af |
parent 30 | a5a39a295112 |
permissions | -rw-r--r-- |
30 | 1 |
/* |
2 |
* Copyright (c) 2009 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef __MENUSRVAPPSCANNER_H__ |
|
19 |
#define __MENUSRVAPPSCANNER_H__ |
|
20 |
||
21 |
#include <e32base.h> |
|
22 |
#include <apgcli.h> |
|
23 |
#include <apgnotif.h> |
|
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
24 |
#include <driveinfo.h> |
30 | 25 |
#include <cenrepnotifyhandler.h> |
26 |
#include "menuengoperation.h" |
|
27 |
#include "mcssatnotifier.h" |
|
28 |
#include "menuengfilter.h" |
|
29 |
#include "mcsfreespaceobserver.h" |
|
30 |
#include "mcsmenuitem.h" |
|
31 |
#include "mcsmenunotifier.h" |
|
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
32 |
#include "mcsinstallnotifier.h" |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
33 |
|
30 | 34 |
|
35 |
// FORWARD DECLARATION |
|
36 |
||
37 |
class CMenuEng; |
|
38 |
class CMenuSrvAppAttributes; |
|
39 |
class CMenuSrvMmcHistory; |
|
40 |
class CRepository; |
|
41 |
class CCenRepNotifyHandler; |
|
42 |
class CMenuSrvEngUtils; |
|
43 |
||
44 |
/** |
|
45 |
* Application scanner. |
|
46 |
* Using AppArc application information, keeps menu application |
|
47 |
* items ("menu:application") up-to-date. |
|
48 |
* |
|
49 |
* Operation is asynchronous (because AppArc startup is asynchronous): |
|
50 |
* 1. ConstructL(): invokes iApaLsSession to build app list (async). |
|
51 |
* 2. RunL(): App list is complete, this object schedules itself to Engine. |
|
52 |
* 3. RunMenuEngOperationL(): The operation is executed by the engine. |
|
53 |
* 4. HandleAppListEvent(): change in app list, go back to step 2. |
|
54 |
* |
|
55 |
* App scanning does the following: |
|
56 |
* - Applications present in the system but not appearing in the menu are added |
|
57 |
* to the appropriate folder. |
|
58 |
* - Java apps should appear / disappear. TODO not impemented yet! |
|
59 |
* - Hide hidden applications, show non-hidden applications (flag "hidden"). |
|
60 |
* - Hide / show MMC-related items, according to whether MMC is present or not |
|
61 |
* (flag "missing"). Keep an MMC history, purge old MMC-based menu items |
|
62 |
* (== missing menu items whose MMC card has not been seen for long). |
|
63 |
* - Observing AppArc (and MMC, and Java, etc etc) to keep the menu data up |
|
64 |
* to date continuously. |
|
65 |
*/ |
|
66 |
NONSHARABLE_CLASS( CMenuSrvAppScanner ) |
|
67 |
: public CActive, public MMenuEngOperation, public MApaAppListServObserver, |
|
68 |
public MCenRepNotifyHandlerCallback, public MMcsSATNotifierCallback, |
|
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
69 |
MMcsFreeSpaceObserver, MMcsInstallListener |
30 | 70 |
{ |
71 |
||
72 |
public: // Constructor |
|
73 |
||
74 |
/** |
|
75 |
* Destructor. |
|
76 |
*/ |
|
77 |
virtual ~CMenuSrvAppScanner(); |
|
78 |
||
79 |
/** |
|
80 |
* Two-phased constructor. |
|
81 |
* @param aEng Engine. |
|
82 |
*/ |
|
83 |
static CMenuSrvAppScanner* NewL( |
|
84 |
CMenuEng& aEng, |
|
85 |
CMenuSrvEngUtils& aSrvEngUtils ); |
|
86 |
||
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
87 |
public: |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
88 |
/** |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
89 |
* Schedule appscanner run. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
90 |
* Self complete active object. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
91 |
*/ |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
92 |
void ScheduleScan(); |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
93 |
|
30 | 94 |
private: // Constructors and destructor |
95 |
||
96 |
/** |
|
97 |
* Constructor. |
|
98 |
* @param aEng Engine. |
|
99 |
*/ |
|
100 |
CMenuSrvAppScanner( CMenuEng& aEng, CMenuSrvEngUtils& aSrvEngUtils ); |
|
101 |
||
102 |
/** |
|
103 |
* Second phased constructor. |
|
104 |
*/ |
|
105 |
void ConstructL(); |
|
106 |
||
107 |
private: // from CActive |
|
108 |
||
109 |
/** |
|
110 |
* Request completed, schedule engine operation. |
|
111 |
*/ |
|
112 |
void RunL(); |
|
113 |
||
114 |
/** |
|
115 |
* Cancel request. |
|
116 |
*/ |
|
117 |
void DoCancel(); |
|
118 |
||
119 |
/** |
|
120 |
* Error handling: ignore error. |
|
121 |
* @param aErr Error code. |
|
122 |
*/ |
|
123 |
TInt RunError( TInt aError ); |
|
124 |
||
125 |
private: // from MMcsFreeSpaceObserver |
|
126 |
/** |
|
127 |
* Handle Free Space Event. |
|
128 |
*/ |
|
129 |
void HandleFreeSpaceEventL(); |
|
130 |
||
131 |
private: // from MMenuEngOperation |
|
132 |
||
133 |
/** |
|
134 |
* Execute engine operation: |
|
135 |
* Do the application scan and update menu accordingly. |
|
136 |
*/ |
|
137 |
void RunMenuEngOperationL(); |
|
138 |
||
139 |
/** |
|
140 |
* Error handling: ignore error. |
|
141 |
* @param aErr Error code. |
|
142 |
*/ |
|
143 |
void CompletedMenuEngOperation( TInt aErr ); |
|
144 |
||
145 |
private: // from MApaAppListServObserver |
|
146 |
||
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
147 |
/** |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
148 |
* Application list event. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
149 |
* @param aEvent only one type event exists. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
150 |
*/ |
30 | 151 |
void HandleAppListEvent( TInt aEvent ); |
152 |
||
153 |
private: // from MCenRepNotifyHandlerCallback |
|
154 |
||
155 |
/** |
|
156 |
* Called if one of CR keys has changed |
|
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
157 |
* @param aKey Id of the key that has changed. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
158 |
* @param aNewValue The new value of the key. |
30 | 159 |
*/ |
160 |
void HandleNotifyString( TUint32 aKey, const TDesC16& aNewValue ); |
|
161 |
||
162 |
private: // from MMcsSATNotifierCallback |
|
163 |
||
164 |
/** |
|
165 |
* Inherited from MNotifierMMcsSATNotifierCallbackCallback |
|
166 |
* |
|
167 |
* @since Series 60 3.1 |
|
168 |
* @return void |
|
169 |
*/ |
|
170 |
void SATChangeL(); |
|
171 |
||
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
172 |
private: // from MMcsInstallListener |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
173 |
|
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
174 |
/** |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
175 |
* Called application is installed. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
176 |
* @param aUid uid of an application. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
177 |
* @param aOperation operation type. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
178 |
*/ |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
179 |
void HandleInstallNotifyL( TUid aUid, |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
180 |
CMcsInstallNotifier::TNotificationType aNotificationType ); |
30 | 181 |
|
182 |
private: // new methods |
|
183 |
||
184 |
/** |
|
185 |
*/ |
|
186 |
void HandleLockDeleteFlagUpdateL( |
|
187 |
const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ); |
|
188 |
||
189 |
/** |
|
190 |
* Updates application's missing attribute. |
|
191 |
* Add new menu item referring to this application. |
|
192 |
* @param aItem menu item. |
|
193 |
*/ |
|
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
194 |
void HandleMissingFlagUpdateL( |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
195 |
const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ); |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
196 |
|
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
197 |
/** |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
198 |
* Notifies engine abaut application installation. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
199 |
*/ |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
200 |
void InstallationNotifyL(); |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
201 |
|
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
202 |
/** |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
203 |
* Removes uid from installed packages array. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
204 |
* @param aUid application uid. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
205 |
*/ |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
206 |
void RemoveFromInstalledPackages( TUid aUid ); |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
207 |
|
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
208 |
/** |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
209 |
* Removes uid from installed packages array. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
210 |
* @param aUid application uid. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
211 |
* @param aId Item ID. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
212 |
* @param aEvent event for engine to append. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
213 |
*/ |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
214 |
CMenuEngObject& ModifiableObjectL( TUid aUid, TInt aId, |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
215 |
TInt aEvent = RMenuNotifier::EItemAttributeChanged ); |
30 | 216 |
|
217 |
/** |
|
218 |
* Updates hidden flag. |
|
219 |
* @param aItem menu item. |
|
220 |
* @param aUid Application's uid. |
|
221 |
* @param aApaItemHidden Application's hidden status from ApaLsSession. |
|
222 |
*/ |
|
223 |
void HandleHiddenFlagUpdateL( |
|
224 |
const TMenuItem & aItem, |
|
225 |
const CMenuSrvAppAttributes& aApaItem ); |
|
226 |
/** |
|
227 |
* Updates native attribute. |
|
228 |
* @param aItem menu item. |
|
229 |
* @param aUid Application's uid. |
|
230 |
*/ |
|
231 |
void HandleNativeAttrUpdateL( |
|
232 |
const TMenuItem& aItem, |
|
233 |
const CMenuSrvAppAttributes& aApaItem ); |
|
234 |
||
235 |
/** |
|
236 |
* Updates mmc attribute. |
|
237 |
* @param aItem menu item. |
|
238 |
* @param aUid Application's uid. |
|
239 |
* @param aMmcId MMC ID of currently inserted MMC, or 0. |
|
240 |
*/ |
|
241 |
void HandleMmcAttrUpdateL( |
|
242 |
const TMenuItem& aItem, |
|
243 |
const CMenuSrvAppAttributes& aApaItem, |
|
244 |
TUint aMmcId ); |
|
245 |
||
246 |
/** |
|
247 |
*/ |
|
248 |
void GetCrItemsL( RPointerArray<CMenuSrvAppAttributes>& aArray ); |
|
249 |
||
250 |
||
251 |
/** |
|
252 |
*/ |
|
253 |
void ParseUidsL( const TDesC& aHiddenApplications, |
|
254 |
RPointerArray<CMenuSrvAppAttributes>& aArray ); |
|
255 |
||
256 |
/** |
|
257 |
*/ |
|
258 |
void SetHidden( const TDesC& aHiddenAppUid, |
|
259 |
RPointerArray<CMenuSrvAppAttributes>& aArray ); |
|
260 |
||
261 |
/** |
|
262 |
*/ |
|
263 |
void GetMcsAppItemsL( RArray<TMenuItem>& aArray); |
|
264 |
||
265 |
/** |
|
266 |
*/ |
|
267 |
void GetMcsAppItemsL( TBool aLegacy, const TUint aUid, |
|
268 |
RArray<TMenuItem>& aArray); |
|
269 |
||
270 |
||
271 |
/** |
|
272 |
* New application is found, no menu item refers to it. |
|
273 |
* Add new menu item referring to this application. |
|
274 |
* @param aUid Application capability. |
|
275 |
* @param aCurrentMmcId MMC ID of currently inserted MMC, or 0. |
|
276 |
*/ |
|
277 |
void AddAppItemL( |
|
278 |
const CMenuSrvAppAttributes& aApaItem, |
|
279 |
TUint aCurrentMmcId ); |
|
280 |
||
281 |
TInt CreateInstallFolderL( const CMenuSrvAppAttributes& aApaItem ); |
|
282 |
||
283 |
||
284 |
/** |
|
285 |
* Find menu folder which has the specified "applicationgroup_name" |
|
286 |
* attribute. If no such folder exists, create. |
|
287 |
* @param aAppGroupName value of the "applicationgroup_name" attribute |
|
288 |
* @param aFolderId Folder ID. |
|
289 |
*/ |
|
290 |
void AppGroupFolderL( const TDesC& aAppGroupName, TInt& aFolderId ); |
|
291 |
||
292 |
/** |
|
293 |
* Find the default folder (folder having attribute 'default="1"'). |
|
294 |
* If not found, return 0. |
|
295 |
* @param aFolderId Dedault folder or 0. |
|
296 |
*/ |
|
297 |
void DefaultFolderL( TInt& aFolderId ); |
|
298 |
||
299 |
/** |
|
300 |
* Make sure that folder is writable (remove "lock_moveinto"). |
|
301 |
* @param aFolder Folder id. |
|
302 |
*/ |
|
303 |
void EnsureFolderWritableL( TInt aFolder ); |
|
304 |
||
305 |
/** |
|
306 |
* Handle items are in the menu but no corresponding app is present: |
|
307 |
* - Items that are on a recently used MMC are get "missing" flag but kept. |
|
308 |
* - Items that are not on MMC or the MMC is not recently used, are |
|
309 |
* removed form the menu. |
|
310 |
* @param aItems Missing items. |
|
311 |
*/ |
|
312 |
void HandleMissingItemsL( const RArray<TMenuItem>& aItems ); |
|
313 |
||
314 |
/** |
|
315 |
* Returns proper flag to be set for missing or hidden item. |
|
316 |
* @param aItem menu item. |
|
317 |
* @return item proper flags for hidding. |
|
318 |
*/ |
|
319 |
TMenuItem::TFlags GetProperFlagL( const TMenuItem& aItem ); |
|
320 |
||
321 |
/** |
|
322 |
* Updates objects flags to aFlagPresent if needed. |
|
323 |
* @param aFlagValue value for flag. |
|
324 |
* @param aItem menu item. |
|
325 |
* @param aFlag menu item's flag. |
|
326 |
* @param aEvent menu item's event for engine. |
|
327 |
*/ |
|
328 |
void SetObjectFlagsL( |
|
329 |
TBool aFlagValue, |
|
330 |
const TMenuItem& aItem, |
|
331 |
const TMenuItem::TFlags& aFlag, |
|
332 |
const RMenuNotifier::TEvent& aEvent = RMenuNotifier::EItemAttributeChanged ); |
|
333 |
||
334 |
/** |
|
335 |
* Check currently inserted MMC card, update and save MMC history. |
|
336 |
* @return Current MMC id, or 0 if no MMC is inserted. |
|
337 |
*/ |
|
338 |
TUint UpdateMmcHistoryL(); |
|
339 |
||
340 |
/** |
|
341 |
* Get current MMC id. 0 if no MMC is inserted, or in case of any errors. |
|
342 |
* @return Current MMC id, or 0. |
|
343 |
*/ |
|
344 |
TUint CurrentMmcId() const; |
|
345 |
||
346 |
/** |
|
347 |
* Check if file is on given default drive type. |
|
348 |
* @param aFileName File name. |
|
349 |
* @return ETrue if aFileName is on given default drive type. |
|
350 |
*/ |
|
351 |
TBool IsFileInDrive( |
|
352 |
const TDesC& aFileName, |
|
353 |
const DriveInfo::TDefaultDrives& aDefaultDrive ) const; |
|
354 |
||
355 |
/** |
|
356 |
* Check if application is installed on given drive type. |
|
357 |
* @param aUid app uid. |
|
358 |
* @param aDefaultDrive drive type. |
|
359 |
* @return ETrue if app is installed on given drive type. |
|
360 |
*/ |
|
361 |
TBool IsAppInDrive( |
|
362 |
const CMenuSrvAppAttributes& aApaItem, |
|
363 |
const DriveInfo::TDefaultDrives& aDefaultDrive ) const; |
|
364 |
||
365 |
/** |
|
366 |
* Check if application is installed on MMC. |
|
367 |
* @param aUid app uid. |
|
368 |
* @return ETrue if app is installed on MMC. |
|
369 |
*/ |
|
370 |
TBool IsInMmc( const CMenuSrvAppAttributes& aApaItem ) const; |
|
371 |
||
372 |
/** |
|
373 |
* Check if application is installed on mass storage. |
|
374 |
* @param aUid app uid. |
|
375 |
* @return ETrue if app is installed on mass storage. |
|
376 |
*/ |
|
377 |
TBool IsInMassStorage( const CMenuSrvAppAttributes& aApaItem ) const; |
|
378 |
||
379 |
/** |
|
380 |
* Check if application is installed on ROM. |
|
381 |
* @param aUid app uid. |
|
382 |
* @return ETrue if app is installed on ROM. |
|
383 |
*/ |
|
384 |
TBool IsInRomL( const CMenuSrvAppAttributes& aApaItem ) const; |
|
385 |
||
386 |
/** |
|
387 |
* Check if drive's status is EDriveInUse. |
|
388 |
* @param aDefaultDrive default drive type. |
|
389 |
* @return ETrue if drive is in use. |
|
390 |
*/ |
|
391 |
TBool IsDriveInUse( |
|
392 |
const DriveInfo::TDefaultDrives& aDefaultDrive ); |
|
393 |
||
394 |
/** |
|
395 |
TODO |
|
396 |
*/ |
|
397 |
void HideItemIfPresentL( TInt aFolder, TInt aId, const TDesC& aUid, TBool aWasHidden ); |
|
398 |
||
399 |
/** |
|
400 |
TODO |
|
401 |
*/ |
|
402 |
void GetHiddenFlagAndUidL( TInt aId, TBool& aHidden, TPtrC& aUidStr ); |
|
403 |
||
404 |
/** |
|
405 |
TODO |
|
406 |
*/ |
|
407 |
void SetHiddenFlagL( TInt aId, TBool aWasHidden, TBool aHide ); |
|
408 |
||
409 |
/** |
|
410 |
TODO |
|
411 |
*/ |
|
412 |
void ValidateLinkUidL( TInt aFolder, TInt aId, const TDesC& aUidStr ); |
|
413 |
||
414 |
/** |
|
415 |
TODO |
|
416 |
*/ |
|
417 |
void UpdateLinkL( TInt aId, TBool aExists, TBool aShowItem, TBool aMissingItem ); |
|
418 |
||
419 |
/** |
|
420 |
TODO |
|
421 |
*/ |
|
422 |
void ValidateLinkRefIdL( TInt aId, const TDesC& refIdStr ); |
|
423 |
||
424 |
/** |
|
425 |
TODO |
|
426 |
*/ |
|
427 |
void ValidateLinkL( TInt aFolder, TInt aId ); |
|
428 |
||
429 |
/** |
|
430 |
TODO |
|
431 |
*/ |
|
432 |
void UpdateApplicationItemL( |
|
433 |
RArray<TMenuItem>& aMcsItems, |
|
434 |
const CMenuSrvAppAttributes& aApaItem, |
|
435 |
TUint aMmcId, |
|
436 |
TBool isLegacy ); |
|
437 |
||
438 |
/** |
|
439 |
TODO |
|
440 |
*/ |
|
441 |
void UpdateApplicationItemsL(); |
|
442 |
||
443 |
/** |
|
444 |
TODO |
|
445 |
*/ |
|
446 |
void UpdateApplicationWithHideIfInstalledItemsL(); |
|
447 |
||
448 |
/** |
|
449 |
TODO |
|
450 |
*/ |
|
451 |
void UpdateLinkItemsL(); |
|
452 |
||
453 |
||
454 |
private: // data |
|
455 |
||
456 |
CMenuEng& iEng; ///< Engine. |
|
457 |
CMenuSrvEngUtils& iSrvEngUtils; ///< Server engine utils. |
|
458 |
CApaAppListNotifier* iNotifier; ///< Change notifier. Own. |
|
459 |
CMenuSrvMmcHistory* iMmcHistory; ///< MMC history. Own. |
|
460 |
RFs iFs; ///< File Server Session. Own. |
|
461 |
||
462 |
/* |
|
463 |
* Sat change notifier. Own |
|
464 |
*/ |
|
465 |
CMcsSatNotifier* iMcsSatNotifier; |
|
466 |
||
467 |
/* |
|
468 |
* Central repository session |
|
469 |
*/ |
|
470 |
CRepository* iCenRepSession; |
|
471 |
||
472 |
/* |
|
473 |
* Central repository change handler for Hidden Apps |
|
474 |
*/ |
|
475 |
CCenRepNotifyHandler* iCenRepNotifyHandlerHiddenApps; |
|
476 |
||
477 |
/* |
|
478 |
*Central repository change handler for Control Panel Hidden Apps |
|
479 |
*/ |
|
480 |
CCenRepNotifyHandler* iCenRepNotifyHandlerCPHiddenApps; |
|
481 |
||
482 |
/* |
|
483 |
*Central repository change handler for Control Panel Hidden Folders |
|
484 |
*/ |
|
485 |
CCenRepNotifyHandler* iCenRepNotifyHandlerCPHiddenFolders; |
|
486 |
||
487 |
/* |
|
488 |
* Free space observer. Own. |
|
489 |
*/ |
|
490 |
CMcsFreeSpaceObserver* iFreeSpaceObserver; |
|
491 |
||
492 |
TBool iOpStatus; |
|
31
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
493 |
|
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
494 |
RArray<TUid> iInstalledPackages; ///< Own. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
495 |
|
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
496 |
CMcsInstallNotifier* iSisInstallNotifier; ///< Native app notifier. Own. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
497 |
CMcsInstallNotifier* iJavaInstallNotifier; ///< Java app notifier. Own. |
8baec10861af
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
498 |
|
30 | 499 |
}; |
500 |
||
501 |
#endif // __MENUSRVAPPSCANNER_H__ |