menucontentsrv/srvinc/menusrvappscanner.h
branchRCL_3
changeset 31 8baec10861af
parent 30 a5a39a295112
--- a/menucontentsrv/srvinc/menusrvappscanner.h	Wed Sep 01 12:22:09 2010 +0100
+++ b/menucontentsrv/srvinc/menusrvappscanner.h	Tue Sep 14 21:55:16 2010 +0300
@@ -21,6 +21,7 @@
 #include <e32base.h>
 #include <apgcli.h>
 #include <apgnotif.h>
+#include <driveinfo.h>
 #include <cenrepnotifyhandler.h>
 #include "menuengoperation.h"
 #include "mcssatnotifier.h"
@@ -28,7 +29,8 @@
 #include "mcsfreespaceobserver.h"
 #include "mcsmenuitem.h"
 #include "mcsmenunotifier.h"
-#include <driveinfo.h>
+#include "mcsinstallnotifier.h"
+
 
 // FORWARD DECLARATION
 
@@ -64,7 +66,7 @@
 NONSHARABLE_CLASS( CMenuSrvAppScanner )
 : public CActive, public MMenuEngOperation, public MApaAppListServObserver,
     public MCenRepNotifyHandlerCallback, public MMcsSATNotifierCallback,
-    MMcsFreeSpaceObserver
+    MMcsFreeSpaceObserver, MMcsInstallListener
     {
 
 public:     // Constructor
@@ -82,6 +84,13 @@
             CMenuEng& aEng,
             CMenuSrvEngUtils& aSrvEngUtils );
 
+public:
+    /**
+     * Schedule appscanner run.
+     * Self complete active object.
+     */
+    void ScheduleScan();
+
 private:    // Constructors and destructor
 
     /**
@@ -135,14 +144,18 @@
 
 private:    // from MApaAppListServObserver
 
+    /**
+    * Application list event.
+    * @param aEvent only one type event exists.
+    */
     void HandleAppListEvent( TInt aEvent );
 
 private:    // from MCenRepNotifyHandlerCallback
 
     /**
     * Called if one of CR keys has changed
-    * @param aId  Id of the key that has changed.
-    * @param aNewValue  The new value of the key.
+    * @param aKey Id of the key that has changed.
+    * @param aNewValue The new value of the key.
     */
     void HandleNotifyString( TUint32 aKey, const TDesC16& aNewValue );
 
@@ -156,12 +169,15 @@
     */
     void SATChangeL();
 
-public:
-	/**
-	 * Schedule appscanner run.
-	 * Self complete active object.
-	 */
-	void ScheduleScan();
+private:    // from MMcsInstallListener
+
+    /**
+    * Called application is installed.
+    * @param aUid uid of an application.
+    * @param aOperation operation type.
+    */
+    void HandleInstallNotifyL( TUid aUid,
+    		CMcsInstallNotifier::TNotificationType aNotificationType  );
 
 private:    // new methods
 
@@ -175,7 +191,28 @@
     * Add new menu item referring to this application.
     * @param aItem menu item.
     */
-    void HandleMissingFlagUpdateL( const TMenuItem& aItem );
+    void HandleMissingFlagUpdateL(
+            const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem );
+
+    /**
+    * Notifies engine abaut application installation.
+    */
+    void InstallationNotifyL();
+
+    /**
+    * Removes uid from installed packages array.
+    * @param aUid application uid.
+    */
+    void RemoveFromInstalledPackages( TUid aUid );
+
+    /**
+    * Removes uid from installed packages array.
+    * @param aUid application uid.
+    * @param aId Item ID.
+    * @param aEvent event for engine to append.
+    */
+    CMenuEngObject& ModifiableObjectL( TUid aUid, TInt aId,
+                TInt aEvent = RMenuNotifier::EItemAttributeChanged );
 
     /**
     * Updates hidden flag.
@@ -453,6 +490,12 @@
     CMcsFreeSpaceObserver* iFreeSpaceObserver;
 
     TBool iOpStatus;
+
+    RArray<TUid> iInstalledPackages; ///< Own.
+
+    CMcsInstallNotifier* iSisInstallNotifier; ///< Native app notifier. Own.
+    CMcsInstallNotifier* iJavaInstallNotifier; ///< Java app notifier. Own.
+
     };
 
 #endif // __MENUSRVAPPSCANNER_H__