Fix boost bind warning.
[libsub.git] / src / subrip_reader.h
index 11ce5306429b97d3a8e48d0a5f69e74bbd84a5a6..8d3fd4c124357e3a0723a84335b576917257ca7d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 #include "reader.h"
 #include <boost/function.hpp>
+#include <list>
 
 struct subrip_reader_convert_line_test;
 struct subrip_reader_convert_time_test;
+struct subrip_reader_test5;
+struct subrip_reader_test6;
 
 namespace sub {
 
@@ -36,20 +39,22 @@ class SubripReader : public Reader
 {
 public:
        SubripReader (FILE* f);
-       SubripReader (std::string const & subs);
+       SubripReader (std::string subs);
 
 private:
        /* For tests */
        friend struct ::subrip_reader_convert_line_test;
        friend struct ::subrip_reader_convert_time_test;
+       friend struct ::subrip_reader_test5;
+       friend struct ::subrip_reader_test6;
        SubripReader () {}
 
-       static Time convert_time (std::string t);
-       void convert_line (std::string t, int line_number, Time from, Time to);
+       Time convert_time (std::string t);
+       void convert_line (std::string t, RawSubtitle& p);
        void maybe_content (RawSubtitle& p);
-       boost::optional<std::string> get_line_stringstream (std::stringstream* str) const;
-       boost::optional<std::string> get_line_file (FILE* file) const;
        void read (boost::function<boost::optional<std::string> ()> get_line);
+
+       std::list<std::string> _context;
 };
 
 }