|
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 logical proxy information. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef CWPAPLOGICALPROXY_H |
|
23 #define CWPAPLOGICALPROXY_H |
|
24 |
|
25 // INCLUDES |
|
26 |
|
27 #include <MWPVisitor.h> |
|
28 #include "CWPAPItemBase.h" |
|
29 #include <cmconnectionmethodext.h> |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 class CWPAPPhysicalProxy; |
|
34 class CWPAPAccesspointItem; |
|
35 class CWPAPPort; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * CWPAPLogicalProxy contains logical proxy data. |
|
41 */ |
|
42 class CWPAPLogicalProxy : public CWPAPItemBase, private MWPVisitor |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * @param aDefaultName The default name of an access point |
|
49 * @param aCharacteristic The PXLOGICAL characteristic |
|
50 */ |
|
51 static CWPAPLogicalProxy* NewLC( const TDesC& aDefaultName, |
|
52 CWPCharacteristic& aCharacteristic ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CWPAPLogicalProxy(); |
|
58 |
|
59 public: // From CWPAPItemBase |
|
60 |
|
61 TBool ValidateL(); |
|
62 void AddDataL( RCmConnectionMethodExt& aCmItem ); |
|
63 TInt AddItemsL( RPointerArray<CWPAPAccesspointItem>& aItems, |
|
64 CWPAPItemBase* aLogicalProxy, |
|
65 CWPAPItemBase* aPhysicalProxy ); |
|
66 const TDesC& Name(); |
|
67 void SaveWlanDataL( TUint32 /*aIapId*/, CCommsDatabase& /*aCommsDb*/ ) {}; |
|
68 |
|
69 void UpdateLingerL(const TUint32 /*aIapId*/){}; |
|
70 |
|
71 private: // From CWPAPItemBase |
|
72 |
|
73 void VisitL(CWPCharacteristic& aElement); |
|
74 void VisitL(CWPParameter& aElement); |
|
75 void VisitLinkL( CWPCharacteristic& /*aLink*/ ) {}; |
|
76 |
|
77 private: // New methods |
|
78 |
|
79 /** |
|
80 * C++ default constructor. |
|
81 * @param aDefaultName The default name of an access point |
|
82 */ |
|
83 CWPAPLogicalProxy( CWPCharacteristic& aCharacteristic, |
|
84 const TDesC& aDefaultName ); |
|
85 |
|
86 /** |
|
87 * By default Symbian 2nd phase constructor is private. |
|
88 */ |
|
89 void ConstructL(); |
|
90 |
|
91 private: // Data |
|
92 |
|
93 /// Pointer to data model parameter. Refs. |
|
94 CWPParameter* iHomepage; |
|
95 |
|
96 /// Pointer to data model parameter. Refs. |
|
97 CWPParameter* iName; |
|
98 |
|
99 /// Pointer to port object. Owns. |
|
100 CWPAPPort* iPort; |
|
101 |
|
102 /// Array of physical proxy objects. Owns. |
|
103 RPointerArray<CWPAPPhysicalProxy> iPhysicalProxies; |
|
104 |
|
105 /// Characteristic |
|
106 CWPCharacteristic& iCharacteristic; |
|
107 |
|
108 private: // For testing |
|
109 |
|
110 friend class T_CWPAPLogicalProxy; |
|
111 friend class T_CWPAPAdapter; |
|
112 friend class T_WPAPTestUtils; |
|
113 }; |
|
114 |
|
115 #endif // CWPAPLOGICALPROXY_H |
|
116 |
|
117 // End of File |