Some Doxygen comments.
[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 #include "reader.h"
21 #include "stl_binary_tables.h"
22 #include <map>
23
24 namespace sub {
25
26 /** @class STLBinaryReader
27  *  @brief A class to read binary STL files.
28  */
29 class STLBinaryReader : public Reader
30 {
31 public:
32         STLBinaryReader (std::istream &);
33         ~STLBinaryReader ();
34
35         std::map<std::string, std::string> metadata () const;
36
37         int code_page_number;
38         int frame_rate;
39         DisplayStandard display_standard;
40         LanguageGroup language_group;
41         Language language;
42         std::string original_programme_title;
43         std::string original_episode_title;
44         std::string translated_programme_title;
45         std::string translated_episode_title;
46         std::string translator_name;
47         std::string translator_contact_details;
48         std::string subtitle_list_reference_code;
49         std::string creation_date;
50         std::string revision_date;
51         std::string revision_number;
52         int tti_blocks;
53         int number_of_subtitles;
54         int subtitle_groups;
55         int maximum_characters;
56         int maximum_rows;
57         TimecodeStatus timecode_status;
58         std::string start_of_programme;
59         std::string first_in_cue;
60         int disks;
61         int disk_sequence_number;
62         std::string country_of_origin;
63         std::string publisher;
64         std::string editor_name;
65         std::string editor_contact_details;
66
67 private:
68         std::string get_string (int, int) const;
69         int get_int (int, int) const;
70         FrameTime get_timecode (int) const;
71
72         STLBinaryTables _tables;
73         unsigned char* _buffer;
74 };
75
76 }