//====START_GENERATED_PROLOG======================================
//
//
//   COMPONENT_NAME: odother
//
//   CLASSES: none
//
//   ORIGINS: 27
//
//
//   (C) COPYRIGHT International Business Machines Corp. 1995,1996
//   All Rights Reserved
//   Licensed Materials - Property of IBM
//   US Government Users Restricted Rights - Use, duplication or
//   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//
//   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
//   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
//   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
//   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
//   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
//   OR PERFORMANCE OF THIS SOFTWARE.
//
//====END_GENERATED_PROLOG========================================
//
// @(#) 1.1 nt/src/samples/cdplayer/cddevice.h, odcdplayerpart, od96nt, odnt9712d 8/22/96 15:35:29 [ 3/21/97 17:32:44 ]

/*-------------------------------------------------------------------+
|                            CDDevice.h                              |
| ================================================================== |
|                                                                    |
| Description:  CD Device interface.                                 |
|                                                                    |
| Author:       David Kuettel, Summer 1996                           |
|                                                                    |
+-------------------------------------------------------------------*/
#ifndef IBMSample_CDDEVICE
#define IBMSample_CDDEVICE

extern "C" {
	#include <windows.h>
	#include <objbase.h>
}

class CDDevice {
public:
	CDDevice ();
	~CDDevice ();

	void SetNotification (HWND hWnd);	// Window to send command
	                                        // complete notifications to.

	DWORD Open ();				// Open the CDAudio device
	DWORD Close ();				// Close the device

	DWORD Play (BYTE track=1); 		// Begin playing
	DWORD Pause ();				// Pause
	DWORD Resume ();			// Resume playing
	DWORD Stop ();				// Stop playing

	DWORD OpenDoor ();			// Eject the CDROM...
	DWORD CloseDoor ();			// Close the CD door...

	DWORD GetID (LPSTR& id);		// Track length

	DWORD Status (DWORD& mode);		// Device status
	BOOL IsMediaPresent ();			// Is media present?

	DWORD NumTracks ();			// Number of tracks on the CD...
	DWORD Track (DWORD& track);		// Track status
	DWORD TrackLength (BYTE track, DWORD& length); // Track length

private:

	UINT fDeviceID;		// CD device id
	HWND fWindowHandle;	// Window that notifications are sent too.

};
#endif /* IBMSample_CDDevice */
