wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_sub_operation_wep_connect.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  State machine for connecting to a WEP network.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CORE_SUB_OPERATION_WEP_CONNECT_H
       
    20 #define CORE_SUB_OPERATION_WEP_CONNECT_H
       
    21 
       
    22 #include "core_operation_base.h"
       
    23 #include "core_ap_data.h"
       
    24 #include "core_type_list.h"
       
    25 
       
    26 /**
       
    27  * State machine for connecting to a WEP AP.
       
    28  *
       
    29  * @since S60 v3.2
       
    30  */
       
    31 NONSHARABLE_CLASS( core_sub_operation_wep_connect_c ) : public core_operation_base_c
       
    32     {
       
    33 
       
    34 public:
       
    35 
       
    36     /** The possible states of the state machine. */
       
    37     enum core_state_e
       
    38         {
       
    39         core_state_init = core_base_state_next,
       
    40         core_state_connect,
       
    41         core_state_connect_failed,
       
    42         core_state_MAX
       
    43         };
       
    44 
       
    45     /**
       
    46      * Constructor.
       
    47      *
       
    48      * @param request_id An unique identification for the request.
       
    49      * @param server Callback to the core server.
       
    50      * @param drivers Callback to the lower adaptation.
       
    51      * @param adaptation Callback to the upper adaptation.
       
    52      * @param is_connected Whether we are still connected to an AP.
       
    53      * @param connect_status Status of connection attempt.
       
    54      * @param ssid SSID to connect to.
       
    55      * @param ap_data AP to connect to.
       
    56      * @param auth_mode Authentication mode to use.
       
    57      * @param encryption_level Encryption to use.
       
    58      * @param assoc_ie_list The list of IEs to be added.
       
    59      * @param assoc_resp The (re-)association response frame is stored here.
       
    60      */
       
    61     core_sub_operation_wep_connect_c(
       
    62         u32_t request_id,
       
    63         core_server_c* server,
       
    64         abs_core_driverif_c* drivers,
       
    65         abs_core_server_callback_c* adaptation,
       
    66         bool_t& is_connected,
       
    67         core_management_status_e& connect_status,
       
    68         const core_ssid_s& ssid,
       
    69         core_ap_data_c& ap_data,
       
    70         core_authentication_mode_e auth_mode,
       
    71         core_encryption_mode_e encryption_level,
       
    72         core_type_list_c<core_frame_dot11_ie_c>& assoc_ie_list,
       
    73         core_frame_assoc_resp_c** assoc_resp );
       
    74 
       
    75     /**
       
    76      * Destructor.
       
    77      */
       
    78     virtual ~core_sub_operation_wep_connect_c();
       
    79 
       
    80 protected:
       
    81 
       
    82 // from base class core_operation_base_c
       
    83 
       
    84     /**
       
    85      * From core_operation_base_c.
       
    86      * This method is called when a pending request has been completed
       
    87      * and so sub-operations are pending.
       
    88      *
       
    89      * @since S60 v3.2
       
    90      * @return status of the operation:
       
    91      *     core_error_request_pending if the operation is not finished,
       
    92      *     otherwise the status code of the finished operation
       
    93      */
       
    94     core_error_e next_state();
       
    95 
       
    96     /**
       
    97      * From core_operation_base_c.
       
    98      * This method is called when the operation needs to be canceled.     
       
    99      *
       
   100      * @since S60 v3.2
       
   101      * @return status of the operation:
       
   102      *     core_error_request_pending if the operation is not finished,
       
   103      *     otherwise the status code of the finished operation
       
   104      */
       
   105     core_error_e cancel();
       
   106 
       
   107 private: // data
       
   108 
       
   109     /** Whether we are still connected to an AP. */
       
   110     bool_t& is_connected_m;
       
   111 
       
   112     /** Status of connection attempt. */
       
   113     core_management_status_e& connect_status_m;
       
   114 
       
   115     /** SSID to connect to. */
       
   116     const core_ssid_s& ssid_m;
       
   117 
       
   118     /** AP to connect to. */
       
   119     core_ap_data_c& ap_data_m;
       
   120 
       
   121     /** Authentication mode to try initially. */    
       
   122     core_authentication_mode_e initial_auth_mode_m;
       
   123 
       
   124     /** Authentication mode to use. */
       
   125     core_authentication_mode_e auth_mode_m;
       
   126 
       
   127     /** Encryption to use. */
       
   128     core_encryption_mode_e encryption_m;
       
   129 
       
   130     /** The list of IEs that will be added to the association/resassociation request */
       
   131     core_type_list_c<core_frame_dot11_ie_c>& assoc_ie_list_m;
       
   132 
       
   133     /**
       
   134      * The (re-)association response frame is stored here if received.
       
   135      * Not owned by this pointer.
       
   136      */
       
   137     core_frame_assoc_resp_c** assoc_resp_m;
       
   138 
       
   139     };
       
   140 
       
   141 #endif // CORE_SUB_OPERATION_WEP_CONNECT_H