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 #ifndef MCSRUNNINGAPPS_H_ |
|
20 #define MCSRUNNINGAPPS_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "mcsmenunotifier.h" |
|
24 |
|
25 class MMCSCallback; |
|
26 class RMenu; |
|
27 class TMenuItem; |
|
28 class RMcsOperationManager; |
|
29 |
|
30 /** |
|
31 * This class implements MCS SAPI core logic for Getrunningapplications async requests. |
|
32 * |
|
33 */ |
|
34 class CMCSRunningApps: public CActive |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 * @param aCallback Callback Object for Change notification. |
|
41 * @return CMCSRunningApps reference. |
|
42 */ |
|
43 static CMCSRunningApps* NewL( RMenu& aMCS, MMCSCallback* aCallback, |
|
44 RMcsOperationManager& aOperationManager ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CMCSRunningApps(); |
|
50 |
|
51 private: |
|
52 |
|
53 /** |
|
54 * Default constructor. |
|
55 * @param aCallback It is a callback notification. |
|
56 */ |
|
57 CMCSRunningApps( RMenu& aMCS, MMCSCallback* aCallback, |
|
58 RMcsOperationManager& aOperationManager ); |
|
59 |
|
60 /** |
|
61 * ConstructL |
|
62 */ |
|
63 void ConstructL(); |
|
64 |
|
65 /** |
|
66 * Inherited from CActive class |
|
67 */ |
|
68 virtual void DoCancel(); |
|
69 |
|
70 /** |
|
71 * Inherited from CActive class |
|
72 */ |
|
73 virtual void RunL(); |
|
74 |
|
75 /** |
|
76 * Notify callback in case RunL leaved; |
|
77 */ |
|
78 TInt RunError(TInt aError); |
|
79 |
|
80 /** |
|
81 * Activates the request and call SetActive() function |
|
82 */ |
|
83 void ActivateRequest(TInt aReason); |
|
84 |
|
85 /** |
|
86 * Gives the result for notification request. |
|
87 */ |
|
88 void NotifyRequestResult(TInt aReason); |
|
89 |
|
90 public : |
|
91 |
|
92 /** |
|
93 * GetRunningApplicationL for asynchronous calls. |
|
94 */ |
|
95 void GetRunningApplicationL(); |
|
96 |
|
97 public: // from MMCSMenuOpObserver |
|
98 |
|
99 /** |
|
100 * RunningAppsChangedL operation complete call back. |
|
101 */ |
|
102 void RunningAppsChangedL(); |
|
103 |
|
104 private: |
|
105 |
|
106 /** iMCS reference. Not owned. */ |
|
107 RMenu iMCS; |
|
108 /** Callback Object. Not owned. */ |
|
109 MMCSCallback* iCallback; |
|
110 /** UID Array. Owned */ |
|
111 RArray<TUid> iUidArray; |
|
112 /** item id **/ |
|
113 TInt iItemId; |
|
114 /** Action to Execute **/ |
|
115 TPtrC8 iAction; |
|
116 /*not own*/ |
|
117 RMcsOperationManager& iOperationManager; |
|
118 |
|
119 |
|
120 }; |
|
121 |
|
122 #endif /*MCSRUNNINGAPPS_H_*/ |
|