contentstorage/casrv/caappscanner/inc/casrvappscanner.h
changeset 104 9b022b1f357c
parent 103 b99b84bcd2d1
child 109 e0aa398e6810
--- a/contentstorage/casrv/caappscanner/inc/casrvappscanner.h	Wed Jun 23 18:33:40 2010 +0300
+++ b/contentstorage/casrv/caappscanner/inc/casrvappscanner.h	Tue Jul 06 14:37:10 2010 +0300
@@ -56,10 +56,7 @@
  *   to date continuously.
  */
 
-NONSHARABLE_CLASS( CCaSrvAppScanner ):
-    public CActive,
-    public MCaInstallListener,
-    public MApaAppListServObserver
+NONSHARABLE_CLASS( CCaSrvAppScanner ) : public CActive
     {
 
 public:
@@ -78,16 +75,6 @@
     static CCaSrvAppScanner* NewL( CCaStorageProxy& aCaStorageProxy,
             CCaSrvEngUtils& aUtils );
 
-public:
-    // from MCaInstallListener
-
-    /**
-     * Handle Install Event.
-     * @since S60 v5.0
-     * @param aUid installed/uninstalled app uid.
-     */
-    void HandleInstallNotifyL( TInt aUid );
-
 private:
     // Constructors and destructor
 
@@ -105,20 +92,6 @@
     void ConstructL();
 
 private:
-
-    /**
-     * Notifies storage about change for aAppUid.
-     * @param aAppUid application uid.
-     */
-    void NotifyL( TInt aAppUid );
-
-    /**
-     * Notifies storage about change for aPackageEntry related app.
-     * @param aPackageEntry application package entry.
-     */
-    void NotifyL( Swi::RSisRegistryEntry& aPackageEntry );
-
-private:
     // from CActive
 
     /**
@@ -138,11 +111,6 @@
     TInt RunError( TInt aError );
 
 private:
-    // from MApaAppListServObserver
-
-    void HandleAppListEvent( TInt aEvent );
-
-private:
     // new methods
 
     /**
@@ -150,9 +118,6 @@
      * @result id of download collection.
      */
     TInt GetCollectionDownloadIdL();
-    
-    //TODO temporary sollution for fake uninstall progres notification
-    void ClearUninstallFlagL();
 
     /**
      * Gets collectionId of all collection.
@@ -201,6 +166,13 @@
     TBool HandleRemovableVisibleFlagsUpdateL( CCaInnerEntry* aItem );
 
     /**
+     * Removes application unninstall flag.
+     * @param aItem menu item.
+     * @return ETrue if flags were updated.
+     */
+    TBool RemoveUninstallFlagL( CCaInnerEntry* aItem );
+
+    /**
      * Updates application's missing and visible flags.
      * @param aItem menu item.
      * @return ETrue if flags were updated.
@@ -285,14 +257,9 @@
      * Add new menu item referring to this application.
      * @param aUid Application capability.
      * @param aCurrentMmcId MMC ID of currently inserted MMC, or 0.
+     * @return added item id
      */
-    void AddAppEntryL( TUint aUid, TUint aCurrentMmcId );
-
-    /**
-     * Removes given uid from iInstalledPackages.
-     * @param aUid Application uid.
-     */
-    void RemoveFromInstalledPackages( TUint aUid );
+    TInt AddAppEntryL( TUint aUid, TUint aCurrentMmcId );
 
     /**
      * Set information from TApaAppInfo to entry.
@@ -386,8 +353,11 @@
      * Update entry from storage.
      * @param aEntry application entry.
      * @param aMmcId unique mmc id.
+     * @param aAlwaysUpdate item always should be updated.
      */
-    void UpdateAppEntryL( CCaInnerEntry* aEntry, TUint aMmcId );
+    void UpdateAppEntryL( CCaInnerEntry* aEntry,
+            TUint aMmcId,
+            TBool aAlwaysUpdate = EFalse );
 
     /**
      * Get all applications from storage and visible from apparc
@@ -396,11 +366,6 @@
     void UpdateApplicationEntriesL();
 
     /**
-     * Notifys storage about updated apps.
-     */
-    void InstallationNotifyL();
-
-    /**
      * Make not empty collections with not hidden apps visible.
      */
     void MakeNotEmptyCollectionsVisibleL();
@@ -410,7 +375,7 @@
      * @param aEntry application entry.
      */
     void MakeCollectionVisibleIfHasVisibleEntryL( CCaInnerEntry* aEntry );
-    
+
     /**
      * Adds or updates component id attribute in entry based on SCR provided data
      * @param aEntry entry being updated with component id attribute.
@@ -418,28 +383,20 @@
      */
     TBool UpdateComponentIdL( CCaInnerEntry& aEntry ) const;
 
-    /**
-     * Schedule appscanner run.
-     * Self complete active object.
-     */
-    void ScheduleScan();
-
 private:
     // data
 
     RApaLsSession iApaLsSession; ///< AppArc session. Own.
-    CApaAppListNotifier* iNotifier; ///< Change notifier. Own.
-    CCaInstallNotifier* iInstallNotifier; ///< Install notifier. Own.
     CCaSrvMmcHistory* iMmcHistory; ///< MMC history. Own.
     RFs iFs; ///< File Server Session. Own.
     Usif::RSoftwareComponentRegistry iSoftwareRegistry;
 
     CCaStorageProxy& iCaStorageProxy; ///< Not own
     CCaSrvEngUtils& iSrvEngUtils; ///< Not own
-    RArray<TInt> iInstalledPackages; ///< Own.
 
     TInt iCollectionDownloadId;
     TInt iAllCollectionId;
+
 CA_STORAGE_TEST_FRIEND_CLASS    (T_casrvAppScaner)
 
     };