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