hfp-cdrom
3
HAL Library

# hfp-cdrom

## Synopsis

                HFPCDROM;
    enum        HFPCDROMDirection;
    #define     HFP_CDROM_MST_TYPE_MASK_LOW
    #define     HFP_CDROM_MST_FMT_NONE
    #define     HFP_CDROM_MST_DATA_120
    #define     HFP_CDROM_MST_AUDIO_120
    #define     HFP_CDROM_MST_COMB_120
    #define     HFP_CDROM_MST_PHOTO_120
    #define     HFP_CDROM_MST_DATA_80
    #define     HFP_CDROM_MST_AUDIO_80
    #define     HFP_CDROM_MST_COMB_80
    #define     HFP_CDROM_MST_PHOTO_80
    #define     HFP_CDROM_MST_TYPE_MASK_HIGH
    #define     HFP_CDROM_MST_CDROM
    #define     HFP_CDROM_MST_CDR
    #define     HFP_CDROM_MST_CDRW
    #define     HFP_CDROM_MST_NO_DISC
    #define     HFP_CDROM_MST_DOOR_OPEN
    #define     HFP_CDROM_MST_FMT_ERROR
    #define     HFP_CDROM_CAP_PAGE
    #define     HFP_CDROM_MST_READ_CDR
    #define     HFP_CDROM_MST_READ_CDRW
    #define     HFP_CDROM_MST_READ_PACKET
    #define     HFP_CDROM_MST_READ_DVDROM
    #define     HFP_CDROM_MST_READ_DVDR
    #define     HFP_CDROM_MST_READ_DVDRAM
    #define     HFP_CDROM_MST_WRITE_CDR
    #define     HFP_CDROM_MST_WRITE_CDRW
    #define     HFP_CDROM_MST_WRITE_TEST
    #define     HFP_CDROM_MST_WRITE_DVDR
    #define     HFP_CDROM_MST_WRITE_DVDRAM
    #define     HFP_CDROM_MSTAUDIO_PLAY
    #define     HFP_CDROM_MST_COMPOSITE
    #define     HFP_CDROM_MST_AUDIO_P1
    #define     HFP_CDROM_MST_AUDIO_P2
    #define     HFP_CDROM_MST_MODE2_f1
    #define     HFP_CDROM_MST_MODE2_f2
    #define     HFP_CDROM_MST_MULTISESSION
    #define     HFP_CDROM_MST_BURNPROOF
    #define     HFP_CDROM_MST_READ_CDDA
    #define     HFP_CDROM_MST_CDDA_STREAM
    #define     HFP_CDROM_MST_COMBINED_RW
    #define     HFP_CDROM_MST_CORRECTED_RW
    #define     HFP_CDROM_MST_SUPPORT_C2
    #define     HFP_CDROM_MST_ISRC
    #define     HFP_CDROM_MST_UPC
    #define     HFP_CDROM_MST_LOCKABLE
    #define     HFP_CDROM_MST_LOCKED
    #define     HFP_CDROM_MST_PREVENT
    #define     HFP_CDROM_MST_EJECT
    #define     HFP_CDROM_MST_MECH_MASK
    #define     HFP_CDROM_MST_MECH_CADDY
    #define     HFP_CDROM_MST_MECH_TRAY
    #define     HFP_CDROM_MST_MECH_POPUP
    #define     HFP_CDROM_MST_MECH_CHANGER
    #define     HFP_CDROM_MST_MECH_CARTRIDGE
    #define     HFP_CDROM_MST_SEP_VOL
    #define     HFP_CDROM_MST_SEP_MUTE
    HFPCDROM*   hfp_cdrom_new                   (const char *path);
    HFPCDROM*   hfp_cdrom_new_from_fd           (int fd,
                                                 const char *path);
    boolean     hfp_cdrom_send_ccb              (HFPCDROM *cdrom,
                                                 char ccb[16],
                                                 int timeout,
                                                 HFPCDROMDirection direction,
                                                 void *data,
                                                 int len,
                                                 char **err);
    boolean     hfp_cdrom_test_unit_ready       (HFPCDROM *cdrom);
    void        hfp_cdrom_free                  (HFPCDROM *cdrom);

