wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_get_available_iaps.h
branchRCL_3
changeset 14 13838cf40350
parent 0 c40eb8fe8501
equal deleted inserted replaced
12:af3fb27c7511 14:13838cf40350
    13 *
    13 *
    14 * Description:  State machine for IAP availability.
    14 * Description:  State machine for IAP availability.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
       
    18 /*
       
    19 * %version: 18 %
       
    20 */
    18 
    21 
    19 #ifndef CORE_OPERATION_GET_AVAILABLE_IAPS_H
    22 #ifndef CORE_OPERATION_GET_AVAILABLE_IAPS_H
    20 #define CORE_OPERATION_GET_AVAILABLE_IAPS_H
    23 #define CORE_OPERATION_GET_AVAILABLE_IAPS_H
    21 
    24 
    22 #include "genscanlist.h"
    25 #include "genscanlist.h"
    41     public abs_core_event_handler_c
    44     public abs_core_event_handler_c
    42     {
    45     {
    43 
    46 
    44 public:
    47 public:
    45 
    48 
       
    49     /**
       
    50      * The possible states of the state machine.
       
    51      */
    46     enum core_state_e
    52     enum core_state_e
    47         {
    53         {
    48         core_state_init = core_base_state_next,
    54         core_state_init = core_base_state_next,
    49         core_state_long_broadcast_scan_start,
    55         core_state_long_broadcast_scan_start,
    50         core_state_long_broadcast_scan_done,
    56         core_state_long_broadcast_scan_done,
    62         core_state_secondary_ssid_done,
    68         core_state_secondary_ssid_done,
    63         core_state_scanning_done,
    69         core_state_scanning_done,
    64         core_state_MAX
    70         core_state_MAX
    65         };
    71         };
    66 
    72 
    67     struct core_scan_list_entry
       
    68         {
       
    69         core_mac_address_s bssid;
       
    70         core_ssid_s ssid;
       
    71         };
       
    72 
       
    73     /**
    73     /**
    74      * Constructor.
    74      * Constructor.
    75      *
    75      *
    76      * @since S60 v3.1
    76      * @since S60 v3.1
    77      * @param request_id to corresponding service request
    77      * @param request_id to corresponding service request
    78      * @param server core server
    78      * @param server core server
    79      * @param drivers pointer to lower adaptation
    79      * @param drivers pointer to lower adaptation
    80      * @param adaptation pointer to upper adaptation
    80      * @param adaptation pointer to upper adaptation
    81      * @param is_active_scan_allowed specifies whether to use probes or just listen to beacons
    81      * @param is_active_scan_allowed specifies whether to use probes or just listen to beacons
    82      * @param iap_data_list contains list of IAP data structures
    82      * @param iap_data_list contains list of IAP data structures
    83      * @param iap_ssid_list List of possible secondary SSIDs
    83      * @param iap_availability_list List of available IAPs.
    84      * @param list of available IAP IDs on return
    84      * @param iap_ssid_list List of possible secondary SSIDs.
    85      * @param scan data of found networks on return
    85      * @param scan_data scan data of found networks on return
    86      */
    86      */
    87     core_operation_get_available_iaps_c(
    87     core_operation_get_available_iaps_c(
    88         u32_t request_id,
    88         u32_t request_id,
    89         core_server_c* server,        
    89         core_server_c* server,        
    90         abs_core_driverif_c* drivers,
    90         abs_core_driverif_c* drivers,
    91         abs_core_server_callback_c* adaptation,
    91         abs_core_server_callback_c* adaptation,
    92         bool_t is_active_scan_allowed,
    92         bool_t is_active_scan_allowed,
    93         core_type_list_c<core_iap_data_s>& iap_data_list,
    93         core_type_list_c<core_iap_data_s>& iap_data_list,
    94         core_type_list_c<u32_t>& iap_id_list,
    94         core_type_list_c<core_iap_availability_data_s>& iap_availability_list,
    95         core_type_list_c<core_ssid_entry_s>* iap_ssid_list,
    95         core_type_list_c<core_ssid_entry_s>* iap_ssid_list,
    96         ScanList& scan_data );
    96         ScanList& scan_data );
    97 
    97 
    98     /**
    98     /**
    99      * Destructor.
    99      * Destructor.
   145         core_am_indication_e indication );
   145         core_am_indication_e indication );
   146 
   146 
   147 private: // functions
   147 private: // functions
   148 
   148 
   149     /**
   149     /**
   150      * Remove IAPs that are not marked hidden from the list of IAPs to search.
       
   151      */
       
   152     void remove_non_hidden_iaps();
       
   153 
       
   154     /**
       
   155      * Process the scan results using the given tag.
   150      * Process the scan results using the given tag.
   156      *
   151      *
   157      * @param tag Tag to use for iterating through the scan results.
   152      * @param tag Tag to use for iterating through the scan results.
   158      */
   153      */
   159     void process_scan_results(
   154     void process_scan_results(
   208      */
   203      */
   209     bool_t is_ssid_in_scanlist(
   204     bool_t is_ssid_in_scanlist(
   210         const core_ssid_s& ssid,
   205         const core_ssid_s& ssid,
   211         const ScanList& scan_data );
   206         const ScanList& scan_data );
   212 
   207 
       
   208     /**
       
   209      * Check whether the given SSID is present in the SSID list.
       
   210      *
       
   211      * @param ssid SSID to match.
       
   212      * @param ssid_list SSID list to search.
       
   213      * @return true_t if matching SSID is found, false_t otherwise.
       
   214      */
       
   215     bool_t is_ssid_in_list(
       
   216         const core_ssid_s& ssid,
       
   217         core_type_list_c<core_ssid_s>& ssid_list ) const;
       
   218 
       
   219     /**
       
   220      * Check whether the given IAP is present in the IAP availability list.
       
   221      *
       
   222      * @param iap_id IAP ID to match.
       
   223      * @param iap_list IAP availability list to search.
       
   224      * @return true_t if matching IAP is found, false_t otherwise.
       
   225      */
       
   226     bool_t is_iap_in_availability_list(
       
   227         u32_t iap_id,
       
   228         core_type_list_c<core_iap_availability_data_s>& iap_list ) const;
       
   229 
       
   230     /**
       
   231      * Add the given IAP to the IAP availability list. If an entry already exists,
       
   232      * only signal strength is updated if needed.
       
   233      *
       
   234      * @param iap_id IAP ID to add.
       
   235      * @param iap_rcpi Signal strength of the IAP.
       
   236      */
       
   237     void update_iap_availability(
       
   238         u32_t iap_id,
       
   239         u8_t iap_rcpi );
       
   240 
   213 private: // data
   241 private: // data
   214 
   242 
   215     /**
   243     /**
   216      * Whether active scanning is allowed.
   244      * Whether active scanning is allowed.
   217      */    
   245      */    
   221      * Whether the amount of channels scanned should be limited.
   249      * Whether the amount of channels scanned should be limited.
   222      */    
   250      */    
   223     bool_t is_limiting_algorithm_used_m;    
   251     bool_t is_limiting_algorithm_used_m;    
   224 
   252 
   225     /**
   253     /**
   226      * Original list of IAPs.
   254      * Number of IAPs.
       
   255      */
       
   256     u32_t iap_data_count_m;
       
   257 
       
   258     /**
       
   259      * List of IAPs.
   227      */
   260      */
   228     core_type_list_c<core_iap_data_s>& iap_data_list_m;
   261     core_type_list_c<core_iap_data_s>& iap_data_list_m;
   229 
   262 
   230     /**
   263     /**
   231      * List for storing IDs of available IAPs.
   264      * List of available IAPs.
   232      */
   265      */
   233     core_type_list_c<u32_t>& iap_id_list_m;
   266     core_type_list_c<core_iap_availability_data_s>& iap_availability_list_m;
   234 
   267 
   235     /**
   268     /**
   236      * List of possible secondary SSIDs. Not owned by this pointer.
   269      * List of possible secondary SSIDs. Not owned by this pointer.
   237      */
   270      */
   238     core_type_list_c<core_ssid_entry_s>* iap_ssid_list_m;
   271     core_type_list_c<core_ssid_entry_s>* iap_ssid_list_m;
   271      * Defines the number of BSSs found during scanning.
   304      * Defines the number of BSSs found during scanning.
   272      */
   305      */
   273     u8_t bss_count_m;
   306     u8_t bss_count_m;
   274 
   307 
   275     /**
   308     /**
   276      * SSID being direct scanned.
   309      * List of SSIDs to direct scan.
   277      */
   310      */
   278     core_ssid_s direct_scanned_ssid_m;
   311     core_type_list_c<core_ssid_s> direct_scan_list_m;
       
   312     
       
   313     /**
       
   314      * Iterator for direct scan list. 
       
   315      */
       
   316     core_type_list_iterator_c<core_ssid_s> direct_scan_iter_m;
   279 
   317 
   280     /**
   318     /**
   281      * Region information that is selected based on the APs country information.
   319      * Region information that is selected based on the APs country information.
   282      */
   320      */
   283     core_wlan_region_e region_from_ap_m;
   321     core_wlan_region_e region_from_ap_m;