|
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 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @released |
|
22 @internalTechnology |
|
23 */ |
|
24 |
|
25 #ifndef __UNINSTALLATIONPROCESSOR_H__ |
|
26 #define __UNINSTALLATIONPROCESSOR_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <f32file.h> |
|
30 #include "sisregistryfiledescription.h" |
|
31 #include "processor.h" |
|
32 |
|
33 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
34 #include "registrywrapper.h" |
|
35 #else |
|
36 #include "sisregistrywritablesession.h" |
|
37 #endif |
|
38 |
|
39 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
40 class CIntegrityServices; |
|
41 #endif |
|
42 |
|
43 namespace Swi |
|
44 { |
|
45 class CApplication; |
|
46 class CSecurityManager; |
|
47 class RSisHelper; |
|
48 class RUiHandler; |
|
49 class CHashContainer; |
|
50 class CPlan; |
|
51 |
|
52 /** |
|
53 * This class processes a CApplication created by the installation planner |
|
54 * @released |
|
55 * @internalTechnology |
|
56 */ |
|
57 class CUninstallationProcessor : public CProcessor |
|
58 { |
|
59 public: |
|
60 |
|
61 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
62 /** |
|
63 * Creates a new CUninstallationProcessor |
|
64 * @param aPlan Installation plan |
|
65 * @param aUiHandler Interface for progress notification |
|
66 * @param aStsSession Used to rollback installation process |
|
67 * @param aRegistryWrapper Used for registy operations |
|
68 * @param aObserver SWI Observer sessision handle which is used to log SWI events. |
|
69 * @return New application processor object |
|
70 */ |
|
71 static CUninstallationProcessor* NewL(const CPlan& aPlan, RUiHandler& aUiHandler, |
|
72 Usif::RStsSession& aStsSession, CRegistryWrapper& aRegistryWrapper, |
|
73 RSwiObserverSession& aObserver); |
|
74 #else |
|
75 /** |
|
76 * Creates a new CUninstallationProcessor |
|
77 * @param aPlan Installation plan |
|
78 * @param aUiHandler Interface for progress notification |
|
79 * @param aIntegrityServices Used to rollback installation process |
|
80 * @param aObserver SWI Observer sessision handle which is used to log SWI events. |
|
81 * @return New application processor object |
|
82 */ |
|
83 static CUninstallationProcessor* NewL(const CPlan& aPlan, RUiHandler& aUiHandler, |
|
84 CIntegrityServices& aIntegrityServices, RSwiObserverSession& aObserver); |
|
85 #endif |
|
86 |
|
87 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
88 /** |
|
89 * Creates a new CUninstallationProcessor and places it on the cleanup stack |
|
90 * @param aPlan Installation plan |
|
91 * @param aUiHandler Interface for progress notification |
|
92 * @param aStsSession Used to rollback installation process |
|
93 * @param aRegistryWrapper Used for registy operations |
|
94 * @param aObserver SWI Observer sessision handle which is used to log SWI events. |
|
95 * @return New application processor object on the |
|
96 * cleanup stack |
|
97 */ |
|
98 static CUninstallationProcessor* NewLC(const CPlan& aPlan, RUiHandler& aUiHandler, |
|
99 Usif::RStsSession& aStsSession, CRegistryWrapper& aRegistryWrapper, |
|
100 RSwiObserverSession& aObserver); |
|
101 #else |
|
102 /** |
|
103 * Creates a new CUninstallationProcessor and places it on the cleanup stack |
|
104 * @param aPlan Installation plan |
|
105 * @param aUiHandler Interface for progress notification |
|
106 * @param aIntegrityServices Used to rollback installation process |
|
107 * @param aObserver SWI Observer sessision handle which is used to log SWI events. |
|
108 * @return New application processor object on the |
|
109 * cleanup stack |
|
110 */ |
|
111 static CUninstallationProcessor* NewLC(const CPlan& aPlan, RUiHandler& aUiHandler, |
|
112 CIntegrityServices& aIntegrityServices, RSwiObserverSession& aObserver); |
|
113 #endif |
|
114 |
|
115 static CUninstallationProcessor* NewL(CUninstallationProcessor& aProcessor); |
|
116 |
|
117 virtual ~CUninstallationProcessor(); |
|
118 |
|
119 private: |
|
120 CUninstallationProcessor(const CPlan& aPlan, RUiHandler& aUiHandler, |
|
121 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
122 Usif::RStsSession& aStsSession, CRegistryWrapper& aRegistryWrapper, |
|
123 #else |
|
124 CIntegrityServices& aIntegrityServices, |
|
125 #endif |
|
126 RSwiObserverSession& aObserver); |
|
127 |
|
128 void ConstructL(); |
|
129 |
|
130 /** |
|
131 * Resets member data ready for processing a new application |
|
132 */ |
|
133 void Reset(); |
|
134 |
|
135 // Functions which get called by CProcessor::RunL to do the work |
|
136 private: |
|
137 virtual TBool DoStateInitializeL(); |
|
138 virtual TBool DoStateProcessEmbeddedL(); |
|
139 virtual TBool DoStateExtractFilesL(); |
|
140 virtual TBool DoStateVerifyPathsL(); |
|
141 virtual TBool DoStateInstallFilesL(); |
|
142 virtual TBool DoStateDisplayFilesL(); |
|
143 virtual TBool DoStateUpdateRegistryL(); |
|
144 virtual TBool DoStateProcessSkipFilesL(); |
|
145 |
|
146 void DoCancel(); |
|
147 |
|
148 CUninstallationProcessor& EmbeddedProcessorL(); |
|
149 private: |
|
150 /// Processes embedded applications |
|
151 CUninstallationProcessor* iEmbeddedProcessor; |
|
152 |
|
153 TInt iCurrent; |
|
154 }; |
|
155 |
|
156 } // namespace Swi |
|
157 |
|
158 #endif |