## Description

## Details

### HFPCDROM

    typedef struct _HFPCDROM HFPCDROM;

### enum HFPCDROMDirection

    typedef enum
    {
      HFP_CDROM_DIRECTION_NONE,
      HFP_CDROM_DIRECTION_IN,
      HFP_CDROM_DIRECTION_OUT
    } HFPCDROMDirection;

### HFP_CDROM_MST_TYPE_MASK_LOW

    #define HFP_CDROM_MST_TYPE_MASK_LOW	0x0f

### HFP_CDROM_MST_FMT_NONE

    #define HFP_CDROM_MST_FMT_NONE		0x00

### HFP_CDROM_MST_DATA_120

    #define HFP_CDROM_MST_DATA_120		0x01

### HFP_CDROM_MST_AUDIO_120

    #define HFP_CDROM_MST_AUDIO_120		0x02

### HFP_CDROM_MST_COMB_120

    #define HFP_CDROM_MST_COMB_120		0x03

### HFP_CDROM_MST_PHOTO_120

    #define HFP_CDROM_MST_PHOTO_120		0x04

### HFP_CDROM_MST_DATA_80

    #define HFP_CDROM_MST_DATA_80		0x05

### HFP_CDROM_MST_AUDIO_80

    #define HFP_CDROM_MST_AUDIO_80		0x06

### HFP_CDROM_MST_COMB_80

    #define HFP_CDROM_MST_COMB_80		0x07

### HFP_CDROM_MST_PHOTO_80

    #define HFP_CDROM_MST_PHOTO_80		0x08

### HFP_CDROM_MST_TYPE_MASK_HIGH

    #define HFP_CDROM_MST_TYPE_MASK_HIGH	0x70

### HFP_CDROM_MST_CDROM

    #define HFP_CDROM_MST_CDROM		0x00

### HFP_CDROM_MST_CDR

    #define HFP_CDROM_MST_CDR		0x10

### HFP_CDROM_MST_CDRW

    #define HFP_CDROM_MST_CDRW		0x20

### HFP_CDROM_MST_NO_DISC

    #define HFP_CDROM_MST_NO_DISC		0x70

### HFP_CDROM_MST_DOOR_OPEN

    #define HFP_CDROM_MST_DOOR_OPEN		0x71

### HFP_CDROM_MST_FMT_ERROR

    #define HFP_CDROM_MST_FMT_ERROR		0x72

### HFP_CDROM_CAP_PAGE

    #define HFP_CDROM_CAP_PAGE		0x2a

### HFP_CDROM_MST_READ_CDR

    #define HFP_CDROM_MST_READ_CDR		0x0001

### HFP_CDROM_MST_READ_CDRW

    #define HFP_CDROM_MST_READ_CDRW		0x0002

### HFP_CDROM_MST_READ_PACKET

    #define HFP_CDROM_MST_READ_PACKET	0x0004

### HFP_CDROM_MST_READ_DVDROM

    #define HFP_CDROM_MST_READ_DVDROM	0x0008

### HFP_CDROM_MST_READ_DVDR

    #define HFP_CDROM_MST_READ_DVDR		0x0010

### HFP_CDROM_MST_READ_DVDRAM

    #define HFP_CDROM_MST_READ_DVDRAM	0x0020

### HFP_CDROM_MST_WRITE_CDR

    #define HFP_CDROM_MST_WRITE_CDR		0x0100

### HFP_CDROM_MST_WRITE_CDRW

    #define HFP_CDROM_MST_WRITE_CDRW	0x0200

### HFP_CDROM_MST_WRITE_TEST

    #define HFP_CDROM_MST_WRITE_TEST	0x0400

### HFP_CDROM_MST_WRITE_DVDR

    #define HFP_CDROM_MST_WRITE_DVDR	0x1000

### HFP_CDROM_MST_WRITE_DVDRAM

    #define HFP_CDROM_MST_WRITE_DVDRAM	0x2000

### HFP_CDROM_MSTAUDIO_PLAY

    #define HFP_CDROM_MSTAUDIO_PLAY		0x0001

### HFP_CDROM_MST_COMPOSITE

    #define HFP_CDROM_MST_COMPOSITE		0x0002

