7 #ifndef MEDIA_FILE_MEDIA_FILE_H_ 8 #define MEDIA_FILE_MEDIA_FILE_H_ 15 #include "packager/file/file.h" 27 bool Close()
override;
28 int64_t
Read(
void* buffer, uint64_t length)
override;
29 int64_t
Write(
const void* buffer, uint64_t length)
override;
30 int64_t
Size()
override;
31 bool Flush()
override;
32 bool Seek(uint64_t position)
override;
33 bool Tell(uint64_t* position)
override;
42 static void Delete(
const std::string& file_name);
50 std::vector<uint8_t>* file_;
58 #endif // MEDIA_FILE_MEDIA_FILE_H_ static void Delete(const std::string &file_name)
bool Open() override
Internal open. Should not be used directly.
Define an abstract file interface.
bool Seek(uint64_t position) override
const std::string & file_name() const
All the methods that are virtual are virtual for mocking.
int64_t Write(const void *buffer, uint64_t length) override
bool Tell(uint64_t *position) override
int64_t Read(void *buffer, uint64_t length) override