libcdio  0.90
cdtext.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2004, 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
3  adapted from cuetools
4  Copyright (C) 2003 Svend Sanjay Sorensen <ssorensen@fastmail.fm>
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
26 
27 #ifndef CDIO_CDTEXT_H_
28 #define CDIO_CDTEXT_H_
29 
30 #include <cdio/types.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35 
36 #define MIN_CDTEXT_FIELD 0
37 #define MAX_CDTEXT_FIELDS 10
38 
40 typedef enum {
53 
55 typedef enum {
86 
92 typedef enum {
196 } cdtext_lang_t;
197 
201 typedef struct cdtext_s cdtext_t;
202 
206 const char *cdtext_genre2str (cdtext_genre_t i);
207 
211 const char *cdtext_lang2str (cdtext_lang_t i);
212 
216 const char *cdtext_field2str (cdtext_field_t i);
217 
224 cdtext_t *cdtext_init (void);
225 
235 int cdtext_data_init(cdtext_t *p_cdtext, uint8_t *wdata, size_t i_data);
236 
242 void cdtext_destroy (cdtext_t *p_cdtext);
243 
250 char *cdtext_get (const cdtext_t *p_cdtext, cdtext_field_t key, track_t track);
251 
262 const char *cdtext_get_const (const cdtext_t *p_cdtext, cdtext_field_t field,
263  track_t track);
264 
270 cdtext_genre_t cdtext_get_genre (const cdtext_t *p_cdtext);
271 
277 cdtext_lang_t cdtext_get_language (const cdtext_t *p_cdtext);
278 
287 bool cdtext_select_language(cdtext_t *p_cdtext, cdtext_lang_t language);
288 
289 /*
290  Returns a list of available languages or NULL.
291 
292  Internally the list is stored in a static array.
293 
294  @param p_cdtext the CD-TEXT object
295 */
296 cdtext_lang_t *cdtext_list_languages (const cdtext_t *p_cdtext);
297 
309 void cdtext_set (cdtext_t *p_cdtext, cdtext_field_t key, const uint8_t *value, track_t track, const char *charset);
310 
311 #ifdef __cplusplus
312 }
313 #endif /* __cplusplus */
314 
315 #endif /* CDIO_CDTEXT_H_ */
316 
317 /*
318  * Local variables:
319  * c-file-style: "gnu"
320  * tab-width: 8
321  * indent-tabs-mode: nil
322  * End:
323  */

Generated for libcdio by doxygen 1.8.3.1