### HFP_CDROM_MST_AUDIO_P1

    #define HFP_CDROM_MST_AUDIO_P1		0x0004

### HFP_CDROM_MST_AUDIO_P2

    #define HFP_CDROM_MST_AUDIO_P2		0x0008

### HFP_CDROM_MST_MODE2_f1

    #define HFP_CDROM_MST_MODE2_f1		0x0010

### HFP_CDROM_MST_MODE2_f2

    #define HFP_CDROM_MST_MODE2_f2		0x0020

### HFP_CDROM_MST_MULTISESSION

    #define HFP_CDROM_MST_MULTISESSION	0x0040

### HFP_CDROM_MST_BURNPROOF

    #define HFP_CDROM_MST_BURNPROOF		0x0080

### HFP_CDROM_MST_READ_CDDA

    #define HFP_CDROM_MST_READ_CDDA		0x0100

### HFP_CDROM_MST_CDDA_STREAM

    #define HFP_CDROM_MST_CDDA_STREAM	0x0200

### HFP_CDROM_MST_COMBINED_RW

    #define HFP_CDROM_MST_COMBINED_RW	0x0400

### HFP_CDROM_MST_CORRECTED_RW

    #define HFP_CDROM_MST_CORRECTED_RW	0x0800

### HFP_CDROM_MST_SUPPORT_C2

    #define HFP_CDROM_MST_SUPPORT_C2	0x1000

### HFP_CDROM_MST_ISRC

    #define HFP_CDROM_MST_ISRC		0x2000

### HFP_CDROM_MST_UPC

    #define HFP_CDROM_MST_UPC		0x4000

### HFP_CDROM_MST_LOCKABLE

    #define HFP_CDROM_MST_LOCKABLE		0x01

### HFP_CDROM_MST_LOCKED

    #define HFP_CDROM_MST_LOCKED		0x02

### HFP_CDROM_MST_PREVENT

    #define HFP_CDROM_MST_PREVENT		0x04

### HFP_CDROM_MST_EJECT

    #define HFP_CDROM_MST_EJECT		0x08

### HFP_CDROM_MST_MECH_MASK

    #define HFP_CDROM_MST_MECH_MASK		0xe0

### HFP_CDROM_MST_MECH_CADDY

    #define HFP_CDROM_MST_MECH_CADDY	0x00

### HFP_CDROM_MST_MECH_TRAY

    #define HFP_CDROM_MST_MECH_TRAY		0x20

### HFP_CDROM_MST_MECH_POPUP

    #define HFP_CDROM_MST_MECH_POPUP	0x40

### HFP_CDROM_MST_MECH_CHANGER

    #define HFP_CDROM_MST_MECH_CHANGER	0x80

### HFP_CDROM_MST_MECH_CARTRIDGE

    #define HFP_CDROM_MST_MECH_CARTRIDGE	0xa0

### HFP_CDROM_MST_SEP_VOL

    #define HFP_CDROM_MST_SEP_VOL		0x01

### HFP_CDROM_MST_SEP_MUTE

    #define HFP_CDROM_MST_SEP_MUTE		0x02

### hfp_cdrom_new ()

    HFPCDROM*   hfp_cdrom_new                   (const char *path);

`path` :

Returns :

### hfp_cdrom_new_from_fd ()

    HFPCDROM*   hfp_cdrom_new_from_fd           (int fd,
                                                 const char *path);

`fd` :

`path` :

Returns :

### hfp_cdrom_send_ccb ()

    boolean     hfp_cdrom_send_ccb              (HFPCDROM *cdrom,
                                                 char ccb[16],
                                                 int timeout,
                                                 HFPCDROMDirection direction,
                                                 void *data,
                                                 int len,
                                                 char **err);

`cdrom` :

`ccb` :

`timeout` :

`direction` :

`data` :

`len` :

`err` :

Returns :

### hfp_cdrom_test_unit_ready ()

    boolean     hfp_cdrom_test_unit_ready       (HFPCDROM *cdrom);

`cdrom` :

Returns :

### hfp_cdrom_free ()

    void        hfp_cdrom_free                  (HFPCDROM *cdrom);

`cdrom` :