sapi_applicationmanager/appmanagerservice/inc/installpkgiterator.h
changeset 0 14df0fbfcc4e
equal deleted inserted replaced
-1:000000000000 0:14df0fbfcc4e
       
     1 /*
       
     2 * Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This Class provides information of all packages installed on 
       
    15 *                the phone by user.
       
    16 *				 				 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __INSTALLPKGITR_H__
       
    22 #define __INSTALLPKGITR_H__
       
    23 
       
    24 
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <swi/sisregistrysession.h>
       
    28 #include <javaregistry.h> 
       
    29 #include "appmanagercommon.h"
       
    30 
       
    31 /**
       
    32 * This Class is an iterator to the list of installed packages
       
    33 *
       
    34 * @since  Series60 v3.2
       
    35 */
       
    36 class CInstallPkgIterator: public CBase , public MIterator
       
    37 	{
       
    38 
       
    39 	public:
       
    40 
       
    41     	 /**
       
    42         * Returns the instance of CInstallPkgIterator.
       
    43         * @since  Series60 v3.2
       
    44         * @param  void
       
    45         * @return CInstallPkgIterator* return the instance of CInstallPkgIterator class
       
    46         */
       
    47 		 static CInstallPkgIterator* NewL();
       
    48 		 
       
    49 		/**
       
    50     	* Destructor.
       
    51     	*/
       
    52 		~CInstallPkgIterator();
       
    53 
       
    54 		 /**
       
    55 		* It gives the instance of MInfoMap which contains the information about the next package 
       
    56 		* on iterator list.
       
    57 		* @since  Series60 v3.2
       
    58 		* @param  aInfo Instance of MInfoMap
       
    59 		* @return TBool returns ETrue when get next application or else False when no more applications
       
    60 		* 				are present on the iterator list
       
    61 		*/
       
    62 		virtual TBool NextL(MInfoMap*& aInfo);
       
    63 
       
    64        
       
    65         /**
       
    66     	* It resets the iterator;
       
    67     	*/
       
    68 		virtual void Reset();
       
    69 
       
    70 
       
    71 	private:		
       
    72 
       
    73      	/**
       
    74         * Constructor
       
    75         * @since  Series60 v3.2
       
    76         */
       
    77 		CInstallPkgIterator();
       
    78 
       
    79      	/**
       
    80         * Two-phased constructor
       
    81         * @return void
       
    82         * @since  Series60 v3.2
       
    83         */
       
    84 		void ConstructL();
       
    85 
       
    86 	private:
       
    87 
       
    88         /**
       
    89         * Instance of Swi::RSisRegistrySession
       
    90         */  
       
    91 		Swi::RSisRegistrySession  iSisRegSession;			
       
    92 
       
    93         /**
       
    94         * Pointer to Java::CJavaRegistry instance
       
    95         */  
       
    96 		Java::CJavaRegistry* iJavaReg;
       
    97 
       
    98         /**
       
    99         * Array of uids of installed native packages(sisx)
       
   100         */  
       
   101 		RArray<TUid>  iSisxUids;
       
   102 
       
   103         /**
       
   104         * Array of uids of installed non-native packages(.jar)
       
   105         */  
       
   106 		RArray<TUid>  iJavaUids;
       
   107 
       
   108         /**
       
   109         * Gives the current value of index in arrays
       
   110         */  
       
   111 		TInt iCurrent;
       
   112 	};
       
   113 
       
   114 
       
   115 #endif __INSTALLPKGITR_H__