diff -r 2473f5e227f9 -r 8b72faa1200f cbsref/csyrefplugins/csy27010/inc/CommReadWriteBaseAo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbsref/csyrefplugins/csy27010/inc/CommReadWriteBaseAo.h Tue Jun 22 11:02:32 2010 +0100 @@ -0,0 +1,71 @@ +// +// * Copyright 2004 Neusoft America Inc. +// * All rights reserved. +// * This component and the accompanying materials are made available +// * under the terms of the Eclipse Public License v1.0 +// * which accompanies this distribution, and is available +// * at the URL "http://www.eclipse.org/legal/epl-v10.html". +// * +// * Contributors: +// * Keith Collins (Neusoft America Inc.) original software development and additional code and modifications. +// * Thomas Gahagen (Neusoft America Inc.) additional code and modifications. +// * Zhen Yuan (Neusoft America Inc.) additional code and modifications. +// * +// * Description: This file declares the base class CCommReadWriteBaseAo. +// Class CCommReadWriteBaseAo contains the common elements for derived +// Frame Reader and Frame Writer classes using a serial comm port. +// + +// CommReadWriteBaseAo.h + +/** @file CommReadWriteBaseAo.h + * + * The file declares the base class CCommReadWriteBaseAo. This class + * holds the common elements for derived Frame Reader and Frame Writer + * classes using a serial comm port. + */ + +#ifndef _CCOMMREADWRITEBASEAO_H_ +#define _CCOMMREADWRITEBASEAO_H_ + +#include "cs_port.h" +#include +#include +#include + + +class CPortFactory; +class CMux0710Protocol; + +class CCommReadWriteBaseAo : public CActive + { +public: + CCommReadWriteBaseAo(CPortFactory* aParent, CMux0710Protocol* aMux0710Protocol, + TInt aPriority = EPriorityStandard); + ~CCommReadWriteBaseAo(); + + TInt SetServerConfig(TCommServerConfig& aConfig); + void GetServerConfig(TCommServerConfig& aConfig) const; + void FreeMemory(); + + inline void SetRole(TCommRole aRole){iRole=aRole;}; + +protected: + void SetBuffersL(); + + // attributes + HBufC8* iBuffer; // pointer to the Tx/Rx buffer + TPtr8* iBuf; // pointer to a TPtr8 that points to the current buffer + + TUint iBufFlags; // contains buffer flags e.g for partial read/write + TInt iBufSize; // size of the Tx/Rx buffer + + TCommRole iRole; // DTE or DCE role for this port unit + + CPortFactory* iParent; // pointer to the CPortC32Interface object + CMux0710Protocol* iMux0710Protocol; + RBusDevComm* iCommPort; // pointer to LDD comm port + + }; + +#endif // _CCOMMREADWRITEBASEAO_H_ \ No newline at end of file