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