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