1.1 --- a/cdrom.h Sat Dec 29 15:23:55 2007 +0100
1.2 +++ b/cdrom.h Sat Dec 29 15:25:21 2007 +0100
1.3 @@ -1,5 +1,5 @@
1.4 /* cdrom.h
1.5 -Copyright (c) 2000-2002 Craig Condit, Stefan Hülswitt.
1.6 +Copyright (c) 2000-2004 Craig Condit, Stefan Hülswitt.
1.7
1.8 Redistribution and use in source and binary forms, with or without
1.9 modification, are permitted provided that the following conditions are met:
1.10 @@ -26,28 +26,33 @@
1.11 #ifndef _CDBACKUP_CDROM_H
1.12 #define _CDBACKUP_CDROM_H
1.13
1.14 -extern struct toc_entry *toc;
1.15 -extern long long cd_used, cd_avail;
1.16 +#ifdef linux
1.17 +#include <linux/cdrom.h>
1.18 +#endif
1.19
1.20 -struct toc_entry {
1.21 - u_char track_no; /* track number */
1.22 - char is_data; /* 1 = data track */
1.23 - char is_cdbackup; /* was it created by CD-Backup? */
1.24 - int sec_start; /* start sector */
1.25 - int sec_end; /* last sector */
1.26 - char id_str[33]; /* recorder id string (32 chars) */
1.27 - char vol_id[33]; /* volume label (32 characters) */
1.28 - char t_stamp[13]; /* time stamp: yyyymmddhhmm */
1.29 - char disk_set; /* disk number */
1.30 -};
1.31 +#ifdef sun
1.32 +#include <sys/cdio.h>
1.33 +#endif
1.34
1.35 -int open_cdr(char *device);
1.36 -void close_cdr(int cd_fd);
1.37 +#ifndef CD_FRAMESIZE
1.38 +#define CD_FRAMESIZE 2048
1.39 +#endif
1.40 +
1.41 +struct cd_header {
1.42 + int start_track, end_track;
1.43 + int used;
1.44 + };
1.45 +
1.46 +struct cd_track {
1.47 + int start_sec;
1.48 + int leadout_size;
1.49 + int is_data;
1.50 + int start_track;
1.51 + };
1.52 +
1.53 void get_param(int fd, unsigned long *ahead, unsigned long *fahead);
1.54 void set_param(int fd, unsigned long ahead, unsigned long fahead);
1.55 -int full_read(int fd, void *buf, int count);
1.56 -int read_toc(int cd_fd, int trackinfos);
1.57 -void free_toc();
1.58 -void print_space();
1.59 +int getCdHeader(struct cd_header *cd);
1.60 +void getCdTrack(int num, struct cd_track *cd);
1.61
1.62 #endif