*.{c,h}: add cdio_get_drive_cap to determine what kind of CDROM device

we've got.

README.libcdio: suggest stonger making a separate package for cd-info
configure.ac: we are in 0.69cvs now
This commit is contained in:
rocky
2004-04-22 03:24:38 +00:00
parent 0be7ab238d
commit 12762d2d7c
8 changed files with 122 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: cdio.c,v 1.43 2004/03/21 03:43:06 rocky Exp $
$Id: cdio.c,v 1.44 2004/04/22 03:24:38 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -37,7 +37,7 @@
#include <cdio/logging.h>
#include "cdio_private.h"
static const char _rcsid[] = "$Id: cdio.c,v 1.43 2004/03/21 03:43:06 rocky Exp $";
static const char _rcsid[] = "$Id: cdio.c,v 1.44 2004/04/22 03:24:38 rocky Exp $";
const char *track_format2str[6] =
@@ -376,6 +376,29 @@ cdio_get_devices_with_cap (char* search_devices[],
return drives_ret;
}
/*!
Return the the kind of drive capabilities of device.
Note: string is malloc'd so caller should free() then returned
string when done with it.
*/
unsigned int
cdio_get_drive_cap (const char *device)
{
cdio_drive_cap_t i_drivetype = CDIO_DRIVE_UNKNOWN;
CdIo *cdio=scan_for_driver(CDIO_MIN_DRIVER, CDIO_MAX_DRIVER,
device);
if (cdio && cdio->op.get_drive_cap) {
i_drivetype=cdio->op.get_drive_cap(cdio->env);
cdio_destroy(cdio);
}
return i_drivetype;
}
/*!
Return a string containing the name of the driver in use.
if CdIo is NULL (we haven't initialized a specific device driver),