|
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 |
|
19 #ifndef TSFSWENTRY_H |
|
20 #define TSFSWENTRY_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32cmn.h> |
|
24 |
|
25 class CTsFswEntry; |
|
26 class RReadStream; |
|
27 class RWriteStream; |
|
28 |
|
29 typedef RPointerArray<CTsFswEntry> RTsFswArray; |
|
30 |
|
31 /** |
|
32 * An entry in the task list. |
|
33 */ |
|
34 NONSHARABLE_CLASS( CTsFswEntry ) : public CBase |
|
35 { |
|
36 public: |
|
37 IMPORT_C static CTsFswEntry* NewL(); |
|
38 IMPORT_C static CTsFswEntry* NewLC(); |
|
39 ~CTsFswEntry(); |
|
40 |
|
41 /** |
|
42 * Window group id. |
|
43 * In case of wrt widgets this is negative and is not a valid window group id. |
|
44 * Use this when calling CloseApp or SwitchToApp. (these work with widgets too) |
|
45 */ |
|
46 IMPORT_C TInt WgId() const; |
|
47 |
|
48 /** |
|
49 * Application uid. |
|
50 */ |
|
51 IMPORT_C TUid AppUid() const; |
|
52 |
|
53 /** |
|
54 * Application name. |
|
55 */ |
|
56 IMPORT_C const TDesC& AppName() const; |
|
57 |
|
58 /** |
|
59 * Bitmap handle to the screenshot or 0 if not available. |
|
60 */ |
|
61 IMPORT_C TInt ScreenshotHandle() const; |
|
62 |
|
63 /** |
|
64 * ETrue if the application is always shown in the fast swapper. |
|
65 * (no use to call CloseApp for such an application) |
|
66 */ |
|
67 IMPORT_C TBool AlwaysShown() const; |
|
68 |
|
69 /** |
|
70 * ETrue if the application is a system application. |
|
71 * (no use to call CloseApp for such an application) |
|
72 */ |
|
73 IMPORT_C TBool SystemApp() const; |
|
74 |
|
75 /** |
|
76 * ETrue if this is a wrt widget. |
|
77 */ |
|
78 IMPORT_C TBool Widget() const; |
|
79 |
|
80 /** |
|
81 * Application icon bitmap handle or 0. |
|
82 * If may not be set if the screenshot is available, i.e. it is |
|
83 * only guaranteed to be non-zero when ScreenshotHandle() returns 0. |
|
84 */ |
|
85 IMPORT_C TInt AppIconBitmapHandle() const; |
|
86 |
|
87 /** |
|
88 * Application icon mask handle. |
|
89 * @see AppIconBitmapHandle |
|
90 * The mask handle may be 0 even when the bitmap handle is non-zero. |
|
91 */ |
|
92 IMPORT_C TInt AppIconMaskHandle() const; |
|
93 |
|
94 |
|
95 IMPORT_C void SetWgId( TInt aWgId ); |
|
96 IMPORT_C void SetAppUid( const TUid& aUid ); |
|
97 IMPORT_C void SetAppNameL( const TDesC& aAppName ); |
|
98 IMPORT_C void SetScreenshotHandle( TInt aHandle ); |
|
99 IMPORT_C void SetAlwaysShown( TBool aValue ); |
|
100 IMPORT_C void SetSystemApp( TBool aValue ); |
|
101 IMPORT_C void SetWidget( TBool aValue ); |
|
102 IMPORT_C void SetAppIconHandles( TInt aBitmapHandle, TInt aMaskHandle ); |
|
103 |
|
104 IMPORT_C void ExternalizeL( RWriteStream& aStream ); |
|
105 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
106 |
|
107 IMPORT_C static void ExternalizeArrayL( RWriteStream& aStream, |
|
108 const RTsFswArray& aArray ); |
|
109 IMPORT_C static void InternalizeArrayL( RReadStream& aStream, |
|
110 RTsFswArray& aArray ); |
|
111 |
|
112 private: |
|
113 TInt iWgId; |
|
114 TUid iAppUid; |
|
115 HBufC* iAppName; |
|
116 TInt iScreenshotHandle; |
|
117 TBool iAlwaysShown; |
|
118 TBool iSystemApp; |
|
119 TBool iWidget; |
|
120 TInt iAppIconBitmapHandle; |
|
121 TInt iAppIconMaskHandle; |
|
122 |
|
123 TInt iReserved0; |
|
124 TInt iReserved1; |
|
125 TInt iReserved2; |
|
126 TInt iReserved3; |
|
127 }; |
|
128 |
|
129 #endif |