|
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: alfasynchgoomsession provides asynchronous |
|
15 * connection to graphics out of memory monitor. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __ALFASYNCHGOOMSESSION_H__ |
|
22 #define __ALFASYNCHGOOMSESSION_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <goommonitorsession.h> |
|
26 |
|
27 /** |
|
28 * Active object to handle asynchronous connection to GOOM thread. |
|
29 */ |
|
30 NONSHARABLE_CLASS( CAlfAsynchGoomSession ) : public CActive |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Constructor. |
|
35 */ |
|
36 CAlfAsynchGoomSession(); |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 ~CAlfAsynchGoomSession(); |
|
42 |
|
43 /** |
|
44 * Informs that application is about to start. |
|
45 * This is the method clients should use. |
|
46 * @param aAppUid application UID. |
|
47 */ |
|
48 void AppAboutToStart( const TUid& aAppUid ); |
|
49 |
|
50 /** |
|
51 * Informs that application is considered to be closed. |
|
52 * @param aAppUid application UID. |
|
53 */ |
|
54 void AppClosed( const TUid& aAppUid ); |
|
55 |
|
56 public: |
|
57 /** |
|
58 * Starts connection creation to goom. |
|
59 */ |
|
60 void Start(); |
|
61 |
|
62 /** |
|
63 * Handles completion of request. |
|
64 */ |
|
65 void RunL(); |
|
66 |
|
67 /** |
|
68 * Cancels pending request. |
|
69 */ |
|
70 void DoCancel(); |
|
71 |
|
72 private: |
|
73 // Goom session. Owned. |
|
74 RGOomMonitorSession iGoomSession; |
|
75 |
|
76 // ETrue if connecting, EFalse otherwise. |
|
77 TBool iConnecting; |
|
78 |
|
79 // ETrue if connected. |
|
80 TBool iConnected; |
|
81 |
|
82 // Pending UIDs of started applications, but not yet |
|
83 // delivered to GOOM. Owned. |
|
84 RArray<TUid> iPendingUids; |
|
85 |
|
86 // Running application list. Owned. |
|
87 RArray<TInt> iRunningAppsList; |
|
88 }; |
|
89 |
|
90 #endif //__ALFASYNCHGOOMSESSION_H__ |