|
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: Wrapper class for instantiating an implementation of |
|
15 * MWlanScanInfoBase and MWlanScanInfoIteratorBase |
|
16 * via ECom framework. |
|
17 * |
|
18 */ |
|
19 |
|
20 /* |
|
21 * %version: 9 % |
|
22 */ |
|
23 |
|
24 #ifndef WLANSCANINFO_H |
|
25 #define WLANSCANINFO_H |
|
26 |
|
27 // INCLUDES |
|
28 #include <ecom/ecom.h> |
|
29 #include "wlanscaninfointerface.h" |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * @brief Class for instantiating an implementation of MWlanScanInfoBase |
|
34 * and MWlanScanInfoIteratorBase via ECom. |
|
35 * |
|
36 * This class encapsulates both the WLAN scan results and methods |
|
37 * needed for parsing and iterating through them. |
|
38 * |
|
39 * Scan results consist of a list of all the BSSs that the scan discovered |
|
40 * and their parameters. Methods from MWlanScanInfoIteratorBase are used |
|
41 * to iterate through list of BSSs. Parameters of an individual BSS are |
|
42 * parsed with methods from MWlanScanInfoBase. |
|
43 * |
|
44 * An usage example: |
|
45 * @code |
|
46 * // scanInfo is a pointer to a CScanInfo object that contains results |
|
47 * // from a scan. |
|
48 * |
|
49 * // Information Element ID for SSID as specified in 802.11. |
|
50 * const TUint8 KWlan802Dot11SsidIE = 0; |
|
51 * |
|
52 * // Iterate through scan results. |
|
53 * for( scanInfo->First(); !scanInfo->IsDone(); scanInfo->Next() ) |
|
54 * { |
|
55 * // Parse through BSS parameters. |
|
56 * |
|
57 * TWlanBssid bssid; |
|
58 * scanInfo->Bssid( bssid ); |
|
59 * // BSSID of the BSS is now stored in bssid. |
|
60 * |
|
61 * TUint8 ieLen( 0 ); |
|
62 * const TUint8* ieData( NULL ); |
|
63 * TInt ret = scanInfo->InformationElement( KWlan802Dot11SsidIE, ieLen, &ieData ); |
|
64 * if ( ret == KErrNone ) |
|
65 * { |
|
66 * // ieData now points to the beginning of the 802.11 SSID payload data |
|
67 * // (i.e. the header is bypassed). ieLen contains the length of payload |
|
68 * // data. |
|
69 * } |
|
70 * } |
|
71 * @endcode |
|
72 * @see MWlanMgmtInterface::GetScanResults |
|
73 * @since S60 3.0 |
|
74 */ |
|
75 class CWlanScanInfo : public CBase, public MWlanScanInfoBase, |
|
76 public MWlanScanInfoIteratorBase |
|
77 { |
|
78 public: // Methods |
|
79 |
|
80 // Constructors and destructor |
|
81 |
|
82 /** |
|
83 * Static constructor. |
|
84 * @return Pointer to the constructed object. |
|
85 */ |
|
86 inline static CWlanScanInfo* NewL(); |
|
87 |
|
88 /** |
|
89 * Destructor. |
|
90 */ |
|
91 inline virtual ~CWlanScanInfo(); |
|
92 |
|
93 private: // Data |
|
94 |
|
95 /** |
|
96 * Identifies the instance of an implementation created by |
|
97 * the ECOM framework. |
|
98 */ |
|
99 TUid iInstanceIdentifier; |
|
100 }; |
|
101 |
|
102 #include "wlanscaninfo.inl" |
|
103 |
|
104 #endif // WLANSCANINFO_H |
|
105 |
|
106 // End of File |