|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __TC_H__ |
|
17 #define __TC_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <e32std.h> |
|
21 #include <networking/module_if.h> |
|
22 #include "parameters.h" // ..for TPacketFilter only |
|
23 |
|
24 class CNif; |
|
25 class CPdpContext; |
|
26 class CFlowData; |
|
27 class CFlowContext; |
|
28 |
|
29 class CFlowData : public CBase |
|
30 { |
|
31 public: |
|
32 static CFlowData* NewL(CFlowContext& aHandle, CNif& aNif, CFlowData *aNext); |
|
33 static CFlowData* Find(const CFlowContext* aHandle, CFlowData *aList); |
|
34 static CFlowData* Remove(const CFlowContext* aHandle, CFlowData **aList); |
|
35 |
|
36 ~CFlowData(); |
|
37 |
|
38 TInt Send(RMBufChain& aPacket, RMBufSendInfo& aInfo); |
|
39 void SetContext(CPdpContext *aContext); |
|
40 |
|
41 inline CPdpContext* PdpContext() const; |
|
42 inline const CFlowContext& FlowContext() const; |
|
43 inline CNif& Nif() const; |
|
44 inline TPacketFilter& PacketFilter() { return iPacketFilter; }; |
|
45 |
|
46 TDblQueLink iLink; |
|
47 |
|
48 private: |
|
49 CFlowData(CFlowContext& aHandle, CNif& aNif); |
|
50 void ConstructL(); |
|
51 CFlowData* iNext; // Links together all CFlowData instances. |
|
52 |
|
53 private: |
|
54 CNif& iNif; // CNif |
|
55 const CFlowContext& iFlowContext; // CFlowContext |
|
56 CPdpContext* iContext; // PDP context |
|
57 TPacketFilter iPacketFilter; // Store packet filter here, because the address in CFlowContext |
|
58 // might be changed and that causes packet filter manipulation to fail |
|
59 }; |
|
60 |
|
61 #include "tc.inl" |
|
62 |
|
63 #endif |