|
1 |
|
2 // Copyright (c) 2004-2009 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: |
|
15 // |
|
16 |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include "SIPExTimeOutTimer.h" |
|
21 #include "SIPExTimeOutNotify.h" |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // CSIPExTimeOutTimer::NewL |
|
25 // Two-phased constructor. |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 CSIPExTimeOutTimer* CSIPExTimeOutTimer::NewL( |
|
29 MSIPExTimeOutNotify& aTimeOutNotify ) |
|
30 { |
|
31 CSIPExTimeOutTimer* self = new( ELeave ) CSIPExTimeOutTimer( aTimeOutNotify ); |
|
32 |
|
33 CleanupStack::PushL( self ); |
|
34 self->ConstructL(); |
|
35 CleanupStack::Pop(); |
|
36 |
|
37 return self; |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CSIPExTimeOutTimer::CSIPExTimeOutTimer |
|
42 // Constructor. |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 CSIPExTimeOutTimer::CSIPExTimeOutTimer( MSIPExTimeOutNotify& aTimeOutNotify ) |
|
46 : CTimer( EPriorityStandard ), iNotifier( aTimeOutNotify ) |
|
47 { |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CSIPExTimeOutTimer::ConstructL |
|
52 // Symbian 2nd phase constructor can leave. |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 void CSIPExTimeOutTimer::ConstructL() |
|
56 { |
|
57 CTimer::ConstructL(); |
|
58 CActiveScheduler::Add( this ); |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CSIPExTimeOutTimer::~CSIPExTimeOutTimer |
|
63 // Destructor. |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 CSIPExTimeOutTimer::~CSIPExTimeOutTimer() |
|
67 { |
|
68 Cancel(); |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CSIPExTimeOutTimer::RunL |
|
73 // To inform the notifier that xx seconds is up. |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 void CSIPExTimeOutTimer::RunL() |
|
77 { |
|
78 // Tell the notifier that times out. |
|
79 iNotifier.TimerExpired(); |
|
80 } |
|
81 |
|
82 // End of File |