|
1 /* |
|
2 * Copyright (c) 2002-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: Declaration of the WlanProtocolStackSideUmacCb class. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 14 % |
|
20 */ |
|
21 |
|
22 #ifndef WLANPROTOCOLSTACKSIDEUMACCB_H |
|
23 #define WLANPROTOCOLSTACKSIDEUMACCB_H |
|
24 |
|
25 class TDataBuffer; |
|
26 |
|
27 /** |
|
28 * |
|
29 */ |
|
30 class WlanProtocolStackSideUmacCb |
|
31 { |
|
32 public: |
|
33 |
|
34 // dtor |
|
35 virtual inline ~WlanProtocolStackSideUmacCb(); |
|
36 |
|
37 /** |
|
38 * |
|
39 * UMAC adaptation needs to call this method! |
|
40 */ |
|
41 inline void AttachProtocolStackSideUmacCb( |
|
42 WlanProtocolStackSideUmacCb& aSelf ); |
|
43 |
|
44 /** |
|
45 * |
|
46 * UMAC adaptation needs to call this method! |
|
47 */ |
|
48 inline void DetachProtocolStackSideUmacCb(); |
|
49 |
|
50 /** |
|
51 * Sets the Tx offset for every frame type which can be transmitted |
|
52 * UMAC adaptation needs to implement this method! |
|
53 * |
|
54 * @param aEthernetFrameTxOffset Tx offset for Ethernet frames |
|
55 */ |
|
56 virtual void SetProtocolStackTxOffset( |
|
57 TUint32 aEthernetFrameTxOffset ); |
|
58 |
|
59 /** |
|
60 * Called when the Tx packet in question has been trasferred to the WLAN |
|
61 * device. |
|
62 * |
|
63 * UMAC adaptation needs to implement this method! |
|
64 * @param aCompletionCode Status of the operation. |
|
65 * @param aMetaHeader Meta header associated with the related Tx packet |
|
66 */ |
|
67 virtual void OnTxProtocolStackDataComplete( |
|
68 TInt aCompletionCode, |
|
69 TDataBuffer* aMetaHeader ); |
|
70 |
|
71 /** |
|
72 * Called when a Tx packet - submitted by someone else than the Protocol |
|
73 * Stack Side Client - has been trasferred to the WLAN device. |
|
74 * |
|
75 * Note! TxProtocolStackData() must not be called in the same context in |
|
76 * which this method is called (but instead e.g. via a DFC)! |
|
77 * |
|
78 * UMAC adaptation needs to implement this method! |
|
79 */ |
|
80 virtual void OnOtherTxDataComplete(); |
|
81 |
|
82 /** |
|
83 * Called when the Tx of a frame has completed (either successfully or |
|
84 * unsuccessfully). |
|
85 * |
|
86 * Note! TxProtocolStackData() must not be called in the same context in |
|
87 * which this method is called (but instead e.g. via a DFC)! |
|
88 * |
|
89 * UMAC adaptation needs to implement this method! |
|
90 */ |
|
91 virtual void OnTxDataSent(); |
|
92 |
|
93 /** |
|
94 * Completes a data read operation from protocol stack side |
|
95 * UMAC adaptation needs to implement this method! |
|
96 * |
|
97 * @param aBufferStart first element of the array that holds pointers to |
|
98 * Rx frame meta headers |
|
99 * @param aNumOfBuffers number of meta header pointers in the array |
|
100 * @return ETrue if this event was processed successfully |
|
101 * EFalse otherwise |
|
102 */ |
|
103 virtual TBool ProtocolStackDataReceiveComplete( |
|
104 const TDataBuffer*& aBufferStart, |
|
105 TUint32 aNumOfBuffers ); |
|
106 |
|
107 /** |
|
108 * Determines if the Protocol Stack Side client is ready to handle any |
|
109 * callbacks from UMAC |
|
110 * UMAC adaptation needs to implement this method! |
|
111 * |
|
112 * @return ETrue if the client is ready |
|
113 * EFalse if the client is not ready |
|
114 */ |
|
115 virtual TBool ProtocolStackSideClientReady() const; |
|
116 |
|
117 /** |
|
118 * Indicates that WLAN Mgmt Client has (re-)enabled protocol stack side |
|
119 * user data Tx. |
|
120 * UMAC adaptation needs to implement this method! |
|
121 * To quickly resume user data Tx after roaming, UMAC adaptation should call |
|
122 * MWlanProtocolStackSideUmac::TxProtocolStackData() as soon as possible |
|
123 * after receiving this indication. Note! TxProtocolStackData() must not be |
|
124 * called in the same context in which this method is called (but instead |
|
125 * e.g. via a DFC)! |
|
126 */ |
|
127 virtual void UserDataReEnabled(); |
|
128 |
|
129 protected: |
|
130 |
|
131 WlanProtocolStackSideUmacCb() : iSelf( NULL ) {}; |
|
132 |
|
133 private: |
|
134 |
|
135 // Prohibit copy constructor |
|
136 WlanProtocolStackSideUmacCb( const WlanProtocolStackSideUmacCb& ); |
|
137 // Prohibit assigment operator |
|
138 WlanProtocolStackSideUmacCb& operator= ( |
|
139 const WlanProtocolStackSideUmacCb& ); |
|
140 |
|
141 private: // Data |
|
142 |
|
143 /** pointer to self */ |
|
144 WlanProtocolStackSideUmacCb* iSelf; |
|
145 }; |
|
146 |
|
147 #include "UmacProtocolStackSideUmacCb.inl" |
|
148 |
|
149 #endif // WLANPROTOCOLSTACKSIDEUMACCB_H |