wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_sub_operation_create_ts.h
changeset 0 c40eb8fe8501
child 6 e0f767079796
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Statemachine for creating a traffic stream.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 4 %
       
    20 */
       
    21 
       
    22 #ifndef CORE_SUB_OPERATION_CREATE_TS_H
       
    23 #define CORE_SUB_OPERATION_CREATE_TS_H
       
    24 
       
    25 #include "core_operation_base.h"
       
    26 #include "core_traffic_stream.h"
       
    27 #include "core_ap_data.h"
       
    28 #include "abs_core_frame_handler.h"
       
    29 
       
    30 /**
       
    31  * Statemachine for creating a traffic stream.
       
    32  *
       
    33  * @lib wlmserversrv.lib
       
    34  * @since S60 v3.1
       
    35  */
       
    36 NONSHARABLE_CLASS( core_sub_operation_create_ts_c ) :
       
    37     public core_operation_base_c,
       
    38     public abs_core_frame_handler_c
       
    39     {
       
    40 
       
    41 public:
       
    42 
       
    43     enum core_state_e
       
    44         {
       
    45         core_state_init = core_base_state_next,
       
    46         core_state_request_sent,
       
    47         core_state_invalid_parameters,
       
    48         core_state_failure,
       
    49         core_state_success,
       
    50         core_state_MAX
       
    51         };
       
    52 
       
    53     core_sub_operation_create_ts_c(
       
    54         u32_t request_id,
       
    55         core_server_c* server,
       
    56         abs_core_driverif_c* drivers,
       
    57         abs_core_server_callback_c* adaptation,
       
    58         const core_ap_data_c& ap_data,
       
    59         u8_t tid,
       
    60         u8_t user_priority,
       
    61         core_traffic_stream_params_s& tspec,
       
    62         core_traffic_stream_status_e& stream_status );
       
    63 
       
    64     virtual ~core_sub_operation_create_ts_c();
       
    65 
       
    66     /**
       
    67      * From abs_core_frame_handler_c Called by the core server when a dot11 frame has been received.
       
    68      *
       
    69      * @since S60 v3.1
       
    70      * @param frame Pointer to a frame parser.
       
    71      * @param rcpi RCPI value of the frame.
       
    72      */
       
    73     bool_t receive_frame(
       
    74         const core_frame_dot11_c* frame,
       
    75         u8_t rcpi );
       
    76 
       
    77 protected:
       
    78 
       
    79     /**
       
    80      * This method is called when a pending request has been completed
       
    81      * and so sub-operations are pending.
       
    82      *
       
    83      * @since S60 v3.1
       
    84      * @return status of the operation:
       
    85      *     core_error_request_pending if the operation is not finished,
       
    86      *     otherwise the status code of the finished operation
       
    87      */
       
    88     core_error_e next_state();
       
    89 
       
    90 private: // data
       
    91 
       
    92     /** The AP currently tried. */
       
    93     const core_ap_data_c& current_ap_m;
       
    94 
       
    95     /**
       
    96      * The TID of the traffic stream.
       
    97      */
       
    98     u8_t tid_m;
       
    99 
       
   100     /**
       
   101      * The User Priority of the traffic stream.
       
   102      */    
       
   103     u8_t user_priority_m;
       
   104 
       
   105     /** Traffic stream to be created. */
       
   106     core_traffic_stream_params_s& tspec_m;
       
   107 
       
   108     /** The current status of the traffic stream. */
       
   109     core_traffic_stream_status_e& stream_status_m; 
       
   110 
       
   111     };
       
   112 
       
   113 #endif // CORE_SUB_OPERATION_CREATE_TS_H