equal
deleted
inserted
replaced
|
1 // Copyright (c) 2002-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 #include "plugintimer.h" |
|
19 #include <featmgr/featureinfoplugin.h> |
|
20 |
|
21 CPluginTimer* CPluginTimer::NewL( const TTimeIntervalMicroSeconds32& anInterval, |
|
22 MPluginTimerCallback* aCallback ) |
|
23 { |
|
24 CPluginTimer* self = new( ELeave ) CPluginTimer(0, aCallback); |
|
25 |
|
26 CleanupStack::PushL( self ); |
|
27 self->ConstructL(); |
|
28 CleanupStack::Pop( self ); |
|
29 |
|
30 CActiveScheduler::Add(self); |
|
31 |
|
32 self->After(anInterval); |
|
33 |
|
34 return self; |
|
35 } |
|
36 |
|
37 CPluginTimer::~CPluginTimer() |
|
38 { |
|
39 iCallback = NULL; |
|
40 } |
|
41 |
|
42 CPluginTimer::CPluginTimer( TInt aPriority, MPluginTimerCallback* aCallback ) |
|
43 : CTimer(aPriority), |
|
44 iCallback(aCallback) |
|
45 { |
|
46 } |
|
47 |
|
48 void CPluginTimer::ConstructL() |
|
49 { |
|
50 CTimer::ConstructL(); |
|
51 } |
|
52 |
|
53 |
|
54 void CPluginTimer::RunL( ) |
|
55 { |
|
56 iCallback->GenericTimerFiredL(); |
|
57 } |