|
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: Timer of time that will be used to polling |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "ictspollingtimetimer.h" |
|
21 #include "ictspollingtimeobserver.h" |
|
22 #include "am_debug.h" |
|
23 |
|
24 |
|
25 // ======== MEMBER FUNCTIONS ======== |
|
26 |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // CIctsPollingTimeTimer::CIctsPollingTimeTimer |
|
30 // C++ default constructor can NOT contain any code, that |
|
31 // might leave. |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 CIctsPollingTimeTimer::CIctsPollingTimeTimer( MIctsPollingTimeObserver& aObserver ) |
|
35 : CTimer( EPriorityStandard ), iObserver( aObserver ) |
|
36 { |
|
37 |
|
38 } |
|
39 |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // CIctsPollingTimeTimer::ConstructL |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 void CIctsPollingTimeTimer::ConstructL() |
|
46 { |
|
47 DEBUG("CIctsPollingTimeTimer::ConstructL()"); |
|
48 CTimer::ConstructL(); |
|
49 CActiveScheduler::Add(this); |
|
50 } |
|
51 |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // CIctsPollingTimeTimer::NewL |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 CIctsPollingTimeTimer* CIctsPollingTimeTimer::NewL( MIctsPollingTimeObserver& aObserver ) |
|
58 { |
|
59 CIctsPollingTimeTimer* self = new( ELeave ) CIctsPollingTimeTimer( aObserver ); |
|
60 CleanupStack::PushL( self ); |
|
61 self->ConstructL(); |
|
62 CleanupStack::Pop( self ); |
|
63 |
|
64 return self; |
|
65 } |
|
66 |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 // CIctsPollingTimeTimer::~CIctsPollingTimeTimer |
|
70 // --------------------------------------------------------------------------- |
|
71 // |
|
72 CIctsPollingTimeTimer::~CIctsPollingTimeTimer() |
|
73 { |
|
74 CTimer::Cancel(); |
|
75 |
|
76 } |
|
77 |
|
78 // --------------------------------------------------------------------------- |
|
79 // CIctsPollingTimeTimer::RunL |
|
80 // --------------------------------------------------------------------------- |
|
81 // |
|
82 void CIctsPollingTimeTimer::RunL() |
|
83 { |
|
84 DEBUG("CIctsPollingTimeTimer::RunL()"); |
|
85 iObserver.PollingTimeTimeout(); |
|
86 } |
|
87 |
|
88 // End of File |