{-# OPTIONS_HADDOCK not-home #-}

{-|
Description:    Common types used in the module-mirroring interface.

Copyright:      (c) 2020-2021 Sam May
License:        GPL-3.0-or-later
Maintainer:     ag@eitilt.life

Stability:      stable
Portability:    non-portable (requires libcdio)

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 via 'Nothing')
* @CDIO_INVALID_LSN@                (removed; handled via 'Nothing')
* @CDIO_INVALID_SESSION@            (removed; handled via 'Nothing')
* @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")
* @bool_3way_t@                     -> 'Maybe' 'Bool'

    - @nope@                        -> 'Just' 'False'
    - @yep@                         -> 'Just' 'True'
    - @dunno@                       -> 'Nothing'

* @cdio_cdrom_addr@                 (removed; never used in library code)
* @cdio_fs_anal_t@                  -> @"Foreign.Libcdio.CdTypes".'Filesystem'@, 'FilesystemClasses', and 'IsoAnalysis'
* @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 to 'Flag')
* @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'@

    - @m@                           -> 'minute'
    - @s@                           -> 'second'
    - @f@                           -> 'frame'

* @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.
-}
module Foreign.Libcdio.Types
    ( -- * Disc
      Cdio
    , Whence
    , Lba
    , Lsn
    , Msf
    , Bcd
    , Track
    , TrackNum
    , TrackFormat
    , ReadMode
    , SessionArg
      -- * CdText
    , SubchannelData
    , Field
    , Genre
    , Language
    , Flag
    , Flags
      -- * Hardware
    , DriverId
    , DriverReturnCode
    , HardwareInfo
    , DriveCapabilityRead
    , DriveReadCaps
    , DriveCapabilityWrite
    , DriveWriteCaps
    , DriveCapabilityMisc
    , DriveMiscCaps
    , DriveCaps
    , DiscMode
      -- * Data
    , Filesystem
    , FilesystemClass
    , FilesystemClasses
    , IsoAnalysis
      -- * Logging
    , LogEntry
    , LogLevel
    ) where


import Foreign.Libcdio.CdText
import Foreign.Libcdio.CdTypes
import Foreign.Libcdio.Device
import Foreign.Libcdio.Disc
import Foreign.Libcdio.Logging
import Foreign.Libcdio.Read
import Foreign.Libcdio.Sector
import Foreign.Libcdio.Track
import Foreign.Libcdio.Util