Copyright | (c) 2019-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 |
Sound.Libcdio.Types
Description
Synopsis
- data Cdio a
- data CdioError
- data CdioErrorType
- data Whence
- data Lsn
- data Track
- data TrackNum
- data TrackFormat
- data SessionArg
- data CdText a
- data CdTextError
- data CdTextErrorType
- data Info
- data Genre
- data Language
- 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
- class LibcdioLogger m
- data LogEntry
- data LogLevel
Disc
A computation within the environment of the data (music or file) stored on a CD. The options for affecting that environment from within are limited by design, as this library is intended for reading discs rather than authoring them.
Instances
Monad Cdio # | |
Functor Cdio # | |
MonadFail Cdio # | Wraps the text in a |
Defined in Sound.Libcdio.Types.Cdio | |
Applicative Cdio # | |
Alternative Cdio # | |
LibcdioLogger Cdio # | |
MonadError CdioError Cdio # | |
Defined in Sound.Libcdio.Types.Cdio |
Associates a well-typed error with human-readable context information.
data CdioErrorType #
Potential situations which may cause a computation to fail.
Instances
Eq CdioErrorType # | |
Defined in Sound.Libcdio.Types.Cdio Methods (==) :: CdioErrorType -> CdioErrorType -> Bool # (/=) :: CdioErrorType -> CdioErrorType -> Bool # | |
Read CdioErrorType # | |
Defined in Sound.Libcdio.Types.Cdio Methods readsPrec :: Int -> ReadS CdioErrorType # readList :: ReadS [CdioErrorType] # | |
Show CdioErrorType # | |
Defined in Sound.Libcdio.Types.Cdio Methods showsPrec :: Int -> CdioErrorType -> ShowS # show :: CdioErrorType -> String # showList :: [CdioErrorType] -> ShowS # |
Which location an offset passed to seek
should be
based on.
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 # | |
Enum Lsn # | |
Eq Lsn # | |
Integral Lsn # | |
Num Lsn # | |
Ord Lsn # | |
Read Lsn # | |
Real Lsn # | |
Defined in Foreign.Libcdio.Types.Internal Methods toRational :: Lsn -> Rational # | |
Show Lsn # | |
Ix Lsn # | |
PrintfArg Lsn # | |
Defined in Foreign.Libcdio.Types.Internal | |
Storable Lsn # | |
Defined in Foreign.Libcdio.Types.Internal | |
Bits Lsn # | |
Defined in Foreign.Libcdio.Types.Internal | |
FiniteBits Lsn # | |
Defined in Foreign.Libcdio.Types.Internal Methods finiteBitSize :: Lsn -> Int # countLeadingZeros :: Lsn -> Int # countTrailingZeros :: Lsn -> Int # |
An index into the segmentation within a write session on a disc.
Instances
Bounded Track # | |
Enum Track # | Note that |
Defined in Foreign.Libcdio.Types.Internal | |
Eq Track # | |
Num Track # | |
Ord Track # | |
Read Track # | |
Show Track # | |
Ix Track # | |
PrintfArg Track # | |
Defined in Foreign.Libcdio.Types.Internal | |
Storable Track # | 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 #
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
data SessionArg #
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
A computation within the environment of metadata (in a particular language) stored on a CD. The options for affecting that environment from within are limited by design, as this library is intended for reading discs rather than authoring them.
Instances
Monad CdText # | |
Functor CdText # | |
MonadFail CdText # | Wraps the text in a |
Defined in Sound.Libcdio.Read.CdText | |
Applicative CdText # | |
Alternative CdText # |
|
LibcdioLogger CdText # | |
MonadError CdTextError CdText # | |
Defined in Sound.Libcdio.Read.CdText Methods throwError :: CdTextError -> CdText a # catchError :: CdText a -> (CdTextError -> CdText a) -> CdText a # |
data CdTextError #
Associates a well-typed error with human-readable context information.
Instances
Eq CdTextError # | |
Defined in Sound.Libcdio.Read.CdText | |
Read CdTextError # | |
Defined in Sound.Libcdio.Read.CdText Methods readsPrec :: Int -> ReadS CdTextError # readList :: ReadS [CdTextError] # readPrec :: ReadPrec CdTextError # readListPrec :: ReadPrec [CdTextError] # | |
Show CdTextError # | |
Defined in Sound.Libcdio.Read.CdText Methods showsPrec :: Int -> CdTextError -> ShowS # show :: CdTextError -> String # showList :: [CdTextError] -> ShowS # | |
MonadError CdTextError CdText # | |
Defined in Sound.Libcdio.Read.CdText Methods throwError :: CdTextError -> CdText a # catchError :: CdText a -> (CdTextError -> CdText a) -> CdText a # |
data CdTextErrorType #
Potential situations which may cause a computation to fail.
Instances
Eq CdTextErrorType # | |
Defined in Sound.Libcdio.Read.CdText Methods (==) :: CdTextErrorType -> CdTextErrorType -> Bool # (/=) :: CdTextErrorType -> CdTextErrorType -> Bool # | |
Read CdTextErrorType # | |
Defined in Sound.Libcdio.Read.CdText Methods readsPrec :: Int -> ReadS CdTextErrorType # readList :: ReadS [CdTextErrorType] # | |
Show CdTextErrorType # | |
Defined in Sound.Libcdio.Read.CdText Methods showsPrec :: Int -> CdTextErrorType -> ShowS # show :: CdTextErrorType -> String # showList :: [CdTextErrorType] -> ShowS # |
Textual metadata describing a single track on a disc, or the disc itself.
Genres recognized in the CD Text standard.
Written languages recognized in the CD Text standard.
Instances
Bounded Language # | |
Enum Language # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq Language # | |
Ord Language # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read Language # | |
Show Language # | |
Hardware
Devices or file types supported by the library.
Instances
Bounded DriverId # | |
Enum DriverId # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq DriverId # | |
Ord DriverId # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read DriverId # | |
Show DriverId # | |
data DriverReturnCode #
Descriptions of various error states which may be returned by driver functions.
Instances
data HardwareInfo #
Information defining the make and model of a (typically physical) device.
Instances
Eq HardwareInfo # | |
Defined in Foreign.Libcdio.Device | |
Read HardwareInfo # | |
Defined in Foreign.Libcdio.Device Methods readsPrec :: Int -> ReadS HardwareInfo # readList :: ReadS [HardwareInfo] # | |
Show HardwareInfo # | |
Defined in Foreign.Libcdio.Device Methods showsPrec :: Int -> HardwareInfo -> ShowS # show :: HardwareInfo -> String # showList :: [HardwareInfo] -> ShowS # | |
Storable HardwareInfo # | |
Defined in Foreign.Libcdio.Device Methods 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 #
Instances
type DriveReadCaps = BitArray DriveCapabilityRead #
The collection of features for reading discs a device provides.
data DriveCapabilityWrite #
Instances
type DriveWriteCaps = BitArray DriveCapabilityWrite #
The collection of features for writing discs a device provides.
data DriveCapabilityMisc #
Miscellaneous properties a device can have, typically describing hardware
features, which are collected in DriveMiscCaps
.
Instances
type DriveMiscCaps = BitArray DriveCapabilityMisc #
The collection of hardware features a device was built with.
type DriveCaps = (DriveReadCaps, DriveWriteCaps, DriveMiscCaps) #
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 # | |
Enum DiscMode # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq DiscMode # | |
Ord DiscMode # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read DiscMode # | |
Show DiscMode # | |
Data
data Filesystem #
Types of filesystem which may be read from a disc.
Instances
data FilesystemClass #
Higher-level descriptions of discs/filesystems.
Instances
type FilesystemClasses = BitArray FilesystemClass #
A collection of disc/filesystem descriptions.
data IsoAnalysis #
A collection of data describing a disc using the ISO 9660 standard.
Instances
Eq IsoAnalysis # | |
Defined in Foreign.Libcdio.CdTypes | |
Read IsoAnalysis # | |
Defined in Foreign.Libcdio.CdTypes Methods readsPrec :: Int -> ReadS IsoAnalysis # readList :: ReadS [IsoAnalysis] # readPrec :: ReadPrec IsoAnalysis # readListPrec :: ReadPrec [IsoAnalysis] # | |
Show IsoAnalysis # | |
Defined in Foreign.Libcdio.CdTypes Methods showsPrec :: Int -> IsoAnalysis -> ShowS # show :: IsoAnalysis -> String # showList :: [IsoAnalysis] -> ShowS # | |
Storable IsoAnalysis # | |
Defined in Foreign.Libcdio.CdTypes Methods 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
class LibcdioLogger m #
An environment which integrates the libcdio logging interface; will almost
always be a Monad
, but as an Applicative
might technically be able to
implement these, that constraint isn't enforced.
Minimal complete definition
Instances
LibcdioLogger IO # | The required initialization function |
LibcdioLogger Cdio # | |
LibcdioLogger CdText # | |
An unstructured message emitted from the library to let the user know what's going on behind the scenes.
Instances
Eq LogEntry # | |
Read LogEntry # | |
Show LogEntry # | |
Storable LogEntry # | |
Defined in Foreign.Libcdio.Logging |
How much detail should be recorded in the logs.
Instances
Bounded LogLevel # | |
Enum LogLevel # | |
Defined in Foreign.Libcdio.Types.Enums | |
Eq LogLevel # | |
Ord LogLevel # | |
Defined in Foreign.Libcdio.Types.Enums | |
Read LogLevel # | |
Show LogLevel # | |