wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11DisassociationPending.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-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:   Declaration of the UmacDot11DisassociationPending class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 17 %
       
    20 */
       
    21 
       
    22 #ifndef WLANDOT11DISASSOCIATIONPENDING_H
       
    23 #define WLANDOT11DISASSOCIATIONPENDING_H
       
    24 
       
    25 #include "UmacDot11Roam.h"
       
    26 
       
    27 /**
       
    28 *  This is a state where disassociation request frame is sent to an AP.
       
    29 *
       
    30 *  @lib wlanumac.lib
       
    31 *  @since S60 v3.1
       
    32 */
       
    33 class WlanDot11DisassociationPending : public WlanDot11Roam
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38     * C++ default constructor.
       
    39     */
       
    40     WlanDot11DisassociationPending();
       
    41 
       
    42     /**
       
    43     * Destructor.
       
    44     */
       
    45     virtual ~WlanDot11DisassociationPending();
       
    46             
       
    47 private:
       
    48 
       
    49     // events for the FSM
       
    50     enum TEvent
       
    51         {
       
    52         // state entry action to be executed
       
    53         ESTATEENTRY,
       
    54         // disassociation request frame has been sent
       
    55         // from the WLAN device
       
    56         ETXPACKETCOMPLETE,
       
    57          // packet scheduler is full
       
    58         ETX_SCHEDULER_FULL,
       
    59         // packet push to packet scheduler possible
       
    60         EPUSHPACKET,
       
    61         // defined as an upper bound
       
    62         EEVENTMAX           
       
    63         };
       
    64 
       
    65     // states of the FSM
       
    66     enum TState
       
    67         {
       
    68         // start state of the state machine
       
    69         EINIT,                          
       
    70         // state for sending the disassociation frame
       
    71         ETXDISASSOCIATIONFRAME,
       
    72         // EPUSHPACKET event waited
       
    73         EWAIT4PUSHPACKET,
       
    74         // junction state prior moving to next dot11 state
       
    75         ECONTINUEDOT11TRAVERSE,
       
    76         // defined as an upper bound        
       
    77         ESTATEMAX                       
       
    78         }; 
       
    79 
       
    80     void Fsm( 
       
    81         WlanContextImpl& aCtxImpl, 
       
    82         TEvent aEvent ); 
       
    83     
       
    84     void OnStateEntryEvent( 
       
    85         WlanContextImpl& aCtxImpl );
       
    86         
       
    87     void OnTxCompleteEvent( 
       
    88         WlanContextImpl& aCtxImpl );
       
    89         
       
    90     void OnTxSchedulerFullEvent( WlanContextImpl& aCtxImpl );
       
    91 
       
    92     void OnPushPacketEvent( WlanContextImpl& aCtxImpl );
       
    93 
       
    94     void ContinueDot11StateTraversal( 
       
    95         WlanContextImpl& aCtxImpl );
       
    96 
       
    97     void ChangeInternalState( 
       
    98         WlanContextImpl& aCtxImpl, 
       
    99         TState aNewState );
       
   100 
       
   101     virtual void Entry( WlanContextImpl& aCtxImpl);
       
   102 
       
   103     virtual void Exit( WlanContextImpl& aCtxImpl);
       
   104 
       
   105     /**
       
   106     * Returns the states name
       
   107     * @since Series 60 3.1
       
   108     * @param aLength (OUT) length of the name of the state
       
   109     * @return name of the state
       
   110     */
       
   111 #ifndef NDEBUG 
       
   112         virtual const TInt8* GetStateName( TUint8& aLength ) const;
       
   113 #endif // !NDEBUG 
       
   114     
       
   115     virtual void OnPacketSendComplete(
       
   116         WlanContextImpl& aCtxImpl, 
       
   117         WHA::TStatus aStatus,
       
   118         TUint32 aPacketId,
       
   119         WHA::TRate aRate,
       
   120         TUint32 aPacketQueueDelay,
       
   121         TUint32 aMediaDelay,
       
   122         TUint aTotalTxDelay,
       
   123         TUint8 aAckFailures,
       
   124         WHA::TQueueId aQueueId,
       
   125         WHA::TRate aRequestedRate,
       
   126         TBool aMulticastData );
       
   127 
       
   128     virtual void OnPacketPushPossible( WlanContextImpl& aCtxImpl );
       
   129 
       
   130     // Prohibit copy constructor
       
   131     WlanDot11DisassociationPending( 
       
   132         const WlanDot11DisassociationPending& );
       
   133 
       
   134     // Prohibit assignment operator
       
   135     WlanDot11DisassociationPending& operator= ( 
       
   136         const WlanDot11DisassociationPending& );  
       
   137     
       
   138 private:   // Data
       
   139     
       
   140     TState              iState;
       
   141     
       
   142 #ifndef NDEBUG
       
   143     // max length of state name for tracing
       
   144     enum { KMaxStateStringLength = 50 };
       
   145     // max length of event name for tracing
       
   146     enum { KMaxEventStringLength = KMaxStateStringLength };
       
   147 
       
   148     // state names for tracing
       
   149     static const TUint8 iStateName[ESTATEMAX][KMaxStateStringLength];
       
   150     // event names for tracing
       
   151     static const TUint8 iEventName[EEVENTMAX][KMaxEventStringLength];             
       
   152     // name of the state 
       
   153     static const TInt8 iName[];        
       
   154 #endif 
       
   155     };
       
   156 
       
   157 #endif      // WLANDOT11DISASSOCIATIONPENDING_H
       
   158