| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef H_DRIVE |
| 14 |
#define H_DRIVE |
| 15 |
|
| 16 |
#include <boca.h> |
| 17 |
|
| 18 |
#include "database.h" |
| 19 |
|
| 20 |
namespace BoCA |
| 21 |
{ |
| 22 |
enum ConfigurationLevel |
| 23 |
{ |
| 24 |
ConfigurationLevelUnconfigured, |
| 25 |
ConfigurationLevelAutomatic, |
| 26 |
ConfigurationLevelVerified, |
| 27 |
ConfigurationLevelManual, |
| 28 |
ConfigurationLevelManualOverride |
| 29 |
}; |
| 30 |
|
| 31 |
class Drive |
| 32 |
{ |
| 33 |
constants: |
| 34 |
static const Int bytesPerSector = 2352; |
| 35 |
static const Int samplesPerSector = 588; |
| 36 |
private: |
| 37 |
Int FindCurrentDriveNumber() const; |
| 38 |
|
| 39 |
DatabaseEntry GetDatabaseEntry() const; |
| 40 |
Bool ToggleAutoRead(Bool) const; |
| 41 |
public: |
| 42 |
const Config *config; |
| 43 |
|
| 44 |
Device device; |
| 45 |
|
| 46 |
Drive(const Config *, Int); |
| 47 |
~Drive(); |
| 48 |
|
| 49 |
ConfigurationLevel GetConfigurationLevel(Bool = False) const; |
| 50 |
Int GetDetectedOffset() const; |
| 51 |
|
| 52 |
ConfigurationLevel ConfigureOffset(Bool = False, Bool = True) const; |
| 53 |
}; |
| 54 |
}; |
| 55 |
|
| 56 |
#endif |