cd_control.h (3532B)
1 /* ------------------------------------------------------------------------ 2 cd_control include file for XfreeCD 3 4 Copyright 1998 by Brian C. Lane 5 nexus@tatoosh.com 6 http://www.tatoosh.com/nexus 7 8 This program is free software; you can redistribute it and/or 9 modify it under the terms of the GNU General Public License 10 as published by the Free Software Foundation; either version 2 11 of the License, or (at your option) any later version. 12 13 This program 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 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 22 ------------------------------------------------------------------------ */ 23 #include <linux/cdrom.h> 24 25 #define CD_DIAG 0x00 26 #define CD_PLAY 0x01 27 #define CD_PAUSE 0x02 28 #define CD_STOP 0x03 29 #define CD_EJECT 0x04 30 #define CD_SEEK_FWD 0x05 31 #define CD_SEEK_REV 0x06 32 #define CD_RESUME 0x07 33 #define CD_VOLUME 0x08 34 #define CD_STATUS 0x09 35 #define CD_TOC 0x0A 36 #define CD_QUIT 0x0B 37 #define CD_SET_EJECT 0x0C 38 #define CD_SET_DEVICE 0x0D 39 40 41 int start_cd_control( int * ); 42 43 44 struct song_info { 45 struct cdrom_tocentry te; /* TOC entry data */ 46 int length; /* Length of this track in sec */ 47 long frame_offset; /* Frame Offset in 1/75 frames */ 48 }; 49 50 struct CDINFO { 51 unsigned long discid; /* cddb disc ID */ 52 int disc; /* disc # being played, for 53 future support for jukeboxes 54 */ 55 int track_length; /* Length of current track */ 56 int cd_length; /* Length of the CD */ 57 int cd_remaining; /* Remaining # of seconds on CD */ 58 int volume; /* Volume setting */ 59 60 /* Info on the current cdrom in the drive */ 61 struct cdrom_tochdr tochdr; /* TOC Headers */ 62 struct cdrom_tocentry leadout; /* Last track info */ 63 struct cdrom_ti ti; /* Track(s) to play 64 Track indexing 65 */ 66 struct cdrom_subchnl sc; /* Drive status */ 67 struct song_info track[99]; /* Info on songs on this CD */ 68 69 GString *title; /* Title of this CD */ 70 GString *category; /* CDDBD category */ 71 GString *name[99]; /* Name of the track */ 72 GString *extd; /* Extended data for the CD */ 73 GString *extt[99]; /* Extended Track info */ 74 int revision; /* CDDB entry revision # */ 75 76 77 /* Data used for talking to the other processes */ 78 int cddbd_cmnd, /* Command for cddbd */ 79 cddbd_stat; /* Status of process */ 80 char server[80]; /* Server to connect to */ 81 int port; /* Port on server */ 82 char line[255]; /* Text from MOTD or SITES */ 83 char local_cddb[1024]; /* Path to local CDDB database */ 84 char device[80]; /* CDROM device */ 85 };