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