|
1 /* |
|
2 * Copyright (c) 2005 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: Declaration of class CConnectionInfo |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CCONNECTIONINFO_H__ |
|
20 #define __CCONNECTIONINFO_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * Information over the connection |
|
30 */ |
|
31 NONSHARABLE_CLASS( CConnectionInfo ) : public CBase |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * NewL function |
|
36 * @param aName Name of the connection |
|
37 * @param aId ID of the connection |
|
38 * @param aListItem List item |
|
39 * return CConnectionInfo* |
|
40 */ |
|
41 static CConnectionInfo* NewL( TDesC& aName, TUint32 aId, |
|
42 TDesC &aListItem ); |
|
43 |
|
44 /** |
|
45 * NewL function |
|
46 * @param aName Name of the connection |
|
47 * @param aId ID of the connection |
|
48 * @param aVPN_iap_id ID of the AP related to the VPN AP |
|
49 * @param aListItem List item |
|
50 * return CConnectionInfo* |
|
51 */ |
|
52 static CConnectionInfo* NewL( TDesC& aName, TUint32 aId, |
|
53 TUint32 aVPN_iap_id, TDesC &aListItem ); |
|
54 |
|
55 /** |
|
56 * NewL function |
|
57 * @param aId ID of the connection |
|
58 * @param aDestinationId Destination Id |
|
59 * @param aListItem List item |
|
60 * return CConnectionInfo* |
|
61 */ |
|
62 static CConnectionInfo* NewL( TUint32 aId, TUint32 aDestinationId, |
|
63 TDesC &aListItem ); |
|
64 |
|
65 |
|
66 private: |
|
67 /** |
|
68 * Constructor of the CConnectionInfo class |
|
69 * @param aId ID of the connection |
|
70 * @param aIsVPN ETrue if the connection is VPN |
|
71 * @param aVPN_iap_id ID of the AP related to the VPN AP |
|
72 * @param aBearer Bearer |
|
73 * @return - |
|
74 */ |
|
75 CConnectionInfo( TUint32 aId, TBool aIsVPN = EFalse, |
|
76 TUint32 aVPN_iap_id = 0, TUint32 aDestinationId = 0 ); |
|
77 |
|
78 public: |
|
79 /** |
|
80 * ~CConnectionInfo() destructor |
|
81 * @param - |
|
82 */ |
|
83 ~CConnectionInfo(); |
|
84 |
|
85 private: |
|
86 /** |
|
87 * Symbian default constructor. |
|
88 * @param aName Name of the connection |
|
89 * @param aListItem List item |
|
90 */ |
|
91 void ConstructL( TDesC &aName, TDesC &aListItem ); |
|
92 |
|
93 /** |
|
94 * Symbian default constructor. |
|
95 * @param aListItem List item |
|
96 */ |
|
97 void ConstructL( TDesC &aListItem ); |
|
98 |
|
99 public: |
|
100 /** |
|
101 * Id() function |
|
102 * Returns iId member |
|
103 * @return iId member |
|
104 */ |
|
105 inline const TUint32 Id() const; |
|
106 |
|
107 /** |
|
108 * ListItem() function |
|
109 * Returns iListItem descriptor |
|
110 * @return iListItem descriptor |
|
111 */ |
|
112 inline const TDesC& ListItem() const; |
|
113 |
|
114 /** |
|
115 * Name() function |
|
116 * Returns iName descriptor |
|
117 * @return iName descriptor |
|
118 */ |
|
119 inline const TDesC& Name() const; |
|
120 |
|
121 /** |
|
122 * VPNIapId() function |
|
123 * Returns iVPN_iap_id member |
|
124 * @return iVPN_iap_id member |
|
125 */ |
|
126 inline const TUint32 VPNIapId() const; |
|
127 |
|
128 |
|
129 /** |
|
130 * VPNIapId() function |
|
131 * Returns iDestinationId member |
|
132 * @return iDestinationId member |
|
133 */ |
|
134 inline const TUint32 DestinationId() const; |
|
135 |
|
136 |
|
137 /** |
|
138 * IsVPN() function |
|
139 * Tells if connection is VPN |
|
140 * @return ETrue if connection is VPN |
|
141 */ |
|
142 inline const TBool IsVPN() const; |
|
143 |
|
144 |
|
145 private: // Data |
|
146 |
|
147 // Name of the connection |
|
148 HBufC* iName; |
|
149 |
|
150 // ID of the connection |
|
151 const TUint32 iId; |
|
152 |
|
153 // List item |
|
154 HBufC* iListItem; |
|
155 |
|
156 // Tells if the connection is VPN or not |
|
157 const TBool iIsVPN; |
|
158 |
|
159 // ID of the AP related to the VPN connection |
|
160 const TUint32 iVPN_iap_id; |
|
161 |
|
162 // ID of the Destination |
|
163 const TUint32 iDestinationId; |
|
164 }; |
|
165 |
|
166 #include "ConnectionInfo.inl" |
|
167 |
|
168 #endif |
|
169 |
|
170 // End of File |