127
|
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 TSRUNNINGAPPENTRY_H
|
|
19 |
#define TSRUNNINGAPPENTRY_H
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <e32cmn.h>
|
|
23 |
|
|
24 |
#include "tsrunningapp.h"
|
|
25 |
#include "tsentrykey.h"
|
|
26 |
#include "tstaskmonitorglobals.h"
|
|
27 |
#include "tsthumbnailobserver.h"
|
|
28 |
|
|
29 |
|
|
30 |
class CTsRunningAppEntry;
|
|
31 |
class CFbsBitmap;
|
|
32 |
class QObject;
|
|
33 |
class MTsResourceManager;
|
|
34 |
class MTsDataObserver;
|
|
35 |
class TsThumbnailProvider;
|
|
36 |
|
|
37 |
typedef RPointerArray<CTsRunningAppEntry> RTsFswArray;
|
|
38 |
|
|
39 |
/**
|
|
40 |
* An entry in the task list.
|
|
41 |
*/
|
|
42 |
NONSHARABLE_CLASS( CTsRunningAppEntry ) : public CBase,
|
|
43 |
public MTsRunningApplication,
|
|
44 |
private MTsThumbnailObserver
|
|
45 |
{
|
|
46 |
public:
|
|
47 |
static CTsRunningAppEntry *NewL(const TTsEntryKey aKey,
|
|
48 |
const MTsRunningApplication& aCacheEntry,
|
|
49 |
MTsResourceManager& aResources,
|
|
50 |
MTsDataObserver &observer,
|
|
51 |
QObject* obj);
|
|
52 |
static CTsRunningAppEntry *NewLC(const TTsEntryKey aKey,
|
|
53 |
const MTsRunningApplication& aCacheEntry,
|
|
54 |
MTsResourceManager& aResources,
|
|
55 |
MTsDataObserver &observer,
|
|
56 |
QObject* obj);
|
|
57 |
~CTsRunningAppEntry();
|
|
58 |
|
|
59 |
public://from MTsRunningApplication
|
|
60 |
TUid Uid()const;
|
|
61 |
ApplicationHideMode HideMode() const;
|
|
62 |
void SetHidden( TBool aHidden );
|
|
63 |
TBool IsSystem() const;
|
|
64 |
TInt WindowGroupId() const;
|
|
65 |
TInt ParentWindowGroupId() const;
|
|
66 |
TBool IsEmbeded() const;
|
|
67 |
|
|
68 |
const TDesC& DisplayName() const;
|
|
69 |
TInt IconHandle() const;
|
|
70 |
TTime Timestamp() const;
|
|
71 |
TTime TimestampUpdate() const;
|
|
72 |
TTsEntryKey Key() const;
|
|
73 |
TBool IsActive() const;
|
|
74 |
TBool IsClosable() const;
|
|
75 |
TBool Close() const;
|
|
76 |
TBool Launch() const;
|
|
77 |
TBool IsMandatory() const;
|
|
78 |
|
|
79 |
public:
|
|
80 |
void SetScreenshotL(const CFbsBitmap &bitmap, UpdatePriority priority, TInt angle);
|
|
81 |
void RemoveScreenshotL();
|
|
82 |
void RefreshTimestamp();
|
|
83 |
void RefreshUpdateTimestamp();
|
|
84 |
void SetCloseableApp(TBool aClosable);
|
|
85 |
|
|
86 |
private:
|
|
87 |
CTsRunningAppEntry(const TTsEntryKey aKey,
|
|
88 |
MTsResourceManager& aResources,
|
|
89 |
MTsDataObserver &aObserver);
|
|
90 |
void ConstructL(const MTsRunningApplication& aCacheEntry, QObject* aObject);
|
|
91 |
void CreateDisplayNameL(const MTsRunningApplication& aCacheEntry);
|
|
92 |
|
|
93 |
public://from MTsThumbnailObserver
|
|
94 |
void ThumbnailCreated(const CFbsBitmap& aThumbnail);
|
|
95 |
|
|
96 |
private:
|
|
97 |
MTsResourceManager& iResources;
|
|
98 |
MTsDataObserver& iObserver;
|
|
99 |
|
|
100 |
const TTsEntryKey iKey;
|
|
101 |
UpdatePriority iPriority;
|
|
102 |
TUid iUid;
|
|
103 |
TBool iIsSystem;
|
|
104 |
ApplicationHideMode iHideMode;
|
|
105 |
TInt iWindowGroupId;
|
|
106 |
TInt iParentWindowGroupId;
|
|
107 |
TTime iTimestamp;
|
|
108 |
TTime iUpdateTimestamp;
|
|
109 |
HBufC *iCaption;
|
|
110 |
mutable CFbsBitmap* iThumbnail;
|
|
111 |
TsThumbnailProvider* iThumbnailProvider;
|
|
112 |
|
|
113 |
};
|
|
114 |
|
|
115 |
#endif //TSRUNNINGAPPENTRY_H
|