appinstaller/AppMngr2/inc/appmngr2model.h
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2010 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     
    63     TBool IsUninstall();
       
    64 
    64 protected:  // from CActive
    65 protected:  // from CActive
    65     void DoCancel();
    66     void DoCancel();
    66     void RunL();
    67     void RunL();
    67 
    68 
    68 public:     // from MAppMngr2RuntimeObserver
    69 public:     // from MAppMngr2RuntimeObserver
    69     void RefreshInstalledApps();
    70     void RefreshInstalledApps();
    70     void RefreshInstallationFiles();
    71     void RefreshInstallationFiles();
    71     
    72 
    72 public:     // from MAppMngr2ScannerObserver
    73 public:     // from MAppMngr2ScannerObserver
    73     void ScanningResultL( RPointerArray<CAppMngr2RecognizedFile>& aResult );
    74     void ScanningResultL( RPointerArray<CAppMngr2RecognizedFile>& aResult );
    74     void ScanningComplete();
    75     void ScanningComplete();
    75     void DirectoryChangedL( const TDesC& aChangedDir );
    76     void DirectoryChangedL( const TDesC& aChangedDir );
    76 
    77 
    85                 RPointerArray<CAppMngr2PackageInfo>& aPackageInfos );
    86                 RPointerArray<CAppMngr2PackageInfo>& aPackageInfos );
    86     void ErrorInCreatingPackagesL( const CAppMngr2InfoMaker& aMaker, TInt aError );
    87     void ErrorInCreatingPackagesL( const CAppMngr2InfoMaker& aMaker, TInt aError );
    87 
    88 
    88 public:     // from MAppMngr2InfoArrayObserver
    89 public:     // from MAppMngr2InfoArrayObserver
    89     void ArrayContentChanged( CAppMngr2InfoArray* aArray, TInt aMoreRefreshesExpected );
    90     void ArrayContentChanged( CAppMngr2InfoArray* aArray, TInt aMoreRefreshesExpected );
    90     
    91 
    91 private:    // new functions
    92 private:    // new functions
    92     CAppMngr2Model( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    93     CAppMngr2Model( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    93     void ConstructL();
    94     void ConstructL();
    94     void LoadDefaultIconsL( CAknIconArray& aIconArray );
    95     void LoadDefaultIconsL( CAknIconArray& aIconArray );
    95     void LoadPluginsL();
    96     void LoadPluginsL();
   108     CAppMngr2AppInfoArray* iInstalledApps;
   109     CAppMngr2AppInfoArray* iInstalledApps;
   109     CAppMngr2PackageInfoArray* iInstallationFiles;
   110     CAppMngr2PackageInfoArray* iInstallationFiles;
   110     CAppMngr2InfoBase* iActiveItem; // not owned
   111     CAppMngr2InfoBase* iActiveItem; // not owned
   111     TInt iActiveCommand;
   112     TInt iActiveCommand;
   112     TBool iClosing;
   113     TBool iClosing;
   113     
   114     TBool iFetchingInstallationFiles;
       
   115     TBool iFetchingInstalledApps;
       
   116 
   114     FLOG_PERF_DEFINE( FetchInstallationFiles )
   117     FLOG_PERF_DEFINE( FetchInstallationFiles )
   115     FLOG_PERF_DEFINE( FetchInstalledApps )
   118     FLOG_PERF_DEFINE( FetchInstalledApps )
   116     };
   119     };
   117 
   120 
   118 #endif // C_APPMNGR2MODEL_H
   121 #endif // C_APPMNGR2MODEL_H