/******************************************************************************
	[CdromInterface.h]

	CD-ROM デバイスを操作するためのインタフェイスを定義します。
	Define interface for controlling CD-ROM device.

	Copyright (C) 2004 Ki

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
******************************************************************************/
#ifndef CDROM_INTERFACE_H_INCLUDED
#define CDROM_INTERFACE_H_INCLUDED

bool CDIF_Open(const char *device_name);
bool CDIF_Close(void);

bool CDIF_Init(void);
void CDIF_Deinit(void);

int32 CDIF_GetFirstTrack();
int32 CDIF_GetLastTrack();
uint32 CDIF_GetTrackStartPositionMSF(int32 track);
uint32 CDIF_GetTrackStartPositionLBA(int32 track);
bool CDIF_ReadSector(uint8* pBuf, uint32 sector, uint32 nSectors);
bool CDIF_ReadSubChannelQ(int8* pBuf, bool bCallback);
uint32 CDIF_GetSectorCountLBA(void);
bool CDIF_ReadAudioSector(uint8 *buffer, uint32 read_sec, uint32 read_sec_start, uint32 read_sec_end );

#endif /* CDROM_INTERFACE_H_INCLUDED */

