testexecfw/statsrv/common/inc/padpacket.h
changeset 0 3e07fef1e154
equal deleted inserted replaced
-1:000000000000 0:3e07fef1e154
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Header file to help determine if a specific packet size
       
    15 * will result in the packet being padded.  This is to avoid a packet that*
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PADPACKET_H_2B31B9BD_01D6_4f35_B525_4E07C03D7762
       
    20 #define PADPACKET_H_2B31B9BD_01D6_4f35_B525_4E07C03D7762
       
    21 
       
    22 #if ! defined __E32DEF_H__
       
    23 	// Win32 code.
       
    24 	typedef signed int TInt;
       
    25 	typedef int TBool;
       
    26 #endif // ! defined __E32DEF_H__
       
    27 
       
    28 static const int packetMultiple = 64;
       
    29 static const unsigned char packetPad = 'S';
       
    30 
       
    31 inline TBool PadPacket( TInt packetSize )
       
    32 {
       
    33 	return ( 0 == ( packetSize % packetMultiple ) );
       
    34 }
       
    35 
       
    36 #endif // defined PADPACKET_H_2B31B9BD_01D6_4f35_B525_4E07C03D7762