/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/include/sgx/filesystem/memorycard/memcardfile.hpp

*/

#ifndef SGX_FILESYSTEM_MEMORYCARD_MEMORYCARD_FILE_HPP
#define SGX_FILESYSTEM_MEMORYCARD_MEMORYCARD_FILE_HPP

class CSGXDeviceMemoryCardFile : public CSGXDeviceBlockState
{
public:
    CSGXDeviceMemoryCard *		m_pMemDevice;
	CSGXDeviceBlockMemoryCard *	m_pBlock;
    tMEM_SIZE					m_CurrOffset;
    tMEM_SIZE					m_iSize;
	tBYTE *						m_pData;
	tBOOL						m_bSaving;

	CSGXDeviceMemoryCardFile(CSGXDeviceMemoryCard *pDevice, CSGXDeviceBlockMemoryCard *pBlock, const tBOOL bSaving);
    virtual ~CSGXDeviceMemoryCardFile();

	// i expect all the below to be abstract
    virtual tMEM_SIZE   read(tBYTE *pDest, tMEM_SIZE size);
    virtual tMEM_SIZE	write(const tBYTE *pDest, tMEM_SIZE size);
    virtual tBOOL		seek(tINT32 offset, CSGXDeviceBlockState::tSeekFrom from);
    virtual tDISC_SIZE	getSeekPos() const;

protected:
	CSGXDeviceMemoryCardFile(){}

};


#endif // SGX_FILESYSTEM_MEMORYCARD_MEMORYCARD_FILE_HPP
