Add generic mode_sense(), add cdio_have_atapi() and use these.
API number bumped Add bool_3way_t (yes, nope, dunno)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* -*- c -*-
|
||||
$Id: cdio.h,v 1.79 2005/02/05 14:42:28 rocky Exp $
|
||||
$Id: cdio.h,v 1.80 2005/02/10 01:59:05 rocky Exp $
|
||||
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -32,7 +32,7 @@
|
||||
/** Application Interface or Protocol version number. If the public
|
||||
* interface changes, we increase this number.
|
||||
*/
|
||||
#define CDIO_API_VERSION 4
|
||||
#define CDIO_API_VERSION 5
|
||||
|
||||
#include <cdio/version.h>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* -*- c -*-
|
||||
$Id: device.h,v 1.12 2005/02/06 11:13:37 rocky Exp $
|
||||
$Id: device.h,v 1.13 2005/02/10 01:59:06 rocky Exp $
|
||||
|
||||
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -282,6 +282,9 @@ extern "C" {
|
||||
*/
|
||||
int cdio_get_media_changed(CdIo_t *p_cdio);
|
||||
|
||||
/*! True if CD-ROM understand ATAPI commands. */
|
||||
bool_3way_t cdio_have_atapi (CdIo_t *p_cdio);
|
||||
|
||||
/*! True if AIX driver is available. */
|
||||
bool cdio_have_aix (void);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: mmc.h,v 1.5 2005/02/09 02:50:47 rocky Exp $
|
||||
$Id: mmc.h,v 1.6 2005/02/10 01:59:06 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -391,7 +391,7 @@ uint8_t mmc_get_cmd_len(uint8_t scsi_cmd);
|
||||
Set the block size for subsequest read requests, via an MMC
|
||||
MODE_SENSE 6 command.
|
||||
*/
|
||||
int mmc_get_blocksize ( const CdIo_t *p_cdio );
|
||||
int mmc_get_blocksize ( CdIo_t *p_cdio );
|
||||
|
||||
/*!
|
||||
Get the lsn of the end of the CD
|
||||
@@ -416,10 +416,10 @@ discmode_t mmc_get_discmode( const CdIo_t *p_cdio );
|
||||
Get drive capabilities for a device.
|
||||
@return the drive capabilities.
|
||||
*/
|
||||
void mmc_get_drive_cap (const CdIo_t *p_cdio,
|
||||
/*out*/ cdio_drive_read_cap_t *p_read_cap,
|
||||
/*out*/ cdio_drive_write_cap_t *p_write_cap,
|
||||
/*out*/ cdio_drive_misc_cap_t *p_misc_cap);
|
||||
void mmc_get_drive_cap ( CdIo_t *p_cdio,
|
||||
/*out*/ cdio_drive_read_cap_t *p_read_cap,
|
||||
/*out*/ cdio_drive_write_cap_t *p_write_cap,
|
||||
/*out*/ cdio_drive_misc_cap_t *p_misc_cap);
|
||||
|
||||
/*!
|
||||
Get the DVD type associated with cd object.
|
||||
@@ -465,15 +465,29 @@ char * mmc_get_mcn ( const CdIo_t *p_cdio );
|
||||
routine could probably return the sincle mmc_feature_interface_t.
|
||||
@return true if we have the interface and false if not.
|
||||
*/
|
||||
bool mmc_have_interface( const CdIo_t *p_cdio,
|
||||
mmc_feature_interface_t e_interface );
|
||||
bool_3way_t mmc_have_interface( CdIo_t *p_cdio,
|
||||
mmc_feature_interface_t e_interface );
|
||||
|
||||
/*! Run a MODE_SENSE_10 and put the results in p_buf */
|
||||
int mmc_mode_sense_10( const CdIo_t *p_cdio, void *p_buf, int i_size,
|
||||
/*! Run a MODE_SENSE command (6- or 10-byte version)
|
||||
and put the results in p_buf
|
||||
@return DRIVER_OP_SUCCESS if we ran the command ok.
|
||||
*/
|
||||
int mmc_mode_sense( CdIo_t *p_cdio, /*out*/ void *p_buf, int i_size,
|
||||
int page);
|
||||
|
||||
|
||||
/*! Run a MODE_SENSE command (10-byte version)
|
||||
and put the results in p_buf
|
||||
@return DRIVER_OP_SUCCESS if we ran the command ok.
|
||||
*/
|
||||
int mmc_mode_sense_10( CdIo_t *p_cdio, /*out*/ void *p_buf, int i_size,
|
||||
int page);
|
||||
|
||||
/*! Run a MODE_SENSE_6 and put the results in p_buf */
|
||||
int mmc_mode_sense_6( const CdIo_t *p_cdio, void *p_buf, int i_size,
|
||||
/*! Run a MODE_SENSE command (6-byte version)
|
||||
and put the results in p_buf
|
||||
@return DRIVER_OP_SUCCESS if we ran the command ok.
|
||||
*/
|
||||
int mmc_mode_sense_6( CdIo_t *p_cdio, /*out*/ void *p_buf, int i_size,
|
||||
int page);
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: types.h,v 1.25 2005/01/04 04:33:36 rocky Exp $
|
||||
$Id: types.h,v 1.26 2005/02/10 01:59:06 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -192,6 +192,12 @@ extern "C" {
|
||||
|
||||
#define msf_t_SIZEOF 3
|
||||
|
||||
typedef enum {
|
||||
nope = 0,
|
||||
yep = 1,
|
||||
dunno = 2
|
||||
} bool_3way_t;
|
||||
|
||||
/* type used for bit-fields in structs (1 <= bits <= 8) */
|
||||
#if defined(__GNUC__)
|
||||
/* this is strict ISO C99 which allows only 'unsigned int', 'signed
|
||||
|
||||
Reference in New Issue
Block a user