#pragma once

#include "vector"
#include "Def.h"

class CDataTransfer
{
private:
	BOOL	m_bStopThread;
	HANDLE	m_hThreadEvent;
	HANDLE	m_hDataEvent;
	std::string	m_strLastCard;
	DWORD	m_dwTimeIns;

public:
	CDataTransfer();
	virtual ~CDataTransfer();

	void (*CallBackRead)(DWORD dwAntena, BYTE* pData, DWORD dwSize, void* pCustomData);
	void*	m_pCustomData;
	DWORD	m_dwMaskAntena;

	void SetThreadEvent();
	void WaitForThread();
	void StopThread(BOOL bStop = TRUE);
	BOOL IsThreadStoped();

	void InsertData(std::string strCard);
	std::string GetData();
};