/* Mednafen - Multi-system Emulator1*2* This program is free software; you can redistribute it and/or modify3* it under the terms of the GNU General Public License as published by4* the Free Software Foundation; either version 2 of the License, or5* (at your option) any later version.6*7* This program is distributed in the hope that it will be useful,8* but WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10* GNU General Public License for more details.11*12* You should have received a copy of the GNU General Public License13* along with this program; if not, write to the Free Software14* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA15*/1617// TODO/WIP1819#ifndef __MDFN_FILESTREAM_H20#define __MDFN_FILESTREAM_H2122#include "Stream.h"23#include "FileWrapper.h"2425class FileStream : public Stream26{27public:2829enum30{31MODE_READ = FileWrapper::MODE_READ,32MODE_WRITE = FileWrapper::MODE_WRITE,33MODE_WRITE_SAFE = FileWrapper::MODE_WRITE_SAFE,34};3536FileStream(const char *path, const int mode);37virtual ~FileStream();3839virtual uint64 attributes(void);4041virtual uint64 read(void *data, uint64 count, bool error_on_eos = true);42virtual void write(const void *data, uint64 count);43virtual void seek(int64 offset, int whence);44virtual int64 tell(void);45virtual int64 size(void);46virtual void close(void);4748private:49FILE *fp;50const int OpenedMode;51};52535455#endif565758