summaryrefslogtreecommitdiff
path: root/includes/cdreader.h
blob: 39912252b953951e8b553dbd7eac18e2d4d1dc1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#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;
};

#else
#error This only works with a C++ compiler
#endif
#endif