|
1 /* |
|
2 * Copyright (c) 2002 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 a class, which holds physical proxy information. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef CWPAPPHYSICALPROXY_H |
|
23 #define CWPAPPHYSICALPROXY_H |
|
24 |
|
25 // INCLUDES |
|
26 |
|
27 #include <MWPVisitor.h> |
|
28 #include "CWPAPItemBase.h" |
|
29 #include <cmconnectionmethodext.h> |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 enum TWPAPPxAddrType |
|
34 { |
|
35 EPxAddrTypeIPv4 = 1, |
|
36 EPxAddrTypeIPv6, |
|
37 EPxAddrTypeUnsupported // (IPv6, E164, ALPHA are not supported) |
|
38 }; |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 |
|
42 class CWPAPLogicalProxy; |
|
43 class CWPAPPort; |
|
44 class CWPAPNapdef; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * CWPAPPhysicalProxy contains physical proxy information |
|
50 */ |
|
51 class CWPAPPhysicalProxy : public CWPAPItemBase, private MWPVisitor |
|
52 { |
|
53 public: // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 * @param aDefaultName The default name of an access point |
|
58 * @param aCharacteristic The PXPHYSICAL characteristic. |
|
59 * @param aPort Reference to a pointer containing PORT of a PXLOGICAL. |
|
60 */ |
|
61 static CWPAPPhysicalProxy* NewLC( const TDesC& aDefaultName, |
|
62 CWPCharacteristic& aCharacteristic, |
|
63 CWPCharacteristic& aLogicalCharacteristic, |
|
64 CWPAPPort*& aPort ); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 ~CWPAPPhysicalProxy(); |
|
70 |
|
71 public: // From CWPAPItemBase |
|
72 |
|
73 TBool ValidateL(); |
|
74 void AddDataL( RCmConnectionMethodExt& aCmItem ); |
|
75 TInt AddItemsL( RPointerArray<CWPAPAccesspointItem>& aItems, |
|
76 CWPAPItemBase* aLogicalProxy, |
|
77 CWPAPItemBase* aPhysicalProxy ); |
|
78 const TDesC& Name(); |
|
79 void SaveWlanDataL( TUint32 /*aIapId*/, CCommsDatabase& /*aCommsDb*/ ) {}; |
|
80 void UpdateLingerL(const TUint32 /*aIapId*/){}; |
|
81 |
|
82 private: // From CWPAPItemBase. Override default implementation. |
|
83 |
|
84 void VisitL( CWPCharacteristic& aElement ); |
|
85 void VisitL( CWPParameter& aElement ); |
|
86 void VisitLinkL( CWPCharacteristic& aCharacteristic ); |
|
87 |
|
88 private: // New functions |
|
89 |
|
90 /** |
|
91 * C++ default constructor. |
|
92 * @param aDefaultName The default name of an access point |
|
93 * @param aPort Reference to a pointer containing PORT of a PXLOGICAL. |
|
94 */ |
|
95 CWPAPPhysicalProxy( const TDesC& aDefaultName, |
|
96 CWPCharacteristic& aLogicalCharacteristic, |
|
97 CWPAPPort*& aPort ); |
|
98 |
|
99 /** |
|
100 * By default Symbian 2nd phase constructor is private. |
|
101 */ |
|
102 void ConstructL(); |
|
103 |
|
104 private: // Data |
|
105 |
|
106 /// Pointer to data model parameter. Refs. |
|
107 CWPParameter* iProxyAddr; |
|
108 |
|
109 /// Pointer to data model parameter. Refs. |
|
110 CWPParameter* iName; |
|
111 |
|
112 /// Proxy address type |
|
113 TWPAPPxAddrType iPxAddrType; |
|
114 |
|
115 /// Pointer to port object. Owns. |
|
116 CWPAPPort* iPort; |
|
117 |
|
118 /// Pointer to port object owned by logical proxy. Refs. |
|
119 CWPAPPort*& iLogicalPort; |
|
120 |
|
121 /// Napdefs linked to by PXPHYSICAL |
|
122 RPointerArray<CWPAPNapdef> iNapdefs; |
|
123 |
|
124 /// Pointer to characteristic |
|
125 CWPCharacteristic& iLogicalCharacteristic; |
|
126 |
|
127 private: // For testing |
|
128 |
|
129 friend class T_CWPAPLogicalProxy; |
|
130 friend class T_CWPAPAdapter; |
|
131 friend class T_WPAPTestUtils; |
|
132 }; |
|
133 |
|
134 #endif // CWPAPPHYSICALPROXY_H |
|
135 |
|
136 // End of File |