/*  $Id: cd_drive.cpp,v 1.4 2004/02/01 20:28:56 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library 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
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
**
*/

#include "Sound/precomp.h"
#include "API/Sound/cd_drive.h"
#include "cd_drive_generic.h"

/////////////////////////////////////////////////////////////////////////////
// CL_CDDrive construction:

CL_CDDrive::CL_CDDrive()
{
}

CL_CDDrive::CL_CDDrive(const CL_CDDrive &copy) : impl(copy.impl)
{
}

CL_CDDrive::~CL_CDDrive()
{
}

/////////////////////////////////////////////////////////////////////////////
// CL_CDDrive attributes:

std::vector<CL_CDDrive> &CL_CDDrive::get_drives()
{
	static std::vector<CL_CDDrive> drives;
	return drives;
}

std::string CL_CDDrive::get_drive_path()
{
	if (impl) return impl->get_drive_path();
	return std::string();
}

std::string CL_CDDrive::get_cd_name()
{
	if (impl) return impl->get_cd_name();
	return std::string();
}

int CL_CDDrive::get_num_tracks()
{
	if (impl) return impl->get_num_tracks();
	return 0;
}

bool CL_CDDrive::is_playing()
{
	if (impl) return impl->is_playing();
	return false;
}

int CL_CDDrive::get_cur_track()
{
	if (impl) return impl->get_cur_track();
	return 0;
}

int CL_CDDrive::get_cur_frame()
{
	if (impl) return impl->get_cur_frame();
	return 0;
}

/////////////////////////////////////////////////////////////////////////////
// CL_CDDrive operations:

bool CL_CDDrive::play_tracks(int track, int end_track)
{
	if (impl) return impl->play_tracks(track, end_track);
	return false;
}

bool CL_CDDrive::play_frames(int frame, int end_frame)
{
	if (impl) return impl->play_frames(frame, end_frame);
	return false;
}

bool CL_CDDrive::play_track(int track)
{
	if (impl) return impl->play_track(track);
	return false;
}

void CL_CDDrive::stop()
{
	if (impl) impl->stop();
}

void CL_CDDrive::pause()
{
	if (impl) impl->pause();
}

void CL_CDDrive::resume()
{
	if (impl) impl->resume();
}

/////////////////////////////////////////////////////////////////////////////
// CL_CDDrive implementation:
