1#ifndef MP4V2_PLATFORM_IO_FILE_H
2#define MP4V2_PLATFORM_IO_FILE_H
4namespace mp4v2 {
namespace platform {
namespace io {
28 virtual bool open(
const std::string& name, Mode mode ) = 0;
29 virtual bool seek( Size pos ) = 0;
30 virtual bool read(
void* buffer, Size size, Size& nin ) = 0;
31 virtual bool write(
const void* buffer, Size size, Size& nout ) = 0;
32 virtual bool truncate( Size size ) = 0;
33 virtual bool close() = 0;
34 virtual bool getSize( Size& nout ) = 0;
74 explicit File(
const std::string& name =
"",
Mode mode = MODE_UNDEFINED,
104 bool open(
const std::string& name =
"",
Mode mode = MODE_UNDEFINED );
207 void setName(
const std::string& name );
208 void setMode(
Mode mode );
218 bool open(
const std::string& name,
Mode mode );
219 bool seek(
Size pos );
220 bool read(
void* buffer,
Size size,
Size& nin );
221 bool write(
const void* buffer,
Size size,
Size& nout );
222 bool truncate(
Size size );
224 bool getSize(
Size& nout );
239 bool open(
const std::string& name,
Mode mode );
240 bool seek(
Size pos );
241 bool read(
void* buffer,
Size size,
Size& nin );
242 bool write(
const void* buffer,
Size size,
Size& nout );
243 bool truncate(
Size size );
245 bool getSize(
Size& nout );
Structure of functions implementing custom file provider.
Definition: file.h:41
Structure of functions implementing custom I/O callbacks.
Definition: file.h:60