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: Task monitor engine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TSFSWENGINE_H |
|
20 #define TSFSWENGINE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "tsfswentry.h" |
|
24 #include "tsdataobserver.h" |
|
25 |
|
26 class CTsFswDataList; |
|
27 |
|
28 |
|
29 /** |
|
30 * Engine for fast swap server. |
|
31 * Performs task monitoring, notifications about wg changes are |
|
32 * received from the appui. |
|
33 */ |
|
34 NONSHARABLE_CLASS( CTsFswEngine ) : public CBase, |
|
35 public MHsDataObserver |
|
36 |
|
37 { |
|
38 |
|
39 public: |
|
40 /** |
|
41 * Creates a new instance. |
|
42 * @param observer ref to observer |
|
43 */ |
|
44 static CTsFswEngine* NewL( MHsDataObserver& observer ); |
|
45 |
|
46 /** |
|
47 * @copydoc NewL |
|
48 */ |
|
49 static CTsFswEngine* NewLC( MHsDataObserver& observer ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CTsFswEngine(); |
|
55 |
|
56 /** |
|
57 * Returns a reference to the current content. |
|
58 * @return ref to content array |
|
59 */ |
|
60 const RTsFswArray& FswDataL(); |
|
61 |
|
62 /** |
|
63 * Set screenshot |
|
64 */ |
|
65 void SetScreenshotL(const CFbsBitmap* bitmap, UpdatePriority priority, TInt wgId); |
|
66 |
|
67 /** |
|
68 * Removes screenshot |
|
69 */ |
|
70 void RemoveScreenshotL(TInt wgId); |
|
71 |
|
72 |
|
73 private: |
|
74 |
|
75 // from MTsFswTaskListObserver |
|
76 void DataChanged(); |
|
77 |
|
78 |
|
79 |
|
80 private: |
|
81 /** |
|
82 * Constructor. |
|
83 */ |
|
84 CTsFswEngine( MHsDataObserver& observer ); |
|
85 |
|
86 /** |
|
87 * Performs 2nd phase construction. |
|
88 */ |
|
89 void ConstructL(); |
|
90 |
|
91 /** |
|
92 * Gets the window group list and reconstructs the fsw content. |
|
93 * @return TBool ETrue if the list has been modified |
|
94 */ |
|
95 TBool CollectTasksL(); |
|
96 |
|
97 private: |
|
98 MHsDataObserver& mObserver; |
|
99 CTsFswDataList* mDataList; //own |
|
100 |
|
101 }; |
|
102 |
|
103 #endif |
|