equal
deleted
inserted
replaced
|
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: Classes for executing OOM actions (e.g. closing applications and running plugins). |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef OOMPLUGINWAITER_H_ |
|
20 #define OOMPLUGINWAITER_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class COomRunPlugin; |
|
25 |
|
26 |
|
27 /* |
|
28 * A class used for waiting for a pre-determined period before completing the plugin operation |
|
29 * It is intended to be used to force a delay between the call to the plugin and the memory check, |
|
30 * thus allowing the plugin to free some memory first. |
|
31 * |
|
32 * @lib oommonitor.lib |
|
33 * @since S60 v5.0 |
|
34 */ |
|
35 NONSHARABLE_CLASS(COomPluginWaiter) : public CTimer |
|
36 { |
|
37 public: |
|
38 static COomPluginWaiter* NewL(TInt aMillisecondsToWait, COomRunPlugin& aCallbackClass); |
|
39 |
|
40 // Start the timer, it will call the plugin back when it expires |
|
41 void Start(); |
|
42 |
|
43 protected: |
|
44 void RunL(); |
|
45 |
|
46 COomPluginWaiter(TInt aMillisecondsToWait, COomRunPlugin& aCallbackClass); |
|
47 |
|
48 private: |
|
49 TInt iMillisecondsToWait; |
|
50 COomRunPlugin& iCallbackClass; |
|
51 }; |
|
52 |
|
53 #endif /*OOMPLUGINWAITER_H_*/ |