|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "waitactive.h" |
|
19 |
|
20 // ======== MEMBER FUNCTIONS ======== |
|
21 |
|
22 |
|
23 void CWaitActive::ConstructL() |
|
24 { |
|
25 CTimer::ConstructL(); |
|
26 iActiveScheduler = new ( ELeave ) CActiveSchedulerWait(); |
|
27 } |
|
28 |
|
29 |
|
30 CWaitActive* CWaitActive::NewL() |
|
31 { |
|
32 CWaitActive* self = new( ELeave ) CWaitActive; |
|
33 CleanupStack::PushL( self ); |
|
34 self->ConstructL(); |
|
35 CleanupStack::Pop(); |
|
36 return self; |
|
37 } |
|
38 |
|
39 // ---------------------------------------------------------------------------- |
|
40 // CIsvTelCallAppTelephony::CIsvTelCallAppTelephony() |
|
41 // Default constructor. |
|
42 // ---------------------------------------------------------------------------- |
|
43 // |
|
44 CWaitActive::CWaitActive() |
|
45 :CTimer( EPriorityStandard ) |
|
46 { |
|
47 CActiveScheduler::Add( this ); |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // destructor |
|
52 // --------------------------------------------------------------------------- |
|
53 CWaitActive::~CWaitActive() |
|
54 { |
|
55 Cancel(); |
|
56 delete iActiveScheduler; |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // destructor |
|
61 // --------------------------------------------------------------------------- |
|
62 void CWaitActive::Wait(TTimeIntervalMicroSeconds32 anInterval) |
|
63 { |
|
64 After(anInterval); |
|
65 iActiveScheduler->Start(); |
|
66 |
|
67 } |
|
68 |
|
69 |
|
70 |
|
71 // ---------------------------------------------------------------------------- |
|
72 // void CIsvTelCallAppTelephony::RunL() |
|
73 // Handles the active object’s request completion event. |
|
74 // ---------------------------------------------------------------------------- |
|
75 // |
|
76 void CWaitActive::CWaitActive::RunL() |
|
77 { |
|
78 // CActiveScheduler::Stop(); |
|
79 iActiveScheduler->AsyncStop(); |
|
80 |
|
81 } |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |