More small header changes:
* Remove leading underscores in header preprocessor names * Regularize names to include directory parts in the file name * Untabify files * Update copyright and remove unmaintained cvs $Id$ line The justification for removing leading underscores comes from a CERTS Secure Coding recommendation: https://www.securecoding.cert.org/confluence/display/cplusplus/DCL32-CPP.+Do+not+declare+or+define+a+reserved+identifier See also Savannah bug #35745 https://savannah.gnu.org/bugs/?35745
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_stdio.h,v 1.3 2008/04/22 15:29:11 karl Exp $
|
||||
|
||||
Copyright (C) 2003, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2003, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -19,8 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __CDIO_STDIO_H__
|
||||
#define __CDIO_STDIO_H__
|
||||
#ifndef CDIO_STDIO_H_
|
||||
#define CDIO_STDIO_H_
|
||||
|
||||
#include "_cdio_stream.h"
|
||||
|
||||
@@ -39,7 +37,7 @@ CdioDataSource_t * cdio_stdio_new(const char psz_path[]);
|
||||
void cdio_stdio_destroy(CdioDataSource_t *p_obj);
|
||||
|
||||
|
||||
#endif /* __CDIO_STREAM_STDIO_H__ */
|
||||
#endif /* CDIO_STDIO_H_ */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __CDIO_STREAM_H__
|
||||
#define __CDIO_STREAM_H__
|
||||
#ifndef CDIO_STREAM_H_
|
||||
#define CDIO_STREAM_H_
|
||||
|
||||
#include <cdio/types.h>
|
||||
#include "cdio_private.h"
|
||||
@@ -126,7 +126,7 @@ extern "C" {
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __CDIO_STREAM_H__ */
|
||||
#endif /* CDIO_STREAM_H_ */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CDIO_ASSERT_H__
|
||||
#define __CDIO_ASSERT_H__
|
||||
#ifndef CDIO_ASSERT_H_
|
||||
#define CDIO_ASSERT_H_
|
||||
|
||||
#if defined(__GNUC__) && !defined(__MINGW32__)
|
||||
|
||||
@@ -55,4 +55,4 @@
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __CDIO_ASSERT_H__ */
|
||||
#endif /* CDIO_ASSERT_H_ */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2003, 2004, 2005, 2008, 2009, 2011
|
||||
Copyright (C) 2003, 2004, 2005, 2008, 2009, 2011, 2012
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -19,8 +19,8 @@
|
||||
/* Internal routines for CD I/O drivers. */
|
||||
|
||||
|
||||
#ifndef __CDIO_PRIVATE_H__
|
||||
#define __CDIO_PRIVATE_H__
|
||||
#ifndef CDIO_DRIVER_PRIVATE_H_
|
||||
#define CDIO_DRIVER_PRIVATE_H_
|
||||
|
||||
#if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H)
|
||||
# include "config.h"
|
||||
@@ -62,7 +62,7 @@ extern "C" {
|
||||
|
||||
*/
|
||||
driver_return_code_t (*audio_get_volume)
|
||||
(void *p_env, /*out*/ cdio_audio_volume_t *p_volume);
|
||||
(void *p_env, /*out*/ cdio_audio_volume_t *p_volume);
|
||||
|
||||
/*!
|
||||
Pause playing CD through analog output
|
||||
@@ -77,8 +77,8 @@ extern "C" {
|
||||
@param p_env the CD object to be acted upon.
|
||||
*/
|
||||
driver_return_code_t (*audio_play_msf) ( void *p_env,
|
||||
msf_t *p_start_msf,
|
||||
msf_t *p_end_msf );
|
||||
msf_t *p_start_msf,
|
||||
msf_t *p_end_msf );
|
||||
|
||||
/*!
|
||||
Playing CD through analog output
|
||||
@@ -86,7 +86,7 @@ extern "C" {
|
||||
@param p_env the CD object to be acted upon.
|
||||
*/
|
||||
driver_return_code_t (*audio_play_track_index)
|
||||
( void *p_env, cdio_track_index_t *p_track_index );
|
||||
( void *p_env, cdio_track_index_t *p_track_index );
|
||||
|
||||
/*!
|
||||
Get subchannel information.
|
||||
@@ -94,7 +94,7 @@ extern "C" {
|
||||
@param p_env the CD object to be acted upon.
|
||||
*/
|
||||
driver_return_code_t (*audio_read_subchannel)
|
||||
( void *p_env, cdio_subchannel_t *subchannel );
|
||||
( void *p_env, cdio_subchannel_t *subchannel );
|
||||
|
||||
/*!
|
||||
Resume playing an audio CD.
|
||||
@@ -111,7 +111,7 @@ extern "C" {
|
||||
|
||||
*/
|
||||
driver_return_code_t (*audio_set_volume)
|
||||
( void *p_env, cdio_audio_volume_t *p_volume );
|
||||
( void *p_env, cdio_audio_volume_t *p_volume );
|
||||
|
||||
/*!
|
||||
Stop playing an audio CD.
|
||||
@@ -204,9 +204,9 @@ extern "C" {
|
||||
See cd_types.h for a list of bitmasks for the drive type;
|
||||
*/
|
||||
void (*get_drive_cap) (const void *p_env,
|
||||
cdio_drive_read_cap_t *p_read_cap,
|
||||
cdio_drive_write_cap_t *p_write_cap,
|
||||
cdio_drive_misc_cap_t *p_misc_cap);
|
||||
cdio_drive_read_cap_t *p_read_cap,
|
||||
cdio_drive_write_cap_t *p_write_cap,
|
||||
cdio_drive_misc_cap_t *p_misc_cap);
|
||||
/*!
|
||||
Return the number of of the first track.
|
||||
CDIO_INVALID_TRACK is returned on error.
|
||||
@@ -218,16 +218,16 @@ extern "C" {
|
||||
False is returned if we had an error getting the information.
|
||||
*/
|
||||
bool (*get_hwinfo)
|
||||
( const CdIo_t *p_cdio, /* out*/ cdio_hwinfo_t *p_hw_info );
|
||||
( const CdIo_t *p_cdio, /* out*/ cdio_hwinfo_t *p_hw_info );
|
||||
|
||||
/*! Get the LSN of the first track of the last session of
|
||||
on the CD.
|
||||
|
||||
|
||||
@param p_cdio the CD object to be acted upon.
|
||||
@param i_last_session pointer to the session number to be returned.
|
||||
*/
|
||||
driver_return_code_t (*get_last_session)
|
||||
( void *p_env, /*out*/ lsn_t *i_last_session );
|
||||
( void *p_env, /*out*/ lsn_t *i_last_session );
|
||||
|
||||
/*!
|
||||
Find out if media has changed since the last call.
|
||||
@@ -315,7 +315,7 @@ extern "C" {
|
||||
audio track?
|
||||
*/
|
||||
track_flag_t (*get_track_preemphasis)
|
||||
( const void *p_env, track_t i_track );
|
||||
( const void *p_env, track_t i_track );
|
||||
|
||||
/*!
|
||||
lseek - reposition read/write file offset
|
||||
@@ -336,7 +336,7 @@ extern "C" {
|
||||
from lsn. Returns 0 if no error.
|
||||
*/
|
||||
int (*read_audio_sectors) ( void *p_env, void *p_buf, lsn_t i_lsn,
|
||||
unsigned int i_blocks );
|
||||
unsigned int i_blocks );
|
||||
|
||||
/*!
|
||||
Read a data sector
|
||||
@@ -356,15 +356,15 @@ extern "C" {
|
||||
M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf.
|
||||
*/
|
||||
driver_return_code_t (*read_data_sectors)
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize,
|
||||
uint32_t i_blocks );
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize,
|
||||
uint32_t i_blocks );
|
||||
|
||||
/*!
|
||||
Reads a single mode2 sector from cd device into buf starting
|
||||
from lsn. Returns 0 if no error.
|
||||
*/
|
||||
int (*read_mode2_sector)
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool b_mode2_form2 );
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool b_mode2_form2 );
|
||||
|
||||
/*!
|
||||
Reads i_blocks of mode2 sectors from cd device into data starting
|
||||
@@ -372,15 +372,15 @@ extern "C" {
|
||||
Returns 0 if no error.
|
||||
*/
|
||||
int (*read_mode2_sectors)
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool b_mode2_form2,
|
||||
unsigned int i_blocks );
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool b_mode2_form2,
|
||||
unsigned int i_blocks );
|
||||
|
||||
/*!
|
||||
Reads a single mode1 sector from cd device into buf starting
|
||||
from lsn. Returns 0 if no error.
|
||||
*/
|
||||
int (*read_mode1_sector)
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool mode1_form2 );
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool mode1_form2 );
|
||||
|
||||
/*!
|
||||
Reads i_blocks of mode1 sectors from cd device into data starting
|
||||
@@ -388,24 +388,24 @@ extern "C" {
|
||||
Returns 0 if no error.
|
||||
*/
|
||||
int (*read_mode1_sectors)
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool mode1_form2,
|
||||
unsigned int i_blocks );
|
||||
( void *p_env, void *p_buf, lsn_t i_lsn, bool mode1_form2,
|
||||
unsigned int i_blocks );
|
||||
|
||||
bool (*read_toc) ( void *p_env ) ;
|
||||
|
||||
/*!
|
||||
Run a SCSI MMC command.
|
||||
|
||||
cdio CD structure set by cdio_open().
|
||||
cdio CD structure set by cdio_open().
|
||||
i_timeout_ms time in milliseconds we will wait for the command
|
||||
to complete.
|
||||
cdb_len number of bytes in cdb (6, 10, or 12).
|
||||
cdb CDB bytes. All values that are needed should be set on
|
||||
cdb CDB bytes. All values that are needed should be set on
|
||||
input.
|
||||
b_return_data TRUE if the command expects data to be returned in
|
||||
b_return_data TRUE if the command expects data to be returned in
|
||||
the buffer
|
||||
len Size of buffer
|
||||
buf Buffer for data, both sending and receiving
|
||||
len Size of buffer
|
||||
buf Buffer for data, both sending and receiving
|
||||
|
||||
Returns 0 if command completed successfully.
|
||||
*/
|
||||
@@ -420,7 +420,7 @@ extern "C" {
|
||||
Set the blocksize for subsequent reads.
|
||||
*/
|
||||
driver_return_code_t (*set_blocksize) ( void *p_env,
|
||||
uint16_t i_blocksize );
|
||||
uint16_t i_blocksize );
|
||||
|
||||
/*!
|
||||
Set the drive speed.
|
||||
@@ -437,7 +437,7 @@ extern "C" {
|
||||
struct _CdIo {
|
||||
driver_id_t driver_id; /**< Particular driver opened. */
|
||||
cdio_funcs_t op; /**< driver-specific routines handling
|
||||
implementation*/
|
||||
implementation*/
|
||||
void *env; /**< environment. Passed to routine above. */
|
||||
};
|
||||
|
||||
@@ -464,7 +464,7 @@ extern "C" {
|
||||
bool (*have_driver) (void);
|
||||
CdIo_t *(*driver_open) (const char *psz_source_name);
|
||||
CdIo_t *(*driver_open_am) (const char *psz_source_name,
|
||||
const char *psz_access_mode);
|
||||
const char *psz_access_mode);
|
||||
char *(*get_default_device) (void);
|
||||
bool (*is_device) (const char *psz_source_name);
|
||||
char **(*get_devices) (void);
|
||||
@@ -489,7 +489,7 @@ extern "C" {
|
||||
Use cdio_free_device_list() to free this device_list.
|
||||
*/
|
||||
void cdio_add_device_list(char **device_list[], const char *psz_drive,
|
||||
unsigned int *i_drives);
|
||||
unsigned int *i_drives);
|
||||
|
||||
driver_return_code_t close_tray_bsdi (const char *psz_drive);
|
||||
driver_return_code_t close_tray_freebsd (const char *psz_drive);
|
||||
@@ -512,7 +512,7 @@ extern "C" {
|
||||
@see cdio_open_cd, cdio_open
|
||||
*/
|
||||
CdIo_t * cdio_open_am_netbsd (const char *psz_source,
|
||||
const char *psz_access_mode);
|
||||
const char *psz_access_mode);
|
||||
|
||||
/*! DEPRICATED: use cdio_have_driver().
|
||||
True if AIX driver is available. */
|
||||
@@ -559,4 +559,4 @@ extern "C" {
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __CDIO_PRIVATE_H__ */
|
||||
#endif /* CDIO_DRIVER_PRIVATE_H_ */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2004, 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2004, 2005, 2008, 2011, 2012
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -15,8 +16,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CDIO_CDTEXT_PRIVATE_H__
|
||||
#define __CDIO_CDTEXT_PRIVATE_H__
|
||||
#ifndef CDIO_DRIVER_CDTEXT_PRIVATE_H_
|
||||
#define CDIO_DRIVER_CDTEXT_PRIVATE_H_
|
||||
|
||||
#include <cdio/types.h>
|
||||
|
||||
@@ -136,7 +137,7 @@ cdtext_field_t cdtext_is_field (const char *field);
|
||||
cdtext_lang_t cdtext_is_language (const char *lang);
|
||||
|
||||
|
||||
#endif /* __CDIO_CDTEXT_PRIVATE_H__ */
|
||||
#endif /* CDIO_DRIVER_CDTEXT_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
filemode.h -- file modes common definitions
|
||||
|
||||
Copyright (C) 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2005, 2008, 2011, 2012 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 1985, 1990, 1993, 1998-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -18,8 +18,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __FILEMODE_H__
|
||||
#define __FILEMODE_H__
|
||||
#ifndef CDIO_DRIVER_FILEMODE_H_
|
||||
#define CDIO_DRIVER_FILEMODE_H_
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
@@ -131,4 +131,4 @@
|
||||
# define S_ISCTG(m) (((m) & S_IFMT) == S_IFCTG)
|
||||
#endif
|
||||
|
||||
#endif /* __FILEMODE_H__ */
|
||||
#endif /* CDIO_DRIVER_FILEMODE_H_ */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2004, 2005, 2006, 2008, 2009 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2004, 2005, 2006, 2008, 2009, 2012
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -18,8 +19,8 @@
|
||||
/* Internal routines for CD I/O drivers. */
|
||||
|
||||
|
||||
#ifndef __CDIO_GENERIC_H__
|
||||
#define __CDIO_GENERIC_H__
|
||||
#ifndef CDIO_DRIVER_GENERIC_H_
|
||||
#define CDIO_DRIVER_GENERIC_H_
|
||||
|
||||
#if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H)
|
||||
# include "config.h"
|
||||
@@ -57,7 +58,7 @@ extern "C" {
|
||||
track_t i_tracks; /**< The number of tracks. */
|
||||
|
||||
uint8_t i_joliet_level; /**< 0 = no Joliet extensions.
|
||||
1-3: Joliet level. */
|
||||
1-3: Joliet level. */
|
||||
iso9660_pvd_t pvd;
|
||||
iso9660_svd_t svd;
|
||||
CdIo_t *cdio; /**< a way to call general cdio routines. */
|
||||
@@ -208,7 +209,7 @@ extern "C" {
|
||||
Is this meaningful if not an audio track?
|
||||
*/
|
||||
track_flag_t get_track_copy_permit_generic(void *p_user_data,
|
||||
track_t i_track);
|
||||
track_t i_track);
|
||||
|
||||
/*! Return 1 if track has pre-emphasis, 0 if not, or -1 for error.
|
||||
Is this meaningful if not an audio track?
|
||||
@@ -216,7 +217,7 @@ extern "C" {
|
||||
pre-emphasis is a non linear frequency response.
|
||||
*/
|
||||
track_flag_t get_track_preemphasis_generic(const void *p_user_data,
|
||||
track_t i_track);
|
||||
track_t i_track);
|
||||
|
||||
/*!
|
||||
Read cdtext information for a CdIo object .
|
||||
@@ -230,14 +231,14 @@ extern "C" {
|
||||
|
||||
/*! Read mode 1 or mode2 sectors (using cooked mode). */
|
||||
driver_return_code_t read_data_sectors_generic (void *p_user_data,
|
||||
void *p_buf, lsn_t i_lsn,
|
||||
uint16_t i_blocksize,
|
||||
uint32_t i_blocks);
|
||||
void *p_buf, lsn_t i_lsn,
|
||||
uint16_t i_blocksize,
|
||||
uint32_t i_blocks);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __CDIO_GENERIC_H__ */
|
||||
#endif /* CDIO_DRIVER_GENERIC_H_ */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2004, 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2004, 2005, 2008, 2011, 2012
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,8 +22,8 @@
|
||||
defined before it is included.
|
||||
*/
|
||||
|
||||
#ifndef __CDIO_IMAGE_H__
|
||||
#define __CDIO_IMAGE_H__
|
||||
#ifndef CDIO_DRIVER_IMAGE_H_
|
||||
#define CDIO_DRIVER_IMAGE_H_
|
||||
|
||||
#if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__)
|
||||
# include "config.h"
|
||||
@@ -46,34 +47,34 @@ typedef struct {
|
||||
msf_t start_msf;
|
||||
lba_t start_lba;
|
||||
int start_index;
|
||||
lba_t pregap; /**< pre-gap */
|
||||
lba_t silence; /**< pre-gap with zero audio data */
|
||||
lba_t pregap; /**< pre-gap */
|
||||
lba_t silence; /**< pre-gap with zero audio data */
|
||||
int sec_count; /**< Number of sectors in this track. Does not
|
||||
include pregap */
|
||||
include pregap */
|
||||
int num_indices;
|
||||
flag_t flags; /**< "[NO] COPY", "4CH", "[NO] PREMPAHSIS" */
|
||||
char *isrc; /**< IRSC Code (5.22.4) exactly 12 bytes */
|
||||
char *isrc; /**< IRSC Code (5.22.4) exactly 12 bytes */
|
||||
char *filename;
|
||||
CdioDataSource_t *data_source;
|
||||
off_t offset; /**< byte offset into data_start of track
|
||||
beginning. In cdrdao for example, one
|
||||
filename may cover many tracks and
|
||||
each track would then have a different
|
||||
offset.
|
||||
*/
|
||||
beginning. In cdrdao for example, one
|
||||
filename may cover many tracks and
|
||||
each track would then have a different
|
||||
offset.
|
||||
*/
|
||||
track_format_t track_format;
|
||||
bool track_green;
|
||||
|
||||
trackmode_t mode;
|
||||
uint16_t datasize; /**< How much is in the portion we return
|
||||
back? */
|
||||
back? */
|
||||
uint16_t datastart; /**< Offset from begining of frame
|
||||
that data starts */
|
||||
that data starts */
|
||||
uint16_t endsize; /**< How much stuff at the end to skip over.
|
||||
This stuff may have error correction
|
||||
(EDC, or ECC).*/
|
||||
This stuff may have error correction
|
||||
(EDC, or ECC).*/
|
||||
uint16_t blocksize; /**< total block size = start + size + end */
|
||||
} track_info_t;
|
||||
|
||||
|
||||
#endif /* __CDIO_IMAGE_H__ */
|
||||
#endif /* CDIO_DRIVER_IMAGE_H_ */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2004, 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -24,8 +24,8 @@
|
||||
image.h
|
||||
*/
|
||||
|
||||
#ifndef __CDIO_IMAGE_COMMON_H__
|
||||
#define __CDIO_IMAGE_COMMON_H__
|
||||
#ifndef CDIO_DRIVER_IMAGE_COMMON_H_
|
||||
#define CDIO_DRIVER_IMAGE_COMMON_H_
|
||||
|
||||
typedef struct {
|
||||
/* Things common to all drivers like this.
|
||||
@@ -35,20 +35,20 @@ typedef struct {
|
||||
|
||||
char *psz_cue_name;
|
||||
char *psz_access_mode; /* Just the name of the driver.
|
||||
We add this for regularity with other
|
||||
real CD drivers which has an access mode.
|
||||
*/
|
||||
We add this for regularity with other
|
||||
real CD drivers which has an access mode.
|
||||
*/
|
||||
char *psz_mcn; /* Media Catalog Number (5.22.3)
|
||||
exactly 13 bytes */
|
||||
exactly 13 bytes */
|
||||
track_info_t tocent[CDIO_CD_MAX_TRACKS+1]; /* entry info for each track
|
||||
add 1 for leadout. */
|
||||
add 1 for leadout. */
|
||||
discmode_t disc_mode;
|
||||
|
||||
#ifdef NEED_NERO_STRUCT
|
||||
/* Nero Specific stuff. Note: for the image_free to work, this *must*
|
||||
be last. */
|
||||
bool is_dao; /* True if some of disk at once. False
|
||||
if some sort of track at once. */
|
||||
if some sort of track at once. */
|
||||
uint32_t mtyp; /* Value of MTYP (media type?) tag */
|
||||
uint8_t dtyp; /* Value of DAOX media type tag */
|
||||
|
||||
@@ -91,9 +91,9 @@ discmode_t _get_discmode_image (void *p_user_data);
|
||||
|
||||
*/
|
||||
void _get_drive_cap_image (const void *user_data,
|
||||
cdio_drive_read_cap_t *p_read_cap,
|
||||
cdio_drive_write_cap_t *p_write_cap,
|
||||
cdio_drive_misc_cap_t *p_misc_cap);
|
||||
cdio_drive_read_cap_t *p_read_cap,
|
||||
cdio_drive_write_cap_t *p_write_cap,
|
||||
cdio_drive_misc_cap_t *p_misc_cap);
|
||||
|
||||
/*!
|
||||
Return the number of of the first track.
|
||||
@@ -151,7 +151,7 @@ track_flag_t get_track_copy_permit_image(void *p_user_data, track_t i_track);
|
||||
pre-emphasis is a non linear frequency response.
|
||||
*/
|
||||
track_flag_t get_track_preemphasis_image(const void *p_user_data,
|
||||
track_t i_track);
|
||||
track_t i_track);
|
||||
|
||||
/*! Return the starting LBA for the pregap for track number i_track.
|
||||
Track numbers start at 1.
|
||||
@@ -190,8 +190,8 @@ char *get_track_isrc_image(const void *p_user_data, track_t i_track);
|
||||
*/
|
||||
driver_return_code_t
|
||||
read_data_sectors_image ( void *p_user_data, void *p_buf,
|
||||
lsn_t i_lsn, uint16_t i_blocksize,
|
||||
uint32_t i_blocks );
|
||||
lsn_t i_lsn, uint16_t i_blocksize,
|
||||
uint32_t i_blocks );
|
||||
|
||||
/*!
|
||||
Set the arg "key" with "value" in the source device.
|
||||
@@ -202,4 +202,4 @@ read_data_sectors_image ( void *p_user_data, void *p_buf,
|
||||
*/
|
||||
int _set_arg_image (void *user_data, const char key[], const char value[]);
|
||||
|
||||
#endif /* __CDIO_IMAGE_COMMON_H__ */
|
||||
#endif /* CDIO_DRIVER_IMAGE_COMMON_H_ */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2010 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2010, 2012 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -15,8 +15,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CDIO_MMC_CMD_HELPER_H__
|
||||
#define __CDIO_MMC_CMD_HELPER_H__
|
||||
#ifndef CDIO_DRIVER_MMC_CMD_HELPER_H_
|
||||
#define CDIO_DRIVER_MMC_CMD_HELPER_H_
|
||||
|
||||
/* Boilerplate initialization code to setup running MMC command. We
|
||||
assume variables 'p_cdio', 'p_buf', and 'i_size' are previously
|
||||
@@ -27,22 +27,22 @@
|
||||
3. zeros the buffer (p_buf) using i_size.
|
||||
4. Sets up the command field of cdb to passed in value mmc_cmd.
|
||||
*/
|
||||
#define MMC_CMD_SETUP(mmc_cmd) \
|
||||
mmc_cdb_t cdb = {{0, }}; \
|
||||
\
|
||||
if ( ! p_cdio ) return DRIVER_OP_UNINIT; \
|
||||
if ( ! p_cdio->op.run_mmc_cmd ) return DRIVER_OP_UNSUPPORTED; \
|
||||
\
|
||||
CDIO_MMC_SET_COMMAND(cdb.field, mmc_cmd)
|
||||
#define MMC_CMD_SETUP(mmc_cmd) \
|
||||
mmc_cdb_t cdb = {{0, }}; \
|
||||
\
|
||||
if ( ! p_cdio ) return DRIVER_OP_UNINIT; \
|
||||
if ( ! p_cdio->op.run_mmc_cmd ) return DRIVER_OP_UNSUPPORTED; \
|
||||
\
|
||||
CDIO_MMC_SET_COMMAND(cdb.field, mmc_cmd)
|
||||
|
||||
/* Boilerplate initialization code to setup running MMC read command
|
||||
needs to set the cdb 16-bit length field. See above
|
||||
comment for MMC_CMD_SETUP.
|
||||
*/
|
||||
#define MMC_CMD_SETUP_READ16(mmc_cmd) \
|
||||
MMC_CMD_SETUP(mmc_cmd); \
|
||||
\
|
||||
/* Setup to read header, to get length of data */ \
|
||||
#define MMC_CMD_SETUP_READ16(mmc_cmd) \
|
||||
MMC_CMD_SETUP(mmc_cmd); \
|
||||
\
|
||||
/* Setup to read header, to get length of data */ \
|
||||
CDIO_MMC_SET_READ_LENGTH16(cdb.field, i_size)
|
||||
|
||||
/* Boilerplate code to run a MMC command.
|
||||
@@ -53,11 +53,11 @@
|
||||
'direction' is the SCSI direction (read, write, none) of the
|
||||
command.
|
||||
*/
|
||||
#define MMC_RUN_CMD(direction, i_timeout) \
|
||||
p_cdio->op.run_mmc_cmd(p_cdio->env, \
|
||||
i_timeout, \
|
||||
mmc_get_cmd_len(cdb.field[0]), \
|
||||
&cdb, \
|
||||
direction, i_size, p_buf)
|
||||
#define MMC_RUN_CMD(direction, i_timeout) \
|
||||
p_cdio->op.run_mmc_cmd(p_cdio->env, \
|
||||
i_timeout, \
|
||||
mmc_get_cmd_len(cdb.field[0]), \
|
||||
&cdb, \
|
||||
direction, i_size, p_buf)
|
||||
|
||||
#endif /* __CDIO_MMC_CMD_HELPER_H__ */
|
||||
#endif /* CDIO_DRIVER_MMC_CMD_HELPER_H_ */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
included other routines can be more portable.
|
||||
*/
|
||||
|
||||
#ifndef __CDIO_PORTABLE_H__
|
||||
#define __CDIO_PORTABLE_H__
|
||||
#ifndef CDIO_DRIVER_PORTABLE_H_
|
||||
#define CDIO_DRIVER_PORTABLE_H_
|
||||
|
||||
#if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__)
|
||||
# include "config.h"
|
||||
@@ -51,4 +51,4 @@
|
||||
# define drand48() (rand() / (double)RAND_MAX)
|
||||
#endif
|
||||
|
||||
#endif /* __CDIO_PORTABLE_H__ */
|
||||
#endif /* CDIO_DRIVER_PORTABLE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user