types.h File Reference

Common type definitions used pervasively in libcdio. More...

#include <cdio/cdio_config.h>

Go to the source code of this file.

Data Structures

struct  msf_s
 MSF (minute/second/frame) structure. More...
union  cdio_cdrom_addr

Defines

#define UINT16_C(c)   c ## U
#define UINT32_C(c)   c ## U
#define UINT64_C(c)   c ## ULL
#define INT64_C(c)   c ## LL
#define false   0
#define true   1
#define bool   uint8_t
#define GNUC_PRINTF(format_idx, arg_idx)
#define GNUC_SCANF(format_idx, arg_idx)
#define GNUC_FORMAT(arg_idx)
#define GNUC_NORETURN
#define GNUC_CONST
#define GNUC_UNUSED
#define GNUC_PACKED
#define PRAGMA_BEGIN_PACKED
#define PRAGMA_END_PACKED
#define GNUC_LIKELY(x)   (x)
#define GNUC_UNLIKELY(x)   (x)
#define NULL   ((void*) 0)
#define __cd_offsetof(TYPE, MEMBER)   ((size_t) &((TYPE *)0)->MEMBER)
#define msf_t_SIZEOF   3
#define CDIO_INVALID_SESSION   0xFF
#define CDIO_INVALID_LBA   -45301
#define CDIO_INVALID_LSN   CDIO_INVALID_LBA
#define CDIO_MCN_SIZE   13
#define CDIO_ISRC_SIZE   12

Typedefs

typedef uint8_t ubyte
typedef typedefPRAGMA_END_PACKED
struct msf_s 
msf_t
typedef char cdio_utf8_t
 UTF-8 char definition.
typedef uint8_t bitfield_t
typedef int32_t lba_t
typedef int32_t lsn_t
typedef uint8_t track_t
typedef uint8_t session_t
typedef char cdio_mcn_t [CDIO_MCN_SIZE+1]
typedef char cdio_isrc_t [CDIO_ISRC_SIZE+1]
typedef int cdio_fs_anal_t

Enumerations

enum  bool_3way_t { nope = 0, yep = 1, dunno = 2 }
enum  cdio_track_flag {
  CDIO_TRACK_FLAG_NONE = 0x00, CDIO_TRACK_FLAG_PRE_EMPHASIS = 0x01, CDIO_TRACK_FLAG_COPY_PERMITTED = 0x02, CDIO_TRACK_FLAG_DATA = 0x04,
  CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO = 0x08, CDIO_TRACK_FLAG_SCMS = 0x10
}

Variables

PRAGMA_BEGIN_PACKED struct
msf_s 
GNUC_PACKED
 MSF (minute/second/frame) structure.


Detailed Description

Common type definitions used pervasively in libcdio.


Define Documentation

#define __cd_offsetof TYPE,
MEMBER   )     ((size_t) &((TYPE *)0)->MEMBER)
 

#define bool   uint8_t
 

#define CDIO_INVALID_LBA   -45301
 

Constant for invalid LBA. It is 151 less than the most negative LBA -45150. This provide slack for the 150-frame offset in LBA to LSN 150 conversions

#define CDIO_INVALID_LSN   CDIO_INVALID_LBA
 

Constant for invalid LSN

#define CDIO_INVALID_SESSION   0xFF
 

Constant for invalid session number

#define CDIO_ISRC_SIZE   12
 

Number of ASCII bytes in International Standard Recording Codes (ISRC)

#define CDIO_MCN_SIZE   13
 

Number of ASCII bytes in a media catalog number (MCN).

#define false   0
 

#define GNUC_CONST
 

#define GNUC_FORMAT arg_idx   ) 
 

#define GNUC_LIKELY  )     (x)
 

#define GNUC_NORETURN
 

#define GNUC_PACKED
 

#define GNUC_PRINTF format_idx,
arg_idx   ) 
 

#define GNUC_SCANF format_idx,
arg_idx   ) 
 

#define GNUC_UNLIKELY  )     (x)
 

#define GNUC_UNUSED
 

#define INT64_C  )     c ## LL
 

#define msf_t_SIZEOF   3
 

#define NULL   ((void*) 0)
 

#define PRAGMA_BEGIN_PACKED
 

#define PRAGMA_END_PACKED
 

#define true   1
 

#define UINT16_C  )     c ## U
 

#define UINT32_C  )     c ## U
 

#define UINT64_C  )     c ## ULL
 


Typedef Documentation

typedef uint8_t bitfield_t
 

typedef int cdio_fs_anal_t
 

typedef char cdio_isrc_t[CDIO_ISRC_SIZE+1]
 

Type to hold ASCII bytes in a media catalog number (MCN). We include an extra 0 byte so these can be used as C strings.

typedef char cdio_mcn_t[CDIO_MCN_SIZE+1]
 

Type to hold ASCII bytes in a media catalog number (MCN). We include an extra 0 byte so these can be used as C strings.

typedef char cdio_utf8_t
 

UTF-8 char definition.

Type to denote UTF-8 strings.

typedef int32_t lba_t
 

The type of a Logical Block Address. We allow for an lba to be negative to be consistent with an lba, although I'm not sure this this is possible.

typedef int32_t lsn_t
 

The type of a Logical Sector Number. Note that an lba can be negative and the MMC3 specs allow for a conversion of a negative lba.

See also:
msf_t

typedef typedefPRAGMA_END_PACKED struct msf_s msf_t
 

typedef uint8_t session_t
 

The type of a session number 0..99.

typedef uint8_t track_t
 

The type of a track number 0..99.

typedef uint8_t ubyte
 


Enumeration Type Documentation

enum bool_3way_t
 

Enumerator:
nope 
yep 
dunno 

enum cdio_track_flag
 

track flags Q Sub-channel Control Field (4.2.3.3)

Enumerator:
CDIO_TRACK_FLAG_NONE  no flags set
CDIO_TRACK_FLAG_PRE_EMPHASIS  audio track recorded with pre-emphasis
CDIO_TRACK_FLAG_COPY_PERMITTED  digital copy permitted
CDIO_TRACK_FLAG_DATA  data track
CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO  4 audio channels
CDIO_TRACK_FLAG_SCMS  SCMS (5.29.2.7)


Variable Documentation

PRAGMA_BEGIN_PACKED struct msf_s GNUC_PACKED
 

MSF (minute/second/frame) structure.

One CD-ROMs addressing scheme especially used in audio formats (Red Book) is an address by minute, sector and frame which BCD-encoded in three bytes. An alternative format is an lba_t.

Note: the fields in this structure are BCD encoded. Use cdio_to_bcd8() or cdio_from_bcd8() to convert an integer into or out of this format. The format specifier x (not d) can be used if you need to format or print values in this structure.

See also:
lba_t


Generated on Fri Oct 27 06:38:09 2006 for libcdio by  doxygen 1.4.6