Add access routine to return driver string

This commit is contained in:
rocky
2003-06-07 01:19:46 +00:00
parent 636c51416f
commit 4a83e68d52
2 changed files with 12 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/* -*- c -*- /* -*- c -*-
$Id: cdio.h,v 1.10 2003/05/27 02:55:58 rocky Exp $ $Id: cdio.h,v 1.11 2003/06/07 01:19:47 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com> Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
@@ -259,6 +259,9 @@ extern "C" {
/* Like above but uses the enumeration instead. */ /* Like above but uses the enumeration instead. */
bool cdio_have_driver (driver_id_t driver_id); bool cdio_have_driver (driver_id_t driver_id);
/* Return a string decribing driver_id. */
const char *cdio_driver_describe (driver_id_t driver_id);
/*! Sets up to read from place specified by source_name and /*! Sets up to read from place specified by source_name and
driver_id This should be called before using any other routine, driver_id This should be called before using any other routine,
except cdio_init. This will call cdio_init, if that hasn't been except cdio_init. This will call cdio_init, if that hasn't been

View File

@@ -1,5 +1,5 @@
/* /*
$Id: cdio.c,v 1.16 2003/05/27 02:55:58 rocky Exp $ $Id: cdio.c,v 1.17 2003/06/07 01:19:46 rocky Exp $
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com> Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -35,7 +35,7 @@
#include <cdio/logging.h> #include <cdio/logging.h>
#include "cdio_private.h" #include "cdio_private.h"
static const char _rcsid[] = "$Id: cdio.c,v 1.16 2003/05/27 02:55:58 rocky Exp $"; static const char _rcsid[] = "$Id: cdio.c,v 1.17 2003/06/07 01:19:46 rocky Exp $";
const char *track_format2str[5] = const char *track_format2str[5] =
@@ -375,6 +375,12 @@ cdio_have_driver(driver_id_t driver_id)
return (*CdIo_all_drivers[driver_id].have_driver)(); return (*CdIo_all_drivers[driver_id].have_driver)();
} }
const char *
cdio_driver_describe(driver_id_t driver_id)
{
return CdIo_all_drivers[driver_id].describe;
}
/*! /*!
Initialize CD Reading and control routines. Should be called first. Initialize CD Reading and control routines. Should be called first.