|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Feature Manager stub plugin timer definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __PLUGINTIMER_H_ |
|
21 #define __PLUGINTIMER_H_ |
|
22 |
|
23 #include <featureinfoplugin.h> |
|
24 |
|
25 /** |
|
26 * An interface for handling timer expiration events. |
|
27 */ |
|
28 class MPluginTimerCallback |
|
29 { |
|
30 public: |
|
31 /** |
|
32 * Called when the timer fires |
|
33 */ |
|
34 virtual void GenericTimerFiredL( MFeatureInfoPluginCallback& aService, |
|
35 FeatureInfoCommand::TFeatureInfoCmd aCommandId, |
|
36 TUint8 aTransId, |
|
37 TInt aRetVal ) = 0; |
|
38 }; |
|
39 |
|
40 |
|
41 class CPluginTimer : public CTimer |
|
42 { |
|
43 public: |
|
44 CPluginTimer( TInt aPriority, |
|
45 MFeatureInfoPluginCallback& aService, |
|
46 FeatureInfoCommand::TFeatureInfoCmd aCommandId, |
|
47 TUint8 aTransId, |
|
48 TInt aRetVal, |
|
49 MPluginTimerCallback* aCallback ); |
|
50 |
|
51 ~CPluginTimer(); |
|
52 |
|
53 CPluginTimer(TInt aPriority); |
|
54 |
|
55 static CPluginTimer* NewL( const TTimeIntervalMicroSeconds32& anInterval, |
|
56 MFeatureInfoPluginCallback& aService, |
|
57 FeatureInfoCommand::TFeatureInfoCmd aCommandId, |
|
58 TUint8 aTransId, |
|
59 TInt aRetVal, |
|
60 MPluginTimerCallback* aCallback ); |
|
61 |
|
62 void ConstructL(); |
|
63 |
|
64 void RunL(); |
|
65 |
|
66 inline TUint8 TransId() const |
|
67 { |
|
68 return iTransId; |
|
69 }; |
|
70 |
|
71 private: |
|
72 |
|
73 MFeatureInfoPluginCallback& iService; // Not owned |
|
74 |
|
75 FeatureInfoCommand::TFeatureInfoCmd iCommandId; |
|
76 TUint8 iTransId; |
|
77 TInt iRetVal; |
|
78 |
|
79 MPluginTimerCallback* iCallback; // Not owned |
|
80 |
|
81 }; |
|
82 |
|
83 |
|
84 #endif // __PLUGINTIMER_H_ |