// cStreamData.h: interface for the cStreamData class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CSTREAMDATA_H__B0D5758D_EBAE_4FBC_8116_0AB366C9A505__INCLUDED_)
#define AFX_CSTREAMDATA_H__B0D5758D_EBAE_4FBC_8116_0AB366C9A505__INCLUDED_

#define SIZE_OF_BUFFER_STREAM   30000

class cStreamData  
{
public:
	cStreamData();
	virtual ~cStreamData();

    bool Add(Word8 *buf,Word32 size);
    bool IsEnoughDataAvailable(Word32 nb);

	UWord8	m_LastWord[SIZE_OF_BUFFER_STREAM];

	UWord64	ReadWord64(void);
	UWord32	ReadWord32(void);
	UWord16	ReadWord16(void);
	UWord8	ReadWord8(void);
	void	ReadString(string &str);
	UWord32	GetPos();
    bool SeekPos(UWord32 seek);

    bool SetPos(UWord32 pos);
    

private:
	Word32	m_LastWordPosWrite;
	Word32	m_LastWordPosRead;
	Word32	m_LastWordDispo;

    Word32  m_dataflush;


	Word32	m_LastWordPosRead_bkp;
	Word32	m_LastWordDispo_bkp;

};

#endif // !defined(AFX_CSTREAMDATA_H__B0D5758D_EBAE_4FBC_8116_0AB366C9A505__INCLUDED_)
