appinstaller/AppMngr2/inc/appmngr2model.h
branchRCL_3
changeset 25 7333d7932ef7
parent 12 7ca52d38f8c3
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
     1 /*
     1 /*
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    50     static CAppMngr2Model* NewL( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    50     static CAppMngr2Model* NewL( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    51     ~CAppMngr2Model();
    51     ~CAppMngr2Model();
    52 
    52 
    53 public:     // new functions
    53 public:     // new functions
    54     TInt AppInfoCount() const;
    54     TInt AppInfoCount() const;
    55     CAppMngr2AppInfo& AppInfo( TInt aIndex ) const;
    55     CAppMngr2AppInfo& AppInfo( TInt aIndex ) const; 
    56     TInt PackageInfoCount() const;
    56     TInt PackageInfoCount() const;
    57     CAppMngr2PackageInfo& PackageInfo( TInt aIndex ) const;
    57     CAppMngr2PackageInfo& PackageInfo( TInt aIndex ) const; 
    58     void LoadIconsL( CAknIconArray& aIconArray );
    58     void LoadIconsL( CAknIconArray& aIconArray );
    59     void GetIconIndexesL( TUid aUid, TInt& aIconIndexBase, TInt& aIconIndexMax ) const;
    59     void GetIconIndexesL( TUid aUid, TInt& aIconIndexBase, TInt& aIconIndexMax ) const;
    60     void HandleCommandL( CAppMngr2InfoBase& aInfo, TInt aCommand );
    60     void HandleCommandL( CAppMngr2InfoBase& aInfo, TInt aCommand );
    61     void StartFetchingInstallationFilesL();
    61     void StartFetchingInstallationFilesL();
    62     void StartFetchingInstalledAppsL();
    62     void StartFetchingInstalledAppsL();
    63     TBool IsUninstall();
    63     
    64 
       
    65 protected:  // from CActive
    64 protected:  // from CActive
    66     void DoCancel();
    65     void DoCancel();
    67     void RunL();
    66     void RunL();
    68 
    67 
    69 public:     // from MAppMngr2RuntimeObserver
    68 public:     // from MAppMngr2RuntimeObserver
    70     void RefreshInstalledApps();
    69     void RefreshInstalledApps();
    71     void RefreshInstallationFiles();
    70     void RefreshInstallationFiles();
    72 
    71     
    73 public:     // from MAppMngr2ScannerObserver
    72 public:     // from MAppMngr2ScannerObserver
    74     void ScanningResultL( RPointerArray<CAppMngr2RecognizedFile>& aResult );
    73     void ScanningResultL( RPointerArray<CAppMngr2RecognizedFile>& aResult );
    75     void ScanningComplete();
    74     void ScanningComplete();
    76     void DirectoryChangedL( const TDesC& aChangedDir );
    75     void DirectoryChangedL( const TDesC& aChangedDir );
    77 
    76 
    86                 RPointerArray<CAppMngr2PackageInfo>& aPackageInfos );
    85                 RPointerArray<CAppMngr2PackageInfo>& aPackageInfos );
    87     void ErrorInCreatingPackagesL( const CAppMngr2InfoMaker& aMaker, TInt aError );
    86     void ErrorInCreatingPackagesL( const CAppMngr2InfoMaker& aMaker, TInt aError );
    88 
    87 
    89 public:     // from MAppMngr2InfoArrayObserver
    88 public:     // from MAppMngr2InfoArrayObserver
    90     void ArrayContentChanged( CAppMngr2InfoArray* aArray, TInt aMoreRefreshesExpected );
    89     void ArrayContentChanged( CAppMngr2InfoArray* aArray, TInt aMoreRefreshesExpected );
    91 
    90     
    92 private:    // new functions
    91 private:    // new functions
    93     CAppMngr2Model( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    92     CAppMngr2Model( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    94     void ConstructL();
    93     void ConstructL();
    95     void LoadDefaultIconsL( CAknIconArray& aIconArray );
    94     void LoadDefaultIconsL( CAknIconArray& aIconArray );
    96     void LoadPluginsL();
    95     void LoadPluginsL();
   109     CAppMngr2AppInfoArray* iInstalledApps;
   108     CAppMngr2AppInfoArray* iInstalledApps;
   110     CAppMngr2PackageInfoArray* iInstallationFiles;
   109     CAppMngr2PackageInfoArray* iInstallationFiles;
   111     CAppMngr2InfoBase* iActiveItem; // not owned
   110     CAppMngr2InfoBase* iActiveItem; // not owned
   112     TInt iActiveCommand;
   111     TInt iActiveCommand;
   113     TBool iClosing;
   112     TBool iClosing;
   114     TBool iFetchingInstallationFiles;
   113     
   115     TBool iFetchingInstalledApps;
       
   116 
       
   117     FLOG_PERF_DEFINE( FetchInstallationFiles )
   114     FLOG_PERF_DEFINE( FetchInstallationFiles )
   118     FLOG_PERF_DEFINE( FetchInstalledApps )
   115     FLOG_PERF_DEFINE( FetchInstalledApps )
   119     };
   116     };
   120 
   117 
   121 #endif // C_APPMNGR2MODEL_H
   118 #endif // C_APPMNGR2MODEL_H