|
1 // Copyright (c) 2006-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 |
|
17 |
|
18 /** |
|
19 @internalComponent |
|
20 */ |
|
21 #ifndef __QOS_INTERFACE_H__ |
|
22 #define __QOS_INTERFACE_H__ |
|
23 |
|
24 #include <e32std.h> |
|
25 |
|
26 class CProtocolQoS; |
|
27 class RModule; |
|
28 class CNifIfBase; |
|
29 class TSoIfControllerInfo; |
|
30 |
|
31 class CInterface : public CBase |
|
32 { |
|
33 public: |
|
34 static CInterface* NewL(CProtocolQoS& aProt, CNifIfBase* aNif); |
|
35 ~CInterface(); |
|
36 |
|
37 inline RModule* TrafficControl(); |
|
38 inline void SetTrafficControl(RModule* aModule); |
|
39 inline TInt TrafficControlStatus() const; |
|
40 inline CProtocolQoS& Protocol(); |
|
41 inline const TDesC& Name() const; |
|
42 inline const TDesC& InterfaceName() const; |
|
43 inline TUint32 IapId() const; |
|
44 inline CNifIfBase* Nif(); |
|
45 |
|
46 TSglQueLink iLink; |
|
47 private: |
|
48 |
|
49 CInterface(CProtocolQoS& aProt, CNifIfBase* aNif); |
|
50 void ConstructL(); |
|
51 void GetInterfaceInfo(); |
|
52 TInt GetPlugIn(TSoIfControllerInfo& aPluginInfo); |
|
53 TInt LoadControlModule(); |
|
54 |
|
55 private: |
|
56 CProtocolQoS& iProtocol; // Reference to protocol class (immutable) |
|
57 CNifIfBase *const iNif; // Nif (immutable) |
|
58 RModule* iTrafficControl; // Traffic control module |
|
59 TInt iTrafficControlStatus; // Traffic control module status (indicates error, if load fails) |
|
60 TName iName; // Name of the interface in TCP/IP stack |
|
61 TPtrC iInterfaceName; // Interface name (i.e. instance id is not visible) |
|
62 TUint32 iIapId; // IAP Id of the Nif |
|
63 }; |
|
64 |
|
65 |
|
66 class CInterfaceManager : public CBase |
|
67 { |
|
68 public: |
|
69 static CInterfaceManager* NewL(CProtocolQoS& aProtocol); |
|
70 ~CInterfaceManager(); |
|
71 |
|
72 CInterface* AddInterfaceL(CNifIfBase* aNif); |
|
73 void RemoveInterface(CInterface* aInterface); |
|
74 CInterface* FindInterface(CNifIfBase* aNif); |
|
75 |
|
76 protected: |
|
77 CInterfaceManager(CProtocolQoS& aProtocol); |
|
78 |
|
79 private: |
|
80 CProtocolQoS& iProtocol; |
|
81 TSglQue<CInterface> iInterfaces; |
|
82 }; |
|
83 |
|
84 #include "interface.inl" |
|
85 |
|
86 #endif |