diff -r 000000000000 -r 56b72877c1cb hotspotfw/hsserver/inc/hssscaninfo.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspotfw/hsserver/inc/hssscaninfo.inl Thu Dec 17 09:20:28 2009 +0200 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: Implementation of ScanInfo inline methods. +* +*/ + + + +#include "hssscanoffsets.h" + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline TUint8 HssScanInfo::SignalNoiseRatio() const +{ + return *( current_m + RX_SNR_OFFSET ); +} + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline TUint8 HssScanInfo::RXLevel() const +{ + return *( current_m + RX_LEVEL_OFFSET ); +} + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline void HssScanInfo::BSSID( TUint8 bssid[BSSID_LENGTH] ) const +{ + TUint8* dst = bssid; + const TUint8* src = current_m + BSSID_OFFSET; + const TUint8* end = src + BSSID_LENGTH; + + for ( ; src < end; ++dst, ++src ) + { + *dst = *src; + } +} + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline TUint16 HssScanInfo::BeaconInterval() const +{ + return *( reinterpret_cast( current_m + BEACON_INTERVAL_OFFSET ) ); +} + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline TUint16 HssScanInfo::Capability() const +{ + return *( reinterpret_cast( current_m + CAPABILITY_OFFSET ) ); +} + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline TBool HssScanInfo::Privacy() const + { + if ( Capability() & SCAN_CAPABILITY_BIT_MASK_PRIVACY ) + { + return 1; + } + + return 0; + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +inline void HssScanInfo::Timestamp( TUint8 timestamp[TIMESTAMP_LENGTH] ) const + { + TUint8* dst = timestamp; + const TUint8* src = current_m + TIMESTAMP_OFFSET; + const TUint8* end = src + TIMESTAMP_LENGTH; + + for ( ; src < end; ++dst, ++src ) + { + *dst = *src; + } + }