nathan@0
|
1 |
/* cdrom.h
|
nathan@4
|
2 |
Copyright (c) 2000-2004 Craig Condit, Stefan Hülswitt.
|
nathan@0
|
3 |
|
nathan@0
|
4 |
Redistribution and use in source and binary forms, with or without
|
nathan@0
|
5 |
modification, are permitted provided that the following conditions are met:
|
nathan@0
|
6 |
|
nathan@0
|
7 |
1. Redistributions of source code must retain the above copyright notice,
|
nathan@0
|
8 |
this list of conditions and the following disclaimer.
|
nathan@0
|
9 |
2. Redistributions in binary form must reproduce the above copyright notice,
|
nathan@0
|
10 |
this list of conditions and the following disclaimer in the documentation
|
nathan@0
|
11 |
and/or other materials provided with the distribution.
|
nathan@0
|
12 |
|
nathan@0
|
13 |
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
nathan@0
|
14 |
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
nathan@0
|
15 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
nathan@0
|
16 |
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
|
nathan@0
|
17 |
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
nathan@0
|
18 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
nathan@0
|
19 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
nathan@0
|
20 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
nathan@0
|
21 |
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
nathan@0
|
22 |
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
nathan@0
|
23 |
SUCH DAMAGE.
|
nathan@0
|
24 |
*/
|
nathan@0
|
25 |
|
nathan@0
|
26 |
#ifndef _CDBACKUP_CDROM_H
|
nathan@0
|
27 |
#define _CDBACKUP_CDROM_H
|
nathan@0
|
28 |
|
nathan@4
|
29 |
#ifdef linux
|
nathan@4
|
30 |
#include <linux/cdrom.h>
|
nathan@4
|
31 |
#endif
|
nathan@0
|
32 |
|
nathan@4
|
33 |
#ifdef sun
|
nathan@4
|
34 |
#include <sys/cdio.h>
|
nathan@4
|
35 |
#endif
|
nathan@2
|
36 |
|
nathan@4
|
37 |
#ifndef CD_FRAMESIZE
|
nathan@4
|
38 |
#define CD_FRAMESIZE 2048
|
nathan@4
|
39 |
#endif
|
nathan@4
|
40 |
|
nathan@4
|
41 |
struct cd_header {
|
nathan@4
|
42 |
int start_track, end_track;
|
nathan@4
|
43 |
int used;
|
nathan@4
|
44 |
};
|
nathan@4
|
45 |
|
nathan@4
|
46 |
struct cd_track {
|
nathan@4
|
47 |
int start_sec;
|
nathan@4
|
48 |
int leadout_size;
|
nathan@4
|
49 |
int is_data;
|
nathan@4
|
50 |
int start_track;
|
nathan@4
|
51 |
};
|
nathan@4
|
52 |
|
nathan@2
|
53 |
void get_param(int fd, unsigned long *ahead, unsigned long *fahead);
|
nathan@2
|
54 |
void set_param(int fd, unsigned long ahead, unsigned long fahead);
|
nathan@4
|
55 |
int getCdHeader(struct cd_header *cd);
|
nathan@4
|
56 |
void getCdTrack(int num, struct cd_track *cd);
|
nathan@0
|
57 |
|
nathan@0
|
58 |
#endif
|