|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Implements self update process. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IAUPDATERMNGR_H |
|
21 #define IAUPDATERMNGR_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <f32file.h> |
|
25 #include <w32std.h> |
|
26 |
|
27 #include "iaupdaterparams.h" |
|
28 #include "iaupdatercancelobserver.h" |
|
29 |
|
30 |
|
31 class CIAUpdaterFileList; |
|
32 class CIAUpdaterResultsFile; |
|
33 class CIAUpdaterInstaller; |
|
34 |
|
35 |
|
36 /** |
|
37 * This class implements self update manager. |
|
38 * |
|
39 * @code |
|
40 * @endcode |
|
41 * @lib |
|
42 * @since S60 |
|
43 */ |
|
44 class CIAUpdaterMngr : public CBase, |
|
45 public MIAUpdaterCancelObserver |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CIAUpdaterMngr* NewL(); |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 */ |
|
57 static CIAUpdaterMngr* NewLC(); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 ~CIAUpdaterMngr(); |
|
63 |
|
64 /** |
|
65 * Funtion gets sis pkgs and starts silent install process. |
|
66 * |
|
67 * @since S60 |
|
68 * @param aStartParams Start parametrs |
|
69 */ |
|
70 void ProcessInstallingL( TIAUpdaterStartParams& aStartParams ); |
|
71 |
|
72 /** |
|
73 * Function sets parameters for IAD process. |
|
74 * |
|
75 * @since S60 |
|
76 * @param aParams |
|
77 */ |
|
78 void SetProcessParametersL( TInt aErr ); |
|
79 |
|
80 /** |
|
81 * Start IAD processes after installation. |
|
82 * |
|
83 * @since S60 |
|
84 */ |
|
85 void StartIADProcessesL(); |
|
86 |
|
87 /** |
|
88 * Close IAD processes after successfull installation. |
|
89 * |
|
90 * @since S60 |
|
91 */ |
|
92 void CloseIADProcessesL(); |
|
93 |
|
94 private: |
|
95 |
|
96 /** |
|
97 * Constructor. |
|
98 */ |
|
99 void ConstructL(); |
|
100 |
|
101 private: //From MIAUpdateCancelObserver |
|
102 |
|
103 /** |
|
104 * Called when global progress note cancelled by an user |
|
105 * |
|
106 */ |
|
107 void UserCancel(); |
|
108 |
|
109 /** |
|
110 * Called when global progress note removed by end key |
|
111 * |
|
112 */ |
|
113 void UserExit(); |
|
114 |
|
115 |
|
116 private: // new functions |
|
117 |
|
118 /** |
|
119 * Function gives paths to install process. |
|
120 * |
|
121 * @since S60 |
|
122 * @param aList Contains information about the content files. |
|
123 */ |
|
124 void ProcessSISFilesL( CIAUpdaterFileList& aList ); |
|
125 |
|
126 /** |
|
127 * Waits until ECOM has updated its index list. |
|
128 */ |
|
129 void EcomWaiterL() const; |
|
130 |
|
131 /** |
|
132 * Checks if the given UID matches |
|
133 * any known ECOM plugin package UID. |
|
134 */ |
|
135 TBool IsEcomPlugin( const TUid& aUid ) const; |
|
136 |
|
137 /** |
|
138 * Returns full name of currently installed iaupdate.exe |
|
139 */ |
|
140 void InstalledIAUpdateL( TFileName& aFullName ) const; |
|
141 |
|
142 |
|
143 private: // data |
|
144 |
|
145 // File server session. |
|
146 RFs iFs; |
|
147 |
|
148 // Installer |
|
149 CIAUpdaterInstaller* iIAInstaller; |
|
150 |
|
151 // This will contain parameters that iaupdate uses when it |
|
152 // is started after self updater. |
|
153 CIAUpdaterResultsFile* iResultsFile; |
|
154 |
|
155 // This is used to identify what is the current file list |
|
156 // that will be installed. Not owned. |
|
157 CIAUpdaterFileList* iCurrentFileList; |
|
158 |
|
159 // This is used for the application task list. |
|
160 RWsSession iWsSession; |
|
161 |
|
162 // This error value is used to recognize if one or more |
|
163 // of the installed packets have failed. |
|
164 TInt iInstallError; |
|
165 |
|
166 // User exit with end key |
|
167 TBool iUserExit; |
|
168 |
|
169 // Informs if the installation package has been an ECOM plugin. |
|
170 // If so, then ECOM indexing will be waited in the end of the flow. |
|
171 TBool iEcomPluginInstalled; |
|
172 |
|
173 }; |
|
174 |
|
175 #endif //CIAUPDATERMNGR_H |
|
176 |
|
177 //EOF |