annotate playtreeparser.h @ 32734:cc58a1e919d9

Allow character in the font description file to be in UTF-8. A character defined in the font description file can be either an ASCII character, any character in the range of 0x80 to 0xFF or - to avoid character set problems, and that is recommended - a character in UTF-8 encoding now. Non-ASCII characters will be stored in the nonASCIIidx array. The indices 0..127 of this array correspond to the indices 128..255 of the Fnt array. (This also settles the "Translate messages shown in the GUI window(s) from UTF-8" issue.)
author ib
date Thu, 27 Jan 2011 18:04:19 +0000
parents de190efe4da3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30429
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
1 /*
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
2 * This file is part of MPlayer.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
3 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
5 * it under the terms of the GNU General Public License as published by
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
7 * (at your option) any later version.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
8 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
12 * GNU General Public License for more details.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
13 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
14 * You should have received a copy of the GNU General Public License along
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
17 */
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 26131
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
19 #ifndef MPLAYER_PLAYTREEPARSER_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
20 #define MPLAYER_PLAYTREEPARSER_H
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
21
26131
83c95bd31aab Add necessary #includes to pass 'make checkheaders'.
diego
parents: 26029
diff changeset
22 #include "playtree.h"
83c95bd31aab Add necessary #includes to pass 'make checkheaders'.
diego
parents: 26029
diff changeset
23
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
24 /// \defgroup PlaytreeParser Playtree parser
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
25 /// \ingroup Playtree
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
26 ///
18316
b3be7df634b0 spelling/grammar/wording fixes in doxygen and non-doxygen comments
diego
parents: 18265
diff changeset
27 /// The playtree parser allows to read various playlist formats. It reads from
b3be7df634b0 spelling/grammar/wording fixes in doxygen and non-doxygen comments
diego
parents: 18265
diff changeset
28 /// a stream allowing to handle playlists from local files and the network.
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
29 ///@{
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
30
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
31 /// \file
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
32
31179
de190efe4da3 Drop pointless _st suffix from 'struct stream'.
diego
parents: 30429
diff changeset
33 struct stream;
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
34
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
35 typedef struct play_tree_parser {
31179
de190efe4da3 Drop pointless _st suffix from 'struct stream'.
diego
parents: 30429
diff changeset
36 struct stream *stream;
4782
4b728967bd77 Playtree parser switch to a by line mode.
albeu
parents: 4308
diff changeset
37 char *buffer,*iter,*line;
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
38 int buffer_size , buffer_end;
4782
4b728967bd77 Playtree parser switch to a by line mode.
albeu
parents: 4308
diff changeset
39 int deep,keep;
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
40 } play_tree_parser_t;
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
41
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
42 /// Create a new parser.
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
43 /** \param stream The stream to read from.
18316
b3be7df634b0 spelling/grammar/wording fixes in doxygen and non-doxygen comments
diego
parents: 18265
diff changeset
44 * \param deep Parser depth. Some formats allow including other files,
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
45 * this is used to track the inclusion depth.
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
46 * \return The new parser.
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
47 */
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
48 play_tree_parser_t*
31179
de190efe4da3 Drop pointless _st suffix from 'struct stream'.
diego
parents: 30429
diff changeset
49 play_tree_parser_new(struct stream *stream, int deep);
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
50
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
51 /// Destroy a parser.
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
52 void
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
53 play_tree_parser_free(play_tree_parser_t* p);
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
54
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
55 /// Build a playtree from the playlist opened with the parser.
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
56 /** \param p The parser.
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
57 * \param forced If non-zero the playlist file was explicitly
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
58 * given by the user, allow falling back on
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
59 * one filename per line playlist.
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
60 * \return A new playtree or NULL on error.
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
61 */
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
62 play_tree_t*
8925
5c15777f1c07 this patch adds an fallback to playlist (any but the plaintext-list format)
arpi
parents: 8164
diff changeset
63 play_tree_parser_get_play_tree(play_tree_parser_t* p, int forced);
4308
d752f99fd535 Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff changeset
64
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
65 /// Wrapper for play_tree_add_basepath (add base path from file).
10211
4bc481804519 warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
alex
parents: 8925
diff changeset
66 void
4bc481804519 warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
alex
parents: 8925
diff changeset
67 play_tree_add_bpf(play_tree_t* pt, char* filename);
4bc481804519 warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
alex
parents: 8925
diff changeset
68
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
69 ///@}
18265
1a14fde7680d Doxygen Attack! - Chapter 3
albeu
parents: 10211
diff changeset
70
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
71 #endif /* MPLAYER_PLAYTREEPARSER_H */