cbsref/csyrefplugins/csy27010/inc/PortC32InterfaceIp.h
author hgs
Mon, 09 Aug 2010 17:35:42 +0100
changeset 58 980b3d0c4069
parent 44 8b72faa1200f
permissions -rw-r--r--
201027_10
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// * Copyright 2004 Neusoft America Inc.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
// * All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// * This component and the accompanying materials are made available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
// * under the terms of the Eclipse Public License v1.0
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// * which accompanies this distribution, and is available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
// * at the URL "http://www.eclipse.org/legal/epl-v10.html".
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
// *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
// * Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
// * Keith Collins (Neusoft America Inc.)  original software development and additional code and modifications.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
// * Thomas Gahagen (Neusoft America Inc.)  additional code and modifications.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
// * Zhen Yuan (Neusoft America Inc.)  additional code and modifications.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
// *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
// * Description:  This file defines the CPortC32InterfaceIp class.  This class
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
// *               is equivalent to client RComm subsessions. This is derived 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
// *               from the C32 base class for ports CPort.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
// CPortC32InterfaceIp.h
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
/** @file CPortC32InterfaceIp.h
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
#ifndef _PORTC32INTERFACEIP_H__
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
#define _PORTC32INTERFACEIP_H__
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
#include <cs_port.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
#include "PortC32InterfaceBase.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
class CChannelMgrCmdData;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
class CCsyMsgBufBpFrame;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
class CPortC32InterfaceIp : public CPortC32InterfaceBase
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
public:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
	static CPortC32InterfaceIp* NewL(CPortFactory& aPortFactory, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
								   CPortFactory::TC32PortInfo& aPortInfo);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
	virtual ~CPortC32InterfaceIp();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
	void SendFrameToClient(CCsyMsgBufBpFrame* aFrame);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
protected:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
	virtual TBool ReadFromBufOrQueue();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
private:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
	CPortC32InterfaceIp(CPortFactory& aPortFactory,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
					  CPortFactory::TC32PortInfo& aPortInfo);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
	void ConstructL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
	virtual TInt QueryReceiveBuffer(TInt& aLength) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
	virtual void ResetBuffers(TUint aFlags);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
	void PlaceIpPacketFramesOntoFreeList();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
	void PlaceIpPacketFramesOntoReadList();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
	TBool CreateIpPacketFromFrames();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
private:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
	//TBuf8<KMaxIpPacketSize>	iPartialReadBuf;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	TUint							iNumberOfPacketsWaiting;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
	TSglQue<CCsyMsgBufBpFrame>		iFramesReceivedForIpPacket;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
	TSglQueIter<CCsyMsgBufBpFrame>	iFramesReceivedForIpPacketIter;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63
	TUint							iCurrentIpPacketLength;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    64
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    65
	TBuf8<KMaxIpPacketSize>			iIpPacket;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    66
	};
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    67
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    68
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    69
#endif  // _PORTC32INTERFACEIP_H__