1 /* @(#)toc.h	1.13 17/07/08 Copyright 1998,1999,2017 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */
2 
3 /*
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * See the file CDDL.Schily.txt in this distribution for details.
10  * A copy of the CDDL is also available via the Internet at
11  * http://www.opensource.org/licenses/cddl1.txt
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file CDDL.Schily.txt from this distribution.
15  */
16 
17 #define	MAXTRK	100	/* maximum of audio tracks (without a hidden track) */
18 
19 extern	unsigned cdtracks;
20 extern	int	have_multisession;
21 extern	int	have_CD_extra;
22 extern	int	have_CD_text;
23 extern	int	have_CDDB;
24 
25 #if	!defined(HAVE_NETDB_H)
26 #undef	USE_REMOTE
27 #else
28 #define	USE_REMOTE	1
29 extern	int		request_titles	__PR((void));
30 #endif
31 
32 extern	int		ReadToc		__PR((void));
33 extern	void		Check_Toc	__PR((void));
34 extern	int		TOC_entries	__PR((unsigned tracks, unsigned char *a, unsigned char *b,
35 						int bvalid));
36 extern	void		toc_entry	__PR((unsigned nr, unsigned flag, unsigned tr,
37 						unsigned char *ISRC,
38 						unsigned long lba, int m, int s, int f));
39 extern	int		patch_real_end	__PR((unsigned long sector));
40 extern	int		no_disguised_audiotracks __PR((void));
41 
42 extern	int		Get_Track	__PR((unsigned long sector));
43 extern	long		FirstTrack	__PR((void));
44 extern	long		LastTrack	__PR((void));
45 extern	long		FirstAudioTrack	__PR((void));
46 extern	long		FirstDataTrack	__PR((void));
47 extern	long		LastAudioTrack	__PR((void));
48 extern	long		Get_EndSector	__PR((unsigned long p_track));
49 extern	long		Get_StartSector	__PR((unsigned long p_track));
50 extern	long		Get_AudioStartSector	__PR((unsigned long p_track));
51 extern	long		Get_LastSectorOnCd	__PR((unsigned long p_track));
52 extern	int		CheckTrackrange	__PR((unsigned long from, unsigned long upto));
53 
54 extern	int		Get_Preemphasis	__PR((unsigned long p_track));
55 extern	int		Get_Channels	__PR((unsigned long p_track));
56 extern	int		Get_Copyright	__PR((unsigned long p_track));
57 extern	int		Get_Datatrack	__PR((unsigned long p_track));
58 extern	int		Get_Tracknumber	__PR((unsigned long p_track));
59 extern	int		useHiddenTrack	__PR((void));
60 extern	unsigned char *	Get_MCN		__PR((void));
61 extern	unsigned char *	Get_ISRC	__PR((unsigned long p_track));
62 
63 extern	unsigned	find_an_off_sector __PR((unsigned lSector, unsigned SectorBurstVal));
64 extern	void		DisplayToc	__PR((void));
65 extern	unsigned	FixupTOC	__PR((unsigned no_tracks));
66 extern	void		calc_cddb_id	__PR((void));
67 extern	void		calc_cdindex_id	__PR((void));
68 extern	void		Read_MCN_ISRC	__PR((unsigned startTrack, unsigned endTrack));
69 extern	unsigned	ScanIndices	__PR((unsigned trackval, unsigned indexval, int bulk));
70 extern	int		handle_cdtext	__PR((void));
71 extern	int		lba_2_msf	__PR((long lba, int *m, int *s, int *f));
72