|
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 "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: Defines sender class for target |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 11 % |
|
20 */ |
|
21 |
|
22 #ifndef _SENDER_HW_H_ |
|
23 #define _SENDER_HW_H_ |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <es_mbuf.h> |
|
27 |
|
28 class CLANLinkCommon; |
|
29 class CPcCardPktDrv; |
|
30 |
|
31 /** |
|
32 * Sender active object |
|
33 * |
|
34 */ |
|
35 class CSender : public CActive |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 // NewL |
|
41 static CSender* NewL(CPcCardPktDrv* aParent); |
|
42 |
|
43 // destructor |
|
44 ~CSender(); |
|
45 |
|
46 /** |
|
47 * Send is called by upper layers to send data. |
|
48 * @param aPacket data packet to be sent |
|
49 * @return 0 if CSender isn't currently ready to accept more data, |
|
50 * 1 if CSender is ready to accept more data immediately |
|
51 */ |
|
52 TInt Send( RMBufChain& aPacket ); |
|
53 |
|
54 private: |
|
55 |
|
56 /** |
|
57 * C++ default constructor. |
|
58 */ |
|
59 CSender(); |
|
60 |
|
61 /** |
|
62 * RunL |
|
63 */ |
|
64 virtual void RunL(); |
|
65 |
|
66 /** |
|
67 * DoCancel |
|
68 */ |
|
69 virtual void DoCancel(); |
|
70 |
|
71 /** |
|
72 * InitL |
|
73 * Initialises CSender |
|
74 * @param aParent CPcCardControlEngine parent class |
|
75 */ |
|
76 void InitL( CPcCardPktDrv* aParent ); |
|
77 |
|
78 /** |
|
79 * Requests notification once Tx is once again allowed |
|
80 * sets the CSender active object as active. |
|
81 */ |
|
82 void RequestResumeTx(); |
|
83 |
|
84 // Prohibit copy constructor |
|
85 CSender( const CSender& ); |
|
86 // Prohibit assigment operator |
|
87 CSender& operator= ( const CSender& ); |
|
88 |
|
89 private: // Data |
|
90 |
|
91 /** */ |
|
92 CPcCardPktDrv* iParent; |
|
93 |
|
94 /** */ |
|
95 TBool iStopSending; |
|
96 |
|
97 /** */ |
|
98 TBool iReqPending; |
|
99 |
|
100 }; |
|
101 |
|
102 #endif //_SENDER_HW_H_ |