appinstaller/AppMngr2/inc/appmngr2model.h
branchRCL_3
changeset 15 51c0f5edf5ef
parent 0 ba25891c3a9e
child 19 7ca52d38f8c3
equal deleted inserted replaced
6:aba6b8104af3 15:51c0f5edf5ef
     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 
    64 protected:  // from CActive
    64 protected:  // from CActive
    65     void DoCancel();
    65     void DoCancel();
    66     void RunL();
    66     void RunL();
    67 
    67 
    68 public:     // from MAppMngr2RuntimeObserver
    68 public:     // from MAppMngr2RuntimeObserver
    69     void RefreshInstalledApps();
    69     void RefreshInstalledApps();
    70     void RefreshInstallationFiles();
    70     void RefreshInstallationFiles();
    71     
    71 
    72 public:     // from MAppMngr2ScannerObserver
    72 public:     // from MAppMngr2ScannerObserver
    73     void ScanningResultL( RPointerArray<CAppMngr2RecognizedFile>& aResult );
    73     void ScanningResultL( RPointerArray<CAppMngr2RecognizedFile>& aResult );
    74     void ScanningComplete();
    74     void ScanningComplete();
    75     void DirectoryChangedL( const TDesC& aChangedDir );
    75     void DirectoryChangedL( const TDesC& aChangedDir );
    76 
    76 
    85                 RPointerArray<CAppMngr2PackageInfo>& aPackageInfos );
    85                 RPointerArray<CAppMngr2PackageInfo>& aPackageInfos );
    86     void ErrorInCreatingPackagesL( const CAppMngr2InfoMaker& aMaker, TInt aError );
    86     void ErrorInCreatingPackagesL( const CAppMngr2InfoMaker& aMaker, TInt aError );
    87 
    87 
    88 public:     // from MAppMngr2InfoArrayObserver
    88 public:     // from MAppMngr2InfoArrayObserver
    89     void ArrayContentChanged( CAppMngr2InfoArray* aArray, TInt aMoreRefreshesExpected );
    89     void ArrayContentChanged( CAppMngr2InfoArray* aArray, TInt aMoreRefreshesExpected );
    90     
    90 
    91 private:    // new functions
    91 private:    // new functions
    92     CAppMngr2Model( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    92     CAppMngr2Model( RFs& aFsSession, MAppMngr2ModelObserver& aObserver );
    93     void ConstructL();
    93     void ConstructL();
    94     void LoadDefaultIconsL( CAknIconArray& aIconArray );
    94     void LoadDefaultIconsL( CAknIconArray& aIconArray );
    95     void LoadPluginsL();
    95     void LoadPluginsL();
   108     CAppMngr2AppInfoArray* iInstalledApps;
   108     CAppMngr2AppInfoArray* iInstalledApps;
   109     CAppMngr2PackageInfoArray* iInstallationFiles;
   109     CAppMngr2PackageInfoArray* iInstallationFiles;
   110     CAppMngr2InfoBase* iActiveItem; // not owned
   110     CAppMngr2InfoBase* iActiveItem; // not owned
   111     TInt iActiveCommand;
   111     TInt iActiveCommand;
   112     TBool iClosing;
   112     TBool iClosing;
   113     
   113     TBool iFetchingInstallationFiles;
       
   114     TBool iFetchingInstalledApps;
       
   115 
   114     FLOG_PERF_DEFINE( FetchInstallationFiles )
   116     FLOG_PERF_DEFINE( FetchInstallationFiles )
   115     FLOG_PERF_DEFINE( FetchInstalledApps )
   117     FLOG_PERF_DEFINE( FetchInstalledApps )
   116     };
   118     };
   117 
   119 
   118 #endif // C_APPMNGR2MODEL_H
   120 #endif // C_APPMNGR2MODEL_H