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: |
|
15 * Declaration of the CApSelect class. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CAPLISTITEM_H |
|
21 #define CAPLISTITEM_H |
|
22 |
|
23 // Deprecation warning |
|
24 #warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. |
|
25 |
|
26 |
|
27 // INCLUDES |
|
28 #include <commdb.h> |
|
29 #include <ApEngineVer.h> |
|
30 #include <ApEngineConsts.h> |
|
31 |
|
32 |
|
33 typedef struct |
|
34 { |
|
35 TBool iReadOnly; ///< Is the AP protected or not |
|
36 TUint32 iIapId; ///< The IAP UID of the item |
|
37 TBool iIsVpn; ///< Is it a VPN or not? |
|
38 }TApListItemExtra; |
|
39 |
|
40 |
|
41 // CLASS DECLARATION |
|
42 /** |
|
43 * Representation of a list item. |
|
44 */ |
|
45 class CApListItem :public CBase |
|
46 ///< This class is used to hold |
|
47 ///< the main information of an |
|
48 ///< access point. |
|
49 ///< It is used in CApSelect. |
|
50 { |
|
51 public: // Constructors and destructor |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. Leaves on failure, places instance |
|
55 * on cleanup stack. |
|
56 * @return The constructed CApListItem. |
|
57 * |
|
58 * @deprecated |
|
59 */ |
|
60 IMPORT_C static CApListItem* NewLC(); |
|
61 |
|
62 |
|
63 /** |
|
64 * NOTE: This function is deprecated, use the one with the additional |
|
65 * aStartPage parameter below. |
|
66 * Two-phased constructor. Leaves on failure, places instance |
|
67 * on cleanup stack. |
|
68 * @param aIspType The type of the access point |
|
69 * (Internet only, Wap only, Internet AND Wap) |
|
70 * @param aUid The ID of the access point |
|
71 * @param aName The name of the access point |
|
72 * @param aBearerType The bearer type of the access point |
|
73 * @return The constructed CApListItem. |
|
74 * |
|
75 * @deprecated |
|
76 */ |
|
77 IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType, |
|
78 TUint32 aUid, |
|
79 const TDesC& aName, |
|
80 TApBearerType aBearerType ); |
|
81 |
|
82 |
|
83 /** |
|
84 * Two-phased constructor. Leaves on failure, places instance |
|
85 * on cleanup stack. |
|
86 * @param aIspType The type of the access point |
|
87 * (Internet only, Wap only, Internet AND Wap) |
|
88 * @param aUid The ID of the access point |
|
89 * @param aName The name of the access point |
|
90 * @param aBearerType The bearer type of the access point |
|
91 * @param aStartpage The starting page of the access point |
|
92 * @param aReadOnly Whether the given item is read-only or not |
|
93 * @return The constructed CApListItem. |
|
94 * |
|
95 * @deprecated |
|
96 */ |
|
97 IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType, |
|
98 TUint32 aUid, |
|
99 const TDesC& aName, |
|
100 TApBearerType aBearerType, |
|
101 const TDesC& aStartPage, |
|
102 TBool aReadOnly = ETrue |
|
103 ); |
|
104 |
|
105 /** |
|
106 * Two-phased constructor. Leaves on failure, places instance |
|
107 * on cleanup stack. |
|
108 * @param aItem a pointer to a CApListItem. |
|
109 * @return The constructed CApListItem. |
|
110 * |
|
111 * @deprecated |
|
112 */ |
|
113 IMPORT_C static CApListItem* NewLC( CApListItem* aItem ); |
|
114 |
|
115 |
|
116 /** |
|
117 * Destructor. |
|
118 * |
|
119 * @deprecated |
|
120 */ |
|
121 IMPORT_C virtual ~CApListItem(); |
|
122 |
|
123 |
|
124 /** |
|
125 * Copies the data from another CApListItem |
|
126 * Substitutes the "Assignment operator." |
|
127 * @return No return value. |
|
128 * |
|
129 * @deprecated |
|
130 */ |
|
131 IMPORT_C void CopyFromL( const CApListItem& aCopyFrom ); |
|
132 |
|
133 |
|
134 |
|
135 protected: // Constructors |
|
136 /** |
|
137 * C++ default constructor. |
|
138 * |
|
139 * @deprecated |
|
140 */ |
|
141 IMPORT_C CApListItem(); |
|
142 |
|
143 /** |
|
144 * NOTE: This function is deprecated, use the one with the additional |
|
145 * aStartPage parameter below. |
|
146 * Second-phase constructor. |
|
147 * @param aIspType The type of the access point |
|
148 * (Internet only, Wap only, Internet AND Wap) |
|
149 * @param aUid The ID of the access point |
|
150 * @param aName The name of the access point |
|
151 * @param aBearerType The bearer type of the access point |
|
152 * |
|
153 * @deprecated |
|
154 */ |
|
155 IMPORT_C void ConstructL( TCommsDbIspType aIspType, |
|
156 TUint32 aUid, |
|
157 const TDesC& aName, |
|
158 TApBearerType aBearerType ); |
|
159 |
|
160 /** |
|
161 * Second-phase constructor. |
|
162 * @param aIspType The type of the access point |
|
163 * (Internet only, Wap only, Internet AND Wap) |
|
164 * @param aUid The ID of the access point |
|
165 * @param aName The name of the access point |
|
166 * @param aBearerType The bearer type of the access point |
|
167 * @param aStartpage The starting page of the access point |
|
168 * |
|
169 * @deprecated |
|
170 */ |
|
171 IMPORT_C void ConstructL( TCommsDbIspType aIspType, |
|
172 TUint32 aUid, |
|
173 const TDesC& aName, |
|
174 TApBearerType aBearerType, |
|
175 const TDesC& aStartPage |
|
176 ); |
|
177 |
|
178 |
|
179 /** |
|
180 * Second-phase constructor. |
|
181 * |
|
182 * @deprecated |
|
183 */ |
|
184 IMPORT_C void ConstructL(); |
|
185 |
|
186 |
|
187 public: // New functions |
|
188 |
|
189 /** |
|
190 * NOTE: This function is deprecated, use the one with the additional |
|
191 * aStartPage parameter below. |
|
192 * Sets item values of the access point. Leaves on failure. |
|
193 * @param aIspType The type of the access point |
|
194 * (Internet only, Wap only, Internet AND Wap) |
|
195 * @param aUid The ID of the access point |
|
196 * @param aName The name of the access point |
|
197 * @param aBearerType The bearer type of the access point |
|
198 * |
|
199 * @deprecated |
|
200 */ |
|
201 IMPORT_C void SetItemL( TCommsDbIspType aIspType, |
|
202 TUint32 aUid, |
|
203 const TDesC& aName, |
|
204 TApBearerType aBearerType ); |
|
205 |
|
206 /** |
|
207 * Sets item values of the access point. Leaves on failure. |
|
208 * @param aIspType The type of the access point |
|
209 * (Internet only, Wap only, Internet AND Wap) |
|
210 * @param aUid The ID of the access point |
|
211 * @param aName The name of the access point |
|
212 * @param aBearerType The bearer type of the access point |
|
213 * @param aStartpage The starting page of the access point |
|
214 * |
|
215 * @deprecated |
|
216 */ |
|
217 IMPORT_C void SetItemL( TCommsDbIspType aIspType, |
|
218 TUint32 aUid, |
|
219 const TDesC& aName, |
|
220 TApBearerType aBearerType, |
|
221 const TDesC& aStartpage |
|
222 ); |
|
223 |
|
224 |
|
225 /** |
|
226 * Gets the name of the 'current' access point |
|
227 * Ownership of the returned text is not passed. |
|
228 * @return The name of the current access point |
|
229 * |
|
230 * @deprecated |
|
231 */ |
|
232 IMPORT_C const TDesC& Name(); |
|
233 |
|
234 |
|
235 /** |
|
236 * Gets the UID of the current access point |
|
237 * @return The UID of the current access point |
|
238 * |
|
239 * @deprecated |
|
240 */ |
|
241 IMPORT_C TUint32 Uid(); |
|
242 |
|
243 |
|
244 /** |
|
245 * Gets the ISP-type of the current access point |
|
246 * @return The ISP-type of the current access point. |
|
247 * |
|
248 * @deprecated |
|
249 */ |
|
250 IMPORT_C TCommsDbIspType Type(); |
|
251 |
|
252 |
|
253 /** |
|
254 * Gets the bearer-type of the current access point |
|
255 * @return The bearer-type of the current access point. |
|
256 * |
|
257 * @deprecated |
|
258 */ |
|
259 IMPORT_C TApBearerType BearerType(); |
|
260 |
|
261 |
|
262 /** |
|
263 * Returns the startpage of the current access point if any, |
|
264 * otherwise, an empty string is returned. |
|
265 * Ownership of the returned text is not passed. |
|
266 * @return The startpage of the current access point. |
|
267 * |
|
268 * @deprecated |
|
269 */ |
|
270 IMPORT_C const TDesC& StartPage() const; |
|
271 |
|
272 |
|
273 /** |
|
274 * Returns whether the access point is read-only or not. |
|
275 * @return Whether the access point is read-only or not. |
|
276 * |
|
277 * @deprecated |
|
278 */ |
|
279 IMPORT_C TBool IsReadOnly() const; |
|
280 |
|
281 |
|
282 /** |
|
283 * Returnes whether the given access point is a VPN ap or not. |
|
284 * @return whether the given access point is a VPN ap or not. |
|
285 */ |
|
286 TBool IsVpnAp() const; |
|
287 |
|
288 /** |
|
289 * Sets whether the given access point is a VPN ap or not. |
|
290 */ |
|
291 void SetVpnFlag( TBool aIsVpn ); |
|
292 |
|
293 protected: |
|
294 void CreateExtraL(); ///< Construct the extra data |
|
295 |
|
296 private: // Data |
|
297 TCommsDbIspType iIspType; ///< The type of the access point |
|
298 ///< (Internet only, Wap only, |
|
299 ///< Internet AND Wap) |
|
300 TUint32 iUid; ///< The ID of the access point |
|
301 HBufC* iName; ///< The name of the access point |
|
302 HBufC* iStartPage; ///< The startpage of the access point |
|
303 |
|
304 TApBearerType iBearerType; ///< Bearer type of the access point |
|
305 TApListItemExtra* iExt; ///< Extra data structure |
|
306 |
|
307 |
|
308 protected: // Friend classes |
|
309 friend class CApSelect; |
|
310 friend class TApListItemUidKey; |
|
311 |
|
312 }; |
|
313 |
|
314 |
|
315 |
|
316 #endif // CAPLISTITEM_H |
|
317 |
|
318 // End of File |
|