|
1 /* |
|
2 * Copyright (c) 2005-2010 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: Header file for ConML tasks |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _SCONCONMLTASK_H_ |
|
20 #define _SCONCONMLTASK_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> |
|
24 |
|
25 const TInt KSConTaskPartiallyCompleted( 206 ); |
|
26 const TInt KMaxPackageNameLength = 128; |
|
27 |
|
28 enum TSConMethodName |
|
29 { |
|
30 ECancel = 0, |
|
31 EGetDataOwnerStatus, |
|
32 EGetDataSize, |
|
33 EGetStatus, |
|
34 EInstall, |
|
35 EListDataOwners, |
|
36 EListInstalledApps, |
|
37 EListPublicFiles, |
|
38 ERequestData, |
|
39 ESetBURMode, |
|
40 ESetInstParams, |
|
41 ESupplyData, |
|
42 EUninstall, |
|
43 EUpdateDeviceInfo, |
|
44 EReboot, |
|
45 EGetMetadata |
|
46 }; |
|
47 |
|
48 enum TSConInstallMode |
|
49 { |
|
50 ESilentInstall = 0, |
|
51 EUnsilentInstall, |
|
52 EUnknown |
|
53 }; |
|
54 |
|
55 enum TSConUserPerm |
|
56 { |
|
57 EPermReadOnly = 0, |
|
58 EPermNormal |
|
59 }; |
|
60 |
|
61 enum TSConDOType |
|
62 { |
|
63 EActiveDataOwner = 1, |
|
64 EPassiveDataOwner, |
|
65 EHybridDataOwner |
|
66 }; |
|
67 |
|
68 enum TSConHasFiles |
|
69 { |
|
70 ENoFiles = 0, |
|
71 EPublicFiles, |
|
72 ESystemFiles, |
|
73 EPublicSystemFiles |
|
74 }; |
|
75 |
|
76 enum TSConAppType |
|
77 { |
|
78 ESisApplication = 0, |
|
79 ESisAugmentation, |
|
80 EJavaApplication, |
|
81 EWidgetApplication |
|
82 }; |
|
83 |
|
84 enum TSConBurMode |
|
85 { |
|
86 ESConBurNormal = 1, // 1 BUR mode - normal |
|
87 ESConBurBackupFull, // 2 BUR mode – backup full |
|
88 ESConBurBackupPartial, // 3 BUR mode – backup partial |
|
89 ESConBurRestoreFull, // 4 BUR mode – restore full |
|
90 ESConBurRestorePartial // 5 BUR mode – restore partial |
|
91 }; |
|
92 |
|
93 enum TSConIncType |
|
94 { |
|
95 ESConNoBackup = 0, // 0 No backup |
|
96 ESConBackupBase = 100, // 100 Backup – base |
|
97 ESConBackupIncrement = 200 // 200 Backup - increment |
|
98 }; |
|
99 |
|
100 enum TSConTransferDataType |
|
101 { |
|
102 ESConRegistrationData = 1, // 1 RegistrationData |
|
103 ESConPassiveSnapshotData, // 2 Passive snapshot data |
|
104 ESConPassiveBaseData, // 3 Passive base data |
|
105 ESConPassiveIncrementalData,// 4 Passive incremental data |
|
106 ESConActiveSnapshotData, // 5 Active snapshot data |
|
107 ESConActiveBaseData, // 6 Active base data |
|
108 ESConActiveIncrementalData, // 7 Active incremental data |
|
109 ESConSystemData, // 8 System data |
|
110 ESConSystemSnapshotData // 9 System snapshot data |
|
111 }; |
|
112 |
|
113 enum TSConDataOwnerStatus |
|
114 { |
|
115 ESConUnset = 0, // 0 Unset |
|
116 ESConNotFound, // 1 Not found |
|
117 ESConReady, // 2 Ready |
|
118 ESConNotReady, // 3 Not ready |
|
119 ESConFailed, // 4 Failed |
|
120 ESConNotConnected, // 5 Not connected |
|
121 ESConNotImplemented // 6 Not implemented |
|
122 }; |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 //============================================================ |
|
128 // class CSConReboot declaration |
|
129 //============================================================ |
|
130 NONSHARABLE_CLASS( CSConReboot ) : public CBase |
|
131 { |
|
132 public: |
|
133 CSConReboot(); |
|
134 ~CSConReboot(); |
|
135 CSConReboot* CopyL(); |
|
136 |
|
137 //used only with reply |
|
138 TBool iComplete; //task complete |
|
139 TInt iProgress; //task progress |
|
140 }; |
|
141 |
|
142 //============================================================ |
|
143 // class CSConDataOwner declaration |
|
144 //============================================================ |
|
145 NONSHARABLE_CLASS( CSConDataOwner ) : public CBase |
|
146 { |
|
147 public: |
|
148 CSConDataOwner(); |
|
149 ~CSConDataOwner(); |
|
150 CSConDataOwner* CopyL(); |
|
151 |
|
152 public: |
|
153 //dataowner type |
|
154 TSConDOType iType; |
|
155 //unique identifier |
|
156 TUid iUid; |
|
157 //drive list |
|
158 TDriveList iDriveList; |
|
159 //package name |
|
160 TBuf<KMaxPackageNameLength> iPackageName; |
|
161 //requires reboot |
|
162 TBool iReqReboot; |
|
163 //has files |
|
164 TSConHasFiles iHasFiles; |
|
165 //supports incremental backup |
|
166 TBool iSupportsInc; |
|
167 //supports selective backup |
|
168 TBool iSupportsSel; |
|
169 //delay to prepare data |
|
170 TBool iDelayToPrep; |
|
171 //size |
|
172 TUint iSize; |
|
173 //data owner status |
|
174 TSConDataOwnerStatus iDataOwnStatus; |
|
175 //transfer data type |
|
176 TSConTransferDataType iTransDataType; |
|
177 //Java hash |
|
178 HBufC* iJavaHash; |
|
179 }; |
|
180 |
|
181 //============================================================ |
|
182 // class CSConUpdateDeviceInfo declaration |
|
183 //============================================================ |
|
184 NONSHARABLE_CLASS( CSConUpdateDeviceInfo ) : public CBase |
|
185 { |
|
186 public: |
|
187 CSConUpdateDeviceInfo(); |
|
188 ~CSConUpdateDeviceInfo(); |
|
189 CSConUpdateDeviceInfo* CopyL(); |
|
190 |
|
191 TBuf8<3> iVersion; //version number |
|
192 TBool iInstallSupp; |
|
193 TBool iUninstallSupp; |
|
194 TBool iInstParamsSupp; |
|
195 TBool iInstAppsSupp; |
|
196 TBool iDataOwnersSupp; |
|
197 TBool iSetBURModeSupp; |
|
198 TBool iGetSizeSupp; |
|
199 TBool iReqDataSupp; |
|
200 TBool iSupplyDataSupp; |
|
201 TBool iRebootSupp; |
|
202 TInt iMaxObjectSize; //kBytes |
|
203 |
|
204 //used only with reply |
|
205 TBool iComplete; //task complete |
|
206 TInt iProgress; //task progress |
|
207 }; |
|
208 //============================================================ |
|
209 // class CSConInstApp declaration |
|
210 //============================================================ |
|
211 NONSHARABLE_CLASS( CSConInstApp ) : public CBase |
|
212 { |
|
213 public: |
|
214 CSConInstApp() {}; |
|
215 ~CSConInstApp(); |
|
216 CSConInstApp* CopyL(); |
|
217 |
|
218 TFileName iName; |
|
219 TFileName iParentName; |
|
220 TFileName iVendor; |
|
221 TFileName iVersion; |
|
222 TInt64 iSize; |
|
223 TSConAppType iType; |
|
224 TUid iUid; |
|
225 HBufC* iWidgetBundleId; // Widget bundle identifier like "com.nokia.widget.HelloWorld" |
|
226 }; |
|
227 |
|
228 //============================================================ |
|
229 // class CSConListInstApps declaration |
|
230 //============================================================ |
|
231 NONSHARABLE_CLASS( CSConListInstApps ) : public CBase |
|
232 { |
|
233 public: |
|
234 CSConListInstApps(); |
|
235 ~CSConListInstApps(); |
|
236 CSConListInstApps* CopyL(); |
|
237 |
|
238 TBool iAllApps; //list all apps |
|
239 TDriveList iDriveList; //drive list |
|
240 |
|
241 //used only with reply |
|
242 TBool iComplete; //task complete |
|
243 TInt iProgress; //task progress |
|
244 |
|
245 RPointerArray<CSConInstApp> iApps; //installed apps |
|
246 }; |
|
247 |
|
248 //============================================================ |
|
249 // class CSConGetStatus declaration |
|
250 //============================================================ |
|
251 NONSHARABLE_CLASS( CSConGetStatus ) : public CBase |
|
252 { |
|
253 public: |
|
254 TBool iAll; //list all statuses |
|
255 TInt iTaskId; //task id |
|
256 }; |
|
257 |
|
258 //============================================================ |
|
259 // class CSConFile declaration |
|
260 //============================================================ |
|
261 NONSHARABLE_CLASS( CSConFile ) : public CBase |
|
262 { |
|
263 public: |
|
264 CSConFile(); |
|
265 ~CSConFile(); |
|
266 CSConFile* CopyL(); |
|
267 |
|
268 TFileName iPath; //file path + name |
|
269 TBuf<KMaxTimeFormatSpec> iModified; //modified date |
|
270 TUint iSize; //file size |
|
271 TSConUserPerm iUserPerm; //user permission |
|
272 }; |
|
273 |
|
274 //============================================================ |
|
275 // class CSConInstall declaration |
|
276 //============================================================ |
|
277 NONSHARABLE_CLASS( CSConInstall ) : public CBase |
|
278 { |
|
279 public: |
|
280 CSConInstall(); |
|
281 ~CSConInstall(); |
|
282 |
|
283 CSConInstall* CopyL(); |
|
284 |
|
285 TFileName iPath; //path to file |
|
286 TSConInstallMode iMode; //install mode |
|
287 |
|
288 //used only with reply |
|
289 TBool iComplete; //task complete |
|
290 TInt iProgress; //task progress |
|
291 }; |
|
292 |
|
293 //============================================================ |
|
294 // class CSConUninstall declaration |
|
295 //============================================================ |
|
296 NONSHARABLE_CLASS( CSConUninstall ) : public CBase |
|
297 { |
|
298 public: |
|
299 CSConUninstall(); |
|
300 ~CSConUninstall(); |
|
301 |
|
302 CSConUninstall* CopyL(); |
|
303 |
|
304 TFileName iName; // application name |
|
305 TFileName iVendor; // application vendor |
|
306 TUid iUid; // application uid |
|
307 TSConAppType iType; // application type |
|
308 TSConInstallMode iMode; // install mode |
|
309 |
|
310 //used only with reply |
|
311 TBool iComplete; //task complete |
|
312 TInt iProgress; //task progress |
|
313 }; |
|
314 |
|
315 //============================================================ |
|
316 // class CSConListDataOwners declaration |
|
317 //============================================================ |
|
318 NONSHARABLE_CLASS( CSConListDataOwners ) : public CBase |
|
319 { |
|
320 public: |
|
321 CSConListDataOwners(); |
|
322 ~CSConListDataOwners(); |
|
323 CSConListDataOwners* CopyL(); |
|
324 void DeleteDataOwners(); |
|
325 |
|
326 //used only with reply |
|
327 TBool iComplete; //task complete |
|
328 TInt iProgress; //task progress |
|
329 |
|
330 RPointerArray<CSConDataOwner> iDataOwners; //data owners |
|
331 }; |
|
332 |
|
333 //============================================================ |
|
334 // class CSConSetBURMode declaration |
|
335 //============================================================ |
|
336 NONSHARABLE_CLASS( CSConSetBURMode ) : public CBase |
|
337 { |
|
338 public: |
|
339 TDriveList iDriveList; //drive list |
|
340 TSConBurMode iPartialType; //partial backup type |
|
341 TSConIncType iIncType; //incremental backup type |
|
342 |
|
343 CSConSetBURMode(); |
|
344 ~CSConSetBURMode(); |
|
345 CSConSetBURMode* CopyL(); |
|
346 |
|
347 //used only with reply |
|
348 TBool iComplete; //task complete |
|
349 TInt iProgress; //task progress |
|
350 }; |
|
351 |
|
352 //============================================================ |
|
353 // class CSConGetDataSize declaration |
|
354 //============================================================ |
|
355 NONSHARABLE_CLASS( CSConGetDataSize ) : public CBase |
|
356 { |
|
357 public: |
|
358 CSConGetDataSize(); |
|
359 ~CSConGetDataSize(); |
|
360 |
|
361 CSConGetDataSize* CopyL(); |
|
362 void DeleteDataOwners(); |
|
363 |
|
364 public: |
|
365 RPointerArray<CSConDataOwner> iDataOwners; //data owners |
|
366 |
|
367 //used only with reply |
|
368 TBool iComplete; //task complete |
|
369 TInt iProgress; //task progress |
|
370 }; |
|
371 |
|
372 //============================================================ |
|
373 // class CSConListPublicFiles declaration |
|
374 //============================================================ |
|
375 NONSHARABLE_CLASS( CSConListPublicFiles ) : public CBase |
|
376 { |
|
377 public: |
|
378 CSConListPublicFiles(); |
|
379 ~CSConListPublicFiles(); |
|
380 CSConListPublicFiles* CopyL(); |
|
381 |
|
382 public: |
|
383 RPointerArray<CSConFile> iFiles; //data owners |
|
384 RPointerArray<CSConDataOwner> iDataOwners; //data owners |
|
385 |
|
386 //used only with reply |
|
387 TBool iComplete; //task complete |
|
388 TInt iProgress; //task progress |
|
389 }; |
|
390 |
|
391 //============================================================ |
|
392 // class CSConRequestData declaration |
|
393 //============================================================ |
|
394 NONSHARABLE_CLASS( CSConRequestData ) : public CBase |
|
395 { |
|
396 public: |
|
397 CSConRequestData(); |
|
398 ~CSConRequestData(); |
|
399 CSConRequestData* CopyL(); |
|
400 void DeleteDataAndDataOwner(); |
|
401 |
|
402 CSConDataOwner* iDataOwner; //data owner |
|
403 HBufC8* iBackupData; //backup data |
|
404 TBool iMoreData; //more data |
|
405 |
|
406 //used only with reply |
|
407 TBool iComplete; //task complete |
|
408 TInt iProgress; //task progress |
|
409 }; |
|
410 |
|
411 //============================================================ |
|
412 // class CSConGetDataOwnerStatus declaration |
|
413 //============================================================ |
|
414 NONSHARABLE_CLASS( CSConGetDataOwnerStatus ) : public CBase |
|
415 { |
|
416 public: |
|
417 CSConGetDataOwnerStatus(); |
|
418 ~CSConGetDataOwnerStatus(); |
|
419 CSConGetDataOwnerStatus* CopyL(); |
|
420 void DeleteDataOwners(); |
|
421 |
|
422 public: |
|
423 RPointerArray<CSConDataOwner> iDataOwners; //data owners |
|
424 |
|
425 //used only with reply |
|
426 TBool iComplete; //task complete |
|
427 TInt iProgress; //task progress |
|
428 }; |
|
429 |
|
430 //============================================================ |
|
431 // class CSConSupplyData declaration |
|
432 //============================================================ |
|
433 NONSHARABLE_CLASS( CSConSupplyData ) : public CBase |
|
434 { |
|
435 public: |
|
436 CSConSupplyData(); |
|
437 ~CSConSupplyData(); |
|
438 CSConSupplyData* CopyL(); |
|
439 public: |
|
440 CSConDataOwner* iDataOwner; |
|
441 HBufC8* iRestoreData; //restore data |
|
442 TBool iMoreData; //more data |
|
443 //used only with reply |
|
444 TBool iComplete; //task complete |
|
445 TInt iProgress; //task progress |
|
446 }; |
|
447 |
|
448 //============================================================ |
|
449 // class CSConGetMetadata declaration |
|
450 //============================================================ |
|
451 NONSHARABLE_CLASS( CSConGetMetadata ) : public CBase |
|
452 { |
|
453 public: |
|
454 CSConGetMetadata(); |
|
455 ~CSConGetMetadata(); |
|
456 CSConGetMetadata* CopyL(); |
|
457 public: |
|
458 TFileName iFilename; |
|
459 HBufC8* iData; //metadata |
|
460 TBool iMoreData; //more data |
|
461 //used only with reply |
|
462 TBool iComplete; //task complete |
|
463 TInt iProgress; //task progress |
|
464 }; |
|
465 |
|
466 //============================================================ |
|
467 // class CSConTask declaration |
|
468 //============================================================ |
|
469 NONSHARABLE_CLASS( CSConTask ): public CBase |
|
470 { |
|
471 public: |
|
472 /** |
|
473 * Two-phase constructor |
|
474 * @return CSConTask instance |
|
475 */ |
|
476 static CSConTask* NewL( TSConMethodName aMethod ); |
|
477 static CSConTask* NewLC( TSConMethodName aMethod ); |
|
478 |
|
479 CSConTask(); |
|
480 ~CSConTask(); |
|
481 TSConMethodName GetServiceId() const; |
|
482 CSConTask* CopyL() const; |
|
483 TBool GetComplete(); |
|
484 void SetCompleteValue( TBool aValue ); |
|
485 TBool GetCompleteValue(); |
|
486 void SetProgressValue( TInt aValue ); |
|
487 private: |
|
488 |
|
489 void ConstructL( TSConMethodName aMethod ); |
|
490 public: |
|
491 //Task |
|
492 //service id |
|
493 TSConMethodName iMethod; |
|
494 //task number |
|
495 TInt iTaskId; |
|
496 |
|
497 //DeviceInfo -params |
|
498 CSConUpdateDeviceInfo* iDevInfoParams; |
|
499 //ListInstalledTasks -params |
|
500 CSConListInstApps* iListAppsParams; |
|
501 //GetStatus -params |
|
502 CSConGetStatus* iGetStatusParams; |
|
503 //Install -params |
|
504 CSConInstall* iInstallParams; |
|
505 //Uninstall -params |
|
506 CSConUninstall* iUninstallParams; |
|
507 //SetBURMode -params |
|
508 CSConSetBURMode* iBURModeParams; |
|
509 //GetDataSize -params |
|
510 CSConGetDataSize* iGetDataSizeParams; |
|
511 //RequestData -params |
|
512 CSConRequestData* iRequestDataParams; |
|
513 //GetDataOwnerStatus -params |
|
514 CSConGetDataOwnerStatus* iGetDataOwnerParams; |
|
515 //SupplyData -params |
|
516 CSConSupplyData* iSupplyDataParams; |
|
517 //ListPublicFiles -params |
|
518 CSConListPublicFiles* iPubFilesParams; |
|
519 //ListDataOwners -params |
|
520 CSConListDataOwners* iListDataOwnersParams; |
|
521 //Reboot -params |
|
522 CSConReboot* iRebootParams; |
|
523 //GetMetadata -params |
|
524 CSConGetMetadata* iGetMetadataParams; |
|
525 |
|
526 TInt iCancelTaskId; |
|
527 TBool iCancelTaskAll; |
|
528 }; |
|
529 |
|
530 //============================================================ |
|
531 // class CSConTaskReply declaration |
|
532 //============================================================ |
|
533 NONSHARABLE_CLASS( CSConTaskReply ) : public CBase |
|
534 { |
|
535 public: |
|
536 CSConTaskReply(); |
|
537 CSConTaskReply( TSConMethodName aMethod ); |
|
538 ~CSConTaskReply(); |
|
539 void InitializeL( const CSConTask& aTask ); |
|
540 void InitializeL( TSConMethodName aMethod, |
|
541 TInt aProgress, TBool aComplete ); |
|
542 CSConTaskReply* CopyAndFreeL(); |
|
543 void CleanTaskData(); |
|
544 |
|
545 public: |
|
546 //task id number |
|
547 TInt iTaskId; |
|
548 //method type |
|
549 TSConMethodName iMethod; |
|
550 |
|
551 //DeviceInfo -params |
|
552 CSConUpdateDeviceInfo* iDevInfoParams; |
|
553 //ListInstalledTasks -params |
|
554 CSConListInstApps* iListAppsParams; |
|
555 //GetStatus -params |
|
556 CSConGetStatus* iGetStatusParams; |
|
557 //Install -params |
|
558 CSConInstall* iInstallParams; |
|
559 //Uninstall -params |
|
560 CSConUninstall* iUninstallParams; |
|
561 //SetBURMode -params |
|
562 CSConSetBURMode* iBURModeParams; |
|
563 //GetDataSize -params |
|
564 CSConGetDataSize* iGetDataSizeParams; |
|
565 //RequestData -params |
|
566 CSConRequestData* iRequestDataParams; |
|
567 //GetDataOwnerStatus -params |
|
568 CSConGetDataOwnerStatus* iGetDataOwnerParams; |
|
569 //SupplyData -params |
|
570 CSConSupplyData* iSupplyDataParams; |
|
571 //ListPublicFiles -params |
|
572 CSConListPublicFiles* iPubFilesParams; |
|
573 //ListDataOwners -params |
|
574 CSConListDataOwners* iListDataOwnersParams; |
|
575 //Reboot -params |
|
576 CSConReboot* iRebootParams; |
|
577 //GetMetadata -params |
|
578 CSConGetMetadata* iGetMetadataParams; |
|
579 }; |
|
580 |
|
581 //============================================================ |
|
582 // class CSConStatusReply declaration |
|
583 //============================================================ |
|
584 NONSHARABLE_CLASS( CSConStatusReply ): public CBase |
|
585 { |
|
586 public: |
|
587 CSConStatusReply(); |
|
588 ~CSConStatusReply(); |
|
589 |
|
590 public: |
|
591 TBool iNoTasks; //no active tasks |
|
592 RPointerArray<CSConTaskReply> iTasks; |
|
593 }; |
|
594 |
|
595 #endif |
|
596 |
|
597 // End of file |
|
598 |