// CDHelper.h: interface for the CCDHelper class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CDHELPER_H__8E33AFA4_DECD_11D4_B691_004033A4E3E4__INCLUDED_)
#define AFX_CDHELPER_H__8E33AFA4_DECD_11D4_B691_004033A4E3E4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <windows.h>

class CDUiMan;

class CCDHelper  
{
public:
	CCDHelper();
	virtual ~CCDHelper();

    void SetDUIMan(CDUiMan *pDUiMan) { m_pDUiMan = pDUiMan; };
    int InitDrive();
    int InitCDFS();

    int ExecuteCommand(int iCommand, void *vParam);

protected:
    int SystemCall(int iParam1, int iParam2, int iParam3, int iParam4);

    int RequestCommand(int iCommand, void *vParam);
    int GetCommandStatus(int iCommandHandle, int *iStatus);
    int ExecServer(void);
    int InitializeSystem(void);
    int GetDriveStatus(DWORD *pStatus);
    int G1DMAEnd();
    int RequestDMATransfer();
    int CheckDMATransfer();
    int ReadAbort();
    int Reset();
    int ChangeDataType(DWORD *pdwTypeInfo);

    typedef DWORD (*lSetKMode) (DWORD dwEnter);
    lSetKMode pSetK;
    HMODULE m_hCoreDLL;
    CDUiMan *m_pDUiMan;
};

#endif // !defined(AFX_CDHELPER_H__8E33AFA4_DECD_11D4_B691_004033A4E3E4__INCLUDED_)
