williamr@2: /* williamr@2: * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * Declaration of the CApSelect class. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef CAPLISTITEM_H williamr@2: #define CAPLISTITEM_H williamr@2: williamr@2: // Deprecation warning williamr@2: #warning This header file has been deprecated. Will be removed in one of the next SDK releases. williamr@2: williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: williamr@2: typedef struct williamr@2: { williamr@2: TBool iReadOnly; ///< Is the AP protected or not williamr@2: TUint32 iIapId; ///< The IAP UID of the item williamr@2: TBool iIsVpn; ///< Is it a VPN or not? williamr@2: }TApListItemExtra; williamr@2: williamr@2: williamr@2: // CLASS DECLARATION williamr@2: /** williamr@2: * Representation of a list item. williamr@2: */ williamr@2: class CApListItem :public CBase williamr@2: ///< This class is used to hold williamr@2: ///< the main information of an williamr@2: ///< access point. williamr@2: ///< It is used in CApSelect. williamr@2: { williamr@2: public: // Constructors and destructor williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. Leaves on failure, places instance williamr@2: * on cleanup stack. williamr@2: * @return The constructed CApListItem. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C static CApListItem* NewLC(); williamr@2: williamr@2: williamr@2: /** williamr@2: * NOTE: This function is deprecated, use the one with the additional williamr@2: * aStartPage parameter below. williamr@2: * Two-phased constructor. Leaves on failure, places instance williamr@2: * on cleanup stack. williamr@2: * @param aIspType The type of the access point williamr@2: * (Internet only, Wap only, Internet AND Wap) williamr@2: * @param aUid The ID of the access point williamr@2: * @param aName The name of the access point williamr@2: * @param aBearerType The bearer type of the access point williamr@2: * @return The constructed CApListItem. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType, williamr@2: TUint32 aUid, williamr@2: const TDesC& aName, williamr@2: TApBearerType aBearerType ); williamr@2: williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. Leaves on failure, places instance williamr@2: * on cleanup stack. williamr@2: * @param aIspType The type of the access point williamr@2: * (Internet only, Wap only, Internet AND Wap) williamr@2: * @param aUid The ID of the access point williamr@2: * @param aName The name of the access point williamr@2: * @param aBearerType The bearer type of the access point williamr@2: * @param aStartpage The starting page of the access point williamr@2: * @param aReadOnly Whether the given item is read-only or not williamr@2: * @return The constructed CApListItem. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C static CApListItem* NewLC( TCommsDbIspType aIspType, williamr@2: TUint32 aUid, williamr@2: const TDesC& aName, williamr@2: TApBearerType aBearerType, williamr@2: const TDesC& aStartPage, williamr@2: TBool aReadOnly = ETrue williamr@2: ); williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. Leaves on failure, places instance williamr@2: * on cleanup stack. williamr@2: * @param aItem a pointer to a CApListItem. williamr@2: * @return The constructed CApListItem. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C static CApListItem* NewLC( CApListItem* aItem ); williamr@2: williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C virtual ~CApListItem(); williamr@2: williamr@2: williamr@2: /** williamr@2: * Copies the data from another CApListItem williamr@2: * Substitutes the "Assignment operator." williamr@2: * @return No return value. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void CopyFromL( const CApListItem& aCopyFrom ); williamr@2: williamr@2: williamr@2: williamr@2: protected: // Constructors williamr@2: /** williamr@2: * C++ default constructor. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C CApListItem(); williamr@2: williamr@2: /** williamr@2: * NOTE: This function is deprecated, use the one with the additional williamr@2: * aStartPage parameter below. williamr@2: * Second-phase constructor. williamr@2: * @param aIspType The type of the access point williamr@2: * (Internet only, Wap only, Internet AND Wap) williamr@2: * @param aUid The ID of the access point williamr@2: * @param aName The name of the access point williamr@2: * @param aBearerType The bearer type of the access point williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void ConstructL( TCommsDbIspType aIspType, williamr@2: TUint32 aUid, williamr@2: const TDesC& aName, williamr@2: TApBearerType aBearerType ); williamr@2: williamr@2: /** williamr@2: * Second-phase constructor. williamr@2: * @param aIspType The type of the access point williamr@2: * (Internet only, Wap only, Internet AND Wap) williamr@2: * @param aUid The ID of the access point williamr@2: * @param aName The name of the access point williamr@2: * @param aBearerType The bearer type of the access point williamr@2: * @param aStartpage The starting page of the access point williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void ConstructL( TCommsDbIspType aIspType, williamr@2: TUint32 aUid, williamr@2: const TDesC& aName, williamr@2: TApBearerType aBearerType, williamr@2: const TDesC& aStartPage williamr@2: ); williamr@2: williamr@2: williamr@2: /** williamr@2: * Second-phase constructor. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void ConstructL(); williamr@2: williamr@2: williamr@2: public: // New functions williamr@2: williamr@2: /** williamr@2: * NOTE: This function is deprecated, use the one with the additional williamr@2: * aStartPage parameter below. williamr@2: * Sets item values of the access point. Leaves on failure. williamr@2: * @param aIspType The type of the access point williamr@2: * (Internet only, Wap only, Internet AND Wap) williamr@2: * @param aUid The ID of the access point williamr@2: * @param aName The name of the access point williamr@2: * @param aBearerType The bearer type of the access point williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void SetItemL( TCommsDbIspType aIspType, williamr@2: TUint32 aUid, williamr@2: const TDesC& aName, williamr@2: TApBearerType aBearerType ); williamr@2: williamr@2: /** williamr@2: * Sets item values of the access point. Leaves on failure. williamr@2: * @param aIspType The type of the access point williamr@2: * (Internet only, Wap only, Internet AND Wap) williamr@2: * @param aUid The ID of the access point williamr@2: * @param aName The name of the access point williamr@2: * @param aBearerType The bearer type of the access point williamr@2: * @param aStartpage The starting page of the access point williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void SetItemL( TCommsDbIspType aIspType, williamr@2: TUint32 aUid, williamr@2: const TDesC& aName, williamr@2: TApBearerType aBearerType, williamr@2: const TDesC& aStartpage williamr@2: ); williamr@2: williamr@2: williamr@2: /** williamr@2: * Gets the name of the 'current' access point williamr@2: * Ownership of the returned text is not passed. williamr@2: * @return The name of the current access point williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C const TDesC& Name(); williamr@2: williamr@2: williamr@2: /** williamr@2: * Gets the UID of the current access point williamr@2: * @return The UID of the current access point williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C TUint32 Uid(); williamr@2: williamr@2: williamr@2: /** williamr@2: * Gets the ISP-type of the current access point williamr@2: * @return The ISP-type of the current access point. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C TCommsDbIspType Type(); williamr@2: williamr@2: williamr@2: /** williamr@2: * Gets the bearer-type of the current access point williamr@2: * @return The bearer-type of the current access point. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C TApBearerType BearerType(); williamr@2: williamr@2: williamr@2: /** williamr@2: * Returns the startpage of the current access point if any, williamr@2: * otherwise, an empty string is returned. williamr@2: * Ownership of the returned text is not passed. williamr@2: * @return The startpage of the current access point. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C const TDesC& StartPage() const; williamr@2: williamr@2: williamr@2: /** williamr@2: * Returns whether the access point is read-only or not. williamr@2: * @return Whether the access point is read-only or not. williamr@2: * williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C TBool IsReadOnly() const; williamr@2: williamr@2: williamr@2: /** williamr@2: * Returnes whether the given access point is a VPN ap or not. williamr@2: * @return whether the given access point is a VPN ap or not. williamr@2: */ williamr@2: TBool IsVpnAp() const; williamr@2: williamr@2: /** williamr@2: * Sets whether the given access point is a VPN ap or not. williamr@2: */ williamr@2: void SetVpnFlag( TBool aIsVpn ); williamr@2: williamr@2: protected: williamr@2: void CreateExtraL(); ///< Construct the extra data williamr@2: williamr@2: private: // Data williamr@2: TCommsDbIspType iIspType; ///< The type of the access point williamr@2: ///< (Internet only, Wap only, williamr@2: ///< Internet AND Wap) williamr@2: TUint32 iUid; ///< The ID of the access point williamr@2: HBufC* iName; ///< The name of the access point williamr@2: HBufC* iStartPage; ///< The startpage of the access point williamr@2: williamr@2: TApBearerType iBearerType; ///< Bearer type of the access point williamr@2: TApListItemExtra* iExt; ///< Extra data structure williamr@2: williamr@2: williamr@2: protected: // Friend classes williamr@2: friend class CApSelect; williamr@2: friend class TApListItemUidKey; williamr@2: williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: #endif // CAPLISTITEM_H williamr@2: williamr@2: // End of File