2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Declaration of the CApSelect class.
23 // Deprecation warning
24 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
29 #include <ApEngineVer.h>
30 #include <ApEngineConsts.h>
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?
43 * Representation of a list item.
45 class CApListItem :public CBase
46 ///< This class is used to hold
47 ///< the main information of an
49 ///< It is used in CApSelect.
51 public: // Constructors and destructor
54 * Two-phased constructor. Leaves on failure, places instance
56 * @return The constructed CApListItem.
60 IMPORT_C static CApListItem* NewLC();
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
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.
77 IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType,
80 TApBearerType aBearerType );
84 * Two-phased constructor. Leaves on failure, places instance
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.
97 IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType,
100 TApBearerType aBearerType,
101 const TDesC& aStartPage,
102 TBool aReadOnly = ETrue
106 * Two-phased constructor. Leaves on failure, places instance
108 * @param aItem a pointer to a CApListItem.
109 * @return The constructed CApListItem.
113 IMPORT_C static CApListItem* NewLC( CApListItem* aItem );
121 IMPORT_C virtual ~CApListItem();
125 * Copies the data from another CApListItem
126 * Substitutes the "Assignment operator."
127 * @return No return value.
131 IMPORT_C void CopyFromL( const CApListItem& aCopyFrom );
135 protected: // Constructors
137 * C++ default constructor.
141 IMPORT_C CApListItem();
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
155 IMPORT_C void ConstructL( TCommsDbIspType aIspType,
158 TApBearerType aBearerType );
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
171 IMPORT_C void ConstructL( TCommsDbIspType aIspType,
174 TApBearerType aBearerType,
175 const TDesC& aStartPage
180 * Second-phase constructor.
184 IMPORT_C void ConstructL();
187 public: // New functions
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
201 IMPORT_C void SetItemL( TCommsDbIspType aIspType,
204 TApBearerType aBearerType );
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
217 IMPORT_C void SetItemL( TCommsDbIspType aIspType,
220 TApBearerType aBearerType,
221 const TDesC& aStartpage
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
232 IMPORT_C const TDesC& Name();
236 * Gets the UID of the current access point
237 * @return The UID of the current access point
241 IMPORT_C TUint32 Uid();
245 * Gets the ISP-type of the current access point
246 * @return The ISP-type of the current access point.
250 IMPORT_C TCommsDbIspType Type();
254 * Gets the bearer-type of the current access point
255 * @return The bearer-type of the current access point.
259 IMPORT_C TApBearerType BearerType();
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.
270 IMPORT_C const TDesC& StartPage() const;
274 * Returns whether the access point is read-only or not.
275 * @return Whether the access point is read-only or not.
279 IMPORT_C TBool IsReadOnly() const;
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.
286 TBool IsVpnAp() const;
289 * Sets whether the given access point is a VPN ap or not.
291 void SetVpnFlag( TBool aIsVpn );
294 void CreateExtraL(); ///< Construct the extra 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
304 TApBearerType iBearerType; ///< Bearer type of the access point
305 TApListItemExtra* iExt; ///< Extra data structure
308 protected: // Friend classes
309 friend class CApSelect;
310 friend class TApListItemUidKey;
316 #endif // CAPLISTITEM_H