williamr@2: // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.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: // williamr@2: williamr@2: #if !defined(__VJCOMP_INL_) williamr@2: #define __VJCOMP_INL_ williamr@2: williamr@2: /** williamr@2: Tests if the delta value is compressible into the 16 bit VJ delta format. williamr@2: The aDelta value actually needs a 33 bit signed integer to hold the entire williamr@2: possible range, but the twos complement math works out if it's just williamr@2: stored as a 32 bit unsigned integer. williamr@2: williamr@2: @param aDelta Delta value to test williamr@2: williamr@2: @return ETrue if the value is compressible williamr@2: */ williamr@2: inline TBool CVJCompressor::IsDeltaCompressible(TUint32 aDelta) const williamr@2: { williamr@2: // This test is a faster equivalent to: williamr@2: // (aDelta >= 0) && (aDelta <= 0xffff) williamr@2: // if aDelta were signed williamr@2: return !(aDelta & 0xffff0000); williamr@2: } williamr@2: williamr@2: williamr@2: inline TUint8* CVJCompressor::GetTCPOpts(ThdrTCP* aTCPHeader) const williamr@2: /** williamr@2: Returns a pointer to the start of the TCP options (if there are any). williamr@2: williamr@2: @param aTCPHeader TCP header williamr@2: williamr@2: @return Start of the TCP options williamr@2: */ williamr@2: { williamr@2: TUint8* aPtr = (TUint8*)aTCPHeader+KTCPHeaderSize; williamr@2: return aPtr; williamr@2: } williamr@2: williamr@2: williamr@2: williamr@2: #endif // __VJCOMP_INL_