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 CWsfActiveWrappers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "wsflogger.h" |
|
22 #include "wsfactivewrappers.h" |
|
23 #include "wsfwlanlistactivewrapper.h" |
|
24 #include "wsfrefreshscanactivewrapper.h" |
|
25 #include "wsfdisconnectactivewrapper.h" |
|
26 #include "wsfconnectactivewrapper.h" |
|
27 #include "wsflaunchaihelperactivewrapper.h" |
|
28 |
|
29 |
|
30 // ---------------------------------------------------------------------------- |
|
31 // CWsfActiveWrappers::CWsfActiveWrappers |
|
32 // ---------------------------------------------------------------------------- |
|
33 // |
|
34 CWsfActiveWrappers::CWsfActiveWrappers() |
|
35 { |
|
36 // No implementation required |
|
37 } |
|
38 |
|
39 |
|
40 // ---------------------------------------------------------------------------- |
|
41 // CWsfActiveWrappers::~CWsfActiveWrappers |
|
42 // ---------------------------------------------------------------------------- |
|
43 // |
|
44 CWsfActiveWrappers::~CWsfActiveWrappers() |
|
45 { |
|
46 delete iWLANListActiveWrapper; |
|
47 delete iRefreshScanActiveWrapper; |
|
48 delete iDisconnectActiveWrapper; |
|
49 delete iConnectActiveWrapper; |
|
50 delete iLaunchAiHelperActiveWrapper; |
|
51 } |
|
52 |
|
53 |
|
54 // ---------------------------------------------------------------------------- |
|
55 // CWsfActiveWrappers::NewLC |
|
56 // ---------------------------------------------------------------------------- |
|
57 // |
|
58 CWsfActiveWrappers* CWsfActiveWrappers::NewLC( CWsfModel* aModel, |
|
59 TWsfAiController &aController ) |
|
60 { |
|
61 LOG_ENTERFN( "CWsfActiveWrappers::NewLC" ); |
|
62 CWsfActiveWrappers* self = new ( ELeave ) CWsfActiveWrappers(); |
|
63 CleanupStack::PushL( self ); |
|
64 self->ConstructL( aModel, aController ); |
|
65 return self; |
|
66 } |
|
67 |
|
68 |
|
69 // ---------------------------------------------------------------------------- |
|
70 // CWsfActiveWrappers::NewL |
|
71 // ---------------------------------------------------------------------------- |
|
72 // |
|
73 CWsfActiveWrappers* CWsfActiveWrappers::NewL( CWsfModel* aModel, |
|
74 TWsfAiController &aController ) |
|
75 { |
|
76 LOG_ENTERFN( "CWsfActiveWrappers::NewL" ); |
|
77 CWsfActiveWrappers* self = CWsfActiveWrappers::NewLC( aModel, aController ); |
|
78 CleanupStack::Pop(); // self; |
|
79 return self; |
|
80 } |
|
81 |
|
82 |
|
83 // ---------------------------------------------------------------------------- |
|
84 // CWsfActiveWrappers::ConstructL |
|
85 // ---------------------------------------------------------------------------- |
|
86 // |
|
87 void CWsfActiveWrappers::ConstructL( CWsfModel* aModel, |
|
88 TWsfAiController &aController ) |
|
89 { |
|
90 LOG_ENTERFN( "CWsfActiveWrappers::ConstructL" ); |
|
91 iWLANListActiveWrapper = CWsfWLANListActiveWrapper::NewL( aModel, |
|
92 aController ); |
|
93 |
|
94 iRefreshScanActiveWrapper = CWsfRefreshScanActiveWrapper::NewL( aModel ); |
|
95 |
|
96 iDisconnectActiveWrapper = CWsfDisconnectActiveWrapper::NewL( aModel ); |
|
97 |
|
98 iConnectActiveWrapper = CWsfConnectActiveWrapper::NewL( aModel ); |
|
99 |
|
100 iLaunchAiHelperActiveWrapper = CWsfLaunchAiHelperActiveWrapper::NewL( |
|
101 aModel, aController ); |
|
102 } |
|
103 |
|
104 |
|
105 // ---------------------------------------------------------------------------- |
|
106 // CWsfActiveWrappers::Disconnect |
|
107 // ---------------------------------------------------------------------------- |
|
108 // |
|
109 void CWsfActiveWrappers::Disconnect() |
|
110 { |
|
111 LOG_ENTERFN( "CWsfActiveWrappers::Disconnect" ); |
|
112 iDisconnectActiveWrapper->Start(); |
|
113 } |
|
114 |
|
115 |
|
116 // ---------------------------------------------------------------------------- |
|
117 // CWsfActiveWrappers::Connect |
|
118 // ---------------------------------------------------------------------------- |
|
119 // |
|
120 void CWsfActiveWrappers::Connect( TUint aIapID, TBool aConnectOnly, |
|
121 TWsfIapPersistence aPersistence ) |
|
122 { |
|
123 LOG_ENTERFN( "CWsfActiveWrappers::Connect" ); |
|
124 iConnectActiveWrapper->Start( aIapID, aConnectOnly, aPersistence ); |
|
125 } |
|
126 |
|
127 |
|
128 // ---------------------------------------------------------------------------- |
|
129 // CWsfActiveWrappers::RefreshScan |
|
130 // ---------------------------------------------------------------------------- |
|
131 // |
|
132 void CWsfActiveWrappers::RefreshScan() |
|
133 { |
|
134 LOG_ENTERFN( "CWsfActiveWrappers::RefreshScan" ); |
|
135 iRefreshScanActiveWrapper->Start(); |
|
136 } |
|
137 |
|
138 |
|
139 // ---------------------------------------------------------------------------- |
|
140 // CWsfActiveWrappers::RefreshWLANList |
|
141 // ---------------------------------------------------------------------------- |
|
142 // |
|
143 void CWsfActiveWrappers::RefreshWLANList( TBool aStarUp ) |
|
144 { |
|
145 LOG_ENTERFN( "CWsfActiveWrappers::RefreshWLANList" ); |
|
146 iWLANListActiveWrapper->Start( aStarUp ); |
|
147 } |
|
148 |
|
149 |
|
150 // ---------------------------------------------------------------------------- |
|
151 // CWsfActiveWrappers::LaunchHelperApplicationL |
|
152 // ---------------------------------------------------------------------------- |
|
153 // |
|
154 void CWsfActiveWrappers::LaunchHelperApplicationL( TWsfWlanInfo& aInfo, |
|
155 TBool aConnectOnly, |
|
156 TBool aTestAccessPoint ) |
|
157 { |
|
158 LOG_ENTERFN( "CWsfActiveWrappers::LaunchHelperApplicationL" ); |
|
159 iLaunchAiHelperActiveWrapper->Start( aInfo, aConnectOnly, aTestAccessPoint ); |
|
160 } |
|
161 |
|
162 |
|
163 // ---------------------------------------------------------------------------- |
|
164 // CWsfActiveWrappers::GetWLANList |
|
165 // ---------------------------------------------------------------------------- |
|
166 // |
|
167 CWsfWlanInfoArray* CWsfActiveWrappers::GetWLANList() |
|
168 { |
|
169 LOG_ENTERFN( "CWsfActiveWrappers::GetWLANList" ); |
|
170 return iWLANListActiveWrapper->GetWlanList(); |
|
171 } |
|
172 |
|
173 |
|
174 // ---------------------------------------------------------------------------- |
|
175 // CWsfActiveWrappers::GetConnectedWLANNetwork |
|
176 // ---------------------------------------------------------------------------- |
|
177 // |
|
178 TWsfWlanInfo CWsfActiveWrappers::GetConnectedWLANNetwork() |
|
179 { |
|
180 LOG_ENTERFN( "CWsfActiveWrappers::GetConnectedWLANNetwork" ); |
|
181 return iWLANListActiveWrapper->GetConnectedWLANNetwork(); |
|
182 } |
|
183 |
|
184 |
|