|
1 /* |
|
2 * Copyright (c) 2005-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: Backup-Restore Queue header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _SCONBRQUEUE_H_ |
|
20 #define _SCONBRQUEUE_H_ |
|
21 |
|
22 #include "sconqueue.h" |
|
23 |
|
24 class CSConTaskQueue; |
|
25 |
|
26 //============================================================ |
|
27 // Class CSConBackupRestoreQueue declaration |
|
28 //============================================================ |
|
29 NONSHARABLE_CLASS ( CSConBackupRestoreQueue ) : public CActive, public CSConTaskQueue |
|
30 { |
|
31 public: |
|
32 /** |
|
33 * Two-phase constructor |
|
34 * @param aMaxObjectSize Max object size |
|
35 * @param aFs aReference to RFs connection. |
|
36 * @return CSConBackupRestoreQueue instance |
|
37 */ |
|
38 static CSConBackupRestoreQueue* NewL( const TInt aMaxObjectSize, RFs& aFs ); |
|
39 /** |
|
40 * Destructor |
|
41 * @return CSConBackupRestoreQueue instance |
|
42 */ |
|
43 ~CSConBackupRestoreQueue(); |
|
44 /** |
|
45 * Adds a new task to queue |
|
46 * @param aNewTask A new task to be added |
|
47 * @param aTaskId The task number |
|
48 * @return KErrNone if no errors, else system wide error codes |
|
49 */ |
|
50 TInt AddNewTask( CSConTask*& aNewTask, TInt aTaskId ); |
|
51 /** |
|
52 * Cancels a task |
|
53 * @param aTask The task number |
|
54 * @param aAllTasks If ETrue => cancel all tasks |
|
55 * @param aStatus The reply |
|
56 * @return none |
|
57 */ |
|
58 void CancelTask( TInt aTask, TBool aAllTasks ); |
|
59 /** |
|
60 * Resets the queue |
|
61 * @return none |
|
62 */ |
|
63 void Reset(); |
|
64 /** |
|
65 * An address pointer to another queue |
|
66 * @param aTaskQueue The address to another queue |
|
67 * @return none |
|
68 */ |
|
69 virtual void QueueAddress( CSConInstallerQueue*& aTaskQueue ); |
|
70 /** |
|
71 * Returns the task type |
|
72 * @param aTaskId The task number |
|
73 * @return task type |
|
74 */ |
|
75 TSConMethodName GetTaskMethodL( TInt aTaskId ); |
|
76 |
|
77 private: |
|
78 /** |
|
79 * Constructor |
|
80 * @return none |
|
81 */ |
|
82 CSConBackupRestoreQueue(); |
|
83 /** |
|
84 * Initializes member data |
|
85 * @param aMaxObjectSize Max object size |
|
86 * @param aFs aReference to RFs connection. |
|
87 * @return none |
|
88 */ |
|
89 void ConstructL( const TInt aMaxObjectSize, RFs& aFs ); |
|
90 /** |
|
91 * Polls queue |
|
92 * @return none |
|
93 */ |
|
94 void PollQueue(); |
|
95 /** |
|
96 * Starts queue polling |
|
97 * @return none |
|
98 */ |
|
99 void StartQueue(); |
|
100 /** |
|
101 * Stops queue polling |
|
102 * @return none |
|
103 */ |
|
104 void StopQueue(); |
|
105 /** |
|
106 * Implementation of CActive::DoCancel() |
|
107 * @return none |
|
108 */ |
|
109 void DoCancel(); |
|
110 /** |
|
111 * Implementation of CActive::RunL() |
|
112 * @return none |
|
113 */ |
|
114 void RunL(); |
|
115 |
|
116 private: |
|
117 CSConBackupRestore* iBackupRestore; |
|
118 CSConInstallerQueue* iInstQueueAddress; |
|
119 }; |
|
120 |
|
121 |
|
122 #endif |
|
123 |
|
124 // End of file |