|
1 /* |
|
2 * Copyright (c) 2006 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: Configuration representation classes for Out of Memory Monitor. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef OOMRUNPLUGINCONFIG_ |
|
20 #define OOMRUNPLUGINCONFIG_ |
|
21 |
|
22 #include "oomactionconfig.h" |
|
23 |
|
24 enum TOomPluginType |
|
25 { |
|
26 EOomAppPlugin, |
|
27 EOomSystemPlugin |
|
28 }; |
|
29 |
|
30 /* |
|
31 * The OOM action of running an OOM plug-in to free up memory. |
|
32 */ |
|
33 NONSHARABLE_CLASS(COomRunPluginConfig) : public COomActionConfig |
|
34 { |
|
35 public: |
|
36 static COomRunPluginConfig* NewL(TUint aPluginId, TOomPluginType aPluginType); |
|
37 |
|
38 TUint CalculatePluginPriority(const COomWindowGroupList& aWindowGroupList); |
|
39 |
|
40 inline TUint Id(); |
|
41 |
|
42 inline void SetTargetApp(TUint aTargetAppId); |
|
43 |
|
44 inline TUint TargetApp() const; |
|
45 |
|
46 ~COomRunPluginConfig(); |
|
47 |
|
48 // Returns ETrue if a wait period has been explicitly configured for this plugin |
|
49 inline TBool WaitAfterPluginDefined() const; |
|
50 |
|
51 // Returns the configured wait after the plugin has been called |
|
52 inline TInt WaitAfterPlugin() const; |
|
53 |
|
54 inline TBool CallIfTargetAppNotRunning() const; |
|
55 |
|
56 // Set the time to wait |
|
57 inline void SetWaitAfterPlugin(TInt aMillisecondsToWait); |
|
58 |
|
59 inline void SetCallIfTargetAppNotRunning(TBool aCallIfTargetAppNotRunning); |
|
60 |
|
61 inline TOomPluginType PluginType(); |
|
62 |
|
63 private: |
|
64 COomRunPluginConfig(TUint aPluginId, TOomPluginType aPluginType); |
|
65 |
|
66 TUint iPluginId; |
|
67 |
|
68 TUint iTargetAppId; |
|
69 |
|
70 TBool iWaitAfterPluginDefined; |
|
71 |
|
72 TInt iWaitAfterPlugin; // The period to wait after a plugin has been called |
|
73 |
|
74 TBool iCallIfTargetAppNotRunning; |
|
75 |
|
76 TOomPluginType iPluginType; |
|
77 }; |
|
78 |
|
79 #include "oomrunpluginconfig.inl" |
|
80 |
|
81 #endif /*OOMRUNPLUGINCONFIG_*/ |