|
1 /* |
|
2 * Copyright (c) 2007-2008 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 CWsfActiveWaiter |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "wsfactivewaiter.h" |
|
21 #include "wsflogger.h" |
|
22 |
|
23 |
|
24 |
|
25 // --------------------------------------------------------- |
|
26 // CWsfActiveWaiter* CWsfActiveWaiter::NewL |
|
27 // --------------------------------------------------------- |
|
28 // |
|
29 CWsfActiveWaiter* CWsfActiveWaiter::NewL() |
|
30 { |
|
31 CWsfActiveWaiter* self = NewLC(); |
|
32 CleanupStack::Pop( self ); |
|
33 |
|
34 return self; |
|
35 } |
|
36 |
|
37 |
|
38 // --------------------------------------------------------- |
|
39 // CWsfActiveWaiter* CWsfActiveWaiter::NewLC |
|
40 // --------------------------------------------------------- |
|
41 // |
|
42 CWsfActiveWaiter* CWsfActiveWaiter::NewLC() |
|
43 { |
|
44 CWsfActiveWaiter* self = new ( ELeave ) CWsfActiveWaiter(); |
|
45 CleanupStack::PushL( self ); |
|
46 |
|
47 return self; |
|
48 } |
|
49 |
|
50 |
|
51 // --------------------------------------------------------- |
|
52 // CWsfActiveWaiter::CWsfActiveWaiter |
|
53 // --------------------------------------------------------- |
|
54 // |
|
55 CWsfActiveWaiter::CWsfActiveWaiter(): |
|
56 CActive( CActive::EPriorityStandard ) |
|
57 { |
|
58 CActiveScheduler::Add( this ); |
|
59 } |
|
60 |
|
61 |
|
62 // --------------------------------------------------------- |
|
63 // CWsfActiveWaiter::~CWsfActiveWaiter |
|
64 // --------------------------------------------------------- |
|
65 // |
|
66 CWsfActiveWaiter::~CWsfActiveWaiter() |
|
67 { |
|
68 Cancel(); |
|
69 } |
|
70 |
|
71 |
|
72 // --------------------------------------------------------- |
|
73 // CWsfActiveWaiter::DoCancel |
|
74 // --------------------------------------------------------- |
|
75 // |
|
76 void CWsfActiveWaiter::DoCancel() |
|
77 { |
|
78 } |
|
79 |
|
80 |
|
81 // --------------------------------------------------------- |
|
82 // CWsfActiveWaiter::RunL |
|
83 // --------------------------------------------------------- |
|
84 // |
|
85 void CWsfActiveWaiter::RunL() |
|
86 { |
|
87 LOG_ENTERFN( "CWsfActiveWaiter::RunL" ); |
|
88 if ( iWait.IsStarted() ) |
|
89 { |
|
90 LOG_WRITE("async call completed, resuming."); |
|
91 iWait.AsyncStop(); |
|
92 } |
|
93 } |
|
94 |
|
95 // --------------------------------------------------------- |
|
96 // CWsfActiveWaiter::WaitForRequest |
|
97 // --------------------------------------------------------- |
|
98 // |
|
99 TInt CWsfActiveWaiter::WaitForRequest() |
|
100 { |
|
101 LOG_ENTERFN("CWsfActiveWaiter::WaitForRequest"); |
|
102 SetActive(); |
|
103 iWait.Start(); |
|
104 |
|
105 return iStatus.Int(); |
|
106 } |
|
107 |
|
108 // End of File |
|
109 |