installationservices/swi/source/swis/server/uninstallationplanner.h
changeset 0 ba25891c3a9e
child 40 f8cf9d484c15
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2004-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 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: 
       
    15 * Definition of the CUninstallationPlanner
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalTechnology
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __UNINSTALLATIONPLANNER_H__
       
    27 #define __UNINSTALLATIONPLANNER_H__
       
    28 
       
    29 #include <e32std.h>
       
    30 
       
    31 #include "planner.h"
       
    32 
       
    33 namespace Swi 
       
    34 {
       
    35 class RUiHandler;
       
    36 class CInstallationResult;
       
    37 class CPlan;
       
    38 
       
    39 
       
    40 /**
       
    41  * This class plans the uninstallation. It asks the user all the required 
       
    42  * questions (regarding dependencies and files/apps in use) and builds a list 
       
    43  * of application and files that need to be uninstalled, without actually 
       
    44  * changing the state of the device.
       
    45  *
       
    46  * @released
       
    47  * @internalTechnology
       
    48  */
       
    49 class CUninstallationPlanner : public CPlanner
       
    50 	{
       
    51 public:
       
    52 	/**
       
    53 	 * This creates a new CUninstallationPlanner object.
       
    54 	 * @param aUiHandler An implementation of the UI
       
    55 	 * @param aResult    Result of uninstallation
       
    56 	 * @return           New object
       
    57 	 */
       
    58 	static CUninstallationPlanner* NewL(RUiHandler& aUiHandler, CInstallationResult& aResult);
       
    59 
       
    60 	/**
       
    61 	 * This creates a new CUninstallationPlanner object.
       
    62 	 * @param aUiHandler An implementation of the UI
       
    63 	 * @param aResult    Result of installation
       
    64 	 * @return           New object on the cleanup stack
       
    65 	 */
       
    66 	static CUninstallationPlanner* NewLC(RUiHandler& aUiHandler, CInstallationResult& aResult);
       
    67 
       
    68 	/**
       
    69 	 * The destructor.
       
    70 	 */
       
    71 	virtual ~CUninstallationPlanner(void);
       
    72 
       
    73 public:
       
    74 	/**
       
    75 	 * Kicks off the uninstallation planning
       
    76 	 *
       
    77 	 * @param aPackage The package to uninstall.
       
    78 	 */
       
    79 	void PlanUninstallationL(CSisRegistryPackage& aPackage);
       
    80 
       
    81 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
    82 	/**
       
    83 	 * @return The final progress bar value from the plan.
       
    84 	 */
       
    85 	TInt32 FinalProgressBarValue() const;
       
    86 #endif
       
    87 	
       
    88 	/**
       
    89 	 * Produces an uninstallation plan
       
    90 	 * @return Uninstallation plan object
       
    91 	 */
       
    92 //	CUninstallationPlan* GetPlanL();
       
    93 	
       
    94 private:
       
    95 	/**
       
    96 	 * The constructor.
       
    97 	 * @param aInstallerUI         UID of installation
       
    98 	 * @param aInstallationResult  Result of installation
       
    99 	 */
       
   100 	CUninstallationPlanner(RUiHandler& aInstallerUI, CInstallationResult& aInstallationResult);
       
   101 
       
   102 	/** 
       
   103 	 * Second phase constructor.
       
   104 	 * Builds the CAppInfo structure.
       
   105 	 */
       
   106 	void ConstructL();
       
   107 	
       
   108 private:
       
   109 	/**
       
   110 	 * Uninstalls a package, and packages which are embedded by this package.
       
   111 	 *
       
   112 	 * @param aUid UID of the package to uninstall.
       
   113 	 * @param aTopLevelPackage ETrue if this is the top level package in the embedding
       
   114 	 *									chain, EFalse otherwise.
       
   115 	 */
       
   116 //	void UninstallPackageL(TUid aUid, TBool aTopLevelPackage, TInt& aFileRemovalCount);
       
   117 
       
   118 private:
       
   119 
       
   120 	/// The uninstallation plan that will be populated by this class
       
   121 	CPlan* iPlan;
       
   122 	};
       
   123 
       
   124 } // namespace Swi 
       
   125 
       
   126 #endif