Introduce InputReader to read data from the file and do low-level parsing.
[libsub.git] / src / stl_binary_reader.h
1 /*
2     Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef LIBSUB_STL_BINARY_READER_H
21 #define LIBSUB_STL_BINARY_READER_H
22
23 #include "reader.h"
24 #include "stl_binary_tables.h"
25 #include <map>
26
27 namespace sub {
28
29 /** @class STLBinaryReader
30  *  @brief A class to read binary STL files.
31  */
32 class STLBinaryReader : public Reader
33 {
34 public:
35         STLBinaryReader (std::istream &);
36
37         std::map<std::string, std::string> metadata () const;
38
39         int code_page_number;
40         int frame_rate;
41         DisplayStandard display_standard;
42         LanguageGroup language_group;
43         Language language;
44         std::string original_programme_title;
45         std::string original_episode_title;
46         std::string translated_programme_title;
47         std::string translated_episode_title;
48         std::string translator_name;
49         std::string translator_contact_details;
50         std::string subtitle_list_reference_code;
51         std::string creation_date;
52         std::string revision_date;
53         std::string revision_number;
54         int tti_blocks;
55         int number_of_subtitles;
56         int subtitle_groups;
57         int maximum_characters;
58         int maximum_rows;
59         TimecodeStatus timecode_status;
60         std::string start_of_programme;
61         std::string first_in_cue;
62         int disks;
63         int disk_sequence_number;
64         std::string country_of_origin;
65         std::string publisher;
66         std::string editor_name;
67         std::string editor_contact_details;
68
69 private:
70         STLBinaryTables _tables;
71 };
72
73 }
74
75 #endif