equal
deleted
inserted
replaced
|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @internalComponent |
|
20 */ |
|
21 #ifndef __MODULE_TIMEOUT_H__ |
|
22 #define __MODULE_TIMEOUT_H__ |
|
23 |
|
24 #include <e32std.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 // priority for timeout active object |
|
28 const TUint KQoSDefaultPriority=10; |
|
29 |
|
30 // CModuleTimeout is used to delay unloading of modules in order to avoid unnecessary loading/unloading |
|
31 class CModuleTimeout : public CTimer |
|
32 { |
|
33 public: |
|
34 static CModuleTimeout* NewL(TCallBack& aCallback, TInt aPriority = KQoSDefaultPriority); |
|
35 inline void RunL(); |
|
36 void Start(TUint aMicroSeconds); |
|
37 void Restart(TUint aMicroSeconds); |
|
38 |
|
39 protected: |
|
40 CModuleTimeout(TCallBack& aCallBack, TInt aPriority); |
|
41 void InitL(); |
|
42 |
|
43 private: |
|
44 TCallBack iCallback; |
|
45 }; |
|
46 |
|
47 // inline methods |
|
48 inline void CModuleTimeout::RunL() |
|
49 { iCallback.CallBack(); }; |
|
50 |
|
51 #endif |