/* mkvmerge -- utility for splicing together matroska files from component media subtypes mm_io_c.h Written by Moritz Bunkus Distributed under the GPL see the file COPYING for details or visit http://www.gnu.org/copyleft/gpl.html */ /*! \file \version \$Id: mm_io.h,v 1.4 2003/06/07 21:59:24 mosu Exp $ \brief IO callback class definitions \author Moritz Bunkus */ #ifndef __MM_IO_H #define __MM_IO_H #ifndef __CYGWIN__ #include #endif // __CYGWIN__ #include "IOCallback.h" using namespace LIBEBML_NAMESPACE; class mm_io_c: public IOCallback { void *file; public: mm_io_c(); mm_io_c(const char *path, const open_mode mode); virtual ~mm_io_c(); virtual uint64 getFilePointer(); virtual void setFilePointer(int64 offset, seek_mode mode=seek_beginning); virtual uint32 read(void *buffer, size_t size); virtual size_t write(const void *buffer, size_t size); virtual void close(); virtual bool eof(); virtual char *gets(char *buffer, size_t max_size); }; class mm_null_io_c: public mm_io_c { protected: int64_t pos; public: mm_null_io_c(); virtual uint64 getFilePointer(); virtual void setFilePointer(int64 offset, seek_mode mode=seek_beginning); virtual uint32 read(void *buffer, size_t size); virtual size_t write(const void *buffer, size_t size); virtual void close(); }; #endif // __MM_IO_H