|
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 reading 3D pattern data. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "C3DAudioTimeOutTimer.h" |
|
21 |
|
22 |
|
23 |
|
24 // ========================= MEMBER FUNCTIONS ================================== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // C3DAudioTimeOutTimer::NewL |
|
28 // Two-phased constructor. |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 C3DAudioTimeOutTimer* C3DAudioTimeOutTimer::NewL( |
|
32 const TInt aPriority, |
|
33 M3DAudioTimeOutNotifier* aTimeOutNotify ) |
|
34 { |
|
35 C3DAudioTimeOutTimer* self = C3DAudioTimeOutTimer::NewLC( aPriority, |
|
36 aTimeOutNotify ); |
|
37 CleanupStack::Pop( self ); |
|
38 return self; |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // C3DAudioTimeOutTimer::NewLC |
|
43 // Two-phased constructor. Leaves pointer on cleanup stack. |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 C3DAudioTimeOutTimer* C3DAudioTimeOutTimer::NewLC( |
|
47 const TInt aPriority, |
|
48 M3DAudioTimeOutNotifier* aTimeOutNotify ) |
|
49 { |
|
50 C3DAudioTimeOutTimer* self = new ( ELeave ) C3DAudioTimeOutTimer( aPriority, |
|
51 aTimeOutNotify ); |
|
52 CleanupStack::PushL( self ); |
|
53 self->ConstructL(); |
|
54 return self; |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // C3DAudioTimeOutTimer::C3DAudioTimeOutTimer |
|
59 // C++ default constructor can NOT contain any code, that might leave. |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 C3DAudioTimeOutTimer::C3DAudioTimeOutTimer( |
|
63 const TInt aPriority, |
|
64 M3DAudioTimeOutNotifier* aTimeOutNotify ): |
|
65 CTimer( aPriority ), |
|
66 iNotify( aTimeOutNotify ) |
|
67 { |
|
68 } |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // C3DAudioTimeOutTimer::ConstructL |
|
72 // Symbian 2nd phase constructor can leave. |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 void C3DAudioTimeOutTimer::ConstructL() |
|
76 { |
|
77 CTimer::ConstructL(); |
|
78 CActiveScheduler::Add( this ); |
|
79 } |
|
80 |
|
81 // Destructor. |
|
82 C3DAudioTimeOutTimer::~C3DAudioTimeOutTimer() |
|
83 { |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // C3DAudioTimeOutTimer::RunError |
|
88 // Called when RunL() leaves. |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 TInt C3DAudioTimeOutTimer::RunError( TInt /*aError*/ ) |
|
92 { |
|
93 return KErrNone; |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // C3DAudioTimeOutTimer::RunL |
|
98 // Called when operation completes. |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 void C3DAudioTimeOutTimer::RunL() |
|
102 { |
|
103 // Timer request has completed, so notify the timer's owner |
|
104 if ( iStatus == KErrNone ) |
|
105 { |
|
106 iNotify->TimerExpiredL(); |
|
107 } |
|
108 } |
|
109 |
|
110 // End of File |