7 #ifndef PACKAGER_MEDIA_FORMATS_WEBVTT_TEXT_READERS_H_ 8 #define PACKAGER_MEDIA_FORMATS_WEBVTT_TEXT_READERS_H_ 14 #include "packager/file/file_closer.h" 15 #include "packager/status.h" 29 static Status Open(
const std::string& filename,
30 std::unique_ptr<FileReader>* out);
38 explicit FileReader(std::unique_ptr<File, FileCloser> file);
43 std::unique_ptr<File, FileCloser> file_;
57 std::unique_ptr<FileReader> source_;
58 char cached_next_ = 0;
59 bool has_cached_next_ =
false;
64 explicit LineReader(std::unique_ptr<FileReader> source);
66 bool Next(std::string* out);
77 explicit BlockReader(std::unique_ptr<FileReader> source);
79 bool Next(std::vector<std::string>* out);
91 #endif // MEDIA_FORMATS_WEBVTT_TEXT_READERS_H_
All the methods that are virtual are virtual for mocking.