cbsref/csyrefplugins/csy27010/inc/PortC32InterfaceIp.h
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     1 //
       
     2 // * Copyright 2004 Neusoft America Inc.
       
     3 // * All rights reserved.
       
     4 // * This component and the accompanying materials are made available
       
     5 // * under the terms of the 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 // * Contributors:
       
    10 // * Keith Collins (Neusoft America Inc.)  original software development and additional code and modifications.
       
    11 // * Thomas Gahagen (Neusoft America Inc.)  additional code and modifications.
       
    12 // * Zhen Yuan (Neusoft America Inc.)  additional code and modifications.
       
    13 // *
       
    14 // * Description:  This file defines the CPortC32InterfaceIp class.  This class
       
    15 // *               is equivalent to client RComm subsessions. This is derived 
       
    16 // *               from the C32 base class for ports CPort.
       
    17 //
       
    18 
       
    19 // CPortC32InterfaceIp.h
       
    20 
       
    21 /** @file CPortC32InterfaceIp.h
       
    22 */
       
    23 #ifndef _PORTC32INTERFACEIP_H__
       
    24 #define _PORTC32INTERFACEIP_H__
       
    25 
       
    26 #include <cs_port.h>
       
    27 #include "PortC32InterfaceBase.h"
       
    28 
       
    29 class CChannelMgrCmdData;
       
    30 class CCsyMsgBufBpFrame;
       
    31 
       
    32 class CPortC32InterfaceIp : public CPortC32InterfaceBase
       
    33 	{
       
    34 public:
       
    35 	static CPortC32InterfaceIp* NewL(CPortFactory& aPortFactory, 
       
    36 								   CPortFactory::TC32PortInfo& aPortInfo);
       
    37 	virtual ~CPortC32InterfaceIp();
       
    38 
       
    39 	void SendFrameToClient(CCsyMsgBufBpFrame* aFrame);
       
    40 
       
    41 protected:
       
    42 	virtual TBool ReadFromBufOrQueue();
       
    43 
       
    44 private:
       
    45 	CPortC32InterfaceIp(CPortFactory& aPortFactory,
       
    46 					  CPortFactory::TC32PortInfo& aPortInfo);
       
    47 	void ConstructL();
       
    48 
       
    49 	virtual TInt QueryReceiveBuffer(TInt& aLength) const;
       
    50 	virtual void ResetBuffers(TUint aFlags);
       
    51 	
       
    52 	void PlaceIpPacketFramesOntoFreeList();
       
    53 	void PlaceIpPacketFramesOntoReadList();
       
    54 	TBool CreateIpPacketFromFrames();
       
    55 
       
    56 private:
       
    57 	//TBuf8<KMaxIpPacketSize>	iPartialReadBuf;
       
    58 
       
    59 	TUint							iNumberOfPacketsWaiting;
       
    60 
       
    61 	TSglQue<CCsyMsgBufBpFrame>		iFramesReceivedForIpPacket;
       
    62 	TSglQueIter<CCsyMsgBufBpFrame>	iFramesReceivedForIpPacketIter;
       
    63 	TUint							iCurrentIpPacketLength;
       
    64 
       
    65 	TBuf8<KMaxIpPacketSize>			iIpPacket;
       
    66 	};
       
    67 
       
    68 
       
    69 #endif  // _PORTC32INTERFACEIP_H__