From b418ce925762c671d78799a2ec34fedcc968cf57 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 25 Aug 2002 17:43:04 +0000 Subject: Began CD Reader code --- includes/cdreader.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 includes/cdreader.h (limited to 'includes') diff --git a/includes/cdreader.h b/includes/cdreader.h new file mode 100644 index 0000000..b409c33 --- /dev/null +++ b/includes/cdreader.h @@ -0,0 +1,43 @@ +#ifndef __CDREADER_H__ +#define __CDREADER_H__ +#ifdef __cplusplus + +#include +#include +#include +#include + +class cdreader : public Handle { + public: + cdreader(const String & = "/dev/cdrom") throw (GeneralException); + cdreader(const cdreader &); + virtual ~cdreader() {} + virtual bool CanWrite(); + virtual bool CanRead(); + virtual bool CanSeek(); + virtual ssize_t read(void *buf, size_t count) throw (GeneralException); + virtual off_t seek(off_t, int) throw (GeneralException); + virtual String GetName(); + virtual ssize_t GetSize(); + virtual void getsector(void *, int = -1) throw (GeneralException); + virtual void sectorseek(int); + + protected: + String n; + int sector; +}; + +class Stdin_t : public cdreader { + public: + Stdin_t(); + virtual ~Stdin_t() {} + virtual bool CanSeek(); + virtual String GetName(); +}; + +extern Stdin_t Stdin; + +#else +#error This only works with a C++ compiler +#endif +#endif -- cgit v1.2.3