|
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 aHeaderData Header data. |
|
89 * @return Symbian error code. |
|
90 */ |
|
91 IMPORT_C TInt GetListHeaders(TDes8& aResultData, const TDesC8& aSearchMaskData, |
|
92 TDes8& aHeaderData); |
|
93 |
|
94 /** |
|
95 * SetActiveTheme. |
|
96 * Synchronous service call. |
|
97 * |
|
98 * @since S60 5.0 |
|
99 * @param aResultData Result data. |
|
100 * @param aSetMaskData Mask data. |
|
101 * @param aHeaderData Header data. |
|
102 * @return Symbian error code. |
|
103 */ |
|
104 IMPORT_C TInt SetActiveTheme(TDes8& aResultData, const TDesC8& aSetMaskData, |
|
105 TDes8& aHeaderData); |
|
106 |
|
107 /** |
|
108 * RemoveTheme. |
|
109 * Synchronous service call. |
|
110 * |
|
111 * @since S60 5.0 |
|
112 * @param aResultData Result data. |
|
113 * @param aSetMaskData Mask data. |
|
114 * @return Symbian error code. |
|
115 */ |
|
116 IMPORT_C TInt RemoveTheme(TDes8& aResultData, const TDesC8& aSetMaskData); |
|
117 |
|
118 /** |
|
119 * RestoreDefault. |
|
120 * Synchronous service call. |
|
121 * |
|
122 * @since S60 5.0 |
|
123 * @param aResultData Result data. |
|
124 * @param aSetMaskData Mask data. |
|
125 * @param aHeaderData Header data. |
|
126 * @return Symbian error code. |
|
127 */ |
|
128 IMPORT_C TInt RestoreDefault(TDes8& aResultData, const TDesC8& aSetMaskData, |
|
129 TDes8& aHeaderData); |
|
130 |
|
131 /** |
|
132 * GetNextHeader. |
|
133 * Asynchronous service call. |
|
134 * |
|
135 * @since S60 5.0 |
|
136 * @param aResultData Result data. |
|
137 * @param aHeaderData Header data. |
|
138 * @param aStatus Request status. |
|
139 */ |
|
140 IMPORT_C void GetNextHeader(TDes8& aResultData, TDes8& aHeaderData, |
|
141 TRequestStatus& aStatus); |
|
142 |
|
143 /** |
|
144 * GetODT. |
|
145 * Synchronous service call. |
|
146 * |
|
147 * @since S60 5.0 |
|
148 * @param aResultData ResultData. |
|
149 * @param aConfiguration Configuration. |
|
150 * @param aRequestData Request data. |
|
151 * @param aODTPath Odt path. |
|
152 * @return Symbian error code. |
|
153 */ |
|
154 IMPORT_C TInt GetODT(TDes8& aResultData, const ThspsConfiguration& aConfiguration, |
|
155 const TDesC8& aRequestData, TDes& aODTPath); |
|
156 |
|
157 /** |
|
158 * AccessResourceFile. |
|
159 * Synchronous service call. |
|
160 * |
|
161 * @since S60 5.0 |
|
162 * @param aResultData ResultData. |
|
163 * @param aConfiguration Configuration. |
|
164 * @param aFileName File name. |
|
165 * @param aFileHandle File handle. |
|
166 * @return Symbian error code. |
|
167 */ |
|
168 IMPORT_C TInt AccessResourceFile(TDes8& aResultData, const ThspsConfiguration& aConfiguration, |
|
169 const TDesC& aFileName, TInt& aFileHandle); |
|
170 |
|
171 /** |
|
172 * GetODTUpdate. |
|
173 * Asynchronous service call. |
|
174 * |
|
175 * @since S60 5.0 |
|
176 * @param aResultData Result data. |
|
177 * @param aRequestNotifyData Request notify data. |
|
178 * @param aHeaderData Header data. |
|
179 * @param aStatus Request status. |
|
180 */ |
|
181 IMPORT_C void GetODTUpdate(TDes8& aResultData, TDes8& aRequestNotifyData, TDes8& aHeaderData, |
|
182 TRequestStatus& aStatus); |
|
183 |
|
184 |
|
185 /** |
|
186 * Reads Odt from given path (aODTPath) and copies its resource files |
|
187 * to destination folder (note that given destination folder is only |
|
188 * prefix for actual destination folder). |
|
189 * |
|
190 * @since S60 5.0 |
|
191 * @param aResultData Result data. |
|
192 * @param aODTPath odt path to be read. |
|
193 * @param aDestinationPath target directory. |
|
194 * @return Symbian error code. |
|
195 **/ |
|
196 IMPORT_C TInt CopyResourceFiles( TDes8& aResultData, TDesC& aODTPath, |
|
197 TDesC& aDestinationPath ); |
|
198 |
|
199 /** |
|
200 * CancelRequest. |
|
201 * Synchronous service call. |
|
202 * |
|
203 * @since S60 5.0 |
|
204 * @param aCancelRequestMessage Cancel request message. |
|
205 * @param aResultData Result data. |
|
206 * @param aAppUid AppUid. |
|
207 */ |
|
208 IMPORT_C void CancelRequest(TInt aCancelRequestMessage, TDes8& aResultData, |
|
209 TInt aAppUid = 0 ); |
|
210 |
|
211 /** |
|
212 * GetNextHeader. |
|
213 * Synchronous service call. |
|
214 * |
|
215 * @since S60 5.0 |
|
216 * @param aResultData Result data. |
|
217 * @param aHeaderData Header data. |
|
218 * @return Symbian error code. |
|
219 */ |
|
220 IMPORT_C TInt GetNextHeader( TDes8& aResultData, TDes8& aHeaderData ); |
|
221 |
|
222 /** |
|
223 * AddPlugin. |
|
224 * Synchronous service call. |
|
225 * |
|
226 * @since S60 5.0 |
|
227 * @param aResultData Result data. |
|
228 * @param aParams Params. |
|
229 * @param aNewPluginId New plugin id. |
|
230 * @return Symbian error code. |
|
231 */ |
|
232 IMPORT_C TInt AddPlugin( TDes8& aResultData, |
|
233 const ThpsParamAddPlugin& aParams, |
|
234 TInt& aNewPluginId); |
|
235 |
|
236 /** |
|
237 * RemovePlugin. |
|
238 * Synchronous service call. |
|
239 * |
|
240 * @since S60 5.0 |
|
241 * @param aResultData Result data. |
|
242 * @param aParams Params. |
|
243 * @return Symbian error code. |
|
244 */ |
|
245 IMPORT_C TInt RemovePlugin( TDes8& aResultData, |
|
246 const ThpsParamRemovePlugin& aParams ); |
|
247 |
|
248 /** |
|
249 * SetActivePlugin. |
|
250 * Set plugin configuration active. |
|
251 * |
|
252 * @since S60 5.0 |
|
253 * @param aResultData Result data. |
|
254 * @param aParams Params. |
|
255 * @return Symbian error code. |
|
256 */ |
|
257 IMPORT_C TInt SetActivePlugin( TDes8& aResultData, |
|
258 const ThpsParamSetActivePlugin& aParams ); |
|
259 |
|
260 /** |
|
261 * GetPluginOdt. |
|
262 * Synchronous service call to get plugin's odt path. |
|
263 * |
|
264 * @since S60 5.0 |
|
265 * @param aResultData Result data. |
|
266 * @param aParams Params. |
|
267 * @param aOdtPath Odt path. |
|
268 * @return Symbian error code. |
|
269 */ |
|
270 IMPORT_C TInt GetPluginOdt( TDes8& aResultData, |
|
271 const ThspsParamGetPluginOdt& aParams, |
|
272 TDes& aOdtPath ); |
|
273 |
|
274 /** |
|
275 * SetPluginSettings. |
|
276 * Synchronous service call. |
|
277 * |
|
278 * @since S60 5.0 |
|
279 * @param aResultData Result data. |
|
280 * @param aSearchMaskData Search mask data. |
|
281 * @param aPluginIdData Plugin id data. |
|
282 * @param aDomData Dom data. |
|
283 * @return Symbian error code. |
|
284 */ |
|
285 IMPORT_C TInt SetPluginSettings( TDes8& aResultData, |
|
286 TDes8& aSearchMaskData, |
|
287 ThspsParamSetPluginSettings aParams, |
|
288 TDes8& aDomData ); |
|
289 |
|
290 |
|
291 /** |
|
292 * MovePlugins. |
|
293 * Synchronous service call. |
|
294 * |
|
295 * @since S60 5.0 |
|
296 * @param aResultData Result data. |
|
297 * @param aParams Params. |
|
298 * @return Symbian error code. |
|
299 */ |
|
300 IMPORT_C TInt MovePlugins( TDes8& aResultData, const ThpsParamMovePlugins& aParams ); |
|
301 |
|
302 /** |
|
303 * SetConfState. |
|
304 * Synchronous service call. |
|
305 * |
|
306 * @since S60 5.0 |
|
307 * @param aResultData Result data. |
|
308 * @param aParams Params. |
|
309 * @return Symbian error code. |
|
310 */ |
|
311 IMPORT_C TInt SetConfState( |
|
312 TDes8& aResultData, |
|
313 const ThspsParamSetConfState& aParams ); |
|
314 |
|
315 /** |
|
316 * ReinstallConf. |
|
317 * Synchronous service call. |
|
318 * |
|
319 * @since S60 5.0 |
|
320 * @param aResultData Result data. |
|
321 * @param aParams Params. |
|
322 * @return Symbian error code. |
|
323 */ |
|
324 IMPORT_C TInt ReinstallConf( |
|
325 TDes8& aResultData, |
|
326 const ThspsParamReinstallConf& aParams ); |
|
327 |
|
328 /** |
|
329 * RestoreActiveAppConf |
|
330 * Synchronous service call. |
|
331 * @param aResultData Operation result |
|
332 * @param aParams Operation parameters |
|
333 * @since S60 5.0 |
|
334 */ |
|
335 IMPORT_C TInt RestoreActiveAppConf( |
|
336 TDes8& aResultData, |
|
337 const ThspsParamRestoreActiveAppConf& aParams ); |
|
338 |
|
339 /** |
|
340 * ReplacePlugin. |
|
341 * Synchronous service call. |
|
342 * |
|
343 * @since S60 5.0 |
|
344 * @param aResultData Result data. |
|
345 * @param aParams Params. |
|
346 * @return Symbian error code. |
|
347 */ |
|
348 IMPORT_C TInt ReplacePlugin( |
|
349 TDes8& aResultData, |
|
350 const ThspsParamReplacePlugin& aParams ); |
|
351 |
|
352 public: |
|
353 |
|
354 friend class ChspsClient; |
|
355 friend class ChspsRequestClient; |
|
356 }; |
|
357 |
|
358 #endif //__hspsCLIENTSESSION_H__ |