wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_directed_roam.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  State machine for a directed roam request.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 1 %
       
    20 */
       
    21 
       
    22 #ifndef CORE_OPERATION_DIRECTED_ROAM_H
       
    23 #define CORE_OPERATION_DIRECTED_ROAM_H
       
    24 
       
    25 #include "core_operation_base.h"
       
    26 
       
    27 /**
       
    28  * State machine for a directed roam request.
       
    29  */
       
    30 NONSHARABLE_CLASS( core_operation_directed_roam_c ) : public core_operation_base_c
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     /**
       
    36      * The possible states of the state machine.
       
    37      */
       
    38     enum core_state_e
       
    39         {
       
    40         core_state_init = core_base_state_next,
       
    41         core_state_scan_start,
       
    42         core_state_scan_complete,
       
    43         core_state_connect_success,
       
    44         core_state_connect_failure,
       
    45         core_state_rcpi_trigger,
       
    46         core_state_MAX
       
    47         };
       
    48 
       
    49     /**
       
    50      * Constructor.
       
    51      * 
       
    52      * @param request_id An unique identification for the request.
       
    53      * @param server Handle to core server.
       
    54      * @param drivers Handle to low-level management functionality.
       
    55      * @param adaptation Handle upper-level management functionality.
       
    56      * @param bssid BSSID to roam to, BROADCAST_MAC_ADDR if any.
       
    57      */
       
    58     core_operation_directed_roam_c(
       
    59         u32_t request_id,
       
    60         core_server_c* server,
       
    61         abs_core_driverif_c* drivers,
       
    62         abs_core_server_callback_c* adaptation,
       
    63         const core_mac_address_s& bssid );
       
    64 
       
    65     /**
       
    66      * Destructor.
       
    67      */
       
    68     virtual ~core_operation_directed_roam_c();
       
    69 
       
    70 protected:
       
    71 
       
    72     /**
       
    73      * This method is called when a pending request has been completed
       
    74      * and so sub-operations are pending.
       
    75      *
       
    76      * @return status of the operation:
       
    77      *     core_error_request_pending if the operation is not finished,
       
    78      *     otherwise the status code of the finished operation
       
    79      */
       
    80     core_error_e next_state();
       
    81 
       
    82     /**
       
    83      * This method is called when the operation needs to be canceled.     
       
    84      *
       
    85      * @return status of the operation:
       
    86      *     core_error_request_pending if the operation is not finished,
       
    87      *     otherwise the status code of the finished operation
       
    88      */
       
    89     core_error_e cancel();
       
    90 
       
    91 private: // data
       
    92 
       
    93     /**
       
    94      * BSSID to roam to, BROADCAST_MAC_ADDR if any.
       
    95      */
       
    96     core_mac_address_s bssid_m;
       
    97 
       
    98     /**
       
    99      * Current RCPI value.
       
   100      */
       
   101     u32_t current_rcpi_m;
       
   102 
       
   103     /**
       
   104      * Whether we are still connected to the AP after the roam attempt.
       
   105      */
       
   106     bool_t is_connected_m;
       
   107 
       
   108     };
       
   109 
       
   110 #endif // CORE_OPERATION_DIRECTED_ROAM_H