menucontentsrv/srvinc/menusrvappscanner.h
branchRCL_3
changeset 31 8baec10861af
parent 30 a5a39a295112
equal deleted inserted replaced
30:a5a39a295112 31:8baec10861af
    19 #define __MENUSRVAPPSCANNER_H__
    19 #define __MENUSRVAPPSCANNER_H__
    20 
    20 
    21 #include <e32base.h>
    21 #include <e32base.h>
    22 #include <apgcli.h>
    22 #include <apgcli.h>
    23 #include <apgnotif.h>
    23 #include <apgnotif.h>
       
    24 #include <driveinfo.h>
    24 #include <cenrepnotifyhandler.h>
    25 #include <cenrepnotifyhandler.h>
    25 #include "menuengoperation.h"
    26 #include "menuengoperation.h"
    26 #include "mcssatnotifier.h"
    27 #include "mcssatnotifier.h"
    27 #include "menuengfilter.h"
    28 #include "menuengfilter.h"
    28 #include "mcsfreespaceobserver.h"
    29 #include "mcsfreespaceobserver.h"
    29 #include "mcsmenuitem.h"
    30 #include "mcsmenuitem.h"
    30 #include "mcsmenunotifier.h"
    31 #include "mcsmenunotifier.h"
    31 #include <driveinfo.h>
    32 #include "mcsinstallnotifier.h"
       
    33 
    32 
    34 
    33 // FORWARD DECLARATION
    35 // FORWARD DECLARATION
    34 
    36 
    35 class CMenuEng;
    37 class CMenuEng;
    36 class CMenuSrvAppAttributes;
    38 class CMenuSrvAppAttributes;
    62 *   to date continuously.
    64 *   to date continuously.
    63 */
    65 */
    64 NONSHARABLE_CLASS( CMenuSrvAppScanner )
    66 NONSHARABLE_CLASS( CMenuSrvAppScanner )
    65 : public CActive, public MMenuEngOperation, public MApaAppListServObserver,
    67 : public CActive, public MMenuEngOperation, public MApaAppListServObserver,
    66     public MCenRepNotifyHandlerCallback, public MMcsSATNotifierCallback,
    68     public MCenRepNotifyHandlerCallback, public MMcsSATNotifierCallback,
    67     MMcsFreeSpaceObserver
    69     MMcsFreeSpaceObserver, MMcsInstallListener
    68     {
    70     {
    69 
    71 
    70 public:     // Constructor
    72 public:     // Constructor
    71 
    73 
    72     /**
    74     /**
    80     */
    82     */
    81     static CMenuSrvAppScanner* NewL(
    83     static CMenuSrvAppScanner* NewL(
    82             CMenuEng& aEng,
    84             CMenuEng& aEng,
    83             CMenuSrvEngUtils& aSrvEngUtils );
    85             CMenuSrvEngUtils& aSrvEngUtils );
    84 
    86 
       
    87 public:
       
    88     /**
       
    89      * Schedule appscanner run.
       
    90      * Self complete active object.
       
    91      */
       
    92     void ScheduleScan();
       
    93 
    85 private:    // Constructors and destructor
    94 private:    // Constructors and destructor
    86 
    95 
    87     /**
    96     /**
    88     * Constructor.
    97     * Constructor.
    89     * @param aEng Engine.
    98     * @param aEng Engine.
   133     */
   142     */
   134     void CompletedMenuEngOperation( TInt aErr );
   143     void CompletedMenuEngOperation( TInt aErr );
   135 
   144 
   136 private:    // from MApaAppListServObserver
   145 private:    // from MApaAppListServObserver
   137 
   146 
       
   147     /**
       
   148     * Application list event.
       
   149     * @param aEvent only one type event exists.
       
   150     */
   138     void HandleAppListEvent( TInt aEvent );
   151     void HandleAppListEvent( TInt aEvent );
   139 
   152 
   140 private:    // from MCenRepNotifyHandlerCallback
   153 private:    // from MCenRepNotifyHandlerCallback
   141 
   154 
   142     /**
   155     /**
   143     * Called if one of CR keys has changed
   156     * Called if one of CR keys has changed
   144     * @param aId  Id of the key that has changed.
   157     * @param aKey Id of the key that has changed.
   145     * @param aNewValue  The new value of the key.
   158     * @param aNewValue The new value of the key.
   146     */
   159     */
   147     void HandleNotifyString( TUint32 aKey, const TDesC16& aNewValue );
   160     void HandleNotifyString( TUint32 aKey, const TDesC16& aNewValue );
   148 
   161 
   149 private:    // from MMcsSATNotifierCallback
   162 private:    // from MMcsSATNotifierCallback
   150 
   163 
   154     * @since Series 60 3.1
   167     * @since Series 60 3.1
   155     * @return void
   168     * @return void
   156     */
   169     */
   157     void SATChangeL();
   170     void SATChangeL();
   158 
   171 
   159 public:
   172 private:    // from MMcsInstallListener
   160 	/**
   173 
   161 	 * Schedule appscanner run.
   174     /**
   162 	 * Self complete active object.
   175     * Called application is installed.
   163 	 */
   176     * @param aUid uid of an application.
   164 	void ScheduleScan();
   177     * @param aOperation operation type.
       
   178     */
       
   179     void HandleInstallNotifyL( TUid aUid,
       
   180     		CMcsInstallNotifier::TNotificationType aNotificationType  );
   165 
   181 
   166 private:    // new methods
   182 private:    // new methods
   167 
   183 
   168     /**
   184     /**
   169     */
   185     */
   173     /**
   189     /**
   174     * Updates application's missing attribute.
   190     * Updates application's missing attribute.
   175     * Add new menu item referring to this application.
   191     * Add new menu item referring to this application.
   176     * @param aItem menu item.
   192     * @param aItem menu item.
   177     */
   193     */
   178     void HandleMissingFlagUpdateL( const TMenuItem& aItem );
   194     void HandleMissingFlagUpdateL(
       
   195             const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem );
       
   196 
       
   197     /**
       
   198     * Notifies engine abaut application installation.
       
   199     */
       
   200     void InstallationNotifyL();
       
   201 
       
   202     /**
       
   203     * Removes uid from installed packages array.
       
   204     * @param aUid application uid.
       
   205     */
       
   206     void RemoveFromInstalledPackages( TUid aUid );
       
   207 
       
   208     /**
       
   209     * Removes uid from installed packages array.
       
   210     * @param aUid application uid.
       
   211     * @param aId Item ID.
       
   212     * @param aEvent event for engine to append.
       
   213     */
       
   214     CMenuEngObject& ModifiableObjectL( TUid aUid, TInt aId,
       
   215                 TInt aEvent = RMenuNotifier::EItemAttributeChanged );
   179 
   216 
   180     /**
   217     /**
   181     * Updates hidden flag.
   218     * Updates hidden flag.
   182     * @param aItem menu item.
   219     * @param aItem menu item.
   183     * @param aUid Application's uid.
   220     * @param aUid Application's uid.
   451     * Free space observer. Own.
   488     * Free space observer. Own.
   452     */
   489     */
   453     CMcsFreeSpaceObserver* iFreeSpaceObserver;
   490     CMcsFreeSpaceObserver* iFreeSpaceObserver;
   454 
   491 
   455     TBool iOpStatus;
   492     TBool iOpStatus;
       
   493 
       
   494     RArray<TUid> iInstalledPackages; ///< Own.
       
   495 
       
   496     CMcsInstallNotifier* iSisInstallNotifier; ///< Native app notifier. Own.
       
   497     CMcsInstallNotifier* iJavaInstallNotifier; ///< Java app notifier. Own.
       
   498 
   456     };
   499     };
   457 
   500 
   458 #endif // __MENUSRVAPPSCANNER_H__
   501 #endif // __MENUSRVAPPSCANNER_H__