wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_frame_action.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2006-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:  Class for parsing and generating 802.11 action frames.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CORE_FRAME_ACTION_H
       
    20 #define CORE_FRAME_ACTION_H
       
    21 
       
    22 #include "am_platform_libraries.h"
       
    23 #include "core_types.h"
       
    24 #include "core_frame_dot11.h"
       
    25 
       
    26 /**
       
    27  * Class for parsing and generating 802.11 action frames.
       
    28  *
       
    29  * @lib wlmserversrv.lib
       
    30  * @since S60 v3.1
       
    31  */
       
    32 NONSHARABLE_CLASS( core_frame_action_c ) : public core_frame_dot11_c
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Defines the possible Category values
       
    39      */
       
    40     enum core_dot11_action_category_e
       
    41         {
       
    42         core_dot11_action_category_spectrum_mgmt = 0,
       
    43         core_dot11_action_category_qos           = 1,
       
    44         core_dot11_action_category_rm            = 5,
       
    45         core_dot11_action_category_wmm_qos       = 17
       
    46         };
       
    47 
       
    48     /**
       
    49      * Factory for creating a parser for the given frame.
       
    50      *
       
    51      * @since S60 v3.1
       
    52      * @param frame Frame to be parsed.
       
    53      * @return Pointer to the created parser instance.
       
    54      */
       
    55     static core_frame_action_c* instance(
       
    56         const core_frame_dot11_c& frame );
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     virtual ~core_frame_action_c();
       
    62 
       
    63     /**
       
    64      * Return the Category field of the header.
       
    65      */
       
    66     u8_t category() const;
       
    67     
       
    68     /**
       
    69      * Set the Category field of the header.
       
    70      * 
       
    71      * @since S60 v5.2
       
    72      * @param cat New value for the Category field of the header.
       
    73      */
       
    74     void set_category( u8_t cat );
       
    75 
       
    76 protected:
       
    77 
       
    78     /**
       
    79      * Generate a 802.11 action frame.
       
    80      *
       
    81      * @param duration The Duration field of the frame.
       
    82      * @param destination The destination MAC field of the frame.
       
    83      * @param source The source MAC field of the frame.
       
    84      * @param bssid The BSSID field of the frame.
       
    85      * @param sequence_control The Sequence Control field of the frame.
       
    86      * @param Category field of the frame.
       
    87      */
       
    88     void generate(
       
    89         u16_t duration,
       
    90         const core_mac_address_s& destination,
       
    91         const core_mac_address_s& source,
       
    92         const core_mac_address_s& bssid,
       
    93         u16_t sequence_control,
       
    94         u8_t category );
       
    95 
       
    96     /**
       
    97      * Constructor.
       
    98      *
       
    99      * @param data_length Length of the frame.
       
   100      * @param data Pointer to the frame data.
       
   101      * @param max_data_length The maximum size of the frame buffer.    
       
   102      */
       
   103     core_frame_action_c(
       
   104         u16_t data_length,
       
   105         const u8_t* data,
       
   106         u16_t max_data_length );
       
   107 
       
   108     };
       
   109 
       
   110 #endif // CORE_FRAME_ACTION_H