Expand getting drive capabilities. We now have 3 masks where we had

only one before.
This commit is contained in:
rocky
2004-07-17 22:16:46 +00:00
parent c4cd69693c
commit e84c6316b0
33 changed files with 679 additions and 528 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: types.h,v 1.18 2004/06/27 15:29:21 rocky Exp $
$Id: types.h,v 1.19 2004/07/17 22:16:47 rocky Exp $
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -272,59 +272,79 @@ extern "C" {
typedef int cdio_fs_anal_t;
/*! The type of an drive capability bit mask. See below for values*/
typedef uint32_t cdio_drive_cap_t;
typedef uint32_t cdio_drive_read_cap_t;
typedef uint32_t cdio_drive_write_cap_t;
typedef uint32_t cdio_drive_misc_cap_t;
/*!
\brief Drive types returned by cdio_get_drive_cap()
Most are copied from the GNU/Linux the uniform CD-ROM driver header
linux/cdrom.h> NOTE: Setting a bit here means the presence of
a capability.
NOTE: Setting a bit here means the presence of a capability.
*/
#define CDIO_DRIVE_CAP_CLOSE_TRAY 0x00001 /**< caddy systems can't
close... */
#define CDIO_DRIVE_CAP_OPEN_TRAY 0x00002 /**< but can eject. */
#define CDIO_DRIVE_CAP_LOCK 0x00004 /**< disable manual eject */
#define CDIO_DRIVE_CAP_SELECT_SPEED 0x00008 /**< programmable speed */
#define CDIO_DRIVE_CAP_SELECT_DISC 0x00010 /**< select disc from juke-box */
#define CDIO_DRIVE_CAP_MULTI_SESSION 0x00020 /**< read sessions>1 */
#define CDIO_DRIVE_CAP_MCN 0x00040 /**< Medium Catalog Number */
#define CDIO_DRIVE_CAP_MEDIA_CHANGED 0x00080 /**< media changed */
#define CDIO_DRIVE_CAP_CD_AUDIO 0x00100 /**< drive can play CD audio */
#define CDIO_DRIVE_CAP_RESET 0x00200 /**< hard reset device */
#define CDIO_DRIVE_CAP_IOCTLS 0x00400 /**< driver has non-standard
ioctls */
#define CDIO_DRIVE_CAP_DRIVE_STATUS 0x00800 /**< driver implements drive
status */
#define CDIO_DRIVE_CAP_GENERIC_PACKET 0x01000 /**< driver implements generic
packets */
#define CDIO_DRIVE_CAP_CD_R 0x02000 /**< drive can write CD-R */
#define CDIO_DRIVE_CAP_CD_RW 0x04000 /**< drive can read CD-RW */
#define CDIO_DRIVE_CAP_DVD 0x08000 /**< drive can read DVD */
#define CDIO_DRIVE_CAP_DVD_R 0x10000 /**< drive can write DVD-R */
#define CDIO_DRIVE_CAP_DVD_RAM 0x20000 /**< drive can write DVD-RAM */
/**< These are not taken by GNU/Linux cdrom.h (yet) */
#define CDIO_DRIVE_CAP_ERROR 0x00000 /**< Error */
#define CDIO_DRIVE_CAP_FILE 0x40000 /**< drive is really a file, i.e
a CD file image */
#define CDIO_DRIVE_CAP_ERROR 0x40000 /**< Error */
#define CDIO_DRIVE_CAP_UNKNOWN 0x80000 /**< Dunno. It can be on if we
have only partial information
or are not completely certain
*/
*/
#define CDIO_DRIVE_CAP_MISC_CLOSE_TRAY 0x00001 /**< caddy systems can't
close... */
#define CDIO_DRIVE_CAP_MISC_OPEN_TRAY 0x00002 /**< but can eject. */
#define CDIO_DRIVE_CAP_MISC_LOCK 0x00004 /**< disable manual eject */
#define CDIO_DRIVE_CAP_MISC_SELECT_SPEED 0x00008 /**< programmable speed */
#define CDIO_DRIVE_CAP_MISC_SELECT_DISC 0x00010 /**< select disc from
juke-box */
#define CDIO_DRIVE_CAP_MISC_MULTI_SESSION 0x00020 /**< read sessions>1 */
#define CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED 0x00080 /**< media changed */
#define CDIO_DRIVE_CAP_MISC_RESET 0x00100 /**< hard reset device */
#define CDIO_DRIVE_CAP_MISC_FILE 0x20000 /**< drive is really a file,
i.e a CD file image */
/*! Reading masks.. */
#define CDIO_DRIVE_CAP_READ_AUDIO 0x00001 /**< drive can play CD audio */
#define CDIO_DRIVE_CAP_READ_CD_G 0x00002 /**< drive can read CD G */
#define CDIO_DRIVE_CAP_READ_CD_R 0x00004 /**< drive can read CD-R */
#define CDIO_DRIVE_CAP_READ_CD_RW 0x00008 /**< drive can read CD-RW */
#define CDIO_DRIVE_CAP_READ_DVD_R 0x00010 /**< drive can read DVD-R */
#define CDIO_DRIVE_CAP_READ_DVD_PR 0x00020 /**< drive can read DVD+R */
#define CDIO_DRIVE_CAP_READ_DVD_RAM 0x00040 /**< drive can read DVD-RAM */
#define CDIO_DRIVE_CAP_READ_DVD_ROM 0x00080 /**< drive can read DVD-ROM */
#define CDIO_DRIVE_CAP_READ_DVD_RW 0x00100 /**< drive can read DVD-RW */
#define CDIO_DRIVE_CAP_READ_DVD_RPW 0x00200 /**< drive can read DVD+RW */
#define CDIO_DRIVE_CAP_READ_C2_ERRS 0x00400 /**< has C2 error correction */
/*! Writing masks.. */
#define CDIO_DRIVE_CAP_WRITE_CD_R 0x00001 /**< drive can write CD-R */
#define CDIO_DRIVE_CAP_WRITE_CD_RW 0x00002 /**< drive can write CD-R */
#define CDIO_DRIVE_CAP_WRITE_DVD_R 0x00004 /**< drive can write DVD-R */
#define CDIO_DRIVE_CAP_WRITE_DVD_PR 0x00008 /**< drive can write DVD+R */
#define CDIO_DRIVE_CAP_WRITE_DVD_RAM 0x00010 /**< drive can write DVD-RAM */
#define CDIO_DRIVE_CAP_WRITE_DVD_RW 0x00020 /**< drive can write DVD-RAM */
#define CDIO_DRIVE_CAP_WRITE_DVD_RPW 0x00040 /**< drive can write DVD-RAM */
#define CDIO_DRIVE_CAP_WRITE_MT_RAIN 0x00080 /**< Mount Rainier */
#define CDIO_DRIVE_CAP_WRITE_BUF_UN 0x00100 /**< buffer underrun protect'n */
/**< Masks derived from above... */
#define CDIO_DRIVE_CAP_CD_WRITER \
(CDIO_DRIVE_CAP_CD_R|CDIO_DRIVE_CAP_CD_RW)
#define CDIO_DRIVE_CAP_WRITE_CD ( \
CDIO_DRIVE_CAP_WRITE_CD_R \
| CDIO_DRIVE_CAP_WRITE_CD_RW \
)
/**< Has some sort of CD writer ability */
#define CDIO_DRIVE_CAP_CD \
(CDIO_DRIVE_CAP_CD_AUDIO|CDIO_DRIVE_CAP_CD_WRITER)
/**< Has some sort of CD ability */
/**< Masks derived from above... */
#define CDIO_DRIVE_CAP_WRITE_DVD ( \
| CDIO_DRIVE_CAP_WRITE_DVD_R \
| CDIO_DRIVE_CAP_WRITE_DVD_PR \
| CDIO_DRIVE_CAP_WRITE_DVD_RAM \
| CDIO_DRIVE_CAP_WRITE_DVD_RW \
| CDIO_DRIVE_CAP_WRITE_DVD_RPW \
)
/**< Has some sort of DVD writer ability */
#define CDIO_DRIVE_CAP_DVD_WRITER \
(CDIO_DRIVE_CAP_DVD_R|CDIO_DRIVE_CAP_DVD_RAM)
/**< Has some sort of DVD writer ability */
#define CDIO_DRIVE_CAP_WRITE \
(CDIO_DRIVE_CAP_WRITE_CD | CDIO_DRIVE_CAP_WRITE_DVD)
/**< Has some sort of DVD or CD writing ability */
/*!
track flags