wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_frame_action_nr.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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 for Neighbor Reports.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CORE_FRAME_ACTION_NR_H
       
    20 #define CORE_FRAME_ACTION_NR_H
       
    21 
       
    22 #include "am_platform_libraries.h"
       
    23 #include "core_types.h"
       
    24 #include "core_frame_action.h"
       
    25 
       
    26 class core_frame_nr_ie_c;
       
    27 
       
    28 /**
       
    29  * Class for parsing and generating 802.11 action frames for Neighbor Reports.
       
    30  *
       
    31  * @lib wlmserversrv.lib
       
    32  * @since S60 v5.2
       
    33  */
       
    34 NONSHARABLE_CLASS( core_frame_action_nr_c ) : public core_frame_action_c
       
    35     {
       
    36 
       
    37 public:
       
    38 
       
    39     /**
       
    40      * Factory for creating a parser for the given frame.
       
    41      *
       
    42      * @since S60 v5.2
       
    43      * @param frame Frame to be parsed.
       
    44      * @param is_copied Frame is copied.
       
    45      * @return Pointer to the created parser instance.
       
    46      */
       
    47     static core_frame_action_nr_c* instance(
       
    48         const core_frame_action_c& frame,
       
    49         bool_t is_copied );
       
    50 
       
    51     /**
       
    52      * Generate a 802.11 action frame in RM category.
       
    53      *
       
    54      * @since S60 v5.2
       
    55      * @param duration The Duration field of the frame.
       
    56      * @param destination The destination MAC field of the frame.
       
    57      * @param source The source MAC field of the frame.
       
    58      * @param bssid The BSSID field of the frame.
       
    59      * @param sequence_control The Sequence Control field of the frame.
       
    60      * @param action_type Action Type field of the frame.
       
    61      * @param dialog_token The Dialog Token field of the frame.
       
    62      * @param nr_ie Reference to the NR information element of the frame.
       
    63      * @return Pointer to the created frame instance.
       
    64      */
       
    65     static core_frame_action_nr_c* instance(
       
    66         u16_t duration,
       
    67         const core_mac_address_s& destination,
       
    68         const core_mac_address_s& source,
       
    69         const core_mac_address_s& bssid,
       
    70         u16_t sequence_control,
       
    71         u8_t action_type,
       
    72         u8_t dialog_token,
       
    73         const core_frame_nr_ie_c* nr_ie );
       
    74 
       
    75     /**
       
    76      * Destructor.
       
    77      *     
       
    78      * @since S60 v5.2
       
    79      */
       
    80     virtual ~core_frame_action_nr_c();
       
    81 
       
    82     /**
       
    83      * Return the Dialog Token field of the header.
       
    84      * 
       
    85      * @since S60 v5.2
       
    86      */
       
    87     u8_t dialog_token() const;
       
    88 
       
    89 private:
       
    90 
       
    91     /**
       
    92      * Generate a 802.11 neighbor report request frame.
       
    93      *  
       
    94      * @since S60 v5.2
       
    95      * @param duration The Duration field of the frame.
       
    96      * @param destination The destination MAC field of the frame.
       
    97      * @param source The source MAC field of the frame.
       
    98      * @param bssid The BSSID field of the frame.
       
    99      * @param sequence_control The Sequence Control field of the frame.
       
   100      * @param action_type Action Type field of the frame.
       
   101      * @param dialog_token The Dialog Token field of the frame.
       
   102      * @param nr_ie Reference to the NR information element of the frame.
       
   103      */
       
   104     void generate(
       
   105         u16_t duration,
       
   106         const core_mac_address_s& destination,
       
   107         const core_mac_address_s& source,
       
   108         const core_mac_address_s& bssid,
       
   109         u16_t sequence_control,
       
   110         u8_t action_type,
       
   111         u8_t dialog_token,
       
   112         const core_frame_nr_ie_c* nr_ie );
       
   113 
       
   114     /**
       
   115      * Constructor.
       
   116      *  
       
   117      * @since S60 v5.2
       
   118      * @param data_length Length of the frame.
       
   119      * @param data Pointer to the frame data.
       
   120      * @param max_data_length The maximum size of the frame buffer.    
       
   121      */
       
   122     core_frame_action_nr_c(
       
   123         u16_t data_length,
       
   124         const u8_t* data,
       
   125         u16_t max_data_length );
       
   126 
       
   127 protected:
       
   128     
       
   129     /**
       
   130      * Return the offset of the first IE.
       
   131      * @return The offset of the first IE. 0 if the frame doesn't support IEs.
       
   132      */
       
   133     virtual u16_t first_ie_offset() const;
       
   134 
       
   135     };
       
   136 
       
   137 #endif // CORE_FRAME_ACTION_NR_H