diff -r 000000000000 -r c40eb8fe8501 wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanssidlist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanssidlist.h Tue Feb 02 02:03:13 2010 +0200 @@ -0,0 +1,136 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class implementing storage for an SSID list. +* +*/ + + +#ifndef WLANSSIDLIST_H +#define WLANSSIDLIST_H + +#include +#include +#include +#include + +/** + * This class implements storage for an SSID list. + * + * @since S60 v5.1 + */ +NONSHARABLE_CLASS( CWlanSsidList ) : public CBase + { + +public: + + /** + * Two-phased constructor. + * + * @param aGranularity Granularity to use when allocating memory. + */ + static CWlanSsidList* NewL( + TUint aGranularity ); + + /** + * Destructor. + */ + virtual ~CWlanSsidList(); + + /** + * Add an SSID to the list. + * + * @since S60 v5.1 + * @param aSsid SSID to add. + * @return KErrNone on success, an error code otherwise. + */ + TInt AddSsid( + const TWlanSsid& aSsid ); + + /** + * Check whether the given SSID is in the list. + * + * @since S60 v5.1 + * @param aSsid SSID to search for. + * @return ETrue if SSID in the list, EFalse otherwise. + */ + TBool IsInList( + const TWlanSsid& aSsid ) const; + + /** + * Return the amount SSIDs in the list. + * + * @return The amount SSIDs in the list. + */ + TUint Count() const; + + /** + * Write the contents of the SSID list to the given stream. + * + * @since S60 v5.1 + * @param aStream Stream to write to. + */ + void ExternalizeL( + RWriteStream& aStream ) const; + + /** + * Read the contents of the SSID list from the given stream. + * + * @since S60 v5.1 + * @param aStream Stream to read from. + */ + void InternalizeL( + RReadStream& aStream ); + +private: + + /** + * Constructor. + * + * @param aGranularity Granularity to use when allocating memory. + */ + CWlanSsidList( + TUint aGranularity ); + + /** + * 2nd state constructor. + */ + void ConstructL(); + + /** + * Determine the linear order of the two SSIDs. + * + * @param aLeft First SSID to compare. + * @param aRight Second SSID to compare. + * @return Zero if SSIDs are equal, negative if the first one is less, + * posive if the first one is greater. + */ + static TInt LinearOrder( + const TWlanSsid& aLeft, + const TWlanSsid& aRight ); + +private: // data + + /** + * List of SSIDs. + */ + RArray iSsidList; + + /** + * Function used to determine the order of two SSIDs. + */ + TLinearOrder iLinearOrder; + + }; + +#endif // WLANSSIDLIST_H