1 /* |
|
2 * Copyright (c) 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: Timer for queries that have timeout. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "SyncMLQueryTimer.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CSyncMLQueryTimer::CSyncMLQueryTimer |
|
27 // C++ default constructor can NOT contain any code, that |
|
28 // might leave. |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CSyncMLQueryTimer::CSyncMLQueryTimer( MSyncMLQueryTimerObserver* aObserver ) |
|
32 : CTimer( EPriorityStandard ), iObserver( aObserver ) |
|
33 { |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CSyncMLQueryTimer::ConstructL |
|
38 // Symbian 2nd phase constructor can leave. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 void CSyncMLQueryTimer::ConstructL() |
|
42 { |
|
43 CTimer::ConstructL(); |
|
44 CActiveScheduler::Add( this ); |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CSyncMLQueryTimer::NewL |
|
49 // Two-phased constructor. |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 CSyncMLQueryTimer* CSyncMLQueryTimer::NewL( MSyncMLQueryTimerObserver* aObserver ) |
|
53 { |
|
54 CSyncMLQueryTimer* self = new( ELeave ) CSyncMLQueryTimer( aObserver ); |
|
55 |
|
56 CleanupStack::PushL( self ); |
|
57 self->ConstructL(); |
|
58 CleanupStack::Pop( self ); |
|
59 |
|
60 return self; |
|
61 } |
|
62 |
|
63 |
|
64 // Destructor |
|
65 CSyncMLQueryTimer::~CSyncMLQueryTimer() |
|
66 { |
|
67 |
|
68 } |
|
69 |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CSyncMLQueryTimer::RunL |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 void CSyncMLQueryTimer::RunL() |
|
76 { |
|
77 if ( iObserver ) |
|
78 { |
|
79 iObserver->TimerExpired(); |
|
80 } |
|
81 } |
|
82 |
|
83 // End of File |
|