/*
 * See the files COPYING and README for copyright information and how to reach 
 * the author.
 *
 *  $Id: cdio.h,v 1.1 2006/04/17 19:03:45 lordjaxom Exp $
 */

#ifndef VGS_WRAPPERS_CDIO_H
#define VGS_WRAPPERS_CDIO_H

#include <string>

extern "C" {
#include <cdio/cdio.h>
};

namespace wrappers
{
	namespace cdio
	{

		enum media_status
		{
			error,
			no_dvd,
			readable,
			writeable,
			unknown
		};

		class device
		{
		public:
			device(void);
			device(const std::string& device);
			~device();

			bool open(const std::string& device);
			void close(void);
			bool eject(void);

			media_status get_media_status(void);

			operator bool() const { return m_cdio != 0; }
			
		private:
			CdIo*       m_cdio;
			std::string m_device;
		};

	}
}

#endif // VGS_WRAPPERS_CDIO_H
