networkcontrol/iptransportlayer/inc/tcprecvwin.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2008-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Class CTCPReceiveWindowSize defines the public interface used by Licensee's NetMcpr
       
    15 // to configure the TCP receive window dynamically. Licensee are required to override
       
    16 // the SetTcpWin(1) method for setting the TCP receive window for different bearers. 
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file tcprecvwin.h
       
    22  @class CTCPReceiveWindowSize
       
    23  @brief Declaration of class CTCPReceiveWindowSize
       
    24  @publishedPartner
       
    25  @released.
       
    26 */
       
    27 
       
    28 #ifndef SYMBIAN_TCP_RECEIVE_WINDOW_H
       
    29 #define SYMBIAN_TCP_RECEIVE_WINDOW_H
       
    30 
       
    31 #include <networking/etelbearers.h>
       
    32 
       
    33 /**
       
    34  * Default TCP receive window
       
    35  */ 
       
    36 const TUint KBearerDefaultWinSize    = 49152;
       
    37 
       
    38 /**
       
    39  * Default maximum TCP receive window
       
    40  */
       
    41 const TUint KBearerDefaultMaxWinSize = 131070;
       
    42 
       
    43 
       
    44 //TCP receive window interface definition.
       
    45 class CTCPReceiveWindowSize : public CBase, public Meta::SMetaData
       
    46 {
       
    47 public:
       
    48 	enum
       
    49 	{
       
    50 		ERealmId= 0x102070ED,
       
    51 		iId = 9,
       
    52 	};
       
    53 	
       
    54 public:
       
    55 	//Default TCP receive window
       
    56 	CTCPReceiveWindowSize() :iWinSize(KBearerDefaultWinSize),
       
    57                          iMaxWinSize(KBearerDefaultMaxWinSize)
       
    58         {};
       
    59 	
       
    60 	//Virtual Destructor
       
    61 	virtual ~CTCPReceiveWindowSize(){};
       
    62 	
       
    63     //Set TCP window size
       
    64 	virtual void SetTcpWin(TUint aBearerType) = 0;
       
    65 
       
    66 	//Get the TCP receive window size for a bearer 
       
    67 	TUint GetTcpWin() const { return iWinSize; }
       
    68 	
       
    69 	//Get maximum  TCP receive window size for a bearer
       
    70 	TUint GetTcpMaxWin() const { return iMaxWinSize; }
       
    71 	
       
    72 public:
       
    73 	//TCP receive window for a bearer.
       
    74    	TUint iWinSize;
       
    75    
       
    76     //TCP maximum receive window for a bearer.
       
    77    	TUint iMaxWinSize;
       
    78    	
       
    79 public:
       
    80  	DATA_VTABLE	
       
    81 };
       
    82 #endif //SYMBIAN_TCP_RECEIVE_WINDOW_H