// Get.h: interface for the CGet class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GET_H__4ED6BEA0_4CBB_11D6_A9A4_00606772164E__INCLUDED_)
#define AFX_GET_H__4ED6BEA0_4CBB_11D6_A9A4_00606772164E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "..\queue1.h"

class CGet : public IGet  
{
public:
	CGet();
	virtual ~CGet();

//	IUnknown
public:
	STDMETHOD(QueryInterface)(REFIID riid, void**ppvObject);
	STDMETHOD_(ULONG, AddRef)();
	STDMETHOD_(ULONG, Release)();

// IGet
public:
	STDMETHOD(Get)(UCHAR*aItem, UINT*aLength, UINT*aTimeout);
	STDMETHOD(Available)(UINT*aLength, UINT*aTimeout);
	STDMETHOD(Clear)();
	STDMETHOD(Interrupt)();
	STDMETHOD(Used)(UINT*aSize);

//	Local entry points
public:
	HRESULT AddList(UCHAR*aList, UINT aLength);

private:
	ULONG	m_Reference;
	UCHAR*	m_Data;
	UINT	m_Length;
	UINT	m_Place;
	//	This is the event set when data is added
	HANDLE	m_Added;
};

#endif // !defined(AFX_GET_H__4ED6BEA0_4CBB_11D6_A9A4_00606772164E__INCLUDED_)

