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