Expand get_cdtext to include a track number. 0 = disc info.

This commit is contained in:
rocky
2004-07-17 02:18:26 +00:00
parent ca69284de2
commit 0c36493f8d
11 changed files with 210 additions and 129 deletions

View File

@@ -1,5 +1,5 @@
/* -*- c -*-
$Id: cdio.h,v 1.56 2004/07/11 14:25:07 rocky Exp $
$Id: cdio.h,v 1.57 2004/07/17 02:18:27 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -160,8 +160,11 @@ extern "C" {
@param obj the CD object that may contain CD-TEXT information.
@return the CD-TEXT object or NULL if obj is NULL
or CD-TEXT information does not exist.
If i_track is 0 or CDIO_CDROM_LEADOUT_TRACK the track returned
is the information assocated with the CD.
*/
const cdtext_t *cdio_get_cdtext (const CdIo *obj);
const cdtext_t *cdio_get_cdtext (CdIo *obj, track_t i_track);
/*!
Get an array of device names in search_devices that have at
@@ -300,7 +303,7 @@ extern "C" {
greater than 0, usually 1.
The "leadout" track is specified either by
using i_track LEADOUT_TRACK or the total tracks+1.
using i_track CDIO_CDROM_LEADOUT_TRACK or the total tracks+1.
@param obj object to get information from
@param i_track the track number we want the LSN for
@@ -314,7 +317,7 @@ extern "C" {
greater than 0, usually 1.
The "leadout" track is specified either by
using i_track LEADOUT_TRACK or the total tracks+1.
using i_track CDIO_CDROM_LEADOUT_TRACK or the total tracks+1.
@param obj object to get information from
@param i_track the track number we want the LSN for
@@ -328,7 +331,7 @@ extern "C" {
greater than 0, usually 1.
The "leadout" track is specified either by
using i_track LEADOUT_TRACK or the total tracks+1.
using i_track CDIO_CDROM_LEADOUT_TRACK or the total tracks+1.
@return true if things worked or false if there is no track entry.
*/

View File

@@ -1,5 +1,5 @@
/*
$Id: cdtext.h,v 1.5 2004/07/16 21:29:24 rocky Exp $
$Id: cdtext.h,v 1.6 2004/07/17 02:18:27 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
adapted from cuetools
@@ -57,35 +57,35 @@ extern "C" {
CDTEXT_INVALID = MAX_CDTEXT_FIELDS
} cdtext_field_t;
/*! Return string representation of the enum values above */
const char *cdtext_field2str (cdtext_field_t i);
/*! Return string representation of the enum values above */
const char *cdtext_field2str (cdtext_field_t i);
/*! Initialize a new cdtext structure.
When the structure is no longer needed, release the
resources using cdtext_delete.
*/
void cdtext_init (cdtext_t *cdtext);
/*! Free memory assocated with cdtext*/
void cdtext_destroy (cdtext_t *cdtext);
/*! returns the CDTEXT value associated with key at the given track
number. NULL is returned if key is CDTEXT_INVALID or the field is
not set.
*/
const char *cdtext_get (cdtext_field_t key, const cdtext_t *cdtext);
/*!
returns enum of keyword if key is a CD-TEXT keyword,
returns MAX_CDTEXT_FIELDS non-zero otherwise.
*/
cdtext_field_t cdtext_is_keyword (const char *key);
/*!
sets cdtext's keyword entry to field
*/
void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext);
/*! Initialize a new cdtext structure.
When the structure is no longer needed, release the
resources using cdtext_delete.
*/
void cdtext_init (cdtext_t *cdtext);
/*! Free memory assocated with cdtext*/
void cdtext_destroy (cdtext_t *cdtext);
/*!
returns the CDTEXT value associated with key. NULL is returned
if key is CDTEXT_INVALID or the field is not set.
*/
const char *cdtext_get (cdtext_field_t key, const cdtext_t *cdtext);
/*!
returns enum of keyword if key is a CD-TEXT keyword,
returns MAX_CDTEXT_FIELDS non-zero otherwise.
*/
cdtext_field_t cdtext_is_keyword (const char *key);
/*!
sets cdtext's keyword entry to field
*/
void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext);
#ifdef __cplusplus
}
#endif /* __cplusplus */