epoc32/include/networking/vj.inl
branchSymbian2
changeset 2 2fe1408b6811
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     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(__VJ_INL_)
       
    17 #define __VJ_INL_
       
    18 
       
    19 /**
       
    20 Sets a flag indicating that the stored object contains a valid TCP/IP header.
       
    21 
       
    22 @see IsValid()
       
    23 */
       
    24 inline void TVJCompHdr::MarkValid()
       
    25 	{
       
    26 	iConnectionId |= KVJValidFlag;
       
    27 	}
       
    28 
       
    29 /**
       
    30 Determines if the stored TCP/IP header contains valid data.
       
    31 
       
    32 @see MarkValid()
       
    33 
       
    34 @return ETrue if the object contains valid headers
       
    35 */
       
    36 inline TBool TVJCompHdr::IsValid() const
       
    37 	{
       
    38 	return !!(iConnectionId & KVJValidFlag);
       
    39 	}
       
    40 
       
    41 /**
       
    42 Sets the pointer to the next object in the linked list.
       
    43 
       
    44 @param aNextPtr Another TVJCompHdr object
       
    45 */
       
    46 inline void TVJCompHdr::SetNextPtr(TVJCompHdr* aNextPtr)
       
    47 	{
       
    48 	iNextPtr = aNextPtr;
       
    49 	}
       
    50 
       
    51 /**
       
    52 Returns the next object in the linked list.
       
    53 
       
    54 @return The next TVJCompHdr object
       
    55 */
       
    56 TVJCompHdr* TVJCompHdr::NextPtr() const
       
    57 	{
       
    58 	return iNextPtr;
       
    59 	}
       
    60 
       
    61 /**
       
    62 Sets the VJ connection number.
       
    63 Also clears the valid flag as a side effect.
       
    64 
       
    65 @param aConnection VJ connection number (0..255)
       
    66 */
       
    67 inline void TVJCompHdr::SetConnectionNumber(TUint aConnection)
       
    68 	{
       
    69 	iConnectionId = aConnection;
       
    70 	}
       
    71 
       
    72 /**
       
    73 Returns the VJ connection number.
       
    74 
       
    75 @return VJ connection number
       
    76 */
       
    77 inline TUint TVJCompHdr::ConnectionNumber() const
       
    78 	{
       
    79 	return iConnectionId & 0xff;	// Strip KVJValidFlag
       
    80 	}
       
    81 
       
    82 
       
    83 #endif // __VJ_INL_