|
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 list entry |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TSENTRY_H |
|
19 #define TSENTRY_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32cmn.h> |
|
23 #include <tsgraphicfilescalinghandler.h> |
|
24 |
|
25 #include "tsentrykey.h" |
|
26 #include "tstaskmonitorglobals.h" |
|
27 |
|
28 class CTsEntry; |
|
29 class CFbsBitmap; |
|
30 class MTsDataObserver; |
|
31 |
|
32 typedef RPointerArray<CTsEntry> RTsFswArray; |
|
33 |
|
34 /** |
|
35 * An entry in the task list. |
|
36 */ |
|
37 NONSHARABLE_CLASS( CTsEntry ) : public CBase, |
|
38 private MImageReadyCallBack |
|
39 { |
|
40 public: |
|
41 static CTsEntry *NewL(const TTsEntryKey &key, MTsDataObserver &observer); |
|
42 static CTsEntry *NewLC(const TTsEntryKey &key, MTsDataObserver &observer); |
|
43 ~CTsEntry(); |
|
44 |
|
45 public: |
|
46 TUid AppUid() const; |
|
47 const TDesC &AppName() const; |
|
48 TBool CloseableApp() const; |
|
49 Visibility GetVisibility() const; |
|
50 CFbsBitmap *AppIconBitmap() const; |
|
51 CFbsBitmap *Screenshot() const; |
|
52 const TTsEntryKey &Key() const; |
|
53 TTime Timestamp() const; |
|
54 |
|
55 void SetAppUid(const TUid &uid); |
|
56 void SetAppNameL(const TDesC &appName); |
|
57 void SetCloseableApp(TBool value); |
|
58 void SetVisibility(Visibility visibility); |
|
59 void SetAppIcon(CFbsBitmap *aBitmap); |
|
60 void SetScreenshotL(const CFbsBitmap &bitmap, UpdatePriority priority); |
|
61 void RemoveScreenshotL(); |
|
62 void SetTimestamp(const TTime ×tamp); |
|
63 |
|
64 private: |
|
65 CTsEntry(const TTsEntryKey &aKey, MTsDataObserver &observer); |
|
66 |
|
67 public: // from MImageReadyCallBack |
|
68 void ImageReadyCallBack(TInt error, const CFbsBitmap *bitmap); |
|
69 |
|
70 private: |
|
71 TUid mAppUid; |
|
72 HBufC* mAppName; |
|
73 TBool mCloseableApp; |
|
74 Visibility mVisibility; |
|
75 CFbsBitmap* mAppIconBitmap; |
|
76 CFbsBitmap* mScreenshot; |
|
77 TTsEntryKey mKey; |
|
78 UpdatePriority mPriority; |
|
79 TTime mTimestamp; |
|
80 |
|
81 private: |
|
82 CTsGraphicFileScalingHandler *mImgTool; |
|
83 |
|
84 private: |
|
85 MTsDataObserver &mObserver; |
|
86 |
|
87 }; |
|
88 |
|
89 #endif |