|
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 CWaitActive* CWaitActive::NewL() |
|
30 { |
|
31 CWaitActive* self = new (ELeave) CWaitActive; |
|
32 CleanupStack::PushL(self); |
|
33 self->ConstructL(); |
|
34 CleanupStack::Pop(); |
|
35 return self; |
|
36 } |
|
37 |
|
38 // ---------------------------------------------------------------------------- |
|
39 // CIsvTelCallAppTelephony::CIsvTelCallAppTelephony() |
|
40 // Default constructor. |
|
41 // ---------------------------------------------------------------------------- |
|
42 // |
|
43 CWaitActive::CWaitActive() : |
|
44 CTimer(EPriorityStandard) |
|
45 { |
|
46 CActiveScheduler::Add(this); |
|
47 } |
|
48 |
|
49 // --------------------------------------------------------------------------- |
|
50 // destructor |
|
51 // --------------------------------------------------------------------------- |
|
52 CWaitActive::~CWaitActive() |
|
53 { |
|
54 Cancel(); |
|
55 delete iActiveScheduler; |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // destructor |
|
60 // --------------------------------------------------------------------------- |
|
61 void CWaitActive::Wait(TTimeIntervalMicroSeconds32 anInterval) |
|
62 { |
|
63 After(anInterval); |
|
64 iActiveScheduler->Start(); |
|
65 |
|
66 } |
|
67 |
|
68 // ---------------------------------------------------------------------------- |
|
69 // void CIsvTelCallAppTelephony::RunL() |
|
70 // Handles the active object’s request completion event. |
|
71 // ---------------------------------------------------------------------------- |
|
72 // |
|
73 void CWaitActive::CWaitActive::RunL() |
|
74 { |
|
75 // CActiveScheduler::Stop(); |
|
76 iActiveScheduler->AsyncStop(); |
|
77 |
|
78 } |
|
79 |