17 |
17 |
18 #ifndef TSENTRY_H |
18 #ifndef TSENTRY_H |
19 #define TSENTRY_H |
19 #define TSENTRY_H |
20 |
20 |
21 #include <e32base.h> |
21 #include <e32base.h> |
22 #include <e32cmn.h> |
|
23 |
22 |
24 #include "tsentrykey.h" |
23 class TTsEntryKey; |
25 #include "tstaskmonitorglobals.h" |
|
26 #include "tsthumbnailobserver.h" |
|
27 |
24 |
28 class CTsEntry; |
25 NONSHARABLE_CLASS( MTsEntry ) |
29 class CFbsBitmap; |
26 { |
30 class QObject; |
27 public: |
31 class MTsDataObserver; |
28 virtual const TDesC& DisplayName() const =0; |
32 class TsThumbnailProvider; |
29 virtual TInt IconHandle() const =0; |
|
30 virtual TTime Timestamp() const =0; |
|
31 virtual TTime TimestampUpdate() const =0; |
|
32 virtual TTsEntryKey Key() const =0; |
|
33 virtual TBool IsActive() const =0; |
|
34 virtual TBool IsClosable() const =0; |
|
35 virtual TBool Close() const =0; |
|
36 virtual TBool Launch() const =0; |
|
37 virtual TBool IsMandatory() const =0; |
33 |
38 |
|
39 }; |
34 |
40 |
35 |
41 #endif //TSENTRY_H |
36 typedef RPointerArray<CTsEntry> RTsFswArray; |
|
37 |
|
38 /** |
|
39 * An entry in the task list. |
|
40 */ |
|
41 NONSHARABLE_CLASS( CTsEntry ) : public CBase, |
|
42 private MTsThumbnailObserver |
|
43 { |
|
44 public: |
|
45 static CTsEntry *NewL(const TTsEntryKey &key, MTsDataObserver &observer, QObject* obj); |
|
46 static CTsEntry *NewLC(const TTsEntryKey &key, MTsDataObserver &observer, QObject* obj); |
|
47 ~CTsEntry(); |
|
48 |
|
49 public: |
|
50 TUid AppUid() const; |
|
51 const TDesC &AppName() const; |
|
52 TBool CloseableApp() const; |
|
53 Visibility GetVisibility() const; |
|
54 CFbsBitmap *AppIconBitmap() const; |
|
55 CFbsBitmap *Screenshot() const; |
|
56 const TTsEntryKey &Key() const; |
|
57 TTime Timestamp() const; |
|
58 TTime LastUpdateTimestamp() const; |
|
59 |
|
60 void SetAppUid(const TUid &uid); |
|
61 void SetAppNameL(const TDesC &appName); |
|
62 void SetCloseableApp(TBool value); |
|
63 void SetVisibility(Visibility visibility); |
|
64 void SetAppIcon(CFbsBitmap *aBitmap); |
|
65 void SetScreenshotL(const CFbsBitmap &bitmap, UpdatePriority priority, TInt angle); |
|
66 void RemoveScreenshotL(); |
|
67 void SetTimestamp(const TTime ×tamp); |
|
68 void RefreshUpdateTimestamp(); |
|
69 |
|
70 private: |
|
71 CTsEntry(const TTsEntryKey &aKey, MTsDataObserver &observer); |
|
72 void ConstructL(QObject* object); |
|
73 |
|
74 public://from MTsThumbnailObserver |
|
75 void ThumbnailCreated(const CFbsBitmap& aThumbnail); |
|
76 |
|
77 private: |
|
78 TUid mAppUid; |
|
79 HBufC* mAppName; |
|
80 TBool mCloseableApp; |
|
81 Visibility mVisibility; |
|
82 CFbsBitmap* mAppIconBitmap; |
|
83 CFbsBitmap* mScreenshot; |
|
84 TTsEntryKey mKey; |
|
85 UpdatePriority mPriority; |
|
86 TTime mTimestamp; |
|
87 TTime mUpdateTimestamp; |
|
88 TsThumbnailProvider* iProvider; |
|
89 private: |
|
90 MTsDataObserver &mObserver; |
|
91 |
|
92 }; |
|
93 |
|
94 #endif |
|