epoc32/include/networking/vjcomp.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // 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
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #if !defined(__VJCOMP_INL_)
    17 #define __VJCOMP_INL_
    18 
    19 /**
    20 Tests if the delta value is compressible into the 16 bit VJ delta format.
    21 The aDelta value actually needs a 33 bit signed integer to hold the entire
    22 possible range, but the twos complement math works out if it's just
    23 stored as a 32 bit unsigned integer.
    24 
    25 @param aDelta Delta value to test
    26 
    27 @return ETrue if the value is compressible
    28 */
    29 inline TBool CVJCompressor::IsDeltaCompressible(TUint32 aDelta) const
    30 	{
    31 	// This test is a faster equivalent to:
    32 	//    (aDelta >= 0) && (aDelta <= 0xffff)
    33 	// if aDelta were signed
    34 	return !(aDelta & 0xffff0000);
    35 	}
    36 
    37 
    38 inline TUint8* CVJCompressor::GetTCPOpts(ThdrTCP* aTCPHeader) const
    39 /**
    40 Returns a pointer to the start of the TCP options (if there are any).
    41 
    42 @param aTCPHeader TCP header
    43 
    44 @return Start of the TCP options
    45 */
    46 	{
    47 	TUint8* aPtr = (TUint8*)aTCPHeader+KTCPHeaderSize;
    48 	return aPtr;
    49 	}
    50 
    51 
    52 
    53 #endif // __VJCOMP_INL_