From: Christian P. <cp...@us...> - 2005-02-17 14:28:29
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23674/include/pclasses/System Modified Files: CdRomDevice.h Log Message: Cleanup of CdRomDevice and TrackInfo. Index: CdRomDevice.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/CdRomDevice.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CdRomDevice.h 14 Feb 2005 16:46:46 -0000 1.5 +++ CdRomDevice.h 17 Feb 2005 14:28:07 -0000 1.6 @@ -58,11 +58,11 @@ DiscMixed }; - //! TOC-Entry - class Track; + //! Track-info + class TrackInfo; //! Track-list (the TOC) - typedef std::list<Track> TrackList; + typedef std::list<TrackInfo> TrackList; CdRomDevice(const std::string& path, AccessMode access, ShareMode share) throw(IO::IOError); @@ -82,8 +82,11 @@ void closeTray() throw (IO::IOError); - //! Read TOC (track-list) - TrackList readTOC() throw(IO::IOError); + //! Read track-info + TrackInfo trackInfo(unsigned int trackNum) const throw(IO::IOError); + + //! Read infos for all tracks + TrackList readTracks() throw(IO::IOError); //! Start audio playback void play(uint8_t startMin, uint8_t startSec, uint8_t startFrame, @@ -91,7 +94,8 @@ throw(IO::IOError); //! Play audio tracks - void play(const Track& from, const Track& to) throw(IO::IOError); + void play(const TrackInfo& from, const TrackInfo& to) + throw(IO::IOError); //! Stop audio playback void stop() throw(IO::IOError); @@ -101,47 +105,46 @@ //! Resume audio playback void resume() throw(IO::IOError); + + private: + void* _private; }; //! CD-ROM Trackinfo -class PSYSTEM_EXPORT CdRomDevice::Track { +class PSYSTEM_EXPORT CdRomDevice::TrackInfo { public: - //! Type of Track - enum Type { + //! Format of Track + enum Format { + Unknown, + Audio, + CDI, + XA, Data, - Audio + PSX }; - Track(unsigned int num, Type type, - size_t lba, size_t size); + TrackInfo(unsigned int num, Format f, + size_t lba, size_t length); - ~Track(); + ~TrackInfo(); //! Returns the track-number unsigned int num() const throw(); - //! Returns the track-type - Type type() const throw(); + //! Returns the track-format + Format format() const throw(); //! Returns the LBA of this track size_t lba() const throw(); - size_t size() const throw(); - - uint8_t startMinute() const throw(); - uint8_t startSecond() const throw(); - uint8_t startFrame() const throw(); - uint8_t endMinute() const throw(); - uint8_t endSecond() const throw(); - uint8_t endFrame() const throw(); + //! Returns the LBA length + size_t length() const throw(); private: unsigned int _num; - Type _type; + Format _format; size_t _lba; - size_t _size; - uint8_t _startMsf[3]; - uint8_t _endMsf[3]; + size_t _length; }; } // !namespace System |