|
1 /* |
|
2 * Copyright (c) 2007 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: Implementation of CIctsActiveWait |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <e32base.h> |
|
22 #include "ictsasyncwait.h" |
|
23 |
|
24 // --------------------------------------------------------- |
|
25 // CIctsAsyncWait::CIctsAsyncWait() |
|
26 // --------------------------------------------------------- |
|
27 // |
|
28 CIctsAsyncWait::CIctsAsyncWait() : CActive(CActive::EPriorityUserInput) |
|
29 { |
|
30 CActiveScheduler::Add(this); |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------- |
|
34 // CIctsAsyncWait::~CIctsAsyncWait() |
|
35 // --------------------------------------------------------- |
|
36 // |
|
37 CIctsAsyncWait::~CIctsAsyncWait() |
|
38 { |
|
39 Cancel() ; |
|
40 } |
|
41 |
|
42 // --------------------------------------------------------- |
|
43 // CIctsAsyncWait::Wait() |
|
44 // --------------------------------------------------------- |
|
45 // |
|
46 void CIctsAsyncWait::Wait() |
|
47 { |
|
48 SetActive(); |
|
49 iActiveWait.Start(); |
|
50 } |
|
51 |
|
52 // --------------------------------------------------------- |
|
53 // CIctsAsyncWait::RunL() |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 void CIctsAsyncWait::RunL() |
|
57 { |
|
58 iActiveWait.AsyncStop() ; |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------- |
|
62 // CIctsAsyncWait::DoCancel() |
|
63 // --------------------------------------------------------- |
|
64 // |
|
65 void CIctsAsyncWait::DoCancel() |
|
66 { |
|
67 if( iStatus == KRequestPending ) |
|
68 { |
|
69 TRequestStatus * reqStat = &iStatus; |
|
70 User::RequestComplete(reqStat, KErrCancel); |
|
71 } |
|
72 } |
|
73 |
|
74 // End of File |