menucontentsrv/srvinc/menusrvappscanner.h
branchRCL_3
changeset 130 67f2ed48ad91
parent 122 6cadd6867c17
equal deleted inserted replaced
122:6cadd6867c17 130:67f2ed48ad91
    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>
       
    25 #include <cenrepnotifyhandler.h>
    24 #include <cenrepnotifyhandler.h>
    26 #include "menuengoperation.h"
    25 #include "menuengoperation.h"
    27 #include "mcssatnotifier.h"
    26 #include "mcssatnotifier.h"
    28 #include "menuengfilter.h"
    27 #include "menuengfilter.h"
    29 #include "mcsfreespaceobserver.h"
    28 #include "mcsfreespaceobserver.h"
    30 #include "mcsmenuitem.h"
    29 #include "mcsmenuitem.h"
    31 #include "mcsmenunotifier.h"
    30 #include "mcsmenunotifier.h"
    32 #include "mcsinstallnotifier.h"
    31 #include <driveinfo.h>
    33 
       
    34 
    32 
    35 // FORWARD DECLARATION
    33 // FORWARD DECLARATION
    36 
    34 
    37 class CMenuEng;
    35 class CMenuEng;
    38 class CMenuSrvAppAttributes;
    36 class CMenuSrvAppAttributes;
    64 *   to date continuously.
    62 *   to date continuously.
    65 */
    63 */
    66 NONSHARABLE_CLASS( CMenuSrvAppScanner )
    64 NONSHARABLE_CLASS( CMenuSrvAppScanner )
    67 : public CActive, public MMenuEngOperation, public MApaAppListServObserver,
    65 : public CActive, public MMenuEngOperation, public MApaAppListServObserver,
    68     public MCenRepNotifyHandlerCallback, public MMcsSATNotifierCallback,
    66     public MCenRepNotifyHandlerCallback, public MMcsSATNotifierCallback,
    69     MMcsFreeSpaceObserver, MMcsInstallListener
    67     MMcsFreeSpaceObserver
    70     {
    68     {
    71 
    69 
    72 public:     // Constructor
    70 public:     // Constructor
    73 
    71 
    74     /**
    72     /**
    82     */
    80     */
    83     static CMenuSrvAppScanner* NewL(
    81     static CMenuSrvAppScanner* NewL(
    84             CMenuEng& aEng,
    82             CMenuEng& aEng,
    85             CMenuSrvEngUtils& aSrvEngUtils );
    83             CMenuSrvEngUtils& aSrvEngUtils );
    86 
    84 
    87 public:
       
    88     /**
       
    89      * Schedule appscanner run.
       
    90      * Self complete active object.
       
    91      */
       
    92     void ScheduleScan();
       
    93 
       
    94 private:    // Constructors and destructor
    85 private:    // Constructors and destructor
    95 
    86 
    96     /**
    87     /**
    97     * Constructor.
    88     * Constructor.
    98     * @param aEng Engine.
    89     * @param aEng Engine.
   142     */
   133     */
   143     void CompletedMenuEngOperation( TInt aErr );
   134     void CompletedMenuEngOperation( TInt aErr );
   144 
   135 
   145 private:    // from MApaAppListServObserver
   136 private:    // from MApaAppListServObserver
   146 
   137 
   147     /**
       
   148     * Application list event.
       
   149     * @param aEvent only one type event exists.
       
   150     */
       
   151     void HandleAppListEvent( TInt aEvent );
   138     void HandleAppListEvent( TInt aEvent );
   152 
   139 
   153 private:    // from MCenRepNotifyHandlerCallback
   140 private:    // from MCenRepNotifyHandlerCallback
   154 
   141 
   155     /**
   142     /**
   156     * Called if one of CR keys has changed
   143     * Called if one of CR keys has changed
   157     * @param aKey Id of the key that has changed.
   144     * @param aId  Id of the key that has changed.
   158     * @param aNewValue The new value of the key.
   145     * @param aNewValue  The new value of the key.
   159     */
   146     */
   160     void HandleNotifyString( TUint32 aKey, const TDesC16& aNewValue );
   147     void HandleNotifyString( TUint32 aKey, const TDesC16& aNewValue );
   161 
   148 
   162 private:    // from MMcsSATNotifierCallback
   149 private:    // from MMcsSATNotifierCallback
   163 
   150 
   167     * @since Series 60 3.1
   154     * @since Series 60 3.1
   168     * @return void
   155     * @return void
   169     */
   156     */
   170     void SATChangeL();
   157     void SATChangeL();
   171 
   158 
   172 private:    // from MMcsInstallListener
   159 public:
   173 
   160 	/**
   174     /**
   161 	 * Schedule appscanner run.
   175     * Called application is installed.
   162 	 * Self complete active object.
   176     * @param aUid uid of an application.
   163 	 */
   177     * @param aOperation operation type.
   164 	void ScheduleScan();
   178     */
       
   179     void HandleInstallNotifyL( TUid aUid,
       
   180         CMcsInstallNotifier::TNotificationType aNotificationType  );
       
   181 
   165 
   182 private:    // new methods
   166 private:    // new methods
   183 
   167 
   184     /**
   168     /**
   185     */
   169     */
   189     /**
   173     /**
   190     * Updates application's missing attribute.
   174     * Updates application's missing attribute.
   191     * Add new menu item referring to this application.
   175     * Add new menu item referring to this application.
   192     * @param aItem menu item.
   176     * @param aItem menu item.
   193     */
   177     */
   194     void HandleMissingFlagUpdateL(
   178     void HandleMissingFlagUpdateL( const TMenuItem& aItem );
   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 );
       
   216 
   179 
   217     /**
   180     /**
   218     * Updates hidden flag.
   181     * Updates hidden flag.
   219     * @param aItem menu item.
   182     * @param aItem menu item.
   220     * @param aUid Application's uid.
   183     * @param aUid Application's uid.
   253     void ParseUidsL( const TDesC& aHiddenApplications,
   216     void ParseUidsL( const TDesC& aHiddenApplications,
   254                                         RPointerArray<CMenuSrvAppAttributes>& aArray );
   217                                         RPointerArray<CMenuSrvAppAttributes>& aArray );
   255 
   218 
   256     /**
   219     /**
   257     */
   220     */
   258     void SetHiddenL( const TDesC& aHiddenAppUid,
   221     void SetHidden( const TDesC& aHiddenAppUid,
   259                                 RPointerArray<CMenuSrvAppAttributes>& aArray );
   222                                 RPointerArray<CMenuSrvAppAttributes>& aArray );
   260 
   223 
   261     /**
   224     /**
   262     */
   225     */
   263     void GetMcsAppItemsL( RArray<TMenuItem>& aArray);
   226     void GetMcsAppItemsL( RArray<TMenuItem>& aArray);
   387     * Check if drive's status is EDriveInUse.
   350     * Check if drive's status is EDriveInUse.
   388     * @param aDefaultDrive default drive type.
   351     * @param aDefaultDrive default drive type.
   389     * @return ETrue if drive is in use.
   352     * @return ETrue if drive is in use.
   390     */
   353     */
   391     TBool IsDriveInUse(
   354     TBool IsDriveInUse(
   392         const DriveInfo::TDefaultDrives& aDefaultDrive );
   355     		const DriveInfo::TDefaultDrives& aDefaultDrive );
   393 
   356 
   394     /**
   357     /**
   395     TODO
   358     TODO
   396     */
   359     */
   397     void HideItemIfPresentL( TInt aFolder, TInt aId, const TDesC& aUid, TBool aWasHidden );
   360     void HideItemIfPresentL( TInt aFolder, TInt aId, const TDesC& aUid, TBool aWasHidden );
   428 
   391 
   429     /**
   392     /**
   430     TODO
   393     TODO
   431     */
   394     */
   432     void UpdateApplicationItemL(
   395     void UpdateApplicationItemL(
   433         RArray<TMenuItem>& aMcsItems,
   396     		RArray<TMenuItem>& aMcsItems,
   434             const CMenuSrvAppAttributes& aApaItem,
   397             const CMenuSrvAppAttributes& aApaItem,
   435             TUint aMmcId,
   398             TUint aMmcId,
   436             TBool isLegacy );
   399             TBool isLegacy );
   437 
   400 
   438     /**
   401     /**
   488     * Free space observer. Own.
   451     * Free space observer. Own.
   489     */
   452     */
   490     CMcsFreeSpaceObserver* iFreeSpaceObserver;
   453     CMcsFreeSpaceObserver* iFreeSpaceObserver;
   491 
   454 
   492     TBool iOpStatus;
   455     TBool iOpStatus;
   493 
       
   494     RArray<TUid> iInstalledPackages; ///< Own.
       
   495 
       
   496     CMcsInstallNotifier* iSisInstallNotifier; ///< Native app notifier. Own.
       
   497     CMcsInstallNotifier* iJavaInstallNotifier; ///< Java app notifier. Own.
       
   498 
       
   499     };
   456     };
   500 
   457 
   501 #endif // __MENUSRVAPPSCANNER_H__
   458 #endif // __MENUSRVAPPSCANNER_H__