|
1 /* |
|
2 * Copyright (c) 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: HSPS server session |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __hspsTHEMESERVERSESSION_H__ |
|
21 #define __hspsTHEMESERVERSESSION_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <f32file.h> |
|
25 |
|
26 #include "hsps_builds_cfg.hrh" |
|
27 |
|
28 // Forward declarations |
|
29 class ChspsODT; |
|
30 class ChspsInstallationHandler; |
|
31 class ChspsMaintenanceHandler; |
|
32 class ChspsClientRequestHandler; |
|
33 class ChspsThemeServer; |
|
34 |
|
35 #ifdef HSPS_LOG_ACTIVE |
|
36 class ChspsLogBus; |
|
37 #endif |
|
38 |
|
39 /** |
|
40 * @ingroup group_hspsserversession |
|
41 * This class provides HSPS Server Session |
|
42 */ |
|
43 class ChspsThemeServerSession : public CSession2 |
|
44 { |
|
45 public: |
|
46 |
|
47 /** |
|
48 * ChspsThemeServerSession |
|
49 * @param aAppUid Application UID using this session |
|
50 * @since S60 3.1 |
|
51 */ |
|
52 ChspsThemeServerSession( |
|
53 const TInt aAppUid ); |
|
54 |
|
55 /** |
|
56 * CreateL |
|
57 * @since S60 3.1 |
|
58 */ |
|
59 void CreateL(); |
|
60 |
|
61 /** |
|
62 * Shares RFs instance from session to handlers it owns. |
|
63 * @return Reference to RFs instance |
|
64 */ |
|
65 RFs& FileSystem(); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * ~ChspsThemeServerSession |
|
71 * @since S60 3.1 |
|
72 */ |
|
73 ~ChspsThemeServerSession(); |
|
74 |
|
75 /** |
|
76 * Server |
|
77 * @since S60 3.1 |
|
78 */ |
|
79 inline ChspsThemeServer& Server(); |
|
80 |
|
81 /** |
|
82 * ServiceL, traps DoServiceL call and completes service |
|
83 * requests when an error occures. |
|
84 * @since S60 5.0 |
|
85 */ |
|
86 void ServiceL(const RMessage2& aMessage); |
|
87 |
|
88 /** |
|
89 * Executes requested service. |
|
90 * @since S60 5.0 |
|
91 */ |
|
92 void DoServiceL(const RMessage2& aMessage); |
|
93 |
|
94 /** |
|
95 * ServiceError |
|
96 * @since S60 3.1 |
|
97 */ |
|
98 void ServiceError(const RMessage2& aMessage,TInt aError); |
|
99 |
|
100 /* hspsInstallationService requests */ |
|
101 /** |
|
102 * InstallThemeL |
|
103 * @since S60 3.1 |
|
104 */ |
|
105 void InstallThemeL(const RMessage2& aMessage); |
|
106 |
|
107 /** |
|
108 * InstallNextPhaseL |
|
109 * @since S60 3.1 |
|
110 */ |
|
111 void InstallNextPhaseL(const RMessage2& aMessage); |
|
112 |
|
113 /** |
|
114 * CancelInstallThemeL |
|
115 * @since S60 3.1 |
|
116 */ |
|
117 void CancelInstallThemeL(const RMessage2& aMessage); |
|
118 |
|
119 /** |
|
120 * ReinstallConfL |
|
121 * @since S60 5.0 |
|
122 */ |
|
123 void ReinstallConfL(const RMessage2& aMessage); |
|
124 |
|
125 /* hspsMaintenanceService requests */ |
|
126 /** |
|
127 * GetListHeadersL |
|
128 * @since S60 3.1 |
|
129 */ |
|
130 void GetListHeadersL(const RMessage2& aMessage); |
|
131 |
|
132 /** |
|
133 * GetNextHeaderL |
|
134 * @since S60 3.1 |
|
135 */ |
|
136 void GetNextHeaderL(const RMessage2& aMessage); |
|
137 |
|
138 /** |
|
139 * CancelGetListHeadersL |
|
140 * @since S60 3.1 |
|
141 */ |
|
142 void CancelGetListHeadersL(const RMessage2& aMessage); |
|
143 |
|
144 /** |
|
145 * SetActiveThemeL |
|
146 * @since S60 3.1 |
|
147 */ |
|
148 void SetActiveThemeL(const RMessage2& aMessage); |
|
149 |
|
150 /** |
|
151 * RestoreDefaultL |
|
152 * @since S60 3.1 |
|
153 */ |
|
154 void RestoreDefaultL(const RMessage2& aMessage); |
|
155 |
|
156 /** |
|
157 * RemoveThemeL |
|
158 * @since S60 3.1 |
|
159 */ |
|
160 void RemoveThemeL(const RMessage2& aMessage); |
|
161 |
|
162 /** |
|
163 * AddPluginL |
|
164 * @since S60 5.0 |
|
165 */ |
|
166 void AddPluginL(const RMessage2& aMessage); |
|
167 |
|
168 /** |
|
169 * RemovePluginL |
|
170 * @since S60 5.0 |
|
171 */ |
|
172 void RemovePluginL(const RMessage2& aMessage); |
|
173 |
|
174 /** |
|
175 * SetActivePluginL |
|
176 * |
|
177 * @since S60 5.0 |
|
178 * @param aMessage IPC message data. |
|
179 */ |
|
180 void SetActivePluginL( const RMessage2& aMessage ); |
|
181 |
|
182 /** |
|
183 * ReplacePluginL |
|
184 * @since S60 5.0 |
|
185 */ |
|
186 void ReplacePluginL(const RMessage2& aMessage); |
|
187 |
|
188 /** |
|
189 * SetPluginSettingsL |
|
190 * @since S60 5.0 |
|
191 */ |
|
192 void SetPluginSettingsL(const RMessage2& aMessage); |
|
193 |
|
194 /** |
|
195 * GetPluginOdtL |
|
196 * @since S60 5.0 |
|
197 */ |
|
198 void GetPluginOdtL(const RMessage2& aMessage); |
|
199 |
|
200 /** |
|
201 * MovePluginsL |
|
202 * @since S60 5.0 |
|
203 */ |
|
204 void MovePluginsL(const RMessage2& aMessage); |
|
205 |
|
206 /** |
|
207 * SetConfStateL |
|
208 * @since S60 5.0 |
|
209 */ |
|
210 void SetConfStateL(const RMessage2& aMessage); |
|
211 |
|
212 /** |
|
213 * RestoreActiveAppConfL |
|
214 * @since S60 5.0 |
|
215 */ |
|
216 void RestoreActiveAppConfL(const RMessage2& aMessage); |
|
217 |
|
218 /**************************************** |
|
219 * hspsClientRequestService requests |
|
220 ****************************************/ |
|
221 |
|
222 /** |
|
223 * GetOdtL |
|
224 * @since S60 3.1 |
|
225 */ |
|
226 void GetOdtL(const RMessage2& aMessage); |
|
227 |
|
228 /** |
|
229 * GetOdtUpdateL |
|
230 * @since S60 3.1 |
|
231 */ |
|
232 void GetOdtUpdateL(const RMessage2& aMessage); |
|
233 |
|
234 /** |
|
235 * CancelGetOdtUpdateL |
|
236 * @since S60 3.1 |
|
237 */ |
|
238 void CancelGetOdtUpdateL(const RMessage2& aMessage); |
|
239 |
|
240 /** |
|
241 * AccessResourceFileL |
|
242 * @since S60 3.1 |
|
243 */ |
|
244 void AccessResourceFileL(const RMessage2& aMessage); |
|
245 |
|
246 /** |
|
247 * Copies (overwrites) odt's resource files under private folder. |
|
248 * Creates folder for each plug-in if needed. |
|
249 * @since S60 5.0.1 |
|
250 */ |
|
251 void CopyResourceFilesL(const RMessage2& aMessage); |
|
252 |
|
253 |
|
254 /** |
|
255 * CreateMaintenanceHandlerL |
|
256 * |
|
257 * Creates a new maintenance handler if one does not already exist. |
|
258 */ |
|
259 void CreateMaintenanceHandlerL( const TUint aSecureId ); |
|
260 |
|
261 /** |
|
262 * CreateClientRequestHandlerL |
|
263 * |
|
264 * Creates a new client request handler if one does not already exist. |
|
265 */ |
|
266 void CreateClientRequestHandlerL(); |
|
267 |
|
268 /** |
|
269 * Finds unique widgets, configuration UIDs, from resource an array. |
|
270 * @since S60 5.0.1 |
|
271 * @param aAppODT is an instance of an application configuration ODT |
|
272 * @param aUidArray holds found UIDs in an array |
|
273 */ |
|
274 void FindWidgetUidsL( |
|
275 ChspsODT& aAppODT, |
|
276 RArray<TInt>& aUidArray ); |
|
277 |
|
278 /** |
|
279 * Handles copying of widget resources to a destination folder. |
|
280 * @since S60 5.0.1 |
|
281 * @param aAppODT Application configuration |
|
282 * @param aFilemanager File manager |
|
283 * @param aConfUid Widget which is to be processed |
|
284 * @param aDestination Target path where the files should be copied to |
|
285 */ |
|
286 TInt DoCopyResourceFilesL( |
|
287 ChspsODT& aAppODT, |
|
288 CFileMan& aFilemanager, |
|
289 const TInt aConfUid, |
|
290 const TDesC& aDestination ); |
|
291 |
|
292 private: |
|
293 RFs iFs; |
|
294 ChspsInstallationHandler* iInstallationHandler; |
|
295 ChspsMaintenanceHandler* iMaintenanceHandler; |
|
296 ChspsClientRequestHandler* iClientRequestHandler; |
|
297 RMessagePtr2 iMessagePtr; |
|
298 TBool iHoldingResources; |
|
299 TInt iAppUid; |
|
300 |
|
301 #ifdef HSPS_LOG_ACTIVE |
|
302 /** |
|
303 * Log bus. |
|
304 */ |
|
305 ChspsLogBus* iLogBus; |
|
306 #endif |
|
307 }; |
|
308 |
|
309 |
|
310 #endif //__hspsTHEMESERVERSESSION_H__ |