1.1 --- a/epoc32/include/mw/aplistitem.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/aplistitem.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,318 @@
1.4 -aplistitem.h
1.5 +/*
1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* Declaration of the CApSelect class.
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +#ifndef CAPLISTITEM_H
1.25 +#define CAPLISTITEM_H
1.26 +
1.27 +// Deprecation warning
1.28 +#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
1.29 +
1.30 +
1.31 +// INCLUDES
1.32 +#include <commdb.h>
1.33 +#include <ApEngineVer.h>
1.34 +#include <ApEngineConsts.h>
1.35 +
1.36 +
1.37 +typedef struct
1.38 + {
1.39 + TBool iReadOnly; ///< Is the AP protected or not
1.40 + TUint32 iIapId; ///< The IAP UID of the item
1.41 + TBool iIsVpn; ///< Is it a VPN or not?
1.42 + }TApListItemExtra;
1.43 +
1.44 +
1.45 +// CLASS DECLARATION
1.46 +/**
1.47 +* Representation of a list item.
1.48 +*/
1.49 +class CApListItem :public CBase
1.50 + ///< This class is used to hold
1.51 + ///< the main information of an
1.52 + ///< access point.
1.53 + ///< It is used in CApSelect.
1.54 + {
1.55 + public: // Constructors and destructor
1.56 +
1.57 + /**
1.58 + * Two-phased constructor. Leaves on failure, places instance
1.59 + * on cleanup stack.
1.60 + * @return The constructed CApListItem.
1.61 + *
1.62 + * @deprecated
1.63 + */
1.64 + IMPORT_C static CApListItem* NewLC();
1.65 +
1.66 +
1.67 + /**
1.68 + * NOTE: This function is deprecated, use the one with the additional
1.69 + * aStartPage parameter below.
1.70 + * Two-phased constructor. Leaves on failure, places instance
1.71 + * on cleanup stack.
1.72 + * @param aIspType The type of the access point
1.73 + * (Internet only, Wap only, Internet AND Wap)
1.74 + * @param aUid The ID of the access point
1.75 + * @param aName The name of the access point
1.76 + * @param aBearerType The bearer type of the access point
1.77 + * @return The constructed CApListItem.
1.78 + *
1.79 + * @deprecated
1.80 + */
1.81 + IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType,
1.82 + TUint32 aUid,
1.83 + const TDesC& aName,
1.84 + TApBearerType aBearerType );
1.85 +
1.86 +
1.87 + /**
1.88 + * Two-phased constructor. Leaves on failure, places instance
1.89 + * on cleanup stack.
1.90 + * @param aIspType The type of the access point
1.91 + * (Internet only, Wap only, Internet AND Wap)
1.92 + * @param aUid The ID of the access point
1.93 + * @param aName The name of the access point
1.94 + * @param aBearerType The bearer type of the access point
1.95 + * @param aStartpage The starting page of the access point
1.96 + * @param aReadOnly Whether the given item is read-only or not
1.97 + * @return The constructed CApListItem.
1.98 + *
1.99 + * @deprecated
1.100 + */
1.101 + IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType,
1.102 + TUint32 aUid,
1.103 + const TDesC& aName,
1.104 + TApBearerType aBearerType,
1.105 + const TDesC& aStartPage,
1.106 + TBool aReadOnly = ETrue
1.107 + );
1.108 +
1.109 + /**
1.110 + * Two-phased constructor. Leaves on failure, places instance
1.111 + * on cleanup stack.
1.112 + * @param aItem a pointer to a CApListItem.
1.113 + * @return The constructed CApListItem.
1.114 + *
1.115 + * @deprecated
1.116 + */
1.117 + IMPORT_C static CApListItem* NewLC( CApListItem* aItem );
1.118 +
1.119 +
1.120 + /**
1.121 + * Destructor.
1.122 + *
1.123 + * @deprecated
1.124 + */
1.125 + IMPORT_C virtual ~CApListItem();
1.126 +
1.127 +
1.128 + /**
1.129 + * Copies the data from another CApListItem
1.130 + * Substitutes the "Assignment operator."
1.131 + * @return No return value.
1.132 + *
1.133 + * @deprecated
1.134 + */
1.135 + IMPORT_C void CopyFromL( const CApListItem& aCopyFrom );
1.136 +
1.137 +
1.138 +
1.139 + protected: // Constructors
1.140 + /**
1.141 + * C++ default constructor.
1.142 + *
1.143 + * @deprecated
1.144 + */
1.145 + IMPORT_C CApListItem();
1.146 +
1.147 + /**
1.148 + * NOTE: This function is deprecated, use the one with the additional
1.149 + * aStartPage parameter below.
1.150 + * Second-phase constructor.
1.151 + * @param aIspType The type of the access point
1.152 + * (Internet only, Wap only, Internet AND Wap)
1.153 + * @param aUid The ID of the access point
1.154 + * @param aName The name of the access point
1.155 + * @param aBearerType The bearer type of the access point
1.156 + *
1.157 + * @deprecated
1.158 + */
1.159 + IMPORT_C void ConstructL( TCommsDbIspType aIspType,
1.160 + TUint32 aUid,
1.161 + const TDesC& aName,
1.162 + TApBearerType aBearerType );
1.163 +
1.164 + /**
1.165 + * Second-phase constructor.
1.166 + * @param aIspType The type of the access point
1.167 + * (Internet only, Wap only, Internet AND Wap)
1.168 + * @param aUid The ID of the access point
1.169 + * @param aName The name of the access point
1.170 + * @param aBearerType The bearer type of the access point
1.171 + * @param aStartpage The starting page of the access point
1.172 + *
1.173 + * @deprecated
1.174 + */
1.175 + IMPORT_C void ConstructL( TCommsDbIspType aIspType,
1.176 + TUint32 aUid,
1.177 + const TDesC& aName,
1.178 + TApBearerType aBearerType,
1.179 + const TDesC& aStartPage
1.180 + );
1.181 +
1.182 +
1.183 + /**
1.184 + * Second-phase constructor.
1.185 + *
1.186 + * @deprecated
1.187 + */
1.188 + IMPORT_C void ConstructL();
1.189 +
1.190 +
1.191 + public: // New functions
1.192 +
1.193 + /**
1.194 + * NOTE: This function is deprecated, use the one with the additional
1.195 + * aStartPage parameter below.
1.196 + * Sets item values of the access point. Leaves on failure.
1.197 + * @param aIspType The type of the access point
1.198 + * (Internet only, Wap only, Internet AND Wap)
1.199 + * @param aUid The ID of the access point
1.200 + * @param aName The name of the access point
1.201 + * @param aBearerType The bearer type of the access point
1.202 + *
1.203 + * @deprecated
1.204 + */
1.205 + IMPORT_C void SetItemL( TCommsDbIspType aIspType,
1.206 + TUint32 aUid,
1.207 + const TDesC& aName,
1.208 + TApBearerType aBearerType );
1.209 +
1.210 + /**
1.211 + * Sets item values of the access point. Leaves on failure.
1.212 + * @param aIspType The type of the access point
1.213 + * (Internet only, Wap only, Internet AND Wap)
1.214 + * @param aUid The ID of the access point
1.215 + * @param aName The name of the access point
1.216 + * @param aBearerType The bearer type of the access point
1.217 + * @param aStartpage The starting page of the access point
1.218 + *
1.219 + * @deprecated
1.220 + */
1.221 + IMPORT_C void SetItemL( TCommsDbIspType aIspType,
1.222 + TUint32 aUid,
1.223 + const TDesC& aName,
1.224 + TApBearerType aBearerType,
1.225 + const TDesC& aStartpage
1.226 + );
1.227 +
1.228 +
1.229 + /**
1.230 + * Gets the name of the 'current' access point
1.231 + * Ownership of the returned text is not passed.
1.232 + * @return The name of the current access point
1.233 + *
1.234 + * @deprecated
1.235 + */
1.236 + IMPORT_C const TDesC& Name();
1.237 +
1.238 +
1.239 + /**
1.240 + * Gets the UID of the current access point
1.241 + * @return The UID of the current access point
1.242 + *
1.243 + * @deprecated
1.244 + */
1.245 + IMPORT_C TUint32 Uid();
1.246 +
1.247 +
1.248 + /**
1.249 + * Gets the ISP-type of the current access point
1.250 + * @return The ISP-type of the current access point.
1.251 + *
1.252 + * @deprecated
1.253 + */
1.254 + IMPORT_C TCommsDbIspType Type();
1.255 +
1.256 +
1.257 + /**
1.258 + * Gets the bearer-type of the current access point
1.259 + * @return The bearer-type of the current access point.
1.260 + *
1.261 + * @deprecated
1.262 + */
1.263 + IMPORT_C TApBearerType BearerType();
1.264 +
1.265 +
1.266 + /**
1.267 + * Returns the startpage of the current access point if any,
1.268 + * otherwise, an empty string is returned.
1.269 + * Ownership of the returned text is not passed.
1.270 + * @return The startpage of the current access point.
1.271 + *
1.272 + * @deprecated
1.273 + */
1.274 + IMPORT_C const TDesC& StartPage() const;
1.275 +
1.276 +
1.277 + /**
1.278 + * Returns whether the access point is read-only or not.
1.279 + * @return Whether the access point is read-only or not.
1.280 + *
1.281 + * @deprecated
1.282 + */
1.283 + IMPORT_C TBool IsReadOnly() const;
1.284 +
1.285 +
1.286 + /**
1.287 + * Returnes whether the given access point is a VPN ap or not.
1.288 + * @return whether the given access point is a VPN ap or not.
1.289 + */
1.290 + TBool IsVpnAp() const;
1.291 +
1.292 + /**
1.293 + * Sets whether the given access point is a VPN ap or not.
1.294 + */
1.295 + void SetVpnFlag( TBool aIsVpn );
1.296 +
1.297 + protected:
1.298 + void CreateExtraL(); ///< Construct the extra data
1.299 +
1.300 + private: // Data
1.301 + TCommsDbIspType iIspType; ///< The type of the access point
1.302 + ///< (Internet only, Wap only,
1.303 + ///< Internet AND Wap)
1.304 + TUint32 iUid; ///< The ID of the access point
1.305 + HBufC* iName; ///< The name of the access point
1.306 + HBufC* iStartPage; ///< The startpage of the access point
1.307 +
1.308 + TApBearerType iBearerType; ///< Bearer type of the access point
1.309 + TApListItemExtra* iExt; ///< Extra data structure
1.310 +
1.311 +
1.312 + protected: // Friend classes
1.313 + friend class CApSelect;
1.314 + friend class TApListItemUidKey;
1.315 +
1.316 + };
1.317 +
1.318 +
1.319 +
1.320 +#endif // CAPLISTITEM_H
1.321 +
1.322 +// End of File