summaryrefslogtreecommitdiff
path: root/includes/cdreader.h
diff options
context:
space:
mode:
authorPixel <Pixel>2002-08-25 17:43:04 +0000
committerPixel <Pixel>2002-08-25 17:43:04 +0000
commitb418ce925762c671d78799a2ec34fedcc968cf57 (patch)
tree9b8a72bea58cecc1dc349134c0a419602a334fe8 /includes/cdreader.h
parent38d60726082b04e79edae1c8c797c6dcb8314504 (diff)
Began CD Reader code
Diffstat (limited to 'includes/cdreader.h')
-rw-r--r--includes/cdreader.h43
1 files changed, 43 insertions, 0 deletions
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 <sys/types.h>
+#include <time.h>
+#include <String.h>
+#include <Handle.h>
+
+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