connectivitymodules/SeCon/services/pcd/inc/sconinstaller.h
branchRCL_3
changeset 19 0aa8cc770c8a
parent 18 453dfc402455
child 20 4a793f564d72
equal deleted inserted replaced
18:453dfc402455 19:0aa8cc770c8a
     1 /*
       
     2 * Copyright (c) 2005-2009 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 "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:  CSConAppInstaller header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _SCONINSTALLER_H_
       
    20 #define _SCONINSTALLER_H_
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <e32cons.h>
       
    26 #include <SWInstApi.h>
       
    27 
       
    28 #include "sconinstqueue.h"
       
    29 
       
    30 class CSConUninstall;
       
    31 
       
    32 //============================================================
       
    33 // Class CSConAppInstaller declaration
       
    34 //============================================================	
       
    35 NONSHARABLE_CLASS ( CSConAppInstaller ): public CActive
       
    36 	{
       
    37 	public:
       
    38 		/**
       
    39 		 * Constructor
       
    40 		 * @param aQueue The address of CSConInstallerQueu
       
    41     	 * @return none
       
    42 		 */
       
    43 		CSConAppInstaller( CSConInstallerQueue* aQueue, RFs& aFs );
       
    44 		
       
    45 		/**
       
    46 		 * Destructor
       
    47 		 * @return none
       
    48 		 */
       
    49 		~CSConAppInstaller();
       
    50 		
       
    51 		/**
       
    52 		 * Starts the installer task
       
    53 		 * @param aTaskId Task number
       
    54     	 * @return none
       
    55 		 */
       
    56 		void StartInstaller( TInt& aTaskId );
       
    57 		/**
       
    58 		 * Stops the installer task
       
    59     	 * @return none
       
    60 		 */
       
    61 		void StopInstaller( TInt& aTaskId );
       
    62 		
       
    63 		/**
       
    64 		 * Returns the active status of the installer
       
    65 		 * @return ETrue if installer is active, else EFalse
       
    66 		 */
       
    67 		TBool InstallerActive() const;
       
    68 		
       
    69 	private:
       
    70 		/**
       
    71 		 * Implementation of CActive::DoCancel()
       
    72 		 * @return none
       
    73 		 */
       
    74 		void DoCancel();
       
    75 		/**
       
    76 		 * Implementation of CActive::RunL()
       
    77 		 * @return none
       
    78 		 */
       
    79 		void RunL();
       
    80 		/**
       
    81 		 * Executes ListInstalledApps task
       
    82 		 * @return none
       
    83 		 */
       
    84 		void ProcessListInstalledAppsL();
       
    85 		/**
       
    86 		 * Execures UnInstall task
       
    87 		 * @param CSConUninstall uninstall params
       
    88     	 * @return none
       
    89 		 */
       
    90 		void ProcessUninstallL( const CSConUninstall& aUninstallParams );
       
    91 		
       
    92 		void UninstallSisL( const CSConUninstall& aUninstallParams );
       
    93 		void UninstallJavaL( const TUid& aUid, const TSConInstallMode aMode );
       
    94 		void UninstallWidget( const TUid& aUid, const TSConInstallMode aMode );
       
    95 		void DeleteFile( const TDesC& aPath );
       
    96 		
       
    97 	private:
       
    98 	    enum TInstallerState
       
    99 	        {
       
   100 	        EIdle = 0,
       
   101 	        EInstalling,
       
   102 	        ESilentInstalling,
       
   103 	        EUninstalling,
       
   104 	        ESilentUninstalling,
       
   105 	        ECustomUninstalling,
       
   106 	        ESilentCustomUnistalling,
       
   107 	        EListingInstalledApps
       
   108 	        };
       
   109 	    TInstallerState                 iInstallerState;
       
   110 		CSConInstallerQueue*			iQueue; // Not owned
       
   111 		SwiUI::RSWInstLauncher			iSWInst;
       
   112 		SwiUI::TInstallOptions          iOptions;
       
   113         SwiUI::TInstallOptionsPckg      iOptionsPckg;   
       
   114 		TInt							iCurrentTask;
       
   115 		RFs&                            iFs;
       
   116 	};
       
   117 	
       
   118 #endif // _SCONINSTALLER_H_
       
   119 
       
   120 // End of file