|
1 /* |
|
2 * Copyright (c) 2006-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 the License "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: The class implementing MWlanControlInterface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef WLANCONTROLIMPL_H |
|
20 #define WLANCONTROLIMPL_H |
|
21 |
|
22 #include "rwlmserver.h" |
|
23 #include "wlancontrolclient.h" |
|
24 |
|
25 /** |
|
26 * Implementation for MWlanControlInterface interface. |
|
27 * |
|
28 * @lib wlancontrolimpl.dll |
|
29 * @since S60 v3.2 |
|
30 */ |
|
31 class CWlanControlImpl : public CWlanControlClient |
|
32 { |
|
33 |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Static constructor. |
|
38 */ |
|
39 static CWlanControlImpl* NewL(); |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~CWlanControlImpl(); |
|
45 |
|
46 // from base class CWlanControlClient |
|
47 |
|
48 /** |
|
49 * From CWlanControlImpl. |
|
50 * Get packet statistics of the current connection. |
|
51 * |
|
52 * @since S60 v3.2 |
|
53 * @param aStatistics Packet statistics of the current connection. |
|
54 * @return KErrNone if statistics were read successfully, an error otherwise. |
|
55 */ |
|
56 virtual TInt GetPacketStatistics( |
|
57 TWlanPacketStatistics& aStatistics ); |
|
58 |
|
59 /** |
|
60 * From CWlanControlImpl. |
|
61 * Clear packet statistics of the current connection. |
|
62 * |
|
63 * @since S60 v3.2 |
|
64 */ |
|
65 virtual void ClearPacketStatistics(); |
|
66 |
|
67 /** |
|
68 * From CWlanControlImpl. |
|
69 * Get the current U-APSD settings. |
|
70 * |
|
71 * @since S60 v3.2 |
|
72 * @param aSettings Current U-APSD settings. |
|
73 * @return KErrNone if settings were read successfully, an error otherwise. |
|
74 */ |
|
75 virtual TInt GetUapsdSettings( |
|
76 TWlanUapsdSettings& aSettings ); |
|
77 |
|
78 /** |
|
79 * From CWlanControlImpl. |
|
80 * Set the U-APSD settings. |
|
81 * |
|
82 * @since S60 v3.2 |
|
83 * @param aSettings Current U-APSD settings to be set. |
|
84 * @return KErrNone if settings were set successfully, an error otherwise. |
|
85 */ |
|
86 virtual TInt SetUapsdSettings( |
|
87 const TWlanUapsdSettings& aSettings ); |
|
88 |
|
89 /** |
|
90 * Get the current power save settings. |
|
91 * |
|
92 * @since S60 v3.2 |
|
93 * @param aSettings power save settings. |
|
94 * @return KErrNone if settings were read successfully, an error otherwise. |
|
95 */ |
|
96 virtual TInt GetPowerSaveSettings( |
|
97 TWlanPowerSaveSettings& aSettings ); |
|
98 |
|
99 /** |
|
100 * Set the power save settings. |
|
101 * |
|
102 * @since S60 v3.2 |
|
103 * @param aSettings Current power save settings to be set. |
|
104 * @return KErrNone if settings were set successfully, an error otherwise. |
|
105 */ |
|
106 virtual TInt SetPowerSaveSettings( |
|
107 const TWlanPowerSaveSettings& aSettings ); |
|
108 |
|
109 /** |
|
110 * Get information about the current AP. |
|
111 * |
|
112 * @since S60 v3.2 |
|
113 * @param aInfo Information about the current AP. |
|
114 * @return KErrNone if information is available, an error otherwise. |
|
115 */ |
|
116 virtual TInt GetAccessPointInfo( |
|
117 TWlanAccessPointInfo& aInfo ); |
|
118 |
|
119 /** |
|
120 * Get roam metrics of the current connection. |
|
121 * |
|
122 * @since S60 v3.2 |
|
123 * @param aRoamMetrics Roam metrics of the current connection. |
|
124 * @return KErrNone if settings were read successfully, an error otherwise. |
|
125 */ |
|
126 virtual TInt GetRoamMetrics( |
|
127 TWlanRoamMetrics& aRoamMetrics ); |
|
128 |
|
129 /** |
|
130 * Get a list of BSSIDs on the rogue list. |
|
131 * |
|
132 * @since S60 v3.2 |
|
133 * @param aRogueList List of BSSIDs on the rogue list. |
|
134 * @return KErrNone if list were read successfully, an error otherwise. |
|
135 */ |
|
136 virtual TInt GetRogueList( |
|
137 CArrayFixSeg<TWlanBssid>& aRogueList ); |
|
138 |
|
139 /** |
|
140 * Get the current regulatory domain. |
|
141 * |
|
142 * @since S60 v3.2 |
|
143 * @param aRegion current region. |
|
144 * @return KErrNone if value was read successfully, an error otherwise. |
|
145 */ |
|
146 virtual TInt GetRegulatoryDomain( |
|
147 TWlanRegion& aRegion ); |
|
148 |
|
149 /** |
|
150 * Get the current power save mode. |
|
151 * |
|
152 * @since S60 v3.2 |
|
153 * @param aPowerSaveMode current power save mode. |
|
154 * @return KErrNone if value was read successfully, an error otherwise. |
|
155 */ |
|
156 virtual TInt GetPowerSaveMode( |
|
157 TWlanPowerSave& aPowerSaveMode ); |
|
158 |
|
159 /** |
|
160 * Set the power save mode. |
|
161 * |
|
162 * @note This method is meant for overriding the dynamic power save mode selection |
|
163 * for testing purposes. Overriding the power save mode may have an adverse |
|
164 * effect on throughput and/or power consumption. Dynamic selection can be |
|
165 * re-enabled by setting the mode to EWlanPowerSaveModeAutomatic. |
|
166 * |
|
167 * @since S60 v5.0.1 |
|
168 * @param aMode Power save mode to be set. |
|
169 * @return KErrNone if the mode was set successfully, an error otherwise. |
|
170 */ |
|
171 virtual TInt SetPowerSaveMode( |
|
172 TWlanPowerSaveMode aMode ); |
|
173 |
|
174 private: |
|
175 |
|
176 /** |
|
177 * C++ default constructor. |
|
178 */ |
|
179 CWlanControlImpl(); |
|
180 |
|
181 /** |
|
182 * Symbian 2nd phase constructor. |
|
183 */ |
|
184 void ConstructL(); |
|
185 |
|
186 private: // data |
|
187 |
|
188 /** |
|
189 * Handle to WLAN engine. |
|
190 */ |
|
191 RWLMServer iServer; |
|
192 |
|
193 }; |
|
194 |
|
195 #endif // WLANCONTROLIMPL_H |