KCompactDisc

wm_cdtext.h
1#ifndef WM_CDTEXT_H
2#define WM_CDTEXT_H
3
4/*
5 * This file is part of WorkMan, the civilized CD player library
6 * Copyright (C) Alexander Kern <alex.kern@gmx.de>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 *
23 * cdtext base structure and defines
24 */
25
26#define MAX_LENGHT_OF_CDTEXT_STRING 162 /* max 160 bytes + 2 * 0x00 by UNICODES */
27#define DATAFIELD_LENGHT_IN_PACK 12
28#define MAX_LANGUAGE_BLOCKS 8
29
30struct cdtext_pack_data_header {
31 unsigned char header_field_id1_typ_of_pack;
32 unsigned char header_field_id2_tracknumber;
33 unsigned char header_field_id3_sequence;
34 unsigned char header_field_id4_block_no;
35 unsigned char text_data_field[DATAFIELD_LENGHT_IN_PACK];
36 unsigned char crc_byte1;
37 unsigned char crc_byte2;
38};
39
40typedef unsigned char cdtext_string[MAX_LENGHT_OF_CDTEXT_STRING];
41
42/* meke it more generic
43 it can be up to 8 blocks with different encoding */
44
45struct cdtext_info_block {
46 /* management */
47 unsigned char block_code;
48 unsigned char block_unicode; /* 0 - single chars, 1 - doublebytes */
49 unsigned char block_encoding; /* orange book -? */
50 cdtext_string* block_encoding_text;
51
52 /* variable part of cdtext */
53 cdtext_string* name;
54 cdtext_string* performer;
55 cdtext_string* songwriter;
56 cdtext_string* composer;
57 cdtext_string* arranger;
58 cdtext_string* message;
59 cdtext_string* UPC_EAN_ISRC_code;
60
61 /* fix part of cdtext */
62 unsigned char binary_disc_identification_info[DATAFIELD_LENGHT_IN_PACK];
63 unsigned char binary_genreidentification_info[DATAFIELD_LENGHT_IN_PACK];
64 unsigned char binary_size_information[DATAFIELD_LENGHT_IN_PACK];
65};
66
67struct cdtext_info {
68 /* sometimes i get hundreds of bytes, without anyone valid pack
69 my CDU-561 for example */
70 int count_of_entries; /* one more because album need one too */
71 int count_of_valid_packs;
72 int count_of_invalid_packs;
73 int valid;
74
75 struct cdtext_info_block *blocks[MAX_LANGUAGE_BLOCKS];
76};
77
78#ifndef IGNORE_FEATURE_LIST
79
80struct feature_list_header {
81 unsigned char lenght_msb;
82 unsigned char lenght_1sb;
83 unsigned char lenght_2sb;
84 unsigned char lenght_lsb;
85 unsigned char reserved1;
86 unsigned char reserved2;
87 unsigned char profile_msb;
88 unsigned char profile_lsb;
89};
90
91struct feature_descriptor_cdread {
92 unsigned char feature_code_msb;
93 unsigned char feature_code_lsb;
94 unsigned char settings;
95 unsigned char add_lenght;
96 unsigned char add_settings;
97 unsigned char reserved1;
98 unsigned char reserved2;
99 unsigned char reserved3;
100};
101
102#endif /* IGNORE_FEATURE_LIST */
103
104struct cdtext_info* wm_cd_get_cdtext(void *p);
105
106#endif /* WM_CDTEXT_H */
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:35 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.