Copyright | (c) 2020-2021 Sam May |
---|---|
License | GPL-3.0-or-later |
Maintainer | ag@eitilt.life |
Stability | stable |
Portability | non-portable (requires libcdio) |
Safe Haskell | None |
Language | Haskell2010 |
The original header defined a rather heterogeneous collection of typedefs,
enums, and preprocessor macros, none of which provide much utility when
separated from their associated functions. Instead of following that design
decision (which only makes sense under the C #include
model), this module
instead exports every type used by the interface without any constructors or
associated functions, for any type signatures which may expose an object only
in passing it along.
types.h
Defines
CDIO_INVALID_LBA
(removed; handled viaNothing
)CDIO_INVALID_LSN
(removed; handled viaNothing
)CDIO_INVALID_SESSION
(removed; handled viaNothing
)CDIO_ISRC_SIZE
->Foreign.Libcdio.Track.
isrcLength
CDIO_MCN_SIZE
->Foreign.Libcdio.Disc.
mcnLength
__cd_offsetof
(removed; structural calculation encapsulated behind the scenes)
Types
CdioDataFree_t
(removed; pointer handling is encapsulated behind the scenes)bitfield_t
(removed; accomplished with greater safety through Data.Array.BitArray)
cdio_cdrom_addr
(removed; never used in library code)cdio_fs_anal_t
->Foreign.Libcdio.CdTypes.
,Filesystem
FilesystemClasses
, andIsoAnalysis
cdio_isrc_t
(removed; never used in library code)cdio_mcn_t
(removed; never used in library code)cdio_track_flag
(removed; identical in all but name toFlag
)cdio_utf8_t
(removed;Char
already serves this purpose)lba_t
->Foreign.Libcdio.Sector.
Lba
lsn_t
->Foreign.Libcdio.Sector.
Lsn
msf_t
->Foreign.Libcdio.Sector.
Msf
session_t
(removed: only used internally)track_t
->Foreign.Libcdio.Track.
Track
Sound.Libcdio.Types
The exact collection of exported types has been changed to reflect those used by the higher-level interface, but the modules are otherwise very similar; many types are shared between the two.
Synopsis
- data Cdio
- data Whence
- data Lba
- data Lsn
- data Msf
- data Bcd
- data Track
- data TrackNum
- data TrackFormat
- data ReadMode
- data SessionArg
- data SubchannelData
- data Field
- data Genre
- data Language
- data Flag
- type Flags = BitArray Flag
- data DriverId
- data DriverReturnCode
- data HardwareInfo
- data DriveCapabilityRead
- type DriveReadCaps = BitArray DriveCapabilityRead
- data DriveCapabilityWrite
- type DriveWriteCaps = BitArray DriveCapabilityWrite
- data DriveCapabilityMisc
- type DriveMiscCaps = BitArray DriveCapabilityMisc
- type DriveCaps = (DriveReadCaps, DriveWriteCaps, DriveMiscCaps)
- data DiscMode
- data Filesystem
- data FilesystemClass
- type FilesystemClasses = BitArray FilesystemClass
- data IsoAnalysis
- data LogEntry
- data LogLevel
Disc
A particular disc reading/writing device, along with the data contained on the loaded disc. Note well that this is always a mutable object, and is not thread-safe; moreover, any function this is passed to may wind up silently modifying the data.
Which location an offset passed to seek
should be
based on.
The type-safe representation of a Logical Block Address, counting sectors
from the very beginning of the write session. See also Lsn
.
Instances
Bounded Lba Source # | |
Enum Lba Source # | |
Eq Lba Source # | |
Integral Lba Source # | |
Num Lba Source # | |
Ord Lba Source # | |
Read Lba Source # | |
Real Lba Source # | |
Defined in Foreign.Libcdio.Types.Internal toRational :: Lba -> Rational # | |
Show Lba Source # | |
Ix Lba Source # | |
PrintfArg Lba Source # | |
Defined in Foreign.Libcdio.Types.Internal formatArg :: Lba -> FieldFormatter # parseFormat :: Lba -> ModifierParser # | |
Storable Lba Source # | |
Defined in Foreign.Libcdio.Types.Internal | |
Bits Lba Source # | |
Defined in Foreign.Libcdio.Types.Internal | |
FiniteBits Lba Source # | |
Defined in Foreign.Libcdio.Types.Internal |
The type-safe representation of a Logical Sector Number, counting sectors
from the start of track 1; this notably excludes the blank session lead-in.
See also Lba
.
Instances
Bounded Lsn Source # | |
Enum Lsn Source # | |
Eq Lsn Source # | |
Integral Lsn Source # | |
Num Lsn Source # | |
Ord Lsn Source # | |
Read Lsn Source # | |
Real Lsn Source # | |
Defined in Foreign.Libcdio.Types.Internal toRational :: Lsn -> Rational # | |
Show Lsn Source # | |
Ix Lsn Source # | |
PrintfArg Lsn Source # | |
Defined in Foreign.Libcdio.Types.Internal formatArg :: Lsn -> FieldFormatter # parseFormat :: Lsn -> ModifierParser # | |
Storable Lsn Source # | |
Defined in Foreign.Libcdio.Types.Internal | |
Bits Lsn Source # | |
Defined in Foreign.Libcdio.Types.Internal | |
FiniteBits Lsn Source # | |
Defined in Foreign.Libcdio.Types.Internal |
Minute/second/frame structure for addresses. Generally only makes sense for audio discs.
A bitwise encoding where the lower four bits encode a number modulo 10, and the upper encode the same divided by 10.
Instances
Bounded Bcd Source # |
|
Enum Bcd Source # | |
Eq Bcd Source # | |
Integral Bcd Source # | |
Num Bcd Source # | |
Ord Bcd Source # | |
Read Bcd Source # | |
Real Bcd Source # | |
Defined in Foreign.Libcdio.Util toRational :: Bcd -> Rational # | |
Show Bcd Source # | |
Ix Bcd Source # | |
PrintfArg Bcd Source # | |
Defined in Foreign.Libcdio.Util formatArg :: Bcd -> FieldFormatter # parseFormat :: Bcd -> ModifierParser # | |
Storable Bcd Source # | |
Defined in Foreign.Libcdio.Util |
An index into the segmentation within a write session on a disc.
Instances
Bounded Track Source # | |
Enum Track Source # | Note that |
Defined in Foreign.Libcdio.Types.Internal | |
Eq Track Source # | |
Num Track Source # | |
Ord Track Source # | |
Read Track Source # | |
Show Track Source # | |
Ix Track Source # | |
PrintfArg Track Source # | |
Defined in Foreign.Libcdio.Types.Internal formatArg :: Track -> FieldFormatter # parseFormat :: Track -> ModifierParser # | |
Storable Track Source # | Note that |
Opaque newtype representing the numeric index of a Track
, while
enforcing the invariants inherant to the specification. Of very limited
utility outside that context.
data TrackFormat Source #
The structure in which data is stored on a segment of a disc. The exact representation of these values is discussed in Foreign.Libcdio.Sector.
Instances
How data is laid out on a disc.
Instances
Bounded ReadMode Source # | |
Enum ReadMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq ReadMode Source # | |
Ord ReadMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read ReadMode Source # | |
Show ReadMode Source # | |
data SessionArg Source #
Metadata about the session in the form of (often freeform) text, providing
a type-safe index to getArg
. Note that not every driver type supports
every item.
The key "access-mode"
is handled separately by getAccessMode
, to better
reflect its restricted outputs.
Instances
CdText
data SubchannelData Source #
Types of information stored on disc subchannels.
Instances
Genres recognized in the CD Text standard.
Written languages recognized in the CD Text standard.
Instances
Bounded Language Source # | |
Enum Language Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq Language Source # | |
Ord Language Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read Language Source # | |
Show Language Source # | |
Metadata describing the layout or type of data on a track.
Hardware
Devices or file types supported by the library.
Instances
Bounded DriverId Source # | |
Enum DriverId Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq DriverId Source # | |
Ord DriverId Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read DriverId Source # | |
Show DriverId Source # | |
data DriverReturnCode Source #
Descriptions of various error states which may be returned by driver functions.
Instances
data HardwareInfo Source #
Information defining the make and model of a (typically physical) device.
Instances
Eq HardwareInfo Source # | |
Defined in Foreign.Libcdio.Device (==) :: HardwareInfo -> HardwareInfo -> Bool # (/=) :: HardwareInfo -> HardwareInfo -> Bool # | |
Read HardwareInfo Source # | |
Defined in Foreign.Libcdio.Device readsPrec :: Int -> ReadS HardwareInfo # readList :: ReadS [HardwareInfo] # | |
Show HardwareInfo Source # | |
Defined in Foreign.Libcdio.Device showsPrec :: Int -> HardwareInfo -> ShowS # show :: HardwareInfo -> String # showList :: [HardwareInfo] -> ShowS # | |
Storable HardwareInfo Source # | |
Defined in Foreign.Libcdio.Device sizeOf :: HardwareInfo -> Int # alignment :: HardwareInfo -> Int # peekElemOff :: Ptr HardwareInfo -> Int -> IO HardwareInfo # pokeElemOff :: Ptr HardwareInfo -> Int -> HardwareInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO HardwareInfo # pokeByteOff :: Ptr b -> Int -> HardwareInfo -> IO () # peek :: Ptr HardwareInfo -> IO HardwareInfo # poke :: Ptr HardwareInfo -> HardwareInfo -> IO () # |
data DriveCapabilityRead Source #
Instances
type DriveReadCaps = BitArray DriveCapabilityRead Source #
The collection of features for reading discs a device provides.
data DriveCapabilityWrite Source #
Instances
type DriveWriteCaps = BitArray DriveCapabilityWrite Source #
The collection of features for writing discs a device provides.
data DriveCapabilityMisc Source #
Miscellaneous properties a device can have, typically describing hardware
features, which are collected in DriveMiscCaps
.
Instances
type DriveMiscCaps = BitArray DriveCapabilityMisc Source #
The collection of hardware features a device was built with.
type DriveCaps = (DriveReadCaps, DriveWriteCaps, DriveMiscCaps) Source #
The three types are usually passed around together, so we can simplify the type signatures using them.
Different types of disc. Modes are combined from several sources, along with some libcdio-specific additions:
- MMC-5 6.33.3.13 (Send CUESHEET)
- MMC-5 Table 400 "DVD Book"
- GNU/Linux
/usr/include/linux/cdrom.h
As C2HS and Haddock don't yet interact well enough to document Enum fields, some of the less obvious mappings include:
DataCdMode
: CD-ROM form 1MixedCdMode
: some combination ofAudioCdMode
,DataCdMode
, andXaCdMode
DvdPlusRecordableMode
: DVD+RDvdPlusReWritableMode
: DVD+RW
Instances
Bounded DiscMode Source # | |
Enum DiscMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq DiscMode Source # | |
Ord DiscMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read DiscMode Source # | |
Show DiscMode Source # | |
Data
data Filesystem Source #
Types of filesystem which may be read from a disc.
Instances
data FilesystemClass Source #
Higher-level descriptions of discs/filesystems.
Instances
type FilesystemClasses = BitArray FilesystemClass Source #
A collection of disc/filesystem descriptions.
data IsoAnalysis Source #
A collection of data describing a disc using the ISO 9660 standard.
Instances
Eq IsoAnalysis Source # | |
Defined in Foreign.Libcdio.CdTypes (==) :: IsoAnalysis -> IsoAnalysis -> Bool # (/=) :: IsoAnalysis -> IsoAnalysis -> Bool # | |
Read IsoAnalysis Source # | |
Defined in Foreign.Libcdio.CdTypes readsPrec :: Int -> ReadS IsoAnalysis # readList :: ReadS [IsoAnalysis] # readPrec :: ReadPrec IsoAnalysis # readListPrec :: ReadPrec [IsoAnalysis] # | |
Show IsoAnalysis Source # | |
Defined in Foreign.Libcdio.CdTypes showsPrec :: Int -> IsoAnalysis -> ShowS # show :: IsoAnalysis -> String # showList :: [IsoAnalysis] -> ShowS # | |
Storable IsoAnalysis Source # | |
Defined in Foreign.Libcdio.CdTypes sizeOf :: IsoAnalysis -> Int # alignment :: IsoAnalysis -> Int # peekElemOff :: Ptr IsoAnalysis -> Int -> IO IsoAnalysis # pokeElemOff :: Ptr IsoAnalysis -> Int -> IsoAnalysis -> IO () # peekByteOff :: Ptr b -> Int -> IO IsoAnalysis # pokeByteOff :: Ptr b -> Int -> IsoAnalysis -> IO () # peek :: Ptr IsoAnalysis -> IO IsoAnalysis # poke :: Ptr IsoAnalysis -> IsoAnalysis -> IO () # |
Logging
An unstructured message emitted from the library to let the user know what's going on behind the scenes.
Instances
Eq LogEntry Source # | |
Read LogEntry Source # | |
Show LogEntry Source # | |
Storable LogEntry Source # | |
Defined in Foreign.Libcdio.Logging |
How much detail should be recorded in the logs.
Instances
Bounded LogLevel Source # | |
Enum LogLevel Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq LogLevel Source # | |
Ord LogLevel Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read LogLevel Source # | |
Show LogLevel Source # | |