|
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: |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __MCSRUNNINGAPPSHIDDENATTRSCANNER_H__ |
|
21 #define __MCSRUNNINGAPPSHIDDENATTRSCANNER_H__ |
|
22 |
|
23 |
|
24 #include "menuengoperation.h" |
|
25 |
|
26 |
|
27 //Forward declatations |
|
28 class CMenuEng; |
|
29 class MMcsRunningAppsHandler; |
|
30 |
|
31 /* |
|
32 * It scans MCS to get UIDs of applications with "hidden" attribute. |
|
33 * It cooperates with CMcsRunningAppsHandler. |
|
34 */ |
|
35 NONSHARABLE_CLASS( CMcsRunningAppsHiddenAttrScanner ): public CBase, MMenuEngOperation |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Factory method. |
|
40 */ |
|
41 static CMcsRunningAppsHiddenAttrScanner* NewL( |
|
42 CMenuEng& aEng, MMcsRunningAppsHandler* aRunningAppsHandler ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CMcsRunningAppsHiddenAttrScanner(); |
|
48 |
|
49 /* |
|
50 * |
|
51 */ |
|
52 void ScanL(); |
|
53 |
|
54 /** |
|
55 * Checks if aUid is present in iHiddenApps array |
|
56 * @param aUid UID of an application |
|
57 * @return hidden attribute of an application |
|
58 */ |
|
59 TBool IsHidden( TUid aUid ); |
|
60 |
|
61 private: |
|
62 /** |
|
63 * Constructor. |
|
64 */ |
|
65 CMcsRunningAppsHiddenAttrScanner( |
|
66 CMenuEng& aEng, MMcsRunningAppsHandler* aRunningAppsHandler ); |
|
67 |
|
68 /** |
|
69 * 2nd phase constructor |
|
70 */ |
|
71 void ConstructL(); |
|
72 |
|
73 private: // from MMenuEngOperation |
|
74 |
|
75 /** |
|
76 * Execute engine operation: |
|
77 * Do the application scan |
|
78 */ |
|
79 void RunMenuEngOperationL(); |
|
80 |
|
81 /** |
|
82 * Error handling: ignore error. |
|
83 * @param aErr Error code. |
|
84 */ |
|
85 void CompletedMenuEngOperation( TInt aErr ); |
|
86 |
|
87 private: |
|
88 /* |
|
89 * Do the scan and update iHiddenApps array with UIDs of applications |
|
90 * with "hidden" attribute. The array is subsequently passed to |
|
91 * CMcsRunningAppsHandler |
|
92 */ |
|
93 void UpdateHiddenApplicationsL(); |
|
94 |
|
95 |
|
96 private://data |
|
97 /* |
|
98 * engine. not own |
|
99 */ |
|
100 CMenuEng& iEng ; ///< Engine. |
|
101 |
|
102 /* |
|
103 * own |
|
104 */ |
|
105 RArray<TUid> iHiddenApps; |
|
106 |
|
107 /* |
|
108 * not own |
|
109 */ |
|
110 MMcsRunningAppsHandler* iRunningAppsHandler; |
|
111 |
|
112 /* |
|
113 * Flag storing operation status information |
|
114 */ |
|
115 TBool iOperationInProgress; |
|
116 |
|
117 }; |
|
118 |
|
119 |
|
120 |
|
121 #endif // __MCSRUNNINGAPPSHIDDENATTRSCANNER_H__ |