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: RhspsClientSession. RhspsClientSession is RSession for the hspsThemeServer.
|
|
15 |
* RhspsClientSession-implementation is a low-level connection library.
|
|
16 |
* It is used by Xuikon Client-side API-implementations, namely
|
|
17 |
* hspsClient and hspsRequestClient. It is not intended to be used by any
|
|
18 |
* Xuikon service users.
|
|
19 |
* Some of the functions are synchronous and same asynchronous when the nature
|
|
20 |
* of the request requiers.
|
|
21 |
*
|
|
22 |
*
|
|
23 |
*/
|
|
24 |
|
|
25 |
|
|
26 |
#ifndef __hspsCLIENTSESSION_H__
|
|
27 |
#define __hspsCLIENTSESSION_H__
|
|
28 |
|
|
29 |
#include <e32std.h>
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Server session.
|
|
33 |
*
|
|
34 |
* @lib hspsclientsession.lib
|
|
35 |
* @since S60 5.0
|
|
36 |
* @ingroup group_hspsclients
|
|
37 |
*/
|
|
38 |
class RhspsClientSession : public RSessionBase
|
|
39 |
{
|
|
40 |
protected:
|
|
41 |
/**
|
|
42 |
* Connect.
|
|
43 |
*
|
|
44 |
* @since S60 5.0
|
|
45 |
* @return Symbian error code.
|
|
46 |
*/
|
|
47 |
IMPORT_C TInt Connect();
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Close.
|
|
51 |
*
|
|
52 |
* @since S60 5.0
|
|
53 |
*/
|
|
54 |
IMPORT_C void Close();
|
|
55 |
|
|
56 |
/**
|
|
57 |
* InstallTheme.
|
|
58 |
* Synchronous service call.
|
|
59 |
*
|
|
60 |
* @since S60 5.0
|
|
61 |
* @param aResultData Result data.
|
|
62 |
* @param aManifestFileName Manifest file name.
|
|
63 |
* @param aHeaderData Header data.
|
|
64 |
* @return Symbian error code.
|
|
65 |
*/
|
|
66 |
IMPORT_C TInt InstallTheme(TDes8& aResultData, const TDesC& aManifestFileName,
|
|
67 |
TDes8& aHeaderData);
|
|
68 |
|
|
69 |
/**
|
|
70 |
* InstallNextPhase.
|
|
71 |
* Asynchronous service call.
|
|
72 |
*
|
|
73 |
* @since S60 5.0
|
|
74 |
* @param aResultData Result data.
|
|
75 |
* @param aHeaderData Header data.
|
|
76 |
* @param aStatus Request status.
|
|
77 |
*/
|
|
78 |
IMPORT_C void InstallNextPhase(TDes8& aResultData, TDes8& aHeaderData,
|
|
79 |
TRequestStatus& aStatus);
|
|
80 |
|
|
81 |
/**
|
|
82 |
* GetListHeaders.
|
|
83 |
* Synchronous service call.
|
|
84 |
*
|
|
85 |
* @since S60 5.0
|
|
86 |
* @param aResultData Result data.
|
|
87 |
* @param aSearchMaskData Search mask data.
|
|
88 |
* @param aCopyLogos Set if logo resources should be copied to client
|
|
89 |
* @param aHeaderData Header data.
|
|
90 |
* @return Symbian error code.
|
|
91 |
*/
|
|
92 |
IMPORT_C TInt GetListHeaders(TDes8& aResultData, const TDesC8& aSearchMaskData,
|
|
93 |
const TBool aCopyLogos,TDes8& aHeaderData);
|
|
94 |
|
|
95 |
/**
|
|
96 |
* SetActiveTheme.
|
|
97 |
* Synchronous service call.
|
|
98 |
*
|
|
99 |
* @since S60 5.0
|
|
100 |
* @param aResultData Result data.
|
|
101 |
* @param aSetMaskData Mask data.
|
|
102 |
* @param aHeaderData Header data.
|
|
103 |
* @return Symbian error code.
|
|
104 |
*/
|
|
105 |
IMPORT_C TInt SetActiveTheme(TDes8& aResultData, const TDesC8& aSetMaskData,
|
|
106 |
TDes8& aHeaderData);
|
|
107 |
|
|
108 |
/**
|
|
109 |
* RemoveTheme.
|
|
110 |
* Synchronous service call.
|
|
111 |
*
|
|
112 |
* @since S60 5.0
|
|
113 |
* @param aResultData Result data.
|
|
114 |
* @param aSetMaskData Mask data.
|
|
115 |
* @return Symbian error code.
|
|
116 |
*/
|
|
117 |
IMPORT_C TInt RemoveTheme(TDes8& aResultData, const TDesC8& aSetMaskData);
|
|
118 |
|
|
119 |
/**
|
|
120 |
* RestoreDefault.
|
|
121 |
* Synchronous service call.
|
|
122 |
*
|
|
123 |
* @since S60 5.0
|
|
124 |
* @param aResultData Result data.
|
|
125 |
* @param aSetMaskData Mask data.
|
|
126 |
* @param aHeaderData Header data.
|
|
127 |
* @return Symbian error code.
|
|
128 |
*/
|
|
129 |
IMPORT_C TInt RestoreDefault(TDes8& aResultData, const TDesC8& aSetMaskData,
|
|
130 |
TDes8& aHeaderData);
|
|
131 |
|
|
132 |
/**
|
|
133 |
* GetNextHeader.
|
|
134 |
* Asynchronous service call.
|
|
135 |
*
|
|
136 |
* @since S60 5.0
|
|
137 |
* @param aResultData Result data.
|
|
138 |
* @param aHeaderData Header data.
|
|
139 |
* @param aStatus Request status.
|
|
140 |
*/
|
|
141 |
IMPORT_C void GetNextHeader(TDes8& aResultData, TDes8& aHeaderData,
|
|
142 |
TRequestStatus& aStatus);
|
|
143 |
|
|
144 |
/**
|
|
145 |
* GetODT.
|
|
146 |
* Synchronous service call.
|
|
147 |
*
|
|
148 |
* @since S60 5.0
|
|
149 |
* @param aResultData ResultData.
|
|
150 |
* @param aConfiguration Configuration.
|
|
151 |
* @param aRequestData Request data.
|
|
152 |
* @param aODTPath Odt path.
|
|
153 |
* @return Symbian error code.
|
|
154 |
*/
|
|
155 |
IMPORT_C TInt GetODT(TDes8& aResultData, const ThspsConfiguration& aConfiguration,
|
|
156 |
const TDesC8& aRequestData, TDes& aODTPath);
|
|
157 |
|
|
158 |
/**
|
|
159 |
* AccessResourceFile.
|
|
160 |
* Synchronous service call.
|
|
161 |
*
|
|
162 |
* @since S60 5.0
|
|
163 |
* @param aResultData ResultData.
|
|
164 |
* @param aConfiguration Configuration.
|
|
165 |
* @param aFileName File name.
|
|
166 |
* @param aFileHandle File handle.
|
|
167 |
* @return Symbian error code.
|
|
168 |
*/
|
|
169 |
IMPORT_C TInt AccessResourceFile(TDes8& aResultData, const ThspsConfiguration& aConfiguration,
|
|
170 |
const TDesC& aFileName, TInt& aFileHandle);
|
|
171 |
|
|
172 |
/**
|
|
173 |
* GetODTUpdate.
|
|
174 |
* Asynchronous service call.
|
|
175 |
*
|
|
176 |
* @since S60 5.0
|
|
177 |
* @param aResultData Result data.
|
|
178 |
* @param aRequestNotifyData Request notify data.
|
|
179 |
* @param aHeaderData Header data.
|
|
180 |
* @param aStatus Request status.
|
|
181 |
*/
|
|
182 |
IMPORT_C void GetODTUpdate(TDes8& aResultData, TDes8& aRequestNotifyData, TDes8& aHeaderData,
|
|
183 |
TRequestStatus& aStatus);
|
|
184 |
|
|
185 |
|
|
186 |
/**
|
|
187 |
* Reads Odt from given path (aODTPath) and copies its resource files
|
|
188 |
* to destination folder (note that given destination folder is only
|
|
189 |
* prefix for actual destination folder).
|
|
190 |
*
|
|
191 |
* @since S60 5.0
|
|
192 |
* @param aResultData Result data.
|
|
193 |
* @param aODTPath odt path to be read.
|
|
194 |
* @param aDestinationPath target directory.
|
|
195 |
* @return Symbian error code.
|
|
196 |
**/
|
|
197 |
IMPORT_C TInt CopyResourceFiles( TDes8& aResultData, TDesC& aODTPath,
|
|
198 |
TDesC& aDestinationPath );
|
|
199 |
|
|
200 |
/**
|
|
201 |
* CancelRequest.
|
|
202 |
* Synchronous service call.
|
|
203 |
*
|
|
204 |
* @since S60 5.0
|
|
205 |
* @param aCancelRequestMessage Cancel request message.
|
|
206 |
* @param aResultData Result data.
|
|
207 |
* @param aAppUid AppUid.
|
|
208 |
*/
|
|
209 |
IMPORT_C void CancelRequest(TInt aCancelRequestMessage, TDes8& aResultData,
|
|
210 |
TInt aAppUid = 0 );
|
|
211 |
|
|
212 |
/**
|
|
213 |
* GetNextHeader.
|
|
214 |
* Synchronous service call.
|
|
215 |
*
|
|
216 |
* @since S60 5.0
|
|
217 |
* @param aResultData Result data.
|
|
218 |
* @param aHeaderData Header data.
|
|
219 |
* @return Symbian error code.
|
|
220 |
*/
|
|
221 |
IMPORT_C TInt GetNextHeader( TDes8& aResultData, TDes8& aHeaderData );
|
|
222 |
|
|
223 |
/**
|
|
224 |
* AddPlugin.
|
|
225 |
* Synchronous service call.
|
|
226 |
*
|
|
227 |
* @since S60 5.0
|
|
228 |
* @param aResultData Result data.
|
|
229 |
* @param aParams Params.
|
|
230 |
* @param aNewPluginId New plugin id.
|
|
231 |
* @return Symbian error code.
|
|
232 |
*/
|
|
233 |
IMPORT_C TInt AddPlugin( TDes8& aResultData,
|
|
234 |
const ThpsParamAddPlugin& aParams,
|
|
235 |
TInt& aNewPluginId);
|
|
236 |
|
|
237 |
/**
|
|
238 |
* RemovePlugin.
|
|
239 |
* Synchronous service call.
|
|
240 |
*
|
|
241 |
* @since S60 5.0
|
|
242 |
* @param aResultData Result data.
|
|
243 |
* @param aParams Params.
|
|
244 |
* @return Symbian error code.
|
|
245 |
*/
|
|
246 |
IMPORT_C TInt RemovePlugin( TDes8& aResultData,
|
|
247 |
const ThpsParamRemovePlugin& aParams );
|
|
248 |
|
|
249 |
/**
|
|
250 |
* SetActivePlugin.
|
|
251 |
* Set plugin configuration active.
|
|
252 |
*
|
|
253 |
* @since S60 5.0
|
|
254 |
* @param aResultData Result data.
|
|
255 |
* @param aParams Params.
|
|
256 |
* @return Symbian error code.
|
|
257 |
*/
|
|
258 |
IMPORT_C TInt SetActivePlugin( TDes8& aResultData,
|
|
259 |
const ThpsParamSetActivePlugin& aParams );
|
|
260 |
|
|
261 |
/**
|
|
262 |
* GetPluginOdt.
|
|
263 |
* Synchronous service call to get plugin's odt path.
|
|
264 |
*
|
|
265 |
* @since S60 5.0
|
|
266 |
* @param aResultData Result data.
|
|
267 |
* @param aParams Params.
|
|
268 |
* @param aOdtPath Odt path.
|
|
269 |
* @return Symbian error code.
|
|
270 |
*/
|
|
271 |
IMPORT_C TInt GetPluginOdt( TDes8& aResultData,
|
|
272 |
const ThspsParamGetPluginOdt& aParams,
|
|
273 |
TDes& aOdtPath );
|
|
274 |
|
|
275 |
/**
|
|
276 |
* SetPluginSettings.
|
|
277 |
* Synchronous service call.
|
|
278 |
*
|
|
279 |
* @since S60 5.0
|
|
280 |
* @param aResultData Result data.
|
|
281 |
* @param aSearchMaskData Search mask data.
|
|
282 |
* @param aPluginIdData Plugin id data.
|
|
283 |
* @param aDomData Dom data.
|
|
284 |
* @return Symbian error code.
|
|
285 |
*/
|
|
286 |
IMPORT_C TInt SetPluginSettings( TDes8& aResultData,
|
|
287 |
TDes8& aSearchMaskData,
|
|
288 |
ThspsParamSetPluginSettings aParams,
|
|
289 |
TDes8& aDomData );
|
|
290 |
|
|
291 |
|
|
292 |
/**
|
|
293 |
* MovePlugins.
|
|
294 |
* Synchronous service call.
|
|
295 |
*
|
|
296 |
* @since S60 5.0
|
|
297 |
* @param aResultData Result data.
|
|
298 |
* @param aParams Params.
|
|
299 |
* @return Symbian error code.
|
|
300 |
*/
|
|
301 |
IMPORT_C TInt MovePlugins( TDes8& aResultData, const ThpsParamMovePlugins& aParams );
|
|
302 |
|
|
303 |
/**
|
|
304 |
* SetConfState.
|
|
305 |
* Synchronous service call.
|
|
306 |
*
|
|
307 |
* @since S60 5.0
|
|
308 |
* @param aResultData Result data.
|
|
309 |
* @param aParams Params.
|
|
310 |
* @return Symbian error code.
|
|
311 |
*/
|
|
312 |
IMPORT_C TInt SetConfState(
|
|
313 |
TDes8& aResultData,
|
|
314 |
const ThspsParamSetConfState& aParams );
|
|
315 |
|
|
316 |
/**
|
|
317 |
* ReinstallConf.
|
|
318 |
* Synchronous service call.
|
|
319 |
*
|
|
320 |
* @since S60 5.0
|
|
321 |
* @param aResultData Result data.
|
|
322 |
* @param aParams Params.
|
|
323 |
* @return Symbian error code.
|
|
324 |
*/
|
|
325 |
IMPORT_C TInt ReinstallConf(
|
|
326 |
TDes8& aResultData,
|
|
327 |
const ThspsParamReinstallConf& aParams );
|
|
328 |
|
|
329 |
/**
|
|
330 |
* RestoreActiveAppConf
|
|
331 |
* Synchronous service call.
|
|
332 |
* @param aResultData Operation result
|
|
333 |
* @param aParams Operation parameters
|
|
334 |
* @since S60 5.0
|
|
335 |
*/
|
|
336 |
IMPORT_C TInt RestoreActiveAppConf(
|
|
337 |
TDes8& aResultData,
|
|
338 |
const ThspsParamRestoreActiveAppConf& aParams );
|
|
339 |
|
|
340 |
/**
|
|
341 |
* ReplacePlugin.
|
|
342 |
* Synchronous service call.
|
|
343 |
*
|
|
344 |
* @since S60 5.0
|
|
345 |
* @param aResultData Result data.
|
|
346 |
* @param aParams Params.
|
|
347 |
* @return Symbian error code.
|
|
348 |
*/
|
|
349 |
IMPORT_C TInt ReplacePlugin(
|
|
350 |
TDes8& aResultData,
|
|
351 |
const ThspsParamReplacePlugin& aParams );
|
|
352 |
|
|
353 |
/**
|
|
354 |
* Restores plugin configurations by either removing all plugins
|
|
355 |
* from the active view or by removing all extra views.
|
|
356 |
* In latter case, the first locked view is emptied. If there are
|
|
357 |
* no locked views then the first view will remain while others
|
|
358 |
* are removed.
|
|
359 |
* @since S60 5.2
|
|
360 |
* @param aResultData Result data.
|
|
361 |
* @param aParams Params.
|
|
362 |
* @return Symbian error code.
|
|
363 |
*/
|
|
364 |
IMPORT_C TInt RestoreConfigurations(
|
|
365 |
TDes8& aResultData,
|
|
366 |
const ThspsParamRestoreConfigurations& aParams );
|
|
367 |
|
|
368 |
public:
|
|
369 |
|
|
370 |
friend class ChspsClient;
|
|
371 |
friend class ChspsRequestClient;
|
|
372 |
};
|
|
373 |
|
|
374 |
#endif //__hspsCLIENTSESSION_H__
|