/**************************************************************************
<MODULE NAME>
<FILENAME></FILENAME>
<HISTORY>
	<MODIFICATION>
		<DATE>04/01/2006</DATE>
		<AUTHOR>DRO</AUTHOR>
		<DESCRIPTION>
		</DESCRIPTION>
	</MODIFICATION>
</HISTORY>
</MODULE NAME>
**************************************************************************/
#ifndef __CDRDVJIT_H__
#define __CDRDVJIT_H__

/**************************************************************************
INCLUDE FILE
**************************************************************************/
#include "..\comp\UrnCrd\CDRDMGUR.h"
#include "..\ComSrc\com.h"


/**************************************************************************
<CLASS>
	<NAME>CCardReaderValidatorJites</NAME>
	<MOTHERS>
		<MOTHER></MOTHER>
	</MOTHERS>
	<DESCRIPTION>
	</DESCRIPTION>
</CLASS>
**************************************************************************/
class CCardReaderValidatorJites : public CCardReaderUrneManager
{
public:
	CCardReaderValidatorJites(void);
	virtual ~CCardReaderValidatorJites(void);

	
	virtual int LecteurInit(s_Parameters* shParm);
	virtual int LecteurInit(void);

	virtual int SendReadCommande(char* pzLectBuffer);
	virtual int ReadCommande(char* pzLectBuffer);
	
	virtual int SendWriteCommande(const char* pzString);
	virtual int WriteCommande(char* pzString);
	
	virtual int SendEjectCommande(unsigned char ucDirection);	
	virtual int EjectCommande(char* pzString);

	
	virtual int Tempo(char* pzString);
	virtual int WaitCard(void);

	static CCardReaderUrneManager* Instance(void);

	virtual void SetPointerCom(struct scom* psPort) {m_psPort = psPort;}
	virtual struct scom* GetPointerCom(void)        {return m_psPort;}

private:
	virtual int  PortReceiveCompleted(void);

	int ReadData(char *pzdata, int ilen);
	int SendData(char *pzch);

	struct scom *m_psPort;

	uchar m_ucRxData[_RX_SIZE];
	uchar m_ucTxData[_TX_SIZE];
	s_Parameters m_sParameters;

};

#endif /*__CDRDVJIT_H__*/