wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscaninfoimpl.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     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 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:  scan info
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WLANSCANINFOIMPL_H
       
    20 #define WLANSCANINFOIMPL_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "rwlmserver.h"
       
    24 #include "genscaninfo.h"
       
    25 #include "genscanlist.h"
       
    26 #include "wlanscaninfo.h"
       
    27 
       
    28 class ScanInfo;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 * Implementation for MWlanScanInfoBase and MWlanScanInfoIteratorBase interfaces.
       
    33 *
       
    34 * This class uses services from ScanInfo and ScanList classes to implement
       
    35 * most of the required functionality.
       
    36 * @lib wlanmgmtimpl.dll
       
    37 * @since S60 3.0
       
    38 */
       
    39 class CWlanScanInfoImpl : public CWlanScanInfo
       
    40     {
       
    41     public:  // Methods
       
    42 
       
    43        // Constructors and destructor
       
    44         
       
    45         /**
       
    46          * Static constructor.
       
    47          */
       
    48         static CWlanScanInfoImpl* NewL();
       
    49         
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         virtual ~CWlanScanInfoImpl();
       
    54 
       
    55        // New methods
       
    56 
       
    57 		/**
       
    58 		 * Return the reference to the internal scan list.
       
    59 		 * @return Internal scan list.
       
    60 		 */
       
    61         ScanList& GetInternalList();
       
    62 
       
    63 		/**
       
    64 		 * Update the internal variables after the internal
       
    65 		 * scan list has been updated.
       
    66 		 * @return KErrNone if results updated successfully, an error code otherwise.
       
    67 		 */
       
    68         TInt UpdateResults();
       
    69 
       
    70        // Methods from base classes
       
    71 
       
    72         /**
       
    73          * (From MWlanScanInfoIteratorBase) Return the size of the scan info.
       
    74 		 * The size includes Status Info, MAC header and Frame Body.
       
    75          * @return The size of the scan info in bytes.
       
    76          */
       
    77         virtual TUint16 Size() const;
       
    78 
       
    79         /**
       
    80          * (From MWlanScanInfoIteratorBase) Find the data of the first access point.
       
    81          * @return Pointer at the beginning of the first access point stored 
       
    82          *         in the scan list. NULL if not any.
       
    83          */
       
    84         virtual const TWlanScanInfoFrame* First();
       
    85 
       
    86         /**
       
    87          * (From MWlanScanInfoIteratorBase) Find the data of the next access point.
       
    88          * @return Pointer at the beginning of the next access point stored
       
    89          *         in the scan list. NULL if not any.
       
    90          */
       
    91         virtual const TWlanScanInfoFrame* Next();
       
    92 
       
    93         /**
       
    94          * (From MWlanScanInfoIteratorBase) Find the data of the current access point.
       
    95          * @return Pointer at the beginning of the current access point stored 
       
    96          *         in the scan list. NULL if not any.
       
    97          */
       
    98         virtual const TWlanScanInfoFrame* Current() const;
       
    99 
       
   100         /**
       
   101          * (From MWlanScanInfoIteratorBase) Find is there any more unhandled access points.
       
   102          * @return EFalse if there is access points in the list left, 
       
   103          *         ETrue if not.
       
   104          */
       
   105         virtual TBool IsDone() const;
       
   106 
       
   107 		/**
       
   108          * (From MWlanScanInfoBase) Return RX level of the BSS.
       
   109          * @return RX level.
       
   110          */
       
   111         virtual TUint8 RXLevel() const;
       
   112 
       
   113         /**
       
   114          * (From MWlanScanInfoBase) Return BSSID of the BSS.
       
   115          * @param  aBssid ID of the access point or IBSS network.
       
   116          * @return Pointer to the beginning of the BSSID. Length is always 6 bytes.
       
   117          */
       
   118 		virtual void Bssid( TWlanBssid& aBssid ) const;
       
   119 
       
   120         /**
       
   121          * (From MWlanScanInfoBase) Get beacon interval of the BSS.
       
   122          * @return the beacon interval.
       
   123          */
       
   124         virtual TUint16 BeaconInterval() const;
       
   125 
       
   126         /**
       
   127          * (From MWlanScanInfoBase) Get capability of the BSS (see IEEE 802.11 section 7.3.1.4.
       
   128          * @return The capability information.
       
   129          */
       
   130         virtual TUint16 Capability() const;
       
   131 
       
   132         /**
       
   133          * (From MWlanScanInfoBase) Get security mode of the BSS.
       
   134          * @return security mode.
       
   135          * @deprecated This method is offered for backward compatibility reasons,
       
   136          *             ExtendedSecurityMode() should be used instead.
       
   137          */
       
   138         virtual TWlanConnectionSecurityMode SecurityMode() const;
       
   139 
       
   140         /**
       
   141          * (From MWlanScanInfoBase) Return requested information element.
       
   142          * @param aIE        Id of the requested IE data.
       
   143          * @param aLength    Length of the IE. Zero if IE not found.
       
   144          * @param aData      Pointer to the beginning of the IE data. NULL if IE not found.
       
   145          * @return           General error message.
       
   146          */
       
   147         virtual TInt InformationElement( TUint8 aIE, 
       
   148                                          TUint8& aLength, 
       
   149                                          const TUint8** aData );
       
   150 
       
   151         /**
       
   152          * (From MWlanScanInfoBase) Return WPA information element.
       
   153          * @param aLength    Length of the IE. Zero if IE not found.
       
   154          * @param aData      Pointer to the beginning of the IE data. NULL if IE not found.
       
   155          * @return           General error message.
       
   156          */
       
   157         virtual TInt WpaIE( TUint8& aLength, 
       
   158                             const TUint8** aData );
       
   159 
       
   160         /**
       
   161          * (From MWlanScanInfoBase) Return the first information element.
       
   162          * @param aIE        Id of the IE. See IEEE 802.11 section 7.3.2.
       
   163          * @param aLength    Length of the IE. Zero if IE not found.
       
   164          * @param aData      Pointer to the beginning of the IE data. NULL if IE not found.
       
   165          * @return           General error message.
       
   166          */
       
   167         virtual TInt FirstIE( TUint8& aIE, 
       
   168                               TUint8& aLength, 
       
   169                               const TUint8** aData );
       
   170 
       
   171         /**
       
   172          * (From MWlanScanInfoBase) Return next information element.
       
   173          * @param aIE        Id of the IE. See IEEE 802.11 section 7.3.2.
       
   174          * @param aLength    Length of the IE. Zero if IE not found.
       
   175          * @param aData      Pointer to the beginning of the IE data. NULL if IE not found.
       
   176          * @return           General error message.
       
   177          */
       
   178         virtual TInt NextIE( TUint8& aIE, 
       
   179                              TUint8& aLength, 
       
   180                              const TUint8** aData );
       
   181         
       
   182         /**
       
   183          * Find whether Wi-Fi Protected Setup is supported.
       
   184          * @return ETrue if AP supports Wi-Fi Protected Setup,
       
   185          *         EFalse if not.
       
   186          */
       
   187         virtual TBool IsProtectedSetupSupported();
       
   188 
       
   189         /**
       
   190          * Get security mode of the BSS.
       
   191          * @return security mode.
       
   192          */
       
   193         virtual TWlanConnectionExtentedSecurityMode ExtendedSecurityMode() const;
       
   194         
       
   195     private: // Methods
       
   196 
       
   197         /**
       
   198          * C++ default constructor.
       
   199          */
       
   200         CWlanScanInfoImpl();
       
   201 
       
   202         /**
       
   203          * Symbian 2nd phase constructor.
       
   204          */
       
   205         void ConstructL();
       
   206         
       
   207         /**
       
   208          * Convert internal error code to Symbian error code.
       
   209          * @param aCode      Internal error code.
       
   210          * @return           Symbian error code.
       
   211          */
       
   212         TInt ConvertErrorCode( TInt aCode ) const;
       
   213         
       
   214     private: // Data
       
   215 
       
   216         /** Scan results */
       
   217         ScanList iScanList;
       
   218 
       
   219         /** Wrapper class for parsing */
       
   220         ScanInfo* iScanInfo;
       
   221     };
       
   222 
       
   223 #endif // WLANSCANINFOIMPL_H
       
   224             
       
   225 // End of File