28 |
28 |
29 class CCaSrvMmcHistory; |
29 class CCaSrvMmcHistory; |
30 class CCaInnerEntry; |
30 class CCaInnerEntry; |
31 class CCaStorageProxy; |
31 class CCaStorageProxy; |
32 class CCaSrvEngUtils; |
32 class CCaSrvEngUtils; |
33 namespace Swi |
33 |
34 { |
|
35 class RSisRegistryEntry; |
|
36 } |
|
37 |
34 |
38 /** |
35 /** |
39 * Application scanner. |
36 * Application scanner. |
40 * Using AppArc application information, keeps menu application |
37 * Using AppArc application information, keeps menu application |
41 * items up-to-date. |
38 * items up-to-date. |
68 virtual ~CCaSrvAppScanner(); |
65 virtual ~CCaSrvAppScanner(); |
69 |
66 |
70 /** |
67 /** |
71 * Two-phased constructor. |
68 * Two-phased constructor. |
72 * @param aCaStorageProxy storage. |
69 * @param aCaStorageProxy storage. |
|
70 * @param aSoftwareRegistry software component registry. |
73 * @param aUtils storage utils. |
71 * @param aUtils storage utils. |
74 */ |
72 */ |
75 static CCaSrvAppScanner* NewL( CCaStorageProxy& aCaStorageProxy, |
73 static CCaSrvAppScanner* NewL( CCaStorageProxy& aCaStorageProxy, |
|
74 Usif::RSoftwareComponentRegistry& aSoftwareRegistry, |
76 CCaSrvEngUtils& aUtils ); |
75 CCaSrvEngUtils& aUtils ); |
77 |
76 |
78 private: |
77 private: |
79 // Constructors and destructor |
78 // Constructors and destructor |
80 |
79 |
81 /** |
80 /** |
82 * Constructor. |
81 * Constructor. |
83 * @param aCaStorageProxy storage. |
82 * @param aCaStorageProxy storage. |
|
83 * @param aSoftwareRegistry software component registry. |
84 * @param aUtils storage utils. |
84 * @param aUtils storage utils. |
85 */ |
85 */ |
86 CCaSrvAppScanner( CCaStorageProxy& aCaStorageProxy, |
86 CCaSrvAppScanner( CCaStorageProxy& aCaStorageProxy, |
|
87 Usif::RSoftwareComponentRegistry& aSoftwareRegistry, |
87 CCaSrvEngUtils& aUtils ); |
88 CCaSrvEngUtils& aUtils ); |
88 |
89 |
89 /** |
90 /** |
90 * Second phased constructor. |
91 * Second phased constructor. |
91 */ |
92 */ |
159 void RemoveEntryFromDownloadedL( TInt aEntryId ); |
160 void RemoveEntryFromDownloadedL( TInt aEntryId ); |
160 |
161 |
161 /** |
162 /** |
162 * Updates application's removable and visible flags. |
163 * Updates application's removable and visible flags. |
163 * @param aItem menu item. |
164 * @param aItem menu item. |
|
165 * @param aMmcId MMC ID of currently inserted MMC, or 0. |
164 * @return ETrue if flags were updated. |
166 * @return ETrue if flags were updated. |
165 */ |
167 */ |
166 TBool HandleRemovableVisibleFlagsUpdateL( CCaInnerEntry* aItem ); |
168 TBool HandleRemovableFlagAndMmcAttrUpdateL( CCaInnerEntry* aItem, TUint aMmcId ); |
167 |
169 |
168 /** |
170 /** |
169 * Removes application unninstall flag. |
171 * Removes application unninstall flag. |
170 * @param aItem menu item. |
172 * @param aItem menu item. |
171 * @return ETrue if flags were updated. |
173 * @return ETrue if flags were updated. |
175 /** |
177 /** |
176 * Updates application's missing and visible flags. |
178 * Updates application's missing and visible flags. |
177 * @param aItem menu item. |
179 * @param aItem menu item. |
178 * @return ETrue if flags were updated. |
180 * @return ETrue if flags were updated. |
179 */ |
181 */ |
180 TBool HandleMissingVisibleFlagsUpdate( CCaInnerEntry* aItem ); |
182 TBool HandleMissingFlagsUpdate( CCaInnerEntry* aItem ); |
181 |
183 |
182 /** |
184 /** |
183 * Updates visible flag. |
185 * Updates visible flag. |
184 * @param aItem menu item. |
186 * @param aItem menu item. |
185 * @return ETrue if visible flag was updated. |
187 * @return ETrue if visible flag was updated. |
197 * Updates mmc attribute. |
199 * Updates mmc attribute. |
198 * @param aItem menu item. |
200 * @param aItem menu item. |
199 * @param aMmcId MMC ID of currently inserted MMC, or 0. |
201 * @param aMmcId MMC ID of currently inserted MMC, or 0. |
200 * @return ETrue if mmc attribute was updated. |
202 * @return ETrue if mmc attribute was updated. |
201 */ |
203 */ |
202 TBool HandleMmcAttrUpdateL( CCaInnerEntry* aItem, TUint aMmcId ); |
204 TBool HandleMmcAttrUpdateL( const Usif::CComponentEntry* aEntry, |
203 |
205 CCaInnerEntry* aItem, TUint aMmcId ); |
204 /** |
|
205 * Check if application is in rom. |
|
206 * Add new menu item referring to this application. |
|
207 * @return ETrue if app is in rom. |
|
208 */ |
|
209 TBool IsInRomL( TInt aUid ); |
|
210 |
206 |
211 /** |
207 /** |
212 * Get applications from AppArc. |
208 * Get applications from AppArc. |
213 * @param aArray RArray with applications' uids. |
209 * @param aArray RArray with applications' uids. |
214 */ |
210 */ |
260 * @return added item id |
256 * @return added item id |
261 */ |
257 */ |
262 TInt AddAppEntryL( TUint aUid, TUint aCurrentMmcId ); |
258 TInt AddAppEntryL( TUint aUid, TUint aCurrentMmcId ); |
263 |
259 |
264 /** |
260 /** |
|
261 * Set CWRT ettributes to entry. |
|
262 * @param aEntry CCaInnerEntry with application. |
|
263 * @return ETrue if app info was updatedd |
|
264 */ |
|
265 TBool SetCWRTAppL( CCaInnerEntry* aEntry ); |
|
266 |
|
267 /** |
|
268 * Set Java attributes to entry. |
|
269 * @param aEntry CCaInnerEntry with application. |
|
270 * @return ETrue if app info was updatedd |
|
271 */ |
|
272 TBool SetJavaAppL( CCaInnerEntry* aEntry ); |
|
273 |
|
274 /** |
|
275 * Set information from TApaAppInfo to entry. |
|
276 * @param aEntry CCaInnerEntry with application. |
|
277 * @param info application informations from AppArc. |
|
278 * @return ETrue if app info was updatedd |
|
279 */ |
|
280 TBool SetAppCaptionL( CCaInnerEntry* aEntry, TApaAppInfo* info ); |
|
281 |
|
282 /** |
|
283 * Gets component id from entry. |
|
284 * @param aEntry CCaInnerEntry with application. |
|
285 * @return component id |
|
286 */ |
|
287 TInt GetComponentIdFromEntryL( CCaInnerEntry* aEntry ); |
|
288 |
|
289 /** |
|
290 * Sets new attribute value. |
|
291 * @param aEntry CCaInnerEntry with application. |
|
292 * @param aKey attribute name. |
|
293 * @param aValue attribute value. |
|
294 * @return ETrue if attribute was updated or added |
|
295 */ |
|
296 TBool AddAttributeL( |
|
297 CCaInnerEntry* aEntry, |
|
298 const TDesC& aKey, |
|
299 const TDesC& aValue ); |
|
300 |
|
301 /** |
|
302 * Removes attribute from entry. |
|
303 * @param aEntry CCaInnerEntry with application. |
|
304 * @param aKey attribute name. |
|
305 * @return ETrue if attribute was removed |
|
306 */ |
|
307 TBool RemoveAttributeL( CCaInnerEntry* aEntry, const TDesC& aKey ); |
|
308 |
|
309 /** |
265 * Set information from TApaAppInfo to entry. |
310 * Set information from TApaAppInfo to entry. |
266 * @param aEntry CCaInnerEntry with application. |
311 * @param aEntry CCaInnerEntry with application. |
267 * @return ETrue if app info was updatedd |
312 * @return ETrue if app info was updatedd |
268 */ |
313 */ |
269 TBool SetApaAppInfoL( CCaInnerEntry* aEntry ); |
314 TBool SetApaAppInfoL( CCaInnerEntry* aEntry ); |
282 * @param aEntry entry. |
327 * @param aEntry entry. |
283 */ |
328 */ |
284 void SetMissingFlagL( CCaInnerEntry* aEntry ); |
329 void SetMissingFlagL( CCaInnerEntry* aEntry ); |
285 |
330 |
286 /** |
331 /** |
287 * Clear "visible" flag (and also "missing" and "used"). |
332 * Clear all flags. |
288 * @param aEntry entry. |
333 * @param aEntry entry. |
289 */ |
334 */ |
290 void ClearVisibleFlagL( CCaInnerEntry* aEntry ); |
335 void ClearAllFlagsL( CCaInnerEntry* aEntry ); |
291 |
336 |
292 /** |
337 /** |
293 * Check currently inserted MMC card, update and save MMC history. |
338 * Check currently inserted MMC card, update and save MMC history. |
294 * @return Current MMC id, or 0 if no MMC is inserted. |
339 * @return Current MMC id, or 0 if no MMC is inserted. |
295 */ |
340 */ |
298 /** |
343 /** |
299 * Get current MMC id. 0 if no MMC is inserted, or in case of any errors. |
344 * Get current MMC id. 0 if no MMC is inserted, or in case of any errors. |
300 * @return Current MMC id or 0. |
345 * @return Current MMC id or 0. |
301 */ |
346 */ |
302 TUint CurrentMmcId() const; |
347 TUint CurrentMmcId() const; |
303 |
348 |
304 /** |
349 /** |
305 * Check if file is on a given default drive type. |
350 * Check if drive letter is on a given default drive type. |
306 * @param aFileName File name. |
351 * @param aDriveLetter drive letter . |
307 * @param aDefaultDrive default drive type |
352 * @param aDefaultDrive default drive type |
308 * @return ETrue if aFileName is on a given default drive type. |
353 * @return ETrue if aFileName is on a given default drive type. |
309 */ |
354 */ |
310 TBool IsFileInDrive( const TDesC& aFileName, |
355 TBool IsCharInDrive( const TChar& aDriveLetter, |
311 const DriveInfo::TDefaultDrives& aDefaultDrive ) const; |
356 const DriveInfo::TDefaultDrives& aDefaultDrive ) const; |
312 |
|
313 /** |
|
314 * Check if application is installed on a given drive type. |
|
315 * @param aUid app uid. |
|
316 * @param aDefaultDrive default drive type. |
|
317 * @return ETrue if app is installed on a given drive type. |
|
318 */ |
|
319 TBool IsAppInDriveL( const TUid aUid, |
|
320 const DriveInfo::TDefaultDrives& aDefaultDrive ) const; |
|
321 |
|
322 /** |
|
323 * Check if application is installed on MMC. |
|
324 * @param aUid app uid. |
|
325 * @return ETrue if app is installed on MMC. |
|
326 */ |
|
327 TBool IsInMmcL( const TUid aUid ) const; |
|
328 |
|
329 /** |
|
330 * Check if application is installed on mass storage. |
|
331 * @param aUid app uid. |
|
332 * @return ETrue if app is installed on mass storage. |
|
333 */ |
|
334 TBool IsInMassStorageL( const TUid aUid ) const; |
|
335 |
357 |
336 /** |
358 /** |
337 * Check if drive's status is EDriveInUse. |
359 * Check if drive's status is EDriveInUse. |
338 * @param aDefaultDrive default drive type. |
360 * @param aDefaultDrive default drive type. |
339 * @return ETrue if drive is in use. |
361 * @return ETrue if drive is in use. |
379 /** |
401 /** |
380 * Adds or updates component id attribute in entry based on SCR provided data |
402 * Adds or updates component id attribute in entry based on SCR provided data |
381 * @param aEntry entry being updated with component id attribute. |
403 * @param aEntry entry being updated with component id attribute. |
382 * @return ETrue when component id attribute of the entry has been added or changed. |
404 * @return ETrue when component id attribute of the entry has been added or changed. |
383 */ |
405 */ |
384 TBool UpdateComponentIdL( CCaInnerEntry& aEntry ) const; |
406 TBool UpdateComponentIdL( CCaInnerEntry& aEntry ); |
385 |
407 |
386 private: |
408 private: |
387 // data |
409 // data |
388 |
410 |
389 RApaLsSession iApaLsSession; ///< AppArc session. Own. |
411 RApaLsSession iApaLsSession; ///< AppArc session. Own. |
390 CCaSrvMmcHistory* iMmcHistory; ///< MMC history. Own. |
412 CCaSrvMmcHistory* iMmcHistory; ///< MMC history. Own. |
391 RFs iFs; ///< File Server Session. Own. |
413 RFs iFs; ///< File Server Session. Own. |
392 Usif::RSoftwareComponentRegistry iSoftwareRegistry; |
414 |
393 |
|
394 CCaStorageProxy& iCaStorageProxy; ///< Not own |
415 CCaStorageProxy& iCaStorageProxy; ///< Not own |
|
416 Usif::RSoftwareComponentRegistry& iSoftwareRegistry; ///< Not own |
395 CCaSrvEngUtils& iSrvEngUtils; ///< Not own |
417 CCaSrvEngUtils& iSrvEngUtils; ///< Not own |
396 |
418 |
397 TInt iCollectionDownloadId; |
419 TInt iCollectionDownloadId; |
398 TInt iAllCollectionId; |
420 TInt iAllCollectionId; |
399 |
421 |