114
|
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 |
/**
|
|
68 |
* Return whether icon file copy required.
|
|
69 |
*
|
|
70 |
* @return TBool ETrue if icon file copy is required. Otherwise false.
|
|
71 |
*/
|
|
72 |
TBool IconFileCopyRequired() const;
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Set icon file copy requirement flag.
|
|
76 |
*
|
|
77 |
* @param aCopyRequired Value to be set.
|
|
78 |
*/
|
|
79 |
void SetIconFileCopyRequired( const TBool aCopyRequired );
|
|
80 |
|
|
81 |
/**
|
|
82 |
* Return whether resource file copy required.
|
|
83 |
*
|
|
84 |
* @return TBool ETrue if icon file copy is required. Otherwise false.
|
|
85 |
*/
|
|
86 |
TBool ResourceFileCopyRequired() const;
|
|
87 |
|
|
88 |
/**
|
|
89 |
* Set resource file copy requirement flag.
|
|
90 |
*
|
|
91 |
* @param aCopyRequired Value to be set.
|
|
92 |
*/
|
|
93 |
void SetResourceFileCopyRequired( const TBool aCopyRequired );
|
|
94 |
|
|
95 |
/**
|
|
96 |
* Get app uid of session
|
|
97 |
*
|
|
98 |
* @return App uid.
|
|
99 |
*/
|
|
100 |
TInt AppUid() const;
|
|
101 |
|
|
102 |
private:
|
|
103 |
|
|
104 |
/**
|
|
105 |
* ~ChspsThemeServerSession
|
|
106 |
* @since S60 3.1
|
|
107 |
*/
|
|
108 |
~ChspsThemeServerSession();
|
|
109 |
|
|
110 |
/**
|
|
111 |
* Server
|
|
112 |
* @since S60 3.1
|
|
113 |
*/
|
|
114 |
inline ChspsThemeServer& Server();
|
|
115 |
|
|
116 |
/**
|
|
117 |
* ServiceL, traps DoServiceL call and completes service
|
|
118 |
* requests when an error occures.
|
|
119 |
* @since S60 5.0
|
|
120 |
*/
|
|
121 |
void ServiceL(const RMessage2& aMessage);
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Executes requested service.
|
|
125 |
* @since S60 5.0
|
|
126 |
*/
|
|
127 |
void DoServiceL(const RMessage2& aMessage);
|
|
128 |
|
|
129 |
/**
|
|
130 |
* ServiceError
|
|
131 |
* @since S60 3.1
|
|
132 |
*/
|
|
133 |
void ServiceError(const RMessage2& aMessage,TInt aError);
|
|
134 |
|
|
135 |
/* hspsInstallationService requests */
|
|
136 |
/**
|
|
137 |
* InstallThemeL
|
|
138 |
* @since S60 3.1
|
|
139 |
*/
|
|
140 |
void InstallThemeL(const RMessage2& aMessage);
|
|
141 |
|
|
142 |
/**
|
|
143 |
* InstallNextPhaseL
|
|
144 |
* @since S60 3.1
|
|
145 |
*/
|
|
146 |
void InstallNextPhaseL(const RMessage2& aMessage);
|
|
147 |
|
|
148 |
/**
|
|
149 |
* CancelInstallThemeL
|
|
150 |
* @since S60 3.1
|
|
151 |
*/
|
|
152 |
void CancelInstallThemeL(const RMessage2& aMessage);
|
|
153 |
|
|
154 |
/**
|
|
155 |
* ReinstallConfL
|
|
156 |
* @since S60 5.0
|
|
157 |
*/
|
|
158 |
void ReinstallConfL(const RMessage2& aMessage);
|
|
159 |
|
|
160 |
/* hspsMaintenanceService requests */
|
|
161 |
/**
|
|
162 |
* GetListHeadersL
|
|
163 |
* @since S60 3.1
|
|
164 |
*/
|
|
165 |
void GetListHeadersL(const RMessage2& aMessage);
|
|
166 |
|
|
167 |
/**
|
|
168 |
* GetNextHeaderL
|
|
169 |
* @since S60 3.1
|
|
170 |
*/
|
|
171 |
void GetNextHeaderL(const RMessage2& aMessage);
|
|
172 |
|
|
173 |
/**
|
|
174 |
* CancelGetListHeadersL
|
|
175 |
* @since S60 3.1
|
|
176 |
*/
|
|
177 |
void CancelGetListHeadersL(const RMessage2& aMessage);
|
|
178 |
|
|
179 |
/**
|
|
180 |
* SetActiveThemeL
|
|
181 |
* @since S60 3.1
|
|
182 |
*/
|
|
183 |
void SetActiveThemeL(const RMessage2& aMessage);
|
|
184 |
|
|
185 |
/**
|
|
186 |
* RestoreDefaultL
|
|
187 |
* @since S60 3.1
|
|
188 |
*/
|
|
189 |
void RestoreDefaultL(const RMessage2& aMessage);
|
|
190 |
|
|
191 |
/**
|
|
192 |
* RemoveThemeL
|
|
193 |
* @since S60 3.1
|
|
194 |
*/
|
|
195 |
void RemoveThemeL(const RMessage2& aMessage);
|
|
196 |
|
|
197 |
/**
|
|
198 |
* AddPluginL
|
|
199 |
* @since S60 5.0
|
|
200 |
*/
|
|
201 |
void AddPluginL(const RMessage2& aMessage);
|
|
202 |
|
|
203 |
/**
|
|
204 |
* RemovePluginL
|
|
205 |
* @since S60 5.0
|
|
206 |
*/
|
|
207 |
void RemovePluginL(const RMessage2& aMessage);
|
|
208 |
|
|
209 |
/**
|
|
210 |
* SetActivePluginL
|
|
211 |
*
|
|
212 |
* @since S60 5.0
|
|
213 |
* @param aMessage IPC message data.
|
|
214 |
*/
|
|
215 |
void SetActivePluginL( const RMessage2& aMessage );
|
|
216 |
|
|
217 |
/**
|
|
218 |
* ReplacePluginL
|
|
219 |
* @since S60 5.0
|
|
220 |
*/
|
|
221 |
void ReplacePluginL(const RMessage2& aMessage);
|
|
222 |
|
|
223 |
/**
|
|
224 |
* SetPluginSettingsL
|
|
225 |
* @since S60 5.0
|
|
226 |
*/
|
|
227 |
void SetPluginSettingsL(const RMessage2& aMessage);
|
|
228 |
|
|
229 |
/**
|
|
230 |
* GetPluginOdtL
|
|
231 |
* @since S60 5.0
|
|
232 |
*/
|
|
233 |
void GetPluginOdtL(const RMessage2& aMessage);
|
|
234 |
|
|
235 |
/**
|
|
236 |
* MovePluginsL
|
|
237 |
* @since S60 5.0
|
|
238 |
*/
|
|
239 |
void MovePluginsL(const RMessage2& aMessage);
|
|
240 |
|
|
241 |
/**
|
|
242 |
* SetConfStateL
|
|
243 |
* @since S60 5.0
|
|
244 |
*/
|
|
245 |
void SetConfStateL(const RMessage2& aMessage);
|
|
246 |
|
|
247 |
/**
|
|
248 |
* RestoreActiveAppConfL
|
|
249 |
* @since S60 5.0
|
|
250 |
*/
|
|
251 |
void RestoreActiveAppConfL(const RMessage2& aMessage);
|
|
252 |
|
|
253 |
/**
|
|
254 |
* RestoreConfigurationsL
|
|
255 |
* @since S60 5.2
|
|
256 |
*/
|
|
257 |
void RestoreConfigurationsL( const RMessage2& aMessage );
|
|
258 |
|
|
259 |
/****************************************
|
|
260 |
* hspsClientRequestService requests
|
|
261 |
****************************************/
|
|
262 |
|
|
263 |
/**
|
|
264 |
* GetOdtL
|
|
265 |
* @since S60 3.1
|
|
266 |
*/
|
|
267 |
void GetOdtL(const RMessage2& aMessage);
|
|
268 |
|
|
269 |
/**
|
|
270 |
* GetOdtUpdateL
|
|
271 |
* @since S60 3.1
|
|
272 |
*/
|
|
273 |
void GetOdtUpdateL(const RMessage2& aMessage);
|
|
274 |
|
|
275 |
/**
|
|
276 |
* CancelGetOdtUpdateL
|
|
277 |
* @since S60 3.1
|
|
278 |
*/
|
|
279 |
void CancelGetOdtUpdateL(const RMessage2& aMessage);
|
|
280 |
|
|
281 |
/**
|
|
282 |
* AccessResourceFileL
|
|
283 |
* @since S60 3.1
|
|
284 |
*/
|
|
285 |
void AccessResourceFileL(const RMessage2& aMessage);
|
|
286 |
|
|
287 |
/**
|
|
288 |
* Copies (overwrites) odt's resource files under private folder.
|
|
289 |
* Creates folder for each plug-in if needed.
|
|
290 |
* @since S60 5.0.1
|
|
291 |
*/
|
|
292 |
void CopyResourceFilesL(const RMessage2& aMessage);
|
|
293 |
|
|
294 |
|
|
295 |
/**
|
|
296 |
* CreateMaintenanceHandlerL
|
|
297 |
*
|
|
298 |
* Creates a new maintenance handler if one does not already exist.
|
|
299 |
*/
|
|
300 |
void CreateMaintenanceHandlerL( const TUint aSecureId );
|
|
301 |
|
|
302 |
/**
|
|
303 |
* CreateClientRequestHandlerL
|
|
304 |
*
|
|
305 |
* Creates a new client request handler if one does not already exist.
|
|
306 |
*/
|
|
307 |
void CreateClientRequestHandlerL();
|
|
308 |
|
|
309 |
/**
|
|
310 |
* Finds unique widgets, configuration UIDs, from resource an array.
|
|
311 |
* @since S60 5.0.1
|
|
312 |
* @param aAppODT is an instance of an application configuration ODT
|
|
313 |
* @param aUidArray holds found UIDs in an array
|
|
314 |
*/
|
|
315 |
void FindWidgetUidsL(
|
|
316 |
ChspsODT& aAppODT,
|
|
317 |
RArray<TInt>& aUidArray );
|
|
318 |
|
|
319 |
private:
|
|
320 |
RFs iFs;
|
|
321 |
ChspsInstallationHandler* iInstallationHandler;
|
|
322 |
ChspsMaintenanceHandler* iMaintenanceHandler;
|
|
323 |
ChspsClientRequestHandler* iClientRequestHandler;
|
|
324 |
RMessagePtr2 iMessagePtr;
|
|
325 |
TBool iHoldingResources;
|
|
326 |
TInt iAppUid;
|
|
327 |
|
|
328 |
|
|
329 |
/**
|
|
330 |
* Boolean to indicate that icon files need to be copied.
|
|
331 |
*/
|
|
332 |
TBool iIconFileCopyRequired;
|
|
333 |
|
|
334 |
/**
|
|
335 |
* Boolean to indicate that resource files need to be copied.
|
|
336 |
*/
|
|
337 |
TBool iResourceFileCopyRequired;
|
|
338 |
|
|
339 |
#ifdef HSPS_LOG_ACTIVE
|
|
340 |
/**
|
|
341 |
* Log bus.
|
|
342 |
*/
|
|
343 |
ChspsLogBus* iLogBus;
|
|
344 |
#endif
|
|
345 |
};
|
|
346 |
|
|
347 |
|
|
348 |
#endif //__hspsTHEMESERVERSESSION_H__
|