|
1 /* |
|
2 * Copyright (c) 2002-2005 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: scan info |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef HSSMGMTSCANINFOIMPL_H |
|
21 #define HSSMGMTSCANINFOIMPL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "hssinterface.h" |
|
25 #include "hssscaninfo.h" |
|
26 #include "hssscanlist.h" |
|
27 #include <hssmgmtscaninfo.h> |
|
28 |
|
29 class HssScanInfo; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * Implementation for MHssMgmtScanInfoBase and MHssMgmtScanInfoIteratorBase interfaces. |
|
34 * |
|
35 * This class uses services from CHssMgmtScanInfo and HssScanList classes to implement |
|
36 * most of the required functionality. |
|
37 */ |
|
38 class CHssMgmtScanInfoImpl : public CHssMgmtScanInfo |
|
39 |
|
40 { |
|
41 public: // Methods |
|
42 |
|
43 // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Static constructor. |
|
47 */ |
|
48 static CHssMgmtScanInfoImpl* NewL(); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CHssMgmtScanInfoImpl(); |
|
54 |
|
55 // New methods |
|
56 |
|
57 /** |
|
58 * Return the reference to the internal scan list. |
|
59 * @return Internal scan list. |
|
60 */ |
|
61 HssScanList& GetInternalList(); |
|
62 |
|
63 /** |
|
64 * Update the internal variables after the internal |
|
65 * scan list has been updated. |
|
66 */ |
|
67 void UpdateResultsL(); |
|
68 |
|
69 // Methods from base classes |
|
70 |
|
71 /** |
|
72 * (From MHssMgmtScanInfoIteratorBase) Return the size of the scan info. |
|
73 * The size includes Status Info, MAC header and Frame Body. |
|
74 * @return The size of the scan info in bytes. |
|
75 */ |
|
76 virtual TUint16 Size() const; |
|
77 |
|
78 /** |
|
79 * (From MHssMgmtScanInfoIteratorBase) Find the data of the first access point. |
|
80 * @return Pointer at the beginning of the first access point stored |
|
81 * in the scan list. NULL if not any. |
|
82 */ |
|
83 virtual const THssMgmtScanInfoFrame* First(); |
|
84 |
|
85 /** |
|
86 * (From MHssMgmtScanInfoIteratorBase) Find the data of the next access point. |
|
87 * @return Pointer at the beginning of the next access point stored |
|
88 * in the scan list. NULL if not any. |
|
89 */ |
|
90 virtual const THssMgmtScanInfoFrame* Next(); |
|
91 |
|
92 /** |
|
93 * (From MHssMgmtScanInfoIteratorBase) Find the data of the current access point. |
|
94 * @return Pointer at the beginning of the current access point stored |
|
95 * in the scan list. NULL if not any. |
|
96 */ |
|
97 virtual const THssMgmtScanInfoFrame* Current() const; |
|
98 |
|
99 /** |
|
100 * (From MHssMgmtScanInfoIteratorBase) Find is there any more unhandled access points. |
|
101 * @return EFalse if there is access points in the list left, |
|
102 * ETrue if not. |
|
103 */ |
|
104 virtual TBool IsDone() const; |
|
105 |
|
106 /** |
|
107 * (From MHssMgmtScanInfoBase) Return RX level of the BSS. |
|
108 * @return RX level. |
|
109 */ |
|
110 virtual TUint8 RXLevel() const; |
|
111 |
|
112 /** |
|
113 * (From MHssMgmtScanInfoBase) Return BSSID of the BSS. |
|
114 * @param aBssid ID of the access point or IBSS network. |
|
115 */ |
|
116 virtual void Bssid( THssBssid& aBssid ) const; |
|
117 |
|
118 /** |
|
119 * (From MHssMgmtScanInfoBase) Get beacon interval of the BSS. |
|
120 * @return the beacon interval. |
|
121 */ |
|
122 virtual TUint16 BeaconInterval() const; |
|
123 |
|
124 /** |
|
125 * (From MHssMgmtScanInfoBase) Get capability of the BSS (see IEEE 802.11 section 7.3.1.4. |
|
126 * @return The capability information. |
|
127 */ |
|
128 virtual TUint16 Capability() const; |
|
129 |
|
130 /** |
|
131 * (From MHssMgmtScanInfoBase) Get security mode of the BSS. |
|
132 * @return security mode. |
|
133 */ |
|
134 virtual THssConnectionSecurityMode SecurityMode() const; |
|
135 |
|
136 /** |
|
137 * (From MHssMgmtScanInfoBase) Return requested information element. |
|
138 * @param aIE Id of the requested IE data. |
|
139 * @param aLength Length of the IE. Zero if IE not found. |
|
140 * @param aData Pointer to the beginning of the IE data. NULL if IE not found. |
|
141 * @return General error code. |
|
142 */ |
|
143 virtual TInt InformationElement( TUint8 aIE, |
|
144 TUint8& aLength, |
|
145 const TUint8** aData ); |
|
146 |
|
147 /** |
|
148 * (From MHssMgmtScanInfoBase) Return WPA information element. |
|
149 * @param aLength Length of the IE. Zero if IE not found. |
|
150 * @param aData Pointer to the beginning of the IE data. NULL if IE not found. |
|
151 * @return General error code. |
|
152 */ |
|
153 virtual TInt WpaIE( TUint8& aLength, |
|
154 const TUint8** aData ); |
|
155 |
|
156 /** |
|
157 * (From MHssMgmtScanInfoBase) Return the first information element. |
|
158 * @param aIE Id of the IE. See IEEE 802.11 section 7.3.2. |
|
159 * @param aLength Length of the IE. Zero if IE not found. |
|
160 * @param aData Pointer to the beginning of the IE data. NULL if IE not found. |
|
161 * @return General error code. |
|
162 */ |
|
163 virtual TInt FirstIE( TUint8& aIE, |
|
164 TUint8& aLength, |
|
165 const TUint8** aData ); |
|
166 |
|
167 /** |
|
168 * (From MHssMgmtScanInfoBase) Return next information element. |
|
169 * @param aIE Id of the IE. See IEEE 802.11 section 7.3.2. |
|
170 * @param aLength Length of the IE. Zero if IE not found. |
|
171 * @param aData Pointer to the beginning of the IE data. NULL if IE not found. |
|
172 * @return General error code. |
|
173 */ |
|
174 virtual TInt NextIE( TUint8& aIE, |
|
175 TUint8& aLength, |
|
176 const TUint8** aData ); |
|
177 |
|
178 private: // Methods |
|
179 |
|
180 /** |
|
181 * C++ default constructor. |
|
182 */ |
|
183 CHssMgmtScanInfoImpl(); |
|
184 |
|
185 /** |
|
186 * Symbian 2nd phase constructor. |
|
187 */ |
|
188 void ConstructL(); |
|
189 |
|
190 private: // Data |
|
191 |
|
192 /** Scan results */ |
|
193 HssScanList iScanList; |
|
194 |
|
195 /** Wrapper class for parsing */ |
|
196 HssScanInfo* iScanInfo; |
|
197 }; |
|
198 |
|
199 #endif // HSSMGMTSCANINFOIMPL_H |
|
200 |
|
201 // End of File |