wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_tools_parser.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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:  Simple parser functions for core
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 18 %
       
    20 */
       
    21 
       
    22 #ifndef CORE_TOOLS_PARSER_H
       
    23 #define CORE_TOOLS_PARSER_H
       
    24 
       
    25 #include "core_types.h"
       
    26 #include "core_ap_data.h"
       
    27 #include "core_settings.h"
       
    28 #include "core_connection_data.h"
       
    29 #include "abs_core_wpx_adaptation.h"
       
    30 
       
    31 class core_frame_dot11_c;
       
    32 
       
    33 /**
       
    34  * Class for parsing various 802.11 information elements.
       
    35  *
       
    36  * @since S60 v3.1
       
    37  */
       
    38 NONSHARABLE_CLASS( core_tools_parser_c )
       
    39     {
       
    40 
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Check whether the given AP has compatible settings with the connection settings.
       
    45      * 
       
    46      * @since S60 v3.1
       
    47      * @param wpx_adaptation WPX adaptation.
       
    48      * @param ap_data AP data to compare.
       
    49      * @param iap_data IAP data to compare.
       
    50      * @param core_settings Core settings to compare.
       
    51      * @param is_cm_active Whether WPA counter measures are active.
       
    52      * @return core_connect_ok if AP is compatible, the failure reason otherwise.
       
    53      */
       
    54     static core_connect_status_e is_ap_compatible_with_iap(
       
    55         abs_core_wpx_adaptation_c& wpx_adaptation,
       
    56         core_ap_data_c& ap_data,
       
    57         core_iap_data_c& iap_data,
       
    58         core_settings_c& core_settings,
       
    59         bool_t is_cm_active = false_t,
       
    60         bool_t ignore_channels = false_t);
       
    61 
       
    62     /**
       
    63      * Check whether the given AP is suitable for roaming.
       
    64      *
       
    65      * @since S60 v3.2
       
    66      * @param wpx_adaptation WPX adaptation.
       
    67      * @param ap_data AP data to compare.
       
    68      * @param iap_data IAP data to compare.
       
    69      * @param core_settings Core settings to compare.
       
    70      * @param connection_data Connection data to compare.
       
    71      * @param min_rcpi Minimum RCPI required. RCPI_VALUE_NONE if none.
       
    72      * @param min_medium_time Minimum amount free medium time required. MEDIUM_TIME_NOT_DEFINED if none.
       
    73      * @param is_cm_active Whether WPA counter measures are active.
       
    74      * @param current_bssid BSSID currently connected to. ZERO_MAC_ADDR if none.
       
    75      * @return core_connect_ok if AP is compatible, the failure reason otherwise.
       
    76      */
       
    77     static core_connect_status_e is_ap_suitable(
       
    78         abs_core_wpx_adaptation_c& wpx_adaptation,
       
    79         core_ap_data_c& ap_data,
       
    80         core_iap_data_c& iap_data,
       
    81         core_settings_c& core_settings,
       
    82         core_connection_data_c& connection_data,
       
    83         u8_t min_rcpi,
       
    84         const medium_time_s& min_medium_time,
       
    85         bool_t is_cm_active,
       
    86         const core_mac_address_s& current_bssid );
       
    87 
       
    88     /**
       
    89      * Get parsed access point information structure.
       
    90      *
       
    91      * @since S60 v3.2
       
    92      * @param iap_data Information about the used IAP.
       
    93      * @param ap_data AP data to parse.
       
    94      * @return Parsed access point information structure.
       
    95      */
       
    96     static core_ap_information_s get_ap_info(
       
    97         const core_iap_data_c& iap_data,
       
    98         core_ap_data_c& ap_data );
       
    99 
       
   100     /**
       
   101      * Get the traffic stream parameters for the given TID.
       
   102      * 
       
   103      * @since S60 v3.2
       
   104      * @param frame Frame to be parsed.
       
   105      * @param tid TID of the traffic stream.
       
   106      * @param tspec Parameters are stored here.
       
   107      * @return true_t if parameters found, false_t otherwise.
       
   108      */
       
   109     static bool_t get_wmm_traffic_stream_params(
       
   110         core_frame_dot11_c& frame,
       
   111         u8_t tid,
       
   112         core_traffic_stream_params_s& tspec );
       
   113 
       
   114     /**
       
   115      * Parse the basic and supported rates from the given information element.
       
   116      * @param data Pointer to IE data.
       
   117      * @param data_length Length of IE data.
       
   118      * @param basic_rates Bitmask of basic rates.
       
   119      * @param supported_rates Bitmask of supported rates.
       
   120      * @see core_tx_rate_e for rates.
       
   121      */
       
   122     static void parse_rates(
       
   123         const u8_t* data,
       
   124         u8_t data_length,
       
   125         u32_t& basic_rates,
       
   126         u32_t& supported_rates );
       
   127 
       
   128 private:
       
   129 
       
   130     /**
       
   131      * Constructor.
       
   132      */
       
   133     core_tools_parser_c();
       
   134     
       
   135     };
       
   136 
       
   137 #endif // core_tools_parser